With Wix Restaurants Orders, site owners can retrieve orders and update their statuses. They can also receive a notification when a new order has been placed.
The Orders API allows your app to:
- Retrieve orders
- Mark orders as accepted, fulfilled, and canceled
- Listen to domain events
- Catalog: All menus.
- Line Item: Any dish or dish option defined in the catalog.
- Dish Option: Any extra that you can add to a dish, any size of the dish, or any deselection that you can remove from the dish.
- Discount: A price reduction for an item or the order. The discount can be an amount, a percentage or free delivery. Discounts may depend on entering a coupon code.
- Order Statuses:
-
Pending: The order has been placed by the customer, but the payment or validation checks have not cleared yet.
Note: Site owners can't see pending orders in their dashboard.
-
New: The order has passed validation checks and the payment has cleared, but the site owners have not accepted or canceled the order yet.
-
Accepted: The site owners have agreed to fulfill the order.
Note: Site owners can set up an automation in the Business Manager to immediately accept every new order.
-
Canceled: The site owners have decided not to fulfill the order or to mark an already fulfilled order as problematic.
-
Fulfilled: The order has been successfully distributed.
-
- Discounts: Percentage discounts can only be applied to an item but not the entire order.
- Currently the Restaurants Orders API doesn’t include create functionality. You can update order statuses and listen to domain events.
This article shares a possible use case your app could support, as well as an example flow. You're certainly not limited to this use case, but it can be a helpful jumping off point as you plan your app's implementation.
In order to enable site owners to sync their external POS with Wix Restaurants Orders data, your app will need to retrieve each new order that is placed in Wix Restaurants. Then you can create a mapping to keep the order statuses synced.
-
Sign up for the New Order Domain Event.
-
Create a mapping between Wix Restaurants and the external POS. Store the mapping on your servers.
-
Get notified when a new order has been placed on Wix Restaurants and add it to the mapping.
-
Add the order to the external POS.
Note: Make sure to include both Wix Restaurants
orderId
and external order ID in the mapping. -
Change the order status on Wix Restaurants according to events in the external POS. Use the Accept Order, Fulfill Order, and Cancel Order endpoints.
The List Orders
and Get Order endpoints
allow you to return a partial order
object
including only the fields you request.
To do this, you can use projected fields in the fieldMask.paths
array in your request.
The following fields can be returned in a partial object
by specifying them in fieldMask.paths
:
Note:
id
andrevision
are always returned, even if you don’t include them in thefieldMask.paths
array in your request.
id
revision
created_date
updated_date
comment
currency
status
line_items
discounts
payments
activities
channel_info
channel_info.type
coupon.code
coupon.id
fulfillment
fulfillment.type
fulfillment.promised_time
fulfillment.asap
fulfillment.delivery_details
fulfillment.delivery_details.charge
fulfillment.delivery_details.address
fulfillment.delivery_details.address.formatted
fulfillment.delivery_details.address.country
fulfillment.delivery_details.address.city
fulfillment.delivery_details.address.street
fulfillment.delivery_details.address.street_number
fulfillment.delivery_details.address.apt
fulfillment.delivery_details.address.floor
fulfillment.delivery_details.address.entrance
fulfillment.delivery_details.address.zip_code
fulfillment.delivery_details.address.country_code
fulfillment.delivery_details.address.approximate
fulfillment.delivery_details.address.comment
fulfillment.delivery_details.address.address_line2
fulfillment.delivery_details.address.on_arrival
fulfillment.delivery_details.address.location
fulfillment.delivery_details.address.location.latitude
fulfillment.delivery_details.address.location.longitude
fulfillment.pickup_details
fulfillment.pickup_details.fee
fulfillment.pickup_details.curbside
fulfillment.pickup_details.curbside.info
fulfillment.dine_in_details
fulfillment.dine_in_details.label
fulfillment.dine_in_details.value
customer
customer.first_name
customer.last_name
customer.phone
customer.email
customer.contact_id
customer.member_id
customer.visitor_id
totals
totals.subtotal
totals.total
totals.delivery
totals.tax
totals.quantity
totals.loyalty_savings
totals.tip
loyalty_info
loyalty_info.reward_id
loyalty_info.applied_amount
loyalty_info.redeemed_points
loyalty_info.transaction_id
loyalty_info.estimated_account_balance
loyalty_info.estimated_points_earned
loyalty_info.reward_revision
Retrieves an order.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
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:Syntax
Changes the order status to ACCEPTED
.
Note: It is not possible to change the order status from
FULFILLED
toACCEPTED
.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Changes the order status to CANCELED
.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Changes the order status to FULFILLED
.
Permission Scopes
For app development, you must have one of the following permission scopes:Syntax
Deprecation Notice
The Order Created webhook has been replaced with the New Order webhook and will be removed on September 30, 2022. If your app uses this webhook, we recommend updating your code as soon as possible.
Event Body
Triggered on successful creation of a new order. This means the order has been validated and the payment has cleared, and now the site owner can accept or cancel the order.
Event Body
Triggered when an order is accepted.
Event Body
Triggered when an order is canceled.
Event Body
Triggered when an order is fulfilled.