Warehouse API is a nice and sexy service for working with Naburszh Warehouse.
API is exposed through the following endpoint –
http://warehouse-api.azurewebsites.net/api
The endpoint is protected by the authentication token. The token must be provided via x-client-id
header
- HMAC-SHA1 is used for message signing
- Hash key will be provided
- Message consists out of payload (original message) and signature fields
POST /outbounds
Example body:
{
"payload":{
"orderNumber":"5",
"product":{
"name":"Elier",
"quantity":2,
"price":41.5
},
"receiver":{
"firstName":"Test",
"lastName":"Receiver",
"phoneNumber":"123456789",
"houseNumber":"122",
"addressText":"Some street",
"addressAdditionalInfo":"apt. 35",
"country":"LATVIA",
"zipCode":"1058"
}
},
"signature":"88a4ff5c4288e53b00aee7c15549e3a7c98d9740"
}
Response: 200 OK
{
"trackingNumber": "01605019895968"
}
Any status except 200 OK should be considered as an error:
Response: 401 Unauthorized - when x-client-id is missing or is wrong
Response: 400 Bad Request - when signature or request data is not valid
Response: 500 Internal Server Error - for internal errors
{
"error": "<SOME ERROR DESCRIPTION>"
}
POST /tracking/
Example body:
{
"payload":{
"trackingNumbers":[
"01605019895968"
]
},
"signature":"f4a4a0e3fc2c4a128a3f7441f7596f03d838d039"
}
Response: 200 OK
{
"statuses": [
{
"trackingNumber": "01605019895968",
"deliveryStatus": "Status in not available. Possible reasons: invalid tracking number or status was not registered yet by DPD",
"trackingInfo": [
{
"dateAndTime": "2017-07-15T08:47:00",
"place": "DPD data centre",
"status": "Order information has been transmitted to DPD"
}
]
}
]
}
Any status except 200 OK should be considered as an error.
Response: 401 Unauthorized - when x-client-id is missing or is wrong
Response: 400 Bad Request - when signature or request data is not valid
Response: 500 Internal Server Error - for internal errors
{
"error": "<SOME ERROR DESCRIPTION>"
}