Create/Update Inventory
https://api.flxpoint.com/inventory/parentsUse this when you want to create inventory data through the API.
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
modifyParentOptionsquerystringShould options of the parent be modified
allowednonereplacemergedeleteIncludedmodifyVariantOptionsquerystringShould options of the variant be modified
allowednonereplacemergedeleteIncludedmodifyParentImagesquerystringShould images of the parent be modified
allowednonereplacemergedeleteIncludedmodifyVariantImagesquerystringShould images of the variant be modified
allowednonereplacemergedeleteIncludedmodifyParentCustomFieldsquerystringShould custom fields of the parent be modified
allowednonereplacemergedeleteIncludedmodifyVariantCustomFieldsquerystringShould custom fields of the variant be modified
allowednonereplacemergedeleteIncludedmodifyVariantCustomAggregateFieldsquerystringShould custom aggregate fields of the variant be modified
allowednonereplacemergedeleteIncludedmodifyAttributesquerystringShould attributes be modified
allowednonereplacemergedeleteIncluded
application/jsonsourceIdintegerskustringrequiredtitlestring | nulldescriptionstring | nullmanufacturerstring | nullarchivedboolean | nullimagesarray[InventoryImageCreateOrUpdate]urlstringrequiredsortOrderintegeroptionsarray[InventoryParentOptionCreateOrUpdate]namestringrequiredattributesarray[InventoryParentAttributeCreateOrUpdate]namestringrequiredvaluestringrequiredcustomFieldsarray[InventoryParentCustomFieldCreateOrUpdate]namestringrequiredvaluestringrequiredvariantsarray[InventoryVariantCreateOrUpdate]supplierVariantIdstring | nullshippingCostnumber | nulldropshipFeenumber | nullinventoryListPricenumber | nullreferenceIdentifierstring | nullquantityinteger | nullskustring | nullrequiredmasterSkustring | nulltitlestring | nullmpnstring | nullupcstring | nulleanstring | nullasinstring | nullmsrpnumber | nullmapnumber | nullweightnumber | nulllengthnumber | nullwidthnumber | nullheightnumber | nullarchivedboolean | nullcostnumber | nullweightUnitobjecthandlestringpoundouncegramkilogramabbreviatedHandlestringlbozgkgdimensionUnitobjecthandlestringinchcentimeterabbreviatedHandlestringincmdimensionalWeightnumber | nullimagesarray[InventoryImageCreateOrUpdate]urlstringrequiredsortOrderintegeroptionsarray[InventoryVariantOptionCreateOrUpdate]namestringrequiredvaluestringrequiredcustomFieldsarray[InventoryVariantCustomFieldCreateOrUpdate]namestringvaluestringallowBackordersboolean | nullbinLocationstring | nulldescriptionstring | nullrequiresFflboolean | nullcategoryOnestring | nullcategoryTwostring | nullcategoryThreestring | nullExample request
/inventory/parentscurl -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"
}
]'[
{
"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
idintegerskustringsuccessbooleanresultInventoryModificationResultnewchangedunchangedarchivedparentOptionsResultobjectsavedintegerunchangedintegerdeletedintegerparentImagesResultobjectsavedintegerunchangedintegerdeletedintegerparentCustomFieldsResultobjectsavedintegerunchangedintegerdeletedintegerparentAttributesResultobjectsavedintegerunchangedintegerdeletedintegervariantsarray[InventoryVariantSaveResponse]idinteger (int64)skustringresultInventoryModificationResultnewchangedunchangedarchivedvariantOptionsResultobjectsavedintegerunchangedintegerdeletedintegervariantImagesResultobjectsavedintegerunchangedintegerdeletedintegervariantCustomFieldsResultobjectsavedintegerunchangedintegerdeletedintegersuccessbooleanerrorsarray[GenericApiError]errorstringdataobjecterrorsarray[GenericApiError]errorstringdataobject[
{
"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"
}
}
}
}