/
getConsignment
getConsignment
Данный метод используется для получения информации о заказах, входящих в групповой заказ по его идентификатору. Для получения статусов API использует структуру application/x-www-form-urlencoded и стандартный HTTP-метод POST.
Входные данные запроса getConsignment
# | Название атрибута | Тип | Обязательность | Описание |
---|---|---|---|---|
1 | sessionID | текст | Да | Идентификатор сессии, полученный от сервера после запроса авторизации. |
1 | consignmentReferences | число | Да | Идентификационный номер группового заказа (пара связанных заказов Pickup & Delivery). |
Заголовки:
Метод: POST
URL: [account-name].maxoptra.com/rest/2/distribution-api/orders/getConsignment
Структура: application/x-www-form-urlencoded
Для этого запроса все атрибуты должны находиться в параметрах запроса.
Параметры запроса: sessionID=eca3b9f1afa24988834ceb5c6aafdcbf&consignmentReferences=bo1*bo2
Пример ответа getConsignment:
<?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="PND" status="ALLOCATED"> <orderItem name="Пакет 1" barcode="12345678" status="NOT_CHECKED" costPerUnit="10" totalCost="10" quantity="1" /> <orderItem name="Пакет 2" barcode="987654321" status="NOT_CHECKED" costPerUnit="20" totalCost="60" quantity="3" /> <aggregatedItemsStatus actualDelivery="0" scheduledDelivery="2" completionStatus="NOT_DELIVERED" /> </order> <order referenceNumber="2311_2" linkType="PND" status="ALLOCATED"></order> </orders> </consignment> </consignments> </consignmentResponse> </apiResponse>
Если один из связанных заказов содержит товары, информация о них также вернется в ответе getConsignment.
Example of Order Items in getConsignment response
<?xml version='1.0' encoding='UTF-8' standalone='yes'?> <apiResponse version="1.0"> <consignmentResponse> <consignments> <consignment consignmentReference="4366700843117298688"> <orders> <order referenceNumber="mID5205913" linkType="PND" status="NEW"> <orderItem name="test1" barcode="1008105964500552" status="NOT_CHECKED" costPerUnit="0" totalCost="0" quantity="0" actualQuantity="0" /> <orderItem name="test2" barcode="2521250862053500" status="NOT_CHECKED" costPerUnit="0" totalCost="0" quantity="0" actualQuantity="0" /> </order> <order referenceNumber="mID5205917" linkType="PND" status="NEW"> <orderItem name="test3" barcode="54654532583386658" status="NOT_CHECKED" costPerUnit="0" totalCost="0" quantity="0" actualQuantity="0" /> <orderItem name="test4" barcode="54561646465455" status="NOT_CHECKED" costPerUnit="0" totalCost="0" quantity="0" actualQuantity="0" /> <orderItem name="eqw" barcode="eqweqw" status="NOT_CHECKED" costPerUnit="0" quantity="0" /> </order> </orders> </consignment> </consignments> </consignmentResponse> </apiResponse>
См. также
Функциональность Pickup & Delivery
, multiple selections available,
Related content
getOrdersWithZone
getOrdersWithZone
Read with this
deleteConsignment
deleteConsignment
More like this
Методы API. Аутентификация
Методы API. Аутентификация
Read with this
send
More like this
Ограничения запросов
Ограничения запросов
Read with this
getAreaOfControls
getAreaOfControls
More like this