Delivery options export

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


Query example (http://<DOMAIN>/api/delivery/export/)
{  
    "token": "24a75d0678c49a34030e35baeb376ff3"
}
Response example
{
    "status": "OK",
    "response": {
        "delivery": [
            {
                "id": 11,
                "title": {
                    "en": "By courier",
                    "ro": "Prin curier"
                },
                "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": {
                    "en": "Delivery option not specified",
                    "ro": "Opțiune de livrare nespecificată"
                },
                "type": 0,
                "by_carrier": false,
                "enabled": false,
                "payment": [],
                "price_options": [
                    {
                        "min": 0,
                        "price": 0,
                        "by_carrier": false
                    }
                ]
            },
            {
                "id": 8,
                "title": {
                    "en": "Local pickup",
                    "ro": "Ridicare personală"
                },
                "type": 4,
                "by_carrier": false,
                "enabled": false,
                "payment": [
                    13,
                    14,
                    16
                ],
                "price_options": [
                    {
                        "min": 0,
                        "price": 0,
                        "by_carrier": false
                    }
                ]
            },
            {
                "id": 9,
                "title": {
                    "en": "DPD",
                    "ro": "DPD"
                },
                "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": {
                    "en": "Nova Post",
                    "ro": "Nova Post"
                },
                "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": {
                    "en": "Sameday",
                    "ro": "Sameday"
                },
                "type": 2,
                "by_carrier": false,
                "enabled": false,
                "payment": [],
                "price_options": []
            },
            {
                "id": 13,
                "title": {
                    "en": "FAN Courier (Moldova): Home Delivery",
                    "ro": "FAN Courier (Moldova): Home Delivery"
                },
                "type": 2,
                "by_carrier": false,
                "enabled": true,
                "payment": [],
                "price_options": [
                    {
                        "min": 0,
                        "price": 0,
                        "by_carrier": false
                    }
                ]
            },
            {
                "id": 14,
                "title": {
                    "en": "InPost Parcel Locker",
                    "ro": "InPost Parcel Locker"
                },
                "type": 5,
                "by_carrier": true,
                "enabled": true,
                "payment": [
                    14,
                    15
                ],
                "price_options": [
                    {
                        "min": 0,
                        "price": 0,
                        "by_carrier": false
                    }
                ]
            }
        ]
    }
}