Consignment API
There are three ways to create Consignments in Birdsystem :
1. To create a Consignment firstly, then add one or more SKUs to the Consignment, Finally updating the Status of Consignment to the PENDING, which is a status BirdSystem ready to process.
2. The second way is, to create the Batch Consignments temporarily first, then batch converting those Batch Consignments to the final Consignments.
3. The third way is, to create a Consignment in a all-in-one API Request. This way is simplest way to create and manage Consignments via API, In addtion, under this way, the Status of Consignment will be updated to the PENDING straightway.
The detail of reference below :
1. Request and Credential
Please refer to the link :Create Request
2. Creating a Consignment one step by one step
1) Creating a Consignment
Post a request with params below:
url | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
method | post | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
body | form parmas:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Return | { "success":true, "data":{ "id":"2006143004830001", "delivery_service_id":"12010433", "...":"..." } } |
Notice: Please check if a proper Delivery Service ID is attached, this is the most common cause for a error response
2) Add SKUs to Consignment
This Step is to attach SKU to the Consignment just created.
url | |||||||||||||||||||||
method | post | ||||||||||||||||||||
body | form params:
| ||||||||||||||||||||
Return | { "success":true, "data":{ "id":"1124955", "consignment_id":"2006143004830001", "product_id":"334422", "...":"..." } } |
Notice: Adding one kind of SKU only each Request.
3) Update the Status of Consignment to the PENDING
The final step is to update the Status of Consignment to the PENDING, which is the status BirdSystem ready to process.
url | http://test.birdsystem.com/client/Consignment/Batch-Update-Status | ||||||||||||
method | post | ||||||||||||
body | form params:
| ||||||||||||
Response | { "success":true } |
3. Creating Temporary Consignments and then batch converting to Consignments
1) Creating temporary Consignments
Temporary Consignments allows pre-process Consignments and correct some fields for Consignment, then batch converting those Consignment to the final Consignments in BirdSystem
url | http://test.birdsystem.com/client/consignment-upload/Temp-Consignment-Json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
method | post | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
body | Fields:
[ { "contact": "Norman Drury", "business_name": null, "address_line1": "3, Northam Close", "address_line2": "Marshside", "address_line3": null, "city": "Southport", "county": "Merseyside", "post_code": "PR9 9GA", "country_name": "United Kingdom", "telephone": "01704 226830", "email": null, "sales_reference": "2", "sales_order_id": "110222319566-0", "payment_reference": "Royal Mail 1st Class Standard", "special_instruction": null, "product_company_ref": "15591*1+215312*1", "delivery_service_name": "Royal Mail 1st Class Standard", "status": "PENDING", "type": "LOCAL", "thirty_system_id":"2222" } ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response | { "success":true, "message":"File successfully uploaded! 1 records has been imported.", "data":{"2222":"12010433"} } |
2) Batch converting Temporary Consignments to the final Consignments
The Status of Consignment will be the PENDING
url | |
method | get |
body | - |
Response | [Response with error ] { "numberOfTotalConsignmentsToProcess": 1, "numberOfConsignmentsProcessed": 1, "finished": true, "data": null, "errorIdList": [ { "id": 12010439, "message": "Can't find delivery service." } ], "success": true, "refresh": false }
{ "numberOfTotalConsignmentsToProcess": 1, "numberOfConsignmentsProcessed": 1, "finished": true, "data": { "12010439": "1507310110000001" }, "errorIdList": [], "success": true, "refresh": false } |
Description of Response Fields | numberOfTotalConsignmentsToProcess: Total Number of Consignment to Process |
Params | ids: Temporary Consignment IDs, join IDs with underscore when multiple. for example: 123_124_125 [Optional] |
4 Creating a Consignment in a all-in-one API Request
url | http://test.birdsystem.com/client/Consignment/Post-Pending-Consignment-With-Products-Json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
method | post | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
body | [ { "contact": "Norman Drury", "business_name": null, "address_line1": "3, Northam Close", "address_line2": "Marshside", "address_line3": null, "city": "Southport", "county": "Merseyside", "post_code": "PR9 9GA", "country_iso": "GB", "telephone": "01704 226830", "email": null, "delivery_service_id": "1471", "sales_reference": "2", "sales_price": 21.99 "sales_order_id": "110222319566-0", "special_instruction": null, "products":[ {"client_sku":"IP-XX3355","quantity":5}, {"id":2,"quantity":4} ] } ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response | { "success": true, "data": [ { "id": 1612120020000011, "company_id": 2, "client_id": 1, "consignment_product_quantity": 9, "consignment_product_reference": "1,2", "delivery_service_id": 1471, "delivery_service_id_internal": 1471, "delivery_package_size_id": 432, "delivery_package_size_id_internal": 432, "total_price": "0.00", "total_cost": "0.00", "...": "...", "contact": "Norman Drury", "business_name": null, "address_line1": "3, Northam Close", "address_line2": "Marshside", "address_line3": null, "city": "Southport", "county": "Merseyside", "post_code": "PR9 9GA", "country_iso": "GB", "telephone": "01704 226830", "email": null, "sales_reference": "2", "sales_order_id": "110222319566-0", } ] } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Params |
|
5 Waiting Warehouse to process Consignment
Once Client Create a Consignment via API, and set the Status of Consignment to the PENDING, Warehouse operators will process that Consignment as soon as possible. so Client can make request to query those Consignment's Status periodically via API or BirdSystem Web interface.
The Main Status of Consignment for Processing: PENDING → PICKING → PROCESSING → FINISHED
6 Common Error
1) Insufficient balance
Please top up some money then continue process
2) Insufficient Stock
Please send more goods to warehouse to top up stock
3) inproper delivery service chosen
Common Causes:
(1) The Chosen Delivery Service is not open for that Country、
(2) The Weight or Dimension of Consignment may not be suitable for that Delivery Service
(3) The SKU in Consignment is prohibitted by the Country.