For the complete documentation index, see llms.txt. This page is also available as Markdown.

Data

Get and set data to the widget

Delivery options

Available delivery options for the current zip code

Get

ZapietEats.getDeliveryOptions()

Example response

{
    "zipCode": 123456,
    "settings": {
        "all_restaurants_closed": false,
        "pickup": {
            "count": 1,
            "estimated_ready_for_pickup_time": 15,
            "restaurants": {
                "current_page": 1,
                "data": [
                    {
                        "id": 1,
                        "zapiet_id": 1,
                        "company_name": "Restaurant",
                        "address_line_1": "",
                        "address_line_2": "",
                        "phone": "",
                        "phone_formatted": "",
                        "postal_code": "",
                        "region": "",
                        "country_code": "",
                        "country_name": "",
                        "latitude": "",
                        "longitude": "",
                        "distance": "",
                        "max_radius": "",
                        "city": "",
                        "estimated_pickup_time": "",
                        "accepting_orders": true,
                        "status": "open",
                        "zone": null,
                        "menus": [
                            {
                                "id": 1,
                                "name": {
                                    "en": "Menu"
                                },
                                "collection": {
                                    "id": 1,
                                    "zapiet_id": 1,
                                    "external_id": "",
                                    "account_id": 1,
                                    "handle": "",
                                    "title": "Menu 1",
                                    "image": null,
                                    "config": "{\"status\": true}",
                                },
                                "status": {
                                    "store_pickup": true,
                                    "local_delivery": true
                                }
                            }
                        ],
                        "config": {
                            "tags": {
                                "store_pickup": [
                                    "Store Pickup"
                                ],
                                "local_delivery": [
                                    "Local Delivery"
                                ]
                            },
                            "pickup_rate": {
                                "rate_name": {
                                    "en": "Pickup"
                                },
                                "max_radius": 0,
                                "rate_price": 0,
                                "phone_required": false,
                                "min_order_value": 0,
                                "rate_description": {
                                    "en": null
                                },
                                "max_radius_enabled": false,
                                "free_pickup_enabled": false,
                                "estimated_pickup_time": 15,
                                "free_pickup_min_order_value": 0
                            }
                        }
                    }
                ],
                "from": 1,
                "last_page": 1,
                "per_page": 3,
                "to": 3,
                "total": 3
            }
        },
        "delivery": {
            "estimated_delivery_time": 20,
            "restaurant": {
                "id": 1,
                "zapiet_id": 1,
                "company_name": "Restaurant",
                "address_line_1": "",
                "address_line_2": "",
                "phone": "",
                "phone_formatted": "",
                "postal_code": "",
                "region": "",
                "country_code": "",
                "country_name": "",
                "latitude": "",
                "longitude": "",
                "distance": "",
                "max_radius": null,
                "city": "",
                "estimated_pickup_time": "",
                "accepting_orders": true,
                "status": "open",
                "zone": {
                    "id": 1,
                    "name": "Zone 1",
                    "config": {
                        "rate_name": {
                            "en": "Delivery"
                        },
                        "rate_price": 4.95,
                        "validation": {
                            "option": "postcode",
                            "max_radius": 0,
                            "eligible_post_codes": "",
                            "max_driving_distance": 0
                        },
                        "phone_required": false,
                        "min_order_value": 0,
                        "free_delivery_enabled": false,
                        "estimated_delivery_time": 20,
                        "free_delivery_min_order_value": 0
                    }
                },
                "menus": [
                    {
                        "id": 1,
                        "name": {
                            "en": "Menu"
                        },
                        "collection": {
                            "id": 1,
                            "zapiet_id": 1,
                            "external_id": "",
                            "account_id": 1,
                            "handle": "",
                            "title": "Menu",
                            "image": null,
                            "config": "{\"status\": true}",
                        },
                        "status": {
                            "store_pickup": true,
                            "local_delivery": true
                        }
                    }
                ],
                "config": {
                    "tags": {
                        "store_pickup": [
                            "Store Pickup"
                        ],
                        "local_delivery": [
                            "Local Delivery"
                        ]
                    },
                    "pickup_rate": {
                        "rate_name": {
                            "en": "Pickup"
                        },
                        "max_radius": 0,
                        "rate_price": 0,
                        "phone_required": false,
                        "min_order_value": 0,
                        "rate_description": {
                            "en": null
                        },
                        "max_radius_enabled": false,
                        "free_pickup_enabled": false,
                        "estimated_pickup_time": 15,
                        "free_pickup_min_order_value": 0
                    }
                }
            }
        }
    }
}

Delivery Option

Currently selected delivery option

Get

Response

A string with the value "pickup" or "delivery"

Set

Example call

Parameters

A string with the value "pickup" or "delivery"

Restaurant

Currently selected restaurant

Get

Example response

Set

Example call

Parameters

An integer with the restaurant's zapiet_id

Currently selected menu

Get

Example response

Set

Example call

Parameters

An integer with the menu's zapiet_id

Language

Widget's current display language

Get

Response

A string with the widget's current language code

Set

Example call

Parameters

An string with the language code

Last updated