Setup

To use the FulfillmentMethods API, install the @wix/restaurants package using npm or Yarn:

Copy
1
npm install @wix/restaurants

or

Copy
1
yarn add @wix/restaurants

Then import { fulfillmentMethods } from @wix/restaurants:

Copy
1
import { fulfillmentMethods } from '@wix/restaurants'
Was this helpful?
Yes
No

createFulfillmentMethod( )

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.

Copy
function createFulfillmentMethod(fulfillmentMethod: FulfillmentMethod): Promise<FulfillmentMethod>
Method Parameters
fulfillmentMethodFulfillmentMethodRequired

Fulfillment method to create.

Returns
Return Type:Promise<FulfillmentMethod>
Was this helpful?
Yes
No

deleteFulfillmentMethod( )

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.

Copy
function deleteFulfillmentMethod(fulfillmentMethodId: string): Promise<void>
Method Parameters
fulfillmentMethodIdstringRequired

The ID of the fulfillment method to delete.

Was this helpful?
Yes
No

getFulfillmentMethod( )

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.

Copy
function getFulfillmentMethod(fulfillmentMethodId: string): Promise<FulfillmentMethod>
Method Parameters
fulfillmentMethodIdstringRequired

The ID of the fulfillment method to retrieve.

Returns
Return Type:Promise<FulfillmentMethod>
Was this helpful?
Yes
No

listAvailableFulfillmentMethodsForAddress( )

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.
Copy
function listAvailableFulfillmentMethodsForAddress(options: ListAvailableFulfillmentMethodsForAddressOptions): Promise<ListAvailableFulfillmentMethodsForAddressResponse>
Method Parameters
optionsListAvailableFulfillmentMethodsForAddressOptions

Options for listing the available fulfillment methods.

Returns
Return Type:Promise<ListAvailableFulfillmentMethodsForAddressResponse>
Was this helpful?
Yes
No

listFulfillmentMethods( )

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.

Copy
function listFulfillmentMethods(options: ListFulfillmentMethodsOptions): Promise<ListFulfillmentMethodsResponse>
Method Parameters
optionsListFulfillmentMethodsOptions

Options for listing the fulfillment methods.

Returns
Return Type:Promise<ListFulfillmentMethodsResponse>
Was this helpful?
Yes
No

queryFulfillmentMethods( )

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 query to retrieve a list of fulfillment methods.

The queryFulfillmentMethods() function builds a query to retrieve a list of reservations and returns a FulfillmentMethodsQueryBuilder object.

The returned object contains the query definition, which is used to run the query using the find() function.

You can refine the query by chaining FulfillmentMethodsQueryBuilder functions onto the query. FulfillmentMethodsQueryBuilder functions enable you to filter, sort, and control the results that queryFulfillmentMethods() returns.

The following FulfillmentMethodsQueryBuilder functions are supported for queryFulfillmentMethods(). For a full description of the reservation object, see the object returned for the items property in FulfillmentMethodsQueryResult.

PROPERTYSUPPORTED FILTERS & SORTING
_ideq(),ne(),exists(),in(),hasSome(),startsWith(),ascending(),descending()
_createdDateeq(),ne(),exists(),in(),hasSome(),lt(),le(),gt(),ge(),ascending(),descending()
_updatedDateeq(),ne(),exists(),in(),hasSome(),lt(),le(),gt(),ge(),ascending(),descending()
typeeq(),ne(),exists(),in(),hasSome(),ascending(),descending()
nameeq(),ne(),exists(),in(),hasSome(),startsWith(),ascending(),descending()
enabledeq(),ne(),exists(),in(),hasSome(),ascending(),descending()
feeeq(),ne(),exists(),in(),hasSome(),startsWith(),ascending(),descending()
minOrderPriceeq(),ne(),exists(),in(),hasSome(),startsWith(),ascending(),descending()
Copy
function queryFulfillmentMethods(options: QueryFulfillmentMethodsOptions): FulfillmentMethodsQueryBuilder
Method Parameters
optionsQueryFulfillmentMethodsOptions
Was this helpful?
Yes
No

updateFulfillmentMethod( )

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.

Copy
function updateFulfillmentMethod(_id: string, fulfillmentMethod: UpdateFulfillmentMethod): Promise<FulfillmentMethod>
Method Parameters
_idstringRequired

Fulfillment method ID.


fulfillmentMethodUpdateFulfillmentMethodRequired

Fulfillment method information to update.

Returns
Return Type:Promise<FulfillmentMethod>
Was this helpful?
Yes
No