Skip to content

Import a Product

Imports a JSON representation of a product.

Direction WMS → WCS

HTTP Method POST

Path /api/product/import

Field notes:

Field NameData TypeDescriptionNotes
productIdStringA Unique product identifier for the product to be imported into wcsMust not be null and contain at least 1 non-whitespace character
titleStringProduct name/titleMust not be null and contain at least 1 non-whitespace character
barcodesString ArrayList of product barcodes
imageUrlStringURL to product image
consumablebooleanWhether product is consumable (packaging).
productsPerSubbinObject (Map)A Map representing the maximum number of product units that can be stored in each bin type in a single compartment.{binType1: units1, binType2: units2, ..} The number of product units must not be a negative value. Currently supported bin Type values: 1/1 (1 row, 1 compartment), 2/2 (2 rows, 4 compartments), 2/4 (2 rows, 8 compartments)
batchManagedbooleanWhether the product is batch managed or notFor batch-managed products, the WCS inspection workflow prompts operators to enter batch and expiration details during product inspection.

Example Request Body

{
"productId": "ABC123",
"title": "Premium Coffee Beans 1kg",
"barcodes": [
"1234567890123",
"9876543210987"
],
"imageUrl": "https://example.com/images/coffee-beans.jpg",
"consumable": true,
"productsPerSubbin": {
"1/1": 48,
"2/2": 24,
"2/4": 12
},
"batchManaged": true
}

202: Product passed validation

{
"message": "Accepted"
}

400: Product failed validation

{
"message": "Bad Request",
"errors": [
{
"message": "Product field productId must contain at least 1 non-whitespace character",
"path": "productId"
},
{
"message": "Product field title must contain at least 1 non-whitespace character",
"path": "title"
},
{
"message": "The number of units must not be a negative value",
"path": "productsPerSubbin"
}
]
}

401: Access denied, Invalid Authentication

{
"message": "Unauthorized"
}