FlxpointAPI Help CenterBeta

Create/Update Inventory

posthttps://api.flxpoint.com/inventory/parents

Use this when you want to create inventory data through the API.

🔑 X-API-TOKEN⏱ 2 req/sToken: Account · Source · Channel

This page explains the endpoint. To send a live test request, use the interactive tester in Stoplight or your own Postman / HTTP client.

Create or update up to 20 parents with variants at a time. This endpoint performs a full update of all data passed. Excluded fields will remain unchanged. This means that explicitly passing null for 'title' will null out title, but skipping passing any json for 'title' will preserve the previous value. For updating just variants (that already exist) with new prices/quantities see the `PUT Inventory Variants` endpoint.

Request

Query parameters
  • modifyParentOptionsquerystring

    Should options of the parent be modified

    allowednonereplacemergedeleteIncluded
  • modifyVariantOptionsquerystring

    Should options of the variant be modified

    allowednonereplacemergedeleteIncluded
  • modifyParentImagesquerystring

    Should images of the parent be modified

    allowednonereplacemergedeleteIncluded
  • modifyVariantImagesquerystring

    Should images of the variant be modified

    allowednonereplacemergedeleteIncluded
  • modifyParentCustomFieldsquerystring

    Should custom fields of the parent be modified

    allowednonereplacemergedeleteIncluded
  • modifyVariantCustomFieldsquerystring

    Should custom fields of the variant be modified

    allowednonereplacemergedeleteIncluded
  • modifyVariantCustomAggregateFieldsquerystring

    Should custom aggregate fields of the variant be modified

    allowednonereplacemergedeleteIncluded
  • modifyAttributesquerystring

    Should attributes be modified

    allowednonereplacemergedeleteIncluded
Bodyapplication/json
array[InventoryParentCreateOrUpdate]
sourceIdinteger
Only required to be passed if you are using an account token type
skustringrequired
titlestring | null
descriptionstring | null
manufacturerstring | null
archivedboolean | null
imagesarray[InventoryImageCreateOrUpdate]
urlstringrequired
sortOrderinteger
optionsarray[InventoryParentOptionCreateOrUpdate]
namestringrequired
attributesarray[InventoryParentAttributeCreateOrUpdate]
namestringrequired
valuestringrequired
customFieldsarray[InventoryParentCustomFieldCreateOrUpdate]
namestringrequired
valuestringrequired
variantsarray[InventoryVariantCreateOrUpdate]
supplierVariantIdstring | null
shippingCostnumber | null
dropshipFeenumber | null
inventoryListPricenumber | null
referenceIdentifierstring | null
quantityinteger | null
skustring | nullrequired
masterSkustring | null
If available from your data source populate with your primary product master SKU to enable easily linking to your existing products or as the foundation to build new product master SKUs from.
titlestring | null
mpnstring | null
upcstring | null
eanstring | null
asinstring | null
msrpnumber | null
mapnumber | null
weightnumber | null
lengthnumber | null
widthnumber | null
heightnumber | null
archivedboolean | null
costnumber | null
weightUnitobject
handlestring
allowedpoundouncegramkilogram
abbreviatedHandlestring
allowedlbozgkg
dimensionUnitobject
handlestring
allowedinchcentimeter
abbreviatedHandlestring
allowedincm
dimensionalWeightnumber | null
imagesarray[InventoryImageCreateOrUpdate]
urlstringrequired
sortOrderinteger
optionsarray[InventoryVariantOptionCreateOrUpdate]
namestringrequired
valuestringrequired
customFieldsarray[InventoryVariantCustomFieldCreateOrUpdate]
namestring
valuestring
allowBackordersboolean | null
binLocationstring | null
An identifier representing the location of a bin in an internal warehouse
descriptionstring | null
requiresFflboolean | null
Indicate if FFL information will be required to fulfill this inventory variant
categoryOnestring | null
categoryTwostring | null
categoryThreestring | null

Example request

post/inventory/parents
curl -X POST "https://api.flxpoint.com/inventory/parents" \
  -H "Accept: application/json" \
  -H "X-API-TOKEN: YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[
         {
           "sourceId": 0,
           "sku": "string",
           "title": "string",
           "description": "string",
           "manufacturer": "string",
           "archived": true,
           "images": [
             {
               "url": "string",
               "sortOrder": 0
             }
           ],
           "options": [
             {
               "name": "string"
             }
           ],
           "attributes": [
             {
               "name": "string",
               "value": "string"
             }
           ],
           "customFields": [
             {
               "name": "string",
               "value": "string"
             }
           ],
           "variants": [
             {
               "supplierVariantId": "string",
               "shippingCost": 0,
               "dropshipFee": 0,
               "inventoryListPrice": 0,
               "referenceIdentifier": "string",
               "quantity": 0,
               "sku": "string",
               "masterSku": "string",
               "title": "string",
               "mpn": "string",
               "upc": "string",
               "ean": "string",
               "asin": "string",
               "msrp": 0,
               "map": 0,
               "weight": 0,
               "length": 0,
               "width": 0,
               "height": 0,
               "archived": true,
               "cost": 0,
               "weightUnit": {
                 "handle": null,
                 "abbreviatedHandle": null
               },
               "dimensionUnit": {
                 "handle": null,
                 "abbreviatedHandle": null
               },
               "dimensionalWeight": 0,
               "images": [
                 null
               ],
               "options": [
                 null
               ],
               "customFields": [
                 null
               ],
               "allowBackorders": true,
               "binLocation": "string",
               "description": "string",
               "requiresFfl": true
             }
           ],
           "categoryOne": "string",
           "categoryTwo": "string",
           "categoryThree": "string"
         }
       ]'
Example body · application/json
[
  {
    "sourceId": 0,
    "sku": "string",
    "title": "string",
    "description": "string",
    "manufacturer": "string",
    "archived": true,
    "images": [
      {
        "url": "string",
        "sortOrder": 0
      }
    ],
    "options": [
      {
        "name": "string"
      }
    ],
    "attributes": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "customFields": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "variants": [
      {
        "supplierVariantId": "string",
        "shippingCost": 0,
        "dropshipFee": 0,
        "inventoryListPrice": 0,
        "referenceIdentifier": "string",
        "quantity": 0,
        "sku": "string",
        "masterSku": "string",
        "title": "string",
        "mpn": "string",
        "upc": "string",
        "ean": "string",
        "asin": "string",
        "msrp": 0,
        "map": 0,
        "weight": 0,
        "length": 0,
        "width": 0,
        "height": 0,
        "archived": true,
        "cost": 0,
        "weightUnit": {
          "handle": null,
          "abbreviatedHandle": null
        },
        "dimensionUnit": {
          "handle": null,
          "abbreviatedHandle": null
        },
        "dimensionalWeight": 0,
        "images": [
          null
        ],
        "options": [
          null
        ],
        "customFields": [
          null
        ],
        "allowBackorders": true,
        "binLocation": "string",
        "description": "string",
        "requiresFfl": true
      }
    ],
    "categoryOne": "string",
    "categoryTwo": "string",
    "categoryThree": "string"
  }
]

Responses

200OKapplication/json
array[InventoryParentSaveResponse]
idinteger
If the parent was created or updated this will be populated. If the parent did not exist and failed to be created this will not be populated
skustring
successboolean
Whether or not the parent was successfully created/updated. If this is false the `errors` property will contain information that you can use to troubleshoot the failure.
resultInventoryModificationResult
allowednewchangedunchangedarchived
parentOptionsResultobject
savedinteger
unchangedinteger
deletedinteger
parentImagesResultobject
savedinteger
unchangedinteger
deletedinteger
parentCustomFieldsResultobject
savedinteger
unchangedinteger
deletedinteger
parentAttributesResultobject
savedinteger
unchangedinteger
deletedinteger
variantsarray[InventoryVariantSaveResponse]
idinteger (int64)
If the variant was created or updated this will be populated. If the variant did not exist and failed to be created this will not be populated
skustring
resultInventoryModificationResult
allowednewchangedunchangedarchived
variantOptionsResultobject
savedinteger
unchangedinteger
deletedinteger
variantImagesResultobject
savedinteger
unchangedinteger
deletedinteger
variantCustomFieldsResultobject
savedinteger
unchangedinteger
deletedinteger
successboolean
Whether or not the variant was successfully created/updated. If this is false the `errors` property will contain information that you can use to troubleshoot the failure.
errorsarray[GenericApiError]
errorstring
A generalized error message, may or may not be fit for human consumption.
dataobject
Data points that could be useful in debugging the error.
No properties documented.
errorsarray[GenericApiError]
errorstring
A generalized error message, may or may not be fit for human consumption.
dataobject
Data points that could be useful in debugging the error.
No properties documented.
Example response
[
  {
    "id": 0,
    "sku": "string",
    "success": true,
    "result": "new",
    "parentOptionsResult": {
      "saved": 0,
      "unchanged": 0,
      "deleted": 0
    },
    "parentImagesResult": {
      "saved": 0,
      "unchanged": 0,
      "deleted": 0
    },
    "parentCustomFieldsResult": {
      "saved": 0,
      "unchanged": 0,
      "deleted": 0
    },
    "parentAttributesResult": {
      "saved": 0,
      "unchanged": 0,
      "deleted": 0
    },
    "variants": [
      {
        "id": 0,
        "sku": "string",
        "result": "new",
        "variantOptionsResult": {
          "saved": null,
          "unchanged": null,
          "deleted": null
        },
        "variantImagesResult": {
          "saved": null,
          "unchanged": null,
          "deleted": null
        },
        "variantCustomFieldsResult": {
          "saved": null,
          "unchanged": null,
          "deleted": null
        },
        "success": true,
        "errors": [
          null
        ]
      }
    ],
    "errors": [
      {
        "error": "string",
        "data": {}
      }
    ]
  }
]
401Unauthorized

No schema documented for this status.

OpenAPI fragment
{
  "post": {
    "summary": "Create/Update Inventory",
    "description": "Create or update up to 20 parents with variants at a time. This endpoint performs a full update of all data passed. Excluded fields will remain unchanged. This means that explicitly passing null for 'title' will null out title, but skipping passing any json for 'title' will preserve the previous value. For updating just variants (that already exist) with new prices/quantities see the `PUT Inventory Variants` endpoint.",
    "parameters": [
      {
        "name": "modifyParentOptions",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "none",
            "replace",
            "merge",
            "deleteIncluded"
          ]
        },
        "description": "Should options of the parent be modified"
      },
      {
        "name": "modifyVariantOptions",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "none",
            "replace",
            "merge",
            "deleteIncluded"
          ]
        },
        "description": "Should options of the variant be modified"
      },
      {
        "name": "modifyParentImages",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "none",
            "replace",
            "merge",
            "deleteIncluded"
          ]
        },
        "description": "Should images of the parent be modified"
      },
      {
        "name": "modifyVariantImages",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "none",
            "replace",
            "merge",
            "deleteIncluded"
          ]
        },
        "description": "Should images of the variant be modified"
      },
      {
        "name": "modifyParentCustomFields",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "none",
            "replace",
            "merge",
            "deleteIncluded"
          ]
        },
        "description": "Should custom fields of the parent be modified"
      },
      {
        "name": "modifyVariantCustomFields",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "none",
            "replace",
            "merge",
            "deleteIncluded"
          ]
        },
        "description": "Should custom fields of the variant be modified"
      },
      {
        "name": "modifyVariantCustomAggregateFields",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "none",
            "replace",
            "merge",
            "deleteIncluded"
          ]
        },
        "description": "Should custom aggregate fields of the variant be modified"
      },
      {
        "name": "modifyAttributes",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "none",
            "replace",
            "merge",
            "deleteIncluded"
          ]
        },
        "description": "Should attributes be modified"
      }
    ],
    "requestBody": {
      "content": {
        "application/json": {
          "schema": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/InventoryParentCreateOrUpdate"
            }
          },
          "examples": {
            "example-minimum": {
              "value": [
                {
                  "sku": "PARENT_SKU_A",
                  "variants": [
                    {
                      "sku": "VARIANT_SKU_A_1",
                      "quantity": 1
                    },
                    {
                      "sku": "VARIANT_SKU_A_2",
                      "quantity": 1
                    },
                    {
                      "sku": "VARIANT_SKU_A_3",
                      "quantity": 1
                    }
                  ]
                },
                {
                  "sku": "PARENT_SKU_B",
                  "variants": [
                    {
                      "sku": "VARIANT_SKU_B_1",
                      "quantity": 1
                    }
                  ]
                },
                {
                  "sku": "PARENT_SKU_C",
                  "variants": [
                    {
                      "sku": "VARIANT_SKU_C_1",
                      "quantity": 1
                    }
                  ]
                }
              ]
            }
          }
        }
      }
    },
    "responses": {
      "200": {
        "description": "OK",
        "content": {
          "application/json": {
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/InventoryParentSaveResponse"
              }
            }
          }
        }
      },
      "401": {
        "description": "Unauthorized"
      }
    }
  }
}
Ready to run it? Send the curl from your terminal or Postman, or use the interactive tester in Stoplight.Open in Stoplight