Introduction

The Fulfillment Methods API allows you to create, retrieve, and manage fulfillment methods for restaurants.

With the Fulfillment Methods API, you can:

  • Create and manage fulfillment methods.
  • Get information about existing fulfillment methods.
  • Retrieve fulfillment methods that are available for a given address.

Before you begin

It’s important to note the following points before starting to code:

  • The site owner must install the Wix Restaurants Orders (New) app.

Use Cases

Allow a restaurant owner to manage their site's fulfillment methods through an external app.

Terminology

  • Fulfillment method: A method by which a restaurant can serve its customers their orders.
  • Pickup fulfillment method: A type of fulfillment method in which the customer picks up the order from the restaurant.
  • Delivery fulfillment method: A type of fulfillment method in which the restaurant, or someone on behalf of the restaurant, delivers the order to the customer.
Was this helpful?
Yes
No

Sample Flows

This article shares a possible use case your app could support, along with sample flows that could support that use case. This can be a helpful jumping-off point as you plan your app's implementation.

Allow a restaurant owner to manage their site's fulfillment methods through an external app

A restaurant owner wants to manage its fulfillment method availability through an external app. Any changes made on the app must be synced to their Wix site and vice versa.

Prerequisites

The site owner must do the following:

  • Install the Wix Restaurants Orders (New) app.
  • Configure the fulfillment methods for the 3rd-party delivery providers.

Flows

The following flows require a mapping from the fulfillment methods on Wix to the fulfillment methods in the external app. Create this mapping and store it on your app's server. According to this mapping, you can sync the data between the app and the site using webhooks and API calls.

>Note: Make sure to ignore webhooks resulting from calls you have triggered so that you don't create an endless loop of updates.

After creating the mapping, you can follow these two flows to create the two-way sync:

Flow 1: Synchronizing to the external system

  1. Sign up to the following fulfillment method webhooks to receive notifications about any changes to fulfillment methods on the Wix site. The webhooks are:
  2. When one of the webhooks is triggered, update the corresponding fulfillment method in the external app according to the mapping.
  3. Update the mapping to reflect any new or deleted fulfillment methods.

Flow 2: Synchronizing to Wix

  1. When a change is made to any of the fulfillment methods in the external app, find the id of the corresponding fulfillment method in Wix according to the mapping.
  2. If the change is an update, use the id from step 1 to get the current revision of the corresponding fulfillment method object using Get Fulfillment Method. This is required when calling the Update fulfillment method endpoint on Wix.
  3. Using the id from step 1, call the appropriate endpoint in the Fulfillment Methods API to update the information in Wix. The endpoints are:
  4. Update the mapping to reflect any new or deleted fulfillment methods.
Was this helpful?
Yes
No

Fulfillment Methods: Supported Filters and Sorting

The following table shows field support for filters and sorting for the Fulfillment Methods object:

FieldSupported FiltersSortable
id$eq, $ne, $in, $nin, $startsWithSortable
created_date$eq, $ne, $in, $nin, $startsWith, $lt, $lte, $gt, $gteSortable
updated_date$eq, $ne, $in, $nin, $startsWith, $lt, $lte, $gt, $gteSortable
type$eq, $ne, $in, min, $startsWith
minOrderPrice$eq, $ne, $in, $nin, $startsWith, $lt, $lte, $gt, $gteSortable
name$eq, $ne, $in, min, $startsWithSortable
enabled$eq, $ne, $in, $nin
fee$eq, $ne, $in, $nin, $startsWith, $lt, $lte, $gt, $gteSortable

Related content: API Query Language, Query Fulfillment Methods

Was this helpful?
Yes
No

Fulfillment Method Object

A Fulfillment Method represents a way in which a restaurant can provide orders to its customers.

Properties
idstringRead-onlyformat GUID
Fulfillment method ID.

revisionintegerRead-onlyformat int64
The current state of an item. Each time the item is modified, its revision changes by the server. for an update operation to succeed, you MUST pass the latest revision.

createdDatestringRead-onlyformat date-time
Date and time the fulfillment method was created.

updatedDatestringRead-onlyformat date-time
Date and time the fulfillment method was last updated.

typestring
3 enum supported values:
UNKNOWN_FULFILLMENT_TYPEPICKUPDELIVERY
Type of fulfillment method.

namestringminLength 1maxLength 30
Fulfillment method name.

enabledboolean
Whether the fulfillment method is enabled.

feestringdecimalValue {"maxScale":3}
Fee for using this fulfillment method.

availabilityobject
Availability of this fulfillment method.

minOrderPricestringdecimalValue {"maxScale":3}
Minimum order price to qualify for using this fulfillment method.

ONE OF:


pickupOptionsobject
Data specific for pickup fulfillment method.

deliveryOptionsobject
Data specific for delivery fulfillment method.
Was this helpful?
Yes
No

GetList Fulfillment Methods

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a list of up to 100 fulfillment methods.

Endpoint
GET
https://www.wixapis.com/fulfillment-methods/v1/fulfillment-methods

Was this helpful?
Yes
No

PostCreate Fulfillment Method

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates a new fulfillment method.

Note: fulfillment_method.availability.time_zone uses the time zone specified in the language and regions settings in the dashboard, regardless of the value provided.

Endpoint
POST
https://www.wixapis.com/fulfillment-methods/v1/fulfillment-methods

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

GetGet Fulfillment Method

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a fulfillment method.

Endpoint
GET
https://www.wixapis.com/fulfillment-methods/v1/fulfillment-methods/{fulfillmentMethodId}

Was this helpful?
Yes
No

DeleteDelete Fulfillment Method

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Deletes a fulfillment method.

Endpoint
DELETE
https://www.wixapis.com/fulfillment-methods/v1/fulfillment-methods/{fulfillmentMethodId}

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PatchUpdate Fulfillment Method

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Updates a fulfillment method.

Each time the fulfillment method is updated, revision increments by 1. The existing revision must be included when updating the fulfillment method. This ensures you're working with the latest fulfillment method information, and it prevents unintended overwrites.

Endpoint
PATCH
https://www.wixapis.com/fulfillment-methods/v1/fulfillment-methods/{fulfillmentMethod.id}

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PostQuery Fulfillment Methods

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a list of fulfillment methods given the provided paging, filtering, and sorting. Up to 100 fulfillment methods can be returned per request.

For a detailed list of supported operations, see the Supported Filters and Sorting article. To learn how to query reservations, see API Query Language.

Endpoint
POST
https://www.wixapis.com/fulfillment-methods/v1/fulfillment-methods/query

Was this helpful?
Yes
No

PostList Available Fulfillment Methods For Address

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a list of up to 100 fulfillment methods available for a given address.

The response will only include:

  • Non-delivery fulfillment methods.
  • Delivery fulfillment methods that are available to the given address according to their delivery areas.
Endpoint
POST
https://www.wixapis.com/fulfillment-methods/v1/fulfillment-methods/available-for-address

Was this helpful?
Yes
No

Fulfillment Method Created

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a fulfillment method is created.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.restaurants.v1.fulfillment_method.

slugstring
Event name. Expected created.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

createdEventobject
Event information.

Was this helpful?
Yes
No

Fulfillment Method Updated

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a fulfillment method is updated.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.restaurants.v1.fulfillment_method.

slugstring
Event name. Expected updated.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

updatedEventobject
Event information.

Was this helpful?
Yes
No

Fulfillment Method Deleted

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a fulfillment method is deleted.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.restaurants.v1.fulfillment_method.

slugstring
Event name. Expected deleted.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

deletedEventstruct
Event information.

Was this helpful?
Yes
No