Setup

To use the Orders 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 { orders } from @wix/restaurants:

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

acceptOrder( )

Developer Preview

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

Changes the order status to ACCEPTED.

Note: It is not possible to change the order status from FULFILLED to ACCEPTED.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Orders
Manage Bookings Services and Settings
Manage Restaurants - all permissions
Learn more about permission scopes.
Copy
function acceptOrder(_id: string, options: AcceptOrderOptions): Promise<AcceptOrderResponse>
Method Parameters
_idstringRequired

ID of the order to mark as ACCEPTED.


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

cancelOrder( )

Developer Preview

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

Changes the order status to CANCELED.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Orders
Manage Bookings Services and Settings
Manage Restaurants - all permissions
Learn more about permission scopes.
Copy
function cancelOrder(_id: string, options: CancelOrderOptions): Promise<CancelOrderResponse>
Method Parameters
_idstringRequired

ID of the order to mark as CANCELED.


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

fulfillOrder( )

Developer Preview

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

Changes the order status to FULFILLED.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Orders
Manage Bookings Services and Settings
Manage Restaurants - all permissions
Learn more about permission scopes.
Copy
function fulfillOrder(_id: string): Promise<FulfillOrderResponse>
Method Parameters
_idstringRequired

ID of the order to mark as FULFILLED.

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

listOrders( )

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 1000 orders, given the provided filters.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Orders
Read Orders
Manage Bookings Services and Settings
Manage Restaurants - all permissions
Learn more about permission scopes.
Copy
function listOrders(options: ListOrdersOptions): Promise<ListOrdersResponse>
Method Parameters
optionsListOrdersOptions
Returns
Return Type:Promise<ListOrdersResponse>
Was this helpful?
Yes
No