Orders API (ORDRSP)

Orders API (ORDRSP)

The  vuuh.com  API for order creation.


Endpoint URI

POST https://onix.vuuh.com/api/v1/orders/
Staging URL: https://onix-staging.vuuh.com/api/v1/orders


Authentication

Authentication is required to use this endpoint.   Read more on the  🔒Authentication  page.


Payload

Content Type

application/json

Format

The payload must be of JSON type and comply with the following structure:
{
"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"
}
]
}
JSON Structure
  • "order" (required): This is an object representing the order.
  • "products" (required): This is a list of objects, each representing a product. The list can contain one or more product objects.
Order Object:
  • The order schema can be found on the  Order schema  page.
Product Object
  • 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."
}