Each product object must contain details about the product. The product schema, which shows which keys are supported, can be found on the Order's product schema page.
Example HTTP Request (cURL)
curl-X POST -H"Authorization: Bearer mytoken34"-H"Content-Type: application/json"-d'{
"order": {
"order_number": "5609",
"retailer": "DK12345678",
"location": "LA store"
},
"products": [
{
"quantity": 10,
"style_name": "Regular Fit T-shirt",
"style_number": "452313",
"collection_name": "Summer 2024",
"color_name": "Green",
"color_code": "323",
"size_eu": "S",
"gtin": "598030652943",
"category": "T-shirts",
"sub_category": "T-shirts for men"
},
{
"quantity": 5,
"style_name": "Regular Fit T-shirt",
"style_number": "452313",
"collection_name": "Summer 2024",
"color_name": "Green",
"color_code": "323",
"size_eu": "M",
"gtin": "598030652944",
"category": "T-shirts",
"sub_category": "T-shirts for men"
}
]
}' https://onix.vuuh.com/api/v1/orders/
Response
200 OK: The order is being added to the system. You can check the status using the provided job id. More details can be found on Jobs API page.
Example:
{
"status":"success",
"substatus":"job_scheduled",
"job":{
"id":"core:ingestjob:11024"
}
}
400 Bad Request: The JSON content is invalid or there are errors in the request.
Examples:
{
"status":"error",
"substatus":"invalid_product_shape",
"description":{
"products[0]":"The keys ['style_name'] are mandatory but are missing. The keys ['prices'] have invalid shape. "
}
}
{
"status":"error",
"substatus":"invalid_order_shape",
"description":{
"order":"The keys ['location'] are mandatory but are missing. "
}
}
{
"status":"error",
"substatus":"retailer_not_found",
"description":"Could not identify a retailer in our system."
}
401 Unauthorized: Authentication is required and the provided credentials are missing.
Example:
{
"status":"error",
"substatus":"not_authenticated",
"description":"Authentication credentials were not provided."
}
403 Forbidden: Authentication is required and the provided credentials are invalid.
Example:
{
"status":"error",
"substatus":"permission_denied",
"description":"Invalid token."
}
500 Internal Server Error: An internal server error occurred.
Example:
{
"status":"error",
"substatus":"internal_error",
"description":"An internal problem related to data loading has occurred."