Delivery Notes API (DESADV)

Delivery Notes API (DESADV)

The  vuuh.com  API for delivery notes creation.

Endpoint URI

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


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:
{
"delivery_note": {
"delivery_note_number": "786569",
"retailer": "DK0441793333",
"order_number": "41476442",
"carrier_party": "TRansFront",
"package_count": 5,
"pieces_count": 20,
"total_gross_weight_kg": 30.940,
"dispatch_note_date": "2023-12-03",
"estimated_delivery_date": "2023-12-10",
"document_date": "2023-12-04",
"document_time": "15:15:44",
"brand": "Vila",
"sub_brand": "Vila"
},
"products": [
{
"gtin": "5715420016092",
"quantity": 10
},
{
"gtin": "5715357464188",
"quantity": 4
}
]
}
JSON Structure
  • "delivery_note" (required): This is an object representing the delivery note.
  • "products" (required): This is a list of objects, each representing a product. The list can contain one or more product objects.
Delivery Note Object:
  • The delivery note schema can be found on the  Delivery note 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  Delivery note's product schema  page.


Example HTTP Request (cURL)


curl -X POST -H "Authorization: Bearer mytoken34" -H "Content-Type: application/json" -d '{
{
"delivery_note": {
"delivery_note_number": "786569",
"retailer": "DK0441793333",
"order_number": "41476442",
"carrier_party": "TRansFront",
"package_count": 5,
"pieces_count": 20,
"total_gross_weight_kg": 30.940,
"dispatch_note_date": "2023-12-03",
"estimated_delivery_date": "2023-12-10",
"document_date": "2023-12-04",
"document_time": "15:15:44",
"brand": "Vila",
"sub_brand": "Vila"
},
"products": [
{
"gtin": "5715420016092",
"quantity": 10
},
{
"gtin": "5715357464188",
"quantity": 4
}
]
}' https://onix.vuuh.com/api/v1/delivery-notes/

Response

  • 200 OK: The delivery note 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.
Example:
{
"status": "error",
"substatus": "invalid_product_shape",
"description": {
"products[0]": "The keys ['gtin'] are mandatory but are missing."
}
}

{
"status": "error",
"substatus": "invalid_delivery_note_shape",
"description": {
"products[0]": "The keys ['order_number', 'retailer'] are mandatory but are missing."
}
}

{
"status": "error",
"substatus": "order_not_found",
"description": {
"products[0]": "The order with the number 41476442 does not exist 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."
}