Retrieve order groups
POST
https://api.ostrovok.ru/api/b2b/v3/ordergroup/info/
Метод возвращает информацию о группе заказов. Используйте его, чтобы проверить данные группы заказов перед вызовом Make order group overpay.
Пример запроса
curl --user '<KEY_ID>:<API_KEY>' 'https://api.ostrovok.ru/api/b2b/v3/ordergroup/info/' \
--header 'Content-Type: application/json' \
--data '{
"ordering": {
"ordering_type": "asc",
"ordering_by": "invoice_id"
},
"pagination": {
"page_size": "1",
"page_number": "1"
},
"search": {
"invoice_id": "12980-00260"
}
}'Тело запроса
Ответ
Пример ответа
{
"data":{
"current_page_number":1,
"groups":[
{
"agreement_number":"B2B-12980/1",
"amount_commission": {
"amount":"0.73",
"currency_code":"EUR"
},
"amount_commission_vat":{
"amount":"0",
"currency_code":"EUR"
},
"amount_payable":{
"amount":"7.27",
"currency_code":"EUR"
},
"amount_payable_vat":{
"amount":"0",
"currency_code":"EUR"
},
"created_at":"2018-12-04T08:51:10.254781",
"invoice_id":"12980-00260",
"orders":[
{
"amount_commission":{
"amount":"0.73",
"currency_code":"EUR"
},
"amount_commission_vat":{
"amount":"0",
"currency_code":"EUR"
},
"amount_payable":{
"amount":"7.27",
"currency_code":"EUR"
},
"amount_payable_vat":{
"amount":"0",
"currency_code":"EUR"
},
"created_at":"2018-12-04T08:49:36.129298",
"order_id":863255831,
"order_type":"hotel",
"payment_due":"2018-12-14",
"status":"completed"
}
],
"payment_due":"2018-12-14"
}
],
"total_groups":1,
"total_pages":1
},
"debug":null,
"error":null,
"status":"ok"
}Ошибки
Значение поля error указано в заголовках ниже.
page_out_of_range
Значение поля current_page_number больше значения поля total_pages. Должно быть меньше.