This method is used to get information about orders included in one consignment by its reference. For this method, API uses application/x-www-form-urlencoded as its acceptable request representation (Media Type), and the standard HTTP-method POST.
Input for getConsignment request
# | Attribute name | Type | Mandatory | Description |
---|---|---|---|---|
1 | sessionID | string | Yes | A session identifier that has been fetched from the server using authentication request. |
1 | consignmentReference | number | Yes | Reference number of a consignment (a pair of linked P&D orders) in question. |
Headers:
URL: /rest/2/distribution-api/orders/getConsignment
Method: POST
Acceptable request representations: application/x-www-form-urlencoded
All attributes should be sent in request parameters for this request.
Request parameters: sessionID=eca3b9f1afa24988834ceb5c6aafdcbf&consignmentReference=bo1*bo2*gsdfg
Example of getConsignment response:
Code Block |
---|
<?xml version='1.0' encoding='UTF-8'
standalone='yes' ?>
<apiResponse version="1.0">
<consignmentResponse>
<consignments>
<consignment consignmentReference="bo2">
<orders>
<order
referenceNumber="2311_3" linkType="PickupAndDelivery" status="NEW"/>
<order
referenceNumber="2311_4" linkType="PickupAndDelivery" status="NEW"/>
</orders>
</consignment>
<consignment consignmentReference="bo1">
<orders>
<order
referenceNumber="2311_1" linkType="PickupAndDelivery" status="NEW"/>
<order
referenceNumber="2311_2" linkType="PickupAndDelivery" status="NEW"/>
</orders>
</consignment>
</consignments>
</consignmentResponse>
</apiResponse> |