API Экспресс-накладная
Работа с экспресс-накладными
- Рассчитать стоимость услуг
- Прогноз даты доставки груза
- Создать экспресс-накладную
- Создать экспресс-накладную на адрес
- Создать экспресс-накладную на отделение
- Создать экспресс-накладную на почтомат "Нова пошта"
- Создать экспресс-накладную с обратной доставкой
- Редактировать экспресс-накладную
- Трекинг
- Получить список ЭН
- Удалить экспресс-накладную
- Формирование запроса для получения полного отчета по накладным
- Формирование запросов на создание ЭН с дополнительными услугами
- Формирование запросов на создание ЭН с различными видами груза
Формирование запроса для получения полного отчета по накладным
Метод «generateReport», работает в модели «InternetDocument», этот метод формирует запрос для получения полного отчета по накладным
URL для входа https://api.novaposhta.ua/v2.0/{format}/ [json or xml]
Формат, обязательно, должен указываться нижним регистром (маленькими буквами), например https://api.novaposhta.ua/v2.0/json/
Доступность: Требует использования API-ключа.
URL-адрес запроса
Параметры запроса
string
Форматы JSON, XML
Заголовки запросов
(дополнительный)
string
Тип формата текста, отправляемого в API.
Текст запроса
Параметр | Тип данных | Описание |
apiKey* | string[36] | Ваш ключ API 2.0 |
modelName* | string | Имя модели |
calledMethod* | string | Имя вызываемого метода |
methodProperties | Свойства метода | |
DocumentRefs* | string | Список документов |
Type | string[36] | Формат документа для печати: xls или csv |
{
"apiKey": "[ВАШ КЛЮЧ]",
"modelName": "InternetDocument",
"calledMethod": "generateReport",
"methodProperties": {
"DateTime":"24.09.2015",
"DocumentRefs": [
"1fb8943e-14e4-11e5-ad08-005056801333",
"230a3869-14e4-11e5-ad08-005056801333"
],
"Type": "xls или csv"
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<file>
<apiKey>[ВАШ КЛЮЧ]</apiKey>
<modelName>InternetDocument</modelName>
<calledMethod>generateReport</calledMethod>
<methodProperties>
<DateTime>24.09.2015</DateTime>
<DocumentRefs>
<item>1fb8943e-14e4-11e5-ad08-005056801333</item>
<item>230a3869-14e4-11e5-ad08-005056801333</item>
</DocumentRefs>
<Type>xls или csv</Type>
</methodProperties>
</file>
Ответ 200
Всегда возвращает код 200 даже при логических ошибках.
Тело ответа на запрос
Параметр | Тип данных | Описание |
Ref | string[36] | Идентификатор контактного лица |
DateTime | string[36] | Дата доставки |
PreferredDeliveryDate | string[36] | Желаемая дата доставки |
Weight | string[36] | Вес |
SeatsAmount | string[36] | Количество мест доставки |
IntDocNumber | string[36] | Номер ИД (интернет документ) |
Cost | string[36] | Оценочная стоимость |
CitySender | string[36] | Идентификатор города отправителя |
CityRecipient | string[36] | Идентификатор города получателя |
State | string[36] | |
SenderAddress | string[36] | Идентификатор адреса отправителя |
RecipientAddress | string[36] | Идентификатор адреса получателя |
CostOnSite | string[36] | Стоимость доставки |
PayerType | string[36] | Идентификатор плательщика |
PaymentMethod | string[36] | Идентификатор способа оплаты |
AfterpaymentOnGoodsCost | string[36] | Стоимость обтачной доставки |
PackingNumber | string[36] | Номер упаковки |
{
"success": true,
"data": [
{
"Ref": "34909b24-d206-11e4-bdb5-005056801329",
"DateTime": "2015-03-24 00:00:00",
"PreferredDeliveryDate": "0001-01-01 00:00:00",
"Weight": "50.00",
"SeatsAmount": "1",
"IntDocNumber": "20400030200931",
"Cost": "500.00",
"CitySender": "8d5a980d-391c-11dd-90d9-001a92567626",
"CityRecipient": "8d5a980d-391c-11dd-90d9-001a92567626",
"State": "00000000-0000-0000-0000-000000000000",
"SenderAddress": "0d545ecf-e1c2-11e3-8c4a-0050568002cf",
"RecipientAddress": "1ec09d88-e1c2-11e3-8c4a-0050568002cf",
"CostOnSite": "141.00",
"PayerType": "Sender",
"PaymentMethod": "Cash",
"AfterpaymentOnGoodsCost": "0.00",
"PackingNumber": "4545",
"Number": null,
"Posted": null,
"DeletionMark": null,
"CargoType": null,
"Route": null,
"EWNumber": null,
"Description": null,
"SaturdayDelivery": null,
"ExpressWaybill": null,
"CarCall": null,
"ServiceType": null,
"DeliveryDateFrom": null,
"Vip": null,
"AdditionalInformation": null,
"LastModificationDate": null,
"ReceiptDate": null,
"LoyaltyCard": null,
"Sender": null,
"ContactSender": null,
"SendersPhone": null,
"Recipient": null,
"ContactRecipient": null,
"RecipientsPhone": null,
"Redelivery": null,
"SaturdayDeliveryString": null,
"Note": null,
"ThirdPerson": null,
"Forwarding": null,
"NumberOfFloorsLifting": null,
"StatementOfAcceptanceTransferCargoID": null,
"StateId": 1,
"StateName": "Замовлення в обробці",
"RecipientFullName": null,
"RecipientPost": null,
"RecipientDateTime": null,
"RejectionReason": null,
"CitySenderDescription": "Київ",
"CityRecipientDescription": "Київ",
"SenderDescription": "CBS-369138 ",
"RecipientDescription": "Тест2",
"RecipientContactPhone": "380997579789",
"RecipientContactPerson": "Пакитенко Микола Іванович",
"SenderAddressDescription": "Відділення №87 (до 30 кг): вул. Княжий
Затон, 14б",
"RecipientAddressDescription": "Відділення №1: вул.
Червонопрапорна, 34 (Корчувате)",
"Printed": "0",
"Fulfillment": 0,
"EstimatedDeliveryDate": "2015-03-25 00:00:00",
"DateLastUpdatedStatus": "2015-03-24 11:52:02",
"CreateTime": "2015-03-24 11:14:42",
"ScanSheetNumber": "",
"InfoRegClientBarcodes": "",
"StatePayId": "0",
"StatePayName": "",
"BackwardDeliveryCargoType": ""
}
],
"errors": [],
"warnings": [],
"info": []
}
<root>
<success>false</success>
<data>
<item>
<Ref>230a3869-14e4-11e5-ad08-005056801333</Ref>
<DateTime>2015-09-24 00:00:00</DateTime>
<PreferredDeliveryDate>0001-01-01 00:00:00</PreferredDeliveryDate>
<Weight>250.00</Weight>
<SeatsAmount>1</SeatsAmount>
<IntDocNumber>20400001209348</IntDocNumber>
<Cost>1.00</Cost>
<CitySender>8d5a980d-391c-11dd-90d9-001a92567626</CitySender>
<CityRecipient>8d5a980d-391c-11dd-90d9-001a92567626</CityRecipient>
<State>00000000-0000-0000-0000-000000000000</State>
<SenderAddress>1ec09d88-e1c2-11e3-8c4a-0050568002cf</SenderAddress>
<RecipientAddress>1ec09d88-e1c2-11e3-8c4a-0050568002cf</RecipientAddress>
<CostOnSite>295.00</CostOnSite>
<PayerType>Sender</PayerType>
<PaymentMethod>Cash</PaymentMethod>
<AfterpaymentOnGoodsCost>0.00</AfterpaymentOnGoodsCost>
<PackingNumber>1</PackingNumber>
<Number />
<Posted />
<DeletionMark />
<CargoType />
<Route />
<EWNumber />
<Description />
<SaturdayDelivery />
<ExpressWaybill />
<CarCall />
<ServiceType />
<DeliveryDateFrom />
<Vip />
<AdditionalInformation />
<LastModificationDate />
<ReceiptDate />
<LoyaltyCard />
<Sender />
<ContactSender />
<SendersPhone />
<Recipient />
<ContactRecipient />
<RecipientsPhone />
<Redelivery />
<SaturdayDeliveryString />
<Note />
<ThirdPerson />
<Forwarding />
<NumberOfFloorsLifting />
<StatementOfAcceptanceTransferCargoID />
<StateId>1</StateId>
<StateName>Замовлення в обробці</StateName>
<RecipientFullName />
<RecipientPost />
<RecipientDateTime />
<RejectionReason />
<CitySenderDescription>Київ</CitySenderDescription>
<CityRecipientDescription>Київ</CityRecipientDescription>
<SenderDescription>Тест_тест_тест</SenderDescription>
<RecipientDescription>Тест Тест Тест</RecipientDescription>
<RecipientContactPhone>380971111111</RecipientContactPhone>
<RecipientContactPerson>Тест Тест Тест</RecipientContactPerson>
<SenderAddressDescription>Відділення №1: вул. Червонопрапорна, 34 (Корчувате)</SenderAddressDescription>
<RecipientAddressDescription>Відділення №1: вул. Червонопрапорна, 34 (Корчувате)</RecipientAddressDescription>
<Printed>0</Printed>
<Fulfillment>0</Fulfillment>
<EstimatedDeliveryDate>2015-09-25 00:00:00</EstimatedDeliveryDate>
<DateLastUpdatedStatus>2015-06-17 14:29:39</DateLastUpdatedStatus>
<CreateTime>2015-06-17 14:29:38</CreateTime>
<ScanSheetNumber></ScanSheetNumber>
<InfoRegClientBarcodes>1</InfoRegClientBarcodes>
<StatePayId>0</StatePayId>
<StatePayName></StatePayName>
<BackwardDeliveryCargoType></BackwardDeliveryCargoType>
</item>
<item>
<Ref>1fb8943e-14e4-11e5-ad08-005056801333</Ref>
<DateTime>2015-09-24 00:00:00</DateTime>
<PreferredDeliveryDate>0001-01-01 00:00:00</PreferredDeliveryDate>
<Weight>250.00</Weight>
<SeatsAmount>1</SeatsAmount>
<IntDocNumber>20400001209342</IntDocNumber>
<Cost>1.00</Cost>
<CitySender>8d5a980d-391c-11dd-90d9-001a92567626</CitySender>
<CityRecipient>8d5a980d-391c-11dd-90d9-001a92567626</CityRecipient>
<State>00000000-0000-0000-0000-000000000000</State>
<SenderAddress>1ec09d88-e1c2-11e3-8c4a-0050568002cf</SenderAddress>
<RecipientAddress>1ec09d88-e1c2-11e3-8c4a-0050568002cf</RecipientAddress>
<CostOnSite>295.00</CostOnSite>
<PayerType>Sender</PayerType>
<PaymentMethod>Cash</PaymentMethod>
<AfterpaymentOnGoodsCost>0.00</AfterpaymentOnGoodsCost>
<PackingNumber>1</PackingNumber>
<Number />
<Posted />
<DeletionMark />
<CargoType />
<Route />
<EWNumber />
<Description />
<SaturdayDelivery />
<ExpressWaybill />
<CarCall />
<ServiceType />
<DeliveryDateFrom />
<Vip />
<AdditionalInformation />
<LastModificationDate />
<ReceiptDate />
<LoyaltyCard />
<Sender />
<ContactSender />
<SendersPhone />
<Recipient />
<ContactRecipient />
<RecipientsPhone />
<Redelivery />
<SaturdayDeliveryString />
<Note />
<ThirdPerson />
<Forwarding />
<NumberOfFloorsLifting />
<StatementOfAcceptanceTransferCargoID />
<StateId>1</StateId>
<StateName>Замовлення в обробці</StateName>
<RecipientFullName />
<RecipientPost />
<RecipientDateTime />
<RejectionReason />
<CitySenderDescription>Київ</CitySenderDescription>
<CityRecipientDescription>Київ</CityRecipientDescription>
<SenderDescription>Тест_тест_тест</SenderDescription>
<RecipientDescription>Тест Тест Тест</RecipientDescription>
<RecipientContactPhone>380971111111</RecipientContactPhone>
<RecipientContactPerson>Тест Тест Тест</RecipientContactPerson>
<SenderAddressDescription>Відділення №1: вул. Червонопрапорна, 34 (Корчувате)</SenderAddressDescription>
<RecipientAddressDescription>Відділення №1: вул. Червонопрапорна, 34 (Корчувате)</RecipientAddressDescription>
<Printed>0</Printed>
<Fulfillment>0</Fulfillment>
<EstimatedDeliveryDate>2015-09-25 00:00:00</EstimatedDeliveryDate>
<DateLastUpdatedStatus>2015-06-17 14:29:32</DateLastUpdatedStatus>
<CreateTime>2015-06-17 14:29:32</CreateTime>
<ScanSheetNumber></ScanSheetNumber>
<InfoRegClientBarcodes>1</InfoRegClientBarcodes>
<StatePayId>0</StatePayId>
<StatePayName></StatePayName>
<BackwardDeliveryCargoType></BackwardDeliveryCargoType>
</item>
</data>
<errors />
<warnings />
<info />
</root>