Function delivery/export (http://<DOMAIN>/api/delivery/export/)
Parameters:
- token - authorisation key received through the auth function
Response:
- status - status of the function execution
- OK - data exported
- EMPTY - no data to export
- response.delivery - list of delivery options
- response.delivery[i].id - unique identifier of delivery variant
- response.delivery[i].title - delivery variant name
- response.delivery[i].title.en - delivery option name in English
- response.delivery[i].title.ro - name of delivery option in Romanian
- ....
- response.delivery[i].title.<LN> is the name of the delivery option in the language. Where <LN> is the abbreviation of the language
- response.delivery[i].type - delivery type identifier (see delivery/exportTypes function)
- response.delivery[i].by_carrier - display "at carrier rates" instead of delivery cost (boolean). It is used only if the order amount does not match any shipping cost from the "price_options" parameter
- response.delivery[i].enabled - delivery option enabled
- response.delivery[i].payment[] - list of identifiers of available payment methods for this delivery option (see payment/export function).
- response.delivery[i].payment[n] - payment option identifier
- response.delivery[i].price_options[] - list of settings of delivery price formation. Price options take precedence over the standard "by_carrier" property
- response.delivery[i].price_options[n].min - threshold of the order amount at which the specified price starts to take effect.
- response.delivery[i].price_options[n].price - delivery cost
- response.delivery[i].price_options[n].by_carrier - if the current cost threshold is enabled, display "at carrier rates" instead of delivery cost
Пример запроса на адрес (http://<DOMAIN>/api/delivery/export/)
{ "token": "24a75d0678c49a34030e35baeb376ff3" }
Пример ответа на запрос
{ "status": "OK", "response": { "delivery": [ { "id": 11, "title": { "ru": "Курьером по Киеву", "ua": "Кур'єром по Киеву" }, "type": 1, "by_carrier": false, "enabled": true, "payment": [ 13, 14, 15, 16 ], "price_options": [ { "min": 0, "price": 45, "by_carrier": false }, { "min": 0, "price": 0, "by_carrier": false }, { "min": 1000, "price": 0, "by_carrier": false } ] }, { "id": 10, "title": { "ru": "Вариант доставки не определен", "ua": "Вариант доставки не определен" }, "type": 0, "by_carrier": false, "enabled": false, "payment": [], "price_options": [ { "min": 0, "price": 0, "by_carrier": false } ] }, { "id": 8, "title": { "ru": "Самовывоз", "ua": "Самовивіз" }, "type": 4, "by_carrier": false, "enabled": false, "payment": [ 13, 14, 16 ], "price_options": [ { "min": 0, "price": 0, "by_carrier": false } ] }, { "id": 9, "title": { "ru": "Укрпочтой", "ua": "Укрпоштою" }, "type": 5, "by_carrier": false, "enabled": false, "payment": [ 13, 14, 16 ], "price_options": [ { "min": 0, "price": 35, "by_carrier": false }, { "min": 100, "price": 0, "by_carrier": false } ] }, { "id": 3, "title": { "ru": "Новой почтой", "ua": "Новою поштою" }, "type": 2, "by_carrier": true, "enabled": true, "payment": [ 12, 13, 14, 15, 16 ], "price_options": [ { "min": 0, "price": 35, "by_carrier": true }, { "min": 500, "price": 15, "by_carrier": false } ] }, { "id": 12, "title": { "ru": "Автолюкс", "ua": "Автолюкс" }, "type": 2, "by_carrier": false, "enabled": false, "payment": [], "price_options": [] }, { "id": 13, "title": { "ru": "Интайм", "ua": "Интайм" }, "type": 2, "by_carrier": false, "enabled": true, "payment": [], "price_options": [ { "min": 0, "price": 0, "by_carrier": false } ] }, { "id": 14, "title": { "ru": "Деливери", "ua": "Деливери" }, "type": 5, "by_carrier": true, "enabled": true, "payment": [ 14, 15 ], "price_options": [ { "min": 0, "price": 0, "by_carrier": false } ] } ] } }
Add Comment