Для передачи данных от курьерской службы или агрегатора используется ключ вида: 2604fef03184da8dff33d19e78bf16f6
Для передачи данных от интернет-магазина(ecommerce) используется ключ вида: ecommerce184da8dff33d19e78bf16f6
Все запросы осуществляются по адресу https://reestr.akit.ru/api/, тело запроса представляет из себя JSON массив, внутри которого есть подмассив auth содержащий данные для авторизации - токен агрегатора и id курьерской службы, и именованные подмассивы с данными для сохранения их в БД за соответствующий период. За один запрос к API можно делать разные запросы на добавление данных, необходимо их передавать как ассоциативные массивы при одиночном запросе.
Пример запроса:
{ "auth": { "token": "2604fef03184da8dff33d19e78bf16f6" }, "get_courier_services_list": "get_list", "delivery_without_buyout": [ { "total_planned": 1234, "total_delivered": 1230, "total_cancelled": 2, "total_resc_cust_fault": 23, "total_resc_our_fault": 555, "total_resc_shop": 421, "total_no_WH": 1234, "interval": 1, "date": "2021-05-10" }, { "total_planned": 1234, "total_delivered": 1230, "total_cancelled": 2, "total_resc_cust_fault": 23, "total_resc_our_fault": 555, "total_resc_shop": 421, "total_no_WH": 1234, "interval": 1, "date": "2021-05-11" } ], "partial_delivery_byuout": [ { "total_planned_part": 123, "total_delivered_part": 123, "del_and_bought_full_part": 123, "total_cancelled_part": 123, "del_and_bought_part": 123, "total_resc_cust_fault_part": 123, "total_resc_our_fault_part": 123, "total_resc_shop_part": 123, "total_no_wh_part": 123, "interval": 1, "date": "2021-05-07" } ] }
{ "result": { "delivery_without_buyout": { "result": { "2021-05-10": { "interval 1": "success" }, "2021-05-11": { "interval 1": "success" } } }, "partial_delivery_byuout": { "result": { "2021-05-07": { "interval 1": "success" } } } } }
Для получения списка курьерских служб необходимо сделть запрос get_courier_services_list, содержащий token авторизацииs агрегатора в массиве auth
Запрос:{ "auth": { "token": "2604fef03184da8dff33d19e78bf16f6" }, "get_courier_services_list": "get_list" }
{ "result": { "get_courier_service_by_name": { "list": [ { "courier_service_id": "1929", "courier_service_name": "Super Fast Экспресс Доставка", "confirmed_courier_service": "1", "INN": "7707792794" }, { "courier_service_id": "1931", "courier_service_name": "ООО АйДи Экспресс", "confirmed_courier_service": "1", "INN": "7725811707" } ] } } }
{ "auth": { "token": "baf89ad5b0f5afe5673455d19bc1607b", "courier_service_id": 1930 }, "delivery_without_buyout": [ { "total_planned_orders": 1234, "renouncement": 1230, "transfer_by_client_request": 2, "transfer_by_our_mistake": 23, "transfer_by_store_mistake": 555, "delivery_in_interval": 421, "delivery_out_interval": 1234, "not_accepted_orders": 1, "date": "2020-05-5", "city_id":4 }, { "total_planned_orders": 1234, "renouncement": 1230, "transfer_by_client_request": 2, "transfer_by_our_mistake": 23, "transfer_by_store_mistake": 555, "delivery_in_interval": 421, "delivery_out_interval": 1234, "not_accepted_orders": 1, "date": "2020-05-5", "city_id":5 } ] }
{ "result": { "delivery_without_buyout": { "2020-05-5": { "4": "unsuccessful", "5": "success" } } } }
{ "auth": { "token": "baf89ad5b0f5afe5673455d19bc1607b", "courier_service_id": 1930 }, "partial_delivery_buyout": [ { "total_planned_orders": 123, "renouncement": 123, "transfer_by_client_request": 123, "transfer_by_our_mistake": 123, "transfer_by_store_mistake": 123, "delivered_and_redeemed_in_full": 123, "delivered_but_not_redeemed": 123, "partially_delivered_and_redeemed": 123, "not_accepted_orders": 123, "delivery_in_interval": 190, "delivery_out_interval": 140, "date": "2021-05-1", "city_id":4 } ] }
{ "result": { "partial_delivery_buyout": { "2021-05-1": { "5": "success" } } } }
{ "auth": { "token": "baf89ad5b0f5afe5673455d19bc1607b", "courier_service_id": 1930 }, "delivery_ondemand": [ { "total_planned_orders": 324, "renouncement": 324, "delivered_within_three_hours": 324, "delivered_over_three_hours": 324, "date": "2021-05-14", "city_id": 5 } ] }
{ "result": { "delivery_ondemand": { "2021-05-14": { "5": "success" } } } }
{ "auth": { "token": "baf89ad5b0f5afe5673455d19bc1607b", "courier_service_id": 1930 }, "oversized_cargo": [{ "total_planned_orders": 1234, "renouncement": 1230, "transfer_by_client_request": 2, "transfer_by_our_mistake": 23, "transfer_by_store_mistake": 555, "delivery_in_interval": 421, "delivery_out_interval": 1234, "not_accepted_orders": 1, "date": "2020-05-11", "city_id": 5 }] }
{ "result": { "oversized_cargo": { "2020-05-11": { "5": "success" } } } }
{ "auth": { "token": "baf89ad5b0f5afe5673455d19bc1607b", "courier_service_id": 1930 }, "goods_refunds": [{ "re_sorting": 123, "surplus": 123, "failure": 123, "wo_reason": 123, "date": "2021-05-08", "city_id":5 }] }
{ "result": { "goods_refunds": { "2021-05-08": { "5": "success" } } } }
{ "auth": { "token": "baf89ad5b0f5afe5673455d19bc1607b", "courier_service_id": 1930 }, "pvz_delivery": [{ "total_planned_orders": 1234, "renouncement": 1230, "transfer_by_client_request": 2, "transfer_by_our_mistake": 23, "transfer_by_store_mistake": 555, "delivered_and_redeemed_in_full": 421, "delivered_but_not_redeemed": 421, "partially_delivered_and_redeemed": 1234, "not_accepted_orders": 1, "delivery_in_interval": 1, "delivery_out_interval": 1, "date": "2020-05-11", "city_id":5 }] }
{ "result": { "pvz_delivery": { "2020-05-11": { "5": "success" } } } }
{ "auth": { "token": "baf89ad5b0f5afe5673455d19bc1607b", "courier_service_id": 1929 }, "delivery_to_parcel_terminals": [{ "total_planned_orders": 1234, "renouncement": 1230, "transfer_by_client_request": 2, "transfer_by_our_mistake": 23, "transfer_by_store_mistake": 555, "delivered_and_redeemed_in_full": 421, "delivered_but_not_redeemed": 421, "partially_delivered_and_redeemed": 1234, "not_accepted_orders": 1, "delivery_in_interval": 1, "delivery_out_interval": 1, "date": "2021-05-19", "city_id": 5 }] }
{ "result": { "delivery_to_parcel_terminals": { "2021-05-19": { "5": "success" } } } }
{ "auth": { "token": "baf89ad5b0f5afe5673455d19bc1607b", "courier_service_id": 1930 }, "super_urgent": [ { "total_planned_orders": 324, "renouncement": 324, "delivered_within_two_hours": 324, "delivered_over_two_hours": 324, "date": "2021-05-13", "city_id":5 } ] }
{ "result": { "super_urgent": { "2021-05-13": { "5": "success" } } } }
{ "auth": { "token": "baf89ad5b0f5afe5673455d19bc1607b", "courier_service_id": 1930 }, "correspondence": [{ "total_planned_orders": 123, "renouncement": 123, "transfer_by_client_request": 123, "transfer_by_our_mistake": 123, "transfer_by_store_mistake": 123, "not_accepted_orders": 123, "delivery_in_interval": 5, "delivery_out_interval":34, "date": "2021-05-09", "city_id":5 }] }
{ "result": { "correspondence": { "2021-05-09": { "5": "success" } } } }
{ "auth": { "token": "baf89ad5b0f5afe5673455d19bc1607b", "courier_service_id": 1930 }, "mail_delivery": [{ "total_planned_orders": 123, "renouncement": 123, "transfer_by_client_request": 123, "transfer_by_our_mistake": 123, "transfer_by_store_mistake": 123, "not_accepted_orders": 123, "delivery_in_interval": 5, "delivery_out_interval":34, "date": "2021-05-09", "city_id":5 }] }
{ "result": { "mail_delivery": { "2021-05-09": { "5": "success" } } } }
{ "auth": { "token": "baf89ad5b0f5afe5673455d19bc1607b", "courier_service_id": 1930 }, "take_away": [ { "total_planned_orders": 324, "renouncement": 324, "pick_up_within_two_hours": 324, "pick_up_more_than_two_hours": 324, "date": "2021-05-15", "city_id":5 } ] }
{ "result": { "take_away": { "2021-05-15": { "5": "success" } } } }
{ "auth": { "token": "34589ad5b0f5afe5673455d19bc1607b", "courier_service_id": 1930 }, "loss_spoilage": [ { "number_of_orders_with_plan": 123, "loss_spoilage": 123, "date": "2021-05" } ] }
{ "result": { "loss_spoilage": { "2021-05": "success" } } }
{ "auth": { "token": "34589ad5b0f5afe5673455d19bc1607b", "courier_service_id": 1930 }, "refunds": [ { "number_of_orders_with_plan": 234, "within_three_days": 123, "within_five_days": 20, "more_five_days": 10, "date": "2021-05" } ] }
{ "result": { "refunds": { "2021-05": "success" } } }
{ "auth": { "token": "2604fef03184da8dff33d19e78bf16f6", "courier_service_id": 1978 }, "update_courier_service_info": { "name": "кс 1", "economic_city": "Moscow", "legal_address": "ул Пушкина", "inn": 117534012, "ogrn": 1234567890, "okved": 55, "post_person": "post person", "telephone": 123123123, "email": "123@test.ru23", "fio": "John Doe", "site": "JohnDoe.com", "activities": "торговля, бартер", "full_name_organization": "ооо ромашка", "description": "Courier servic2313e", "services_description": "serv descr12311", "agent_spots": 55, "courier_terminal": 56, "kgt_min": "20", "kgt_max": "299", "other":[ 121121, 121120 ], "integration":[ 121109, 121110 ], "notifiable_events":[ 121102, 121107, 121103, 121105, 121106, 121107, 121104 ], "communication":[ 121095, 121097 ] } }
{ "result": { "update_courier_service_info": { "result": "success" } } }
Делается запрос get_chars_list с нужной характеристикой (other, communication,...), в ответе в массиве values лежат значения характеристики, их id необходимо передать для обновления данных курьерской службы. ВНИМАНИЕ - передавать нужно все актуальные значения, остальные будут удалены
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "get_chars_list": "other" }
{ "result": { "get_chars_list": { "104": { "feature_alias": "other", "feature_name": "Дополнительные клиентские условия", "values": [ { "id": "121322", "value": "Доставка КГТ" }, { "id": "121121", "value": "Наложенные платежи" }, { "id": "121120", "value": "Трансграничная доставка" } ] } } } }
Делается запрос get_chars_list с нужной характеристикой (other, communication,...), в ответе в массиве values лежат значения характеристики, их id необходимо передать для обновления данных курьерской службы. ВНИМАНИЕ - передавать нужно все актуальные значения, остальные будут удалены
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "get_chars_list": "other" }
{ "result": { "get_chars_list": { "104": { "feature_alias": "other", "feature_name": "Дополнительные клиентские условия", "values": [ { "id": "121322", "value": "Доставка КГТ" }, { "id": "121121", "value": "Наложенные платежи" }, { "id": "121120", "value": "Трансграничная доставка" } ] } } } }
{ "auth": { "token": "2604fef03184da8dff33d19e78bf16f6" }, "create_new_courier_service": { "name": "кс 12", "inn": 117534012, "ogrn": 1234567890, "city": "Москва", "address": "Ленинский проспект, 231", "fio": "John Doe", "telephone": 123123123, "email": "123@test.ru23", "description": "Courier servic2313e", "services_description": "serv descr12311" } }
{ "result": { "create_new_courier_service": { "result": "Успешно" } } }
{ "auth": { "token": "2604fef03184da8dff33d19e78bf16f6" }, "get_courier_service_by_name": { "name": "Логистика»" } }
{ "result": { "get_courier_service_by_name": { "list": [ { "courier_service_id": "1943", "courier_service_name": "ООО «СВ Карго Логистика»", "confirmed_courier_service": "1", "INN": "2130147858" } ] } } }
{ "auth": { "token": "2604fef03184da8dff33d19e78bf16f6", "courier_service_id": 1930 }, "get_cities_list": {} }
{ "result": { "get_cities_list": [ { "city_id": "3", "city_name": "Хакасия", "region": "Хакасия" }, { "city_id": "4", "city_name": "Абаза", "region": "Хакасия" } ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1930 }, "get_cities_of_cs":{ } }
{ "result": { "get_cities_of_cs": [ { "city_id": "33074", "city_name": "Новодвинск город" }, { "city_id": "33083", "city_name": "Северодвинск город" }, { "city_id": "35430", "city_name": "Няндома город" }, { "city_id": "37559", "city_name": "Губкин город" } ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1930 }, "set_cities_to_cs":[ 33074, 33083, 35430, 37559 ] }
{ "result": { "set_cities_to_cs": { "success": true } } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1930 }, "delete_cities_of_cs":[ 33074, 33083, 35430 ] }
{ "result": { "delete_cities_of_cs": { "status": "deleted" } } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "get_delivery_type":{} }
{ "result": { "get_delivery_type": [ { "delivery_type_id": "1", "delivery_type_name": "Продукты (до 1 часа)" }, { "delivery_type_id": "2", "delivery_type_name": "Сверхсрочно (до 2 часов)" } ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "get_delivery_type_to_city":{} }
{ "result": { "get_delivery_type_to_city": { "Москва": [ { "city_id": "1197", "city_name": "Москва", "delivery_type_id": "1", "delivery_type_name": "Продукты (до 1 часа)" }, { "city_id": "1197", "city_name": "Москва", "delivery_type_id": "10", "delivery_type_name": "Заборы" } ] } } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "set_delivery_type_to_city":[ { "city_id":1203, "delivery_type_id":[ 1,2,3,5,6,7,10 ] }, { "city_id":1201, "delivery_type_id":[ 1,2,3,10 ] } ] }
{ "result": { "set_delivery_type_to_city": { "1203": [ "success", "success", "success", "success", "success", "success", "success" ], "1201": [ "success", "success", "success", "success" ] } } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "get_delivery_type":{} }
{ "result": { "get_delivery_type": [ { "delivery_type_id": "1", "delivery_type_name": "Продукты (до 1 часа)" }, { "delivery_type_id": "2", "delivery_type_name": "Сверхсрочно (до 2 часов)" } ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "get_delivery_type_to_city":{} }
{ "result": { "get_delivery_type_to_city": { "Москва": [ { "city_id": "1197", "city_name": "Москва", "delivery_type_id": "1", "delivery_type_name": "Продукты (до 1 часа)" }, { "city_id": "1197", "city_name": "Москва", "delivery_type_id": "10", "delivery_type_name": "Заборы" } ] } } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "set_delivery_type_to_city":[ { "city_id":1203, "delivery_type_id":[ 1,2,3,5,6,7,10 ] }, { "city_id":1201, "delivery_type_id":[ 1,2,3,10 ] } ] }
{ "result": { "set_delivery_type_to_city": { "1203": [ "success", "success", "success", "success", "success", "success", "success" ], "1201": [ "success", "success", "success", "success" ] } } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1930 }, "set_highways_to_cs":[ [ 33074, 33083 ], [ 39317, 37559, 41141 ] ] }
{ "result": { "set_highways_to_cs": { "success": true } } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1930 }, "get_highways_of_cs":{} }
{ "result": { "get_highways_of_cs": { "1": { "highway_id": "1", "highways": [ { "city_id": "33074", "city_name": "Новодвинск город" }, { "city_id": "33083", "city_name": "Северодвинск город" } ] }, "2": { "highway_id": "2", "highways": [ { "city_id": "39317", "city_name": "Злынка город" }, { "city_id": "37559", "city_name": "Губкин город" }, { "city_id": "41141", "city_name": "Трубчевск город" } ] } } } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1930 }, "delete_highways_from_cs":[ 3, 4, 5, 6 ] }
{ "result": { "delete_highways_from_cs": { "success": true } } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "get_branches_of_cs":{} }
{ "result": { "get_branches_of_cs": [ { "city_id": "1201", "city_name": "Санкт-Петербург", "quantity": "1" }, { "city_id": "1197", "city_name": "Москва", "quantity": "1" } ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "set_branches_of_cs":[ {"city_id":1201,"quantity":1},"city_id":1197,"quantity":1, {"city_id":4, "quantity":1} ] }
{ "result": { "set_branches_of_cs": [ "success", "success", "no changes" ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "delete_branches_of_cs":[ 4, 5 ] }
{ "result": { "delete_branches_of_cs": [ "success", "no changes" ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "get_warehouses_of_cs":{} }
{ "result": { "get_warehouses_of_cs": [ { "city_id": "1201", "city_name": "Санкт-Петербург", "quantity": "2", "category": [ "A+", "A" ] }, { "city_id": "1197", "city_name": "Москва", "quantity": "1", "category": [ "B+" ] } ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "set_warehouses_of_cs":[ { "city_id":1201, "quantity":2, "category":[ "A+", "A" ] }, { "city_id":1197, "quantity":1, "category":[ "B+" ] } ] }
{ "result": { "set_warehouses_of_cs": [ "success", "success", "no changes" ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "delete_warehouses_of_cs":[ 4, 5 ] }
{ "result": { "delete_warehouses_of_cs": [ "success", "no changes" ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "get_pvz_of_cs":{} }
{ "result": { "get_pvz_of_cs": [ { "city_id": "1201", "city_name": "Санкт-Петербург", "quantity": "3", "pvz_with_fitting": 55, "pvz_with_terminals": 40 }, { "city_id": "1197", "city_name": "Москва", "quantity": "6", "pvz_with_fitting": 67, "pvz_with_terminals": 43 }, { "city_id": "4", "city_name": "Абаза", "quantity": "2", "pvz_with_fitting": 80, "pvz_with_terminals": 25 } ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "set_pvz_of_cs":[ { "city_id":1201, "quantity":3, "pvz_with_fitting": 67, "pvz_with_terminals": 43 }, { "city_id":1197, "quantity":6, "pvz_with_fitting": 82, "pvz_with_terminals": 19 }, { "city_id":4, "quantity":2, "pvz_with_fitting":55, "pvz_with_terminals": 88 } ] }
{ "result": { "set_pvz_of_cs": [ "success", "success", "no changes" ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "delete_pvz_of_cs":[ 4, 5 ] }
{ "result": { "delete_pvz_of_cs": [ "success", "no changes" ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "get_postomats_of_cs":{} }
{ "result": { "get_postomats_of_cs": [ { "city_id": "1201", "city_name": "Санкт-Петербург", "quantity": "3" }, { "city_id": "1197", "city_name": "Москва", "quantity": "6" } ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "set_postomats_of_cs":[ {"city_id":1201,"quantity":3},"city_id":1197,"quantity":6, {"city_id":4, "quantity":2} ] }
{ "result": { "set_postomats_of_cs": [ "success", "success", "no changes" ] } }
{ "auth": { "token": "a9942daf4822866a3af92011b3c7db11", "courier_service_id": 1929 }, "delete_postomats_of_cs":[ 4, 5 ] }
{ "result": { "delete_postomats_of_cs": [ "success", "no changes" ] } }