Operation Definitions
The Online Ordering API documentation includes operation definitions, which list the endpoints, data models, and error responses.
Endpoints
GET /api/order
Summary
Get the orders.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
query |
| string | No | Odata filter parameter. Example of usage: filtering by customer: customer/id eq 'customer_id',filtering by state: state eq 'committed',filtering by terminal.id: creator/terminal/id eq '9',filtering by date range: time/created gt '2017-06-22T12:15:34Z' and time/created lt '2017-06-28T12:15:35Z'combined filtering: creator/terminal/id eq '9' and time/created gt '2017-06-22T12:15:34Z' and time/created lt '2017-06-28T12:15:35Z' |
query |
| number | No | The number of items to be returned |
query |
| string | No | The Odata sorting parameter. Example of sorting by time.created in descending order: time/created desc |
query |
| number | No | The number of items to be skipped |
query |
| string | No | The fields to be returned |
Responses
Code | Description | Schema |
|---|---|---|
200 | Returns a list of found orders | |
400 | Error getting order |
POST /api/order
Summary
Use the Create Order operation to create a new order. Users can create an empty order, or they can add products to the order at the same time as creating a new order. The Create Order method returns an Order Object.
Note
To create a refund order request, use the Create Refund Order request body.
To create an order with loyalty information, use the Create Order with loyalty information request body.
Beyond the standard Create Order request, which is documented below, it is possible to use the Create Order request to access additional features of Online Ordering:
Marketplace Facilitator Taxes - For integrators, such as delivery partners that are required to collect tax in some states but not in others, the Create Order operation provides a way to define the tax liability state of the order.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
body |
| Yes | Add the Create Order request body. To create a refund order, replace with CreateRefundOrderRequestBody. To create an order with loyalty information, replace with CreateOrderLoyaltyRequestBody. |
Responses
Code | Description | Schema |
|---|---|---|
200 | Order successfully created | |
400 | Error creating order |
GET /api/order/{_id}
Summary
Get the order by the identifier.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
Responses
Code | Description | Schema |
|---|---|---|
200 | Order successfully returned | |
404 | Error getting order |
DELETE /api/order/{_id}
Summary
Remove the order.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
header |
| string | No | The order target |
path |
| string | Yes | The unique identifier (UID) relating to the order |
Responses
Code | Description | Schema |
|---|---|---|
200 | Order successfully removed | |
400 | Error removing order |
PUT /api/order/{_id}/item
Summary
An order must include items before it can be processed. Use the Add Items operation to add items to an order or update the items already associated with the order.
When items are added to an order, the associated prices are used to automatically calculate the subtotal, tax amount, and total amount to be paid for the order.
The Add Items method returns an Order Object that includes an array of item objects and the subtotals, taxes, and total order amount.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
body |
| Yes | Adds items to the order request body (individual item structure). To add loyalty discount information, use the |
Responses
Code | Description | Schema |
|---|---|---|
200 | Item successfully added | |
400 | Error adding item to order |
DELETE /api/order/{_id}/item
Summary
Remove the item.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
body |
| Yes | Delete the child items body |
Responses
Code | Description | Schema |
|---|---|---|
200 | Item successfully removed | |
400 | Error removing item from order |
PUT /api/order/{_id}/item/update
Summary
Update an order item.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
body |
| Yes | Update the order item request body |
Responses
Code | Description | Schema |
|---|---|---|
200 | Successfully updated order item | |
400 | Error updating order item |
PUT /api/order/{_id}/item/{parent_item_id}/child
Summary
Add a child item.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
path |
| string | Yes | The |
body |
| No | Add child items body |
Responses
Code | Description | Schema |
|---|---|---|
200 | Child item successfully added | |
400 | Error adding child item to order |
PUT /api/order/{_id}/checkin
Summary
The Check In operation sends the order to the store to be prepared and delivered. Orders that have been checked in cannot be altered.
The Check In operation returns an Order Object with the state property set to checkedin.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
body |
| No | Add a destination to the request body |
Responses
Code | Description | Schema |
|---|---|---|
200 | Order successfully checked in | |
400 | Error checking in order |
PUT /api/order/{_id}/customer
Summary
An order must have a customer associated with it before it can be processed. The Add Customer operation adds a customer to an order or updates customer information already associated with the order. The customer object, attached to the order, is where users can set a pickup date and time for the order. The Add Customer operation returns an Order Object that includes the customer information.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
body |
| Yes | Add a customer to the order request body |
Responses
Code | Description | Schema |
|---|---|---|
200 | Successfully added customer to order | |
400 | Error adding customer to order |
DELETE /api/order/{_id}/customer
Summary
Remove the customer from the order.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
Responses
Code | Description | Schema |
|---|---|---|
200 | Successfully removed customer from order | |
400 | Error removing customer from order |
PUT /api/order/{_id}/payment
Summary
Use the Add Payment operation to define how a customer paid for an order.
It is possible to use multiple payment methods to pay for an order. When the total amount of the order has been allocated to payment methods, the value of the payment_status parameter switches from "open" to "paid."
The Add Payment operation returns an Order Object with the payment methods included. The operation automatically calculates and updates the payment status and change due.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
body |
| Yes | Add the Payment request body |
Responses
Code | Description | Schema |
|---|---|---|
200 | Successfully added payment to order | |
400 | Error adding payment to order |
DELETE /api/order/{_id}/payment
Summary
Remove the payment from the order.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
body |
| Yes | Add the Delete Payment request body |
Responses
Code | Description | Schema |
|---|---|---|
200 | Successfully removed payment from order | |
400 | Error removing payment from order |
PUT /api/order/{_id}/discount
Summary
Use the Create Order operation to create a new discount order with loyalty information.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
body |
| Yes | Add the Add Order Discounts request body |
Responses
Code | Description | Schema |
|---|---|---|
200 | Order successfully created | |
400 | Error creating order |
DELETE /api/order/{_id}/discount
Summary
Remove the discount from the order.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
body |
| Yes | Removes the Discount request body |
Responses
Code | Description | Schema |
|---|---|---|
200 | Successfully removed discount from order | |
400 | Error deleting discount from order |
PUT /api/order/{_id}/total
Summary
Manually total the order.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
Responses
Code | Description | Schema |
|---|---|---|
200 | Successfully totaled order | |
400 | Error totaling order |
PUT /api/order/{_id}/update
Summary
Update the order.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
body |
| Yes | Optional fields to update in the order |
Responses
Code | Description | Schema |
|---|---|---|
200 | Successfully updated the order | |
400 | Error updating order |
PUT /api/order/{_id}/commit
Summary
Use the Commit operation to confirm that the order is complete and ready to be processed. Committed orders can still be amended; however, users will have to update payment details if they change a committed order.
The Commit operation returns an Order Object with the state property set to committed.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
path |
| string | Yes | The unique identifier (UID) relating to the order |
body |
| No | Add a destination to the request body |
Responses
Code | Description | Schema |
|---|---|---|
200 | Successfully committed the order | |
400 | Error committing order |
PUT /api/order/{_id}/touchlessPayment
Summary
Add a touchless payment option to the order.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
body |
| Yes | The JSON formatted request |
Responses
Code | Description | Schema |
|---|---|---|
200 | Successfully added touchless payment | |
400 | Error adding touchless payment |
PUT /api/order/{_id}/close
Summary
Close the order.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
header |
| string | No | If it does not exist or is empty, then we send |
path |
| string | Yes | The unique identifier (UID) relating to the order |
body |
| Yes | The JSON formatted request |
Responses
Code | Description | Schema |
|---|---|---|
200 | Successfully closed order | |
400 | Validation Error |
GET /api/site/status
Summary
The Site Status operation allows users to retrieve the latest status updates for a company's sites, primarily to determine whether or not a site is online.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of site identifiers |
query |
| boolean | No | If set to true, additional field - |
Responses
Code | Description | Schema |
|---|---|---|
200 | Successfully retrieved site status |
GET /api/info
Summary
Get the component information.
Request Parameters
No parameters
Responses
Code | Description | Schema |
|---|---|---|
200 | Returns component information |
PUT /api/total
Summary
Create an order without saving it to the database.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
body |
| Yes | The JSON formatted request |
Responses
Code | Description | Schema |
|---|---|---|
200 | Order successfully created | |
400 | Error creating order |
PUT /api/cache-reset
Summary
Reset the cache.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token created previously |
header |
| string | Yes | The identifier of the company that owns the document |
header |
| string | Yes | Comma separated list of the site identifiers |
body |
| array [string] | Yes | Entities to be deleted from the cache |
Responses
Code | Description | Schema |
|---|---|---|
200 | Default: Cache successfully cleared | string |
400 | Error clearing cache |
PUT /api/order/{refund_order_id}/payment
Summary
Use the Add Refund Order Payment operation to send a refund request for an order.
Request Parameters
In | Field Name | Type | Required | Description |
|---|---|---|---|---|
header |
| string | Yes |
|
header |
| string | Yes | The integrator token required to perform API calls for the company |
header |
| string | Yes | The unique identifier (UID) for the company in which the menu will be created |
header |
| string | Yes | The UID for the site in which the menu will be created |
body |
| Yes |
Data Models
BaseCreateOrderRequestBody
The Create Order request body.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The store number of the specified site |
| No | These fields define the information for the terminal associated with a particular order or event | |
| No | Adds items to the Order request body (individual item structure) | |
| No | Adds a customer to the request body | |
| No | Adds a destination to the request body | |
| No | Adds discount information to the request body | |
| string | No | The reference to another order identifier |
| No | The owner's information | |
| No | Adds suite information to the Order Object. If only the suite_id is provided, then the other data is taken from the xcat API. | |
| No | Adds table information to the Order Object | |
| No | Adds event information to the Order Object | |
| string | No | If the table_name is missing, it will be taken from the suite_info.name |
| boolean | No | If is true, then the next event will be added |
| FeeRequestBody | No | Minimum items: 1 |
| string | No | The Order Source. Example: Mobile |
| string | No | The type of order. Enum: order, refund |
| string | No | The Order Source ID, if present order_source_entity_id is not allowed. Example: web |
| string | No | The Order Source item |
| boolean | No | Specifies if the marketplace merchant is liable for taxes |
| number | No | Specified by the integrator |
| number | No | Specified by the integrator |
RefundRequest
If order_type = refund.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The refund reference identifier |
| No | Add items to the Order request body |
RegularOrderRequest
For regular order items.
Field Name | Type | Required | Description |
|---|---|---|---|
| No | Adds items to the Order request body (individual item structure) |
CreateOrderRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The store number of the specified site |
| Yes | The terminal attributes | |
| Yes | Add items to the Order request body | |
| Yes | Add customer to the order request body | |
| Yes | Add the Destination request body | |
| Yes | Add the Discount Information request body | |
| string | No | The reference to another order identifier |
| No | The owner's information | |
| Yes | Adding suite information to the Order Object. If only the | |
| Yes | Adding table information to the Order Object | |
| Yes | Adding event information to the Order Object | |
| string | No | If the |
| boolean | No | If is true, then the next event will be added |
| Yes | The fee type item. One of [ | |
| string | No | The Order Source. Example: Mobile |
| string | No | The type of order. Enum: order, refund |
| string | No | The Order Source ID, if present, Example: web |
| string | No | The Order Source item |
| boolean | No | Specifies if the marketplace merchant is liable for taxes |
| number | No | Specified by the integrator |
| number | No | Specified by the integrator |
CreateRefundOrderRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The order type which defines when an order should be a refund: |
| string | Yes | The identification (ID) from the original order |
CreateOrderLoyaltyRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| Yes | Contains loyalty information from the customer |
customer Object
Field Name | Type | Required | Description |
|---|---|---|---|
| Yes | The customer's loyalty information added to the order |
Sample Request Body
{
"customer": {
"first_name": "Fname",
"id": "1234567890123456789",
"last_name": "Lname",
"loyalty_card_number": "0987654321",
"loyalty_info": {
"customer": {
"customer_id": "1234",
"first_name": "Fname",
"identification_method": "loyalty_card_number",
"last_name": "Lname",
"loyalty_card_number": "0122333444455555"
}
},
"phone_cell": "999-999-9999"
},
"items": [
{
"product_id": "123",
"quantity": 1,
"unit_price": 3.50
},
{
"product_id": "456",
"quantity": 1,
"unit_price": 2
}
],
"order_source": "APP",
"store_number": "146",
"terminal": {
"id": "02"
}
}loyalty_info Object
Field Name | Type | Required | Description |
|---|---|---|---|
| array | No | The list of customer's loyalty balances. For example, points or visits. |
| array | No | The list of stored value accounts available for the customer |
| Yes | The loyalty customer personal information |
balance Object
Field Name | Type | Required | Description |
|---|---|---|---|
| number | No | The customer's loyalty balance |
| array | No | The loyalty balance expiration dates |
| string | No | The loyalty balance's name. For example, |
| string | No | The loyalty balance type |
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The loyalty balance expiration date |
| number | No | The balance amount to expire |
cards Object
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The customer's stored value account or card number |
| string | No | The customer's stored value account or card balance |
| string | No | The customer's stored value account or card PIN |
inner customer Object
Field Name | Type | Required | Description |
|---|---|---|---|
| string (enum) | Yes | The method used to identify loyalty customer. The possible values are as follows:
|
| string | No | The customer's first name |
| string | No | The customer's last name |
| string | Yes* | The customer's loyalty card or account number that can be used for customer identification. *One of the following is required for the request:
|
| string | Yes* | The customer's loyalty code that can be used for customer identification. *One of the following is required for the request:
|
| string | Yes* | The customer's email. *One of the following is required for the request:
|
| string | Yes* | The customer's phone number. *One of the following is required for the request:
|
| string | No | The customer account identifier (ID) in the loyalty system |
Field Name | Type | Required | Description |
|---|---|---|---|
| boolean | Yes* | The flag that identifies if the reward should be applied automatically. These rewards cannot be removed from the order. *This field is required if the offers Object is provided. |
| string | Yes* | Indicates the party responsible for the loyalty rewards. This should be set to This should be set to For this type of integration, the value should be set to *This field is required if the offers Object is provided. |
| number | No | The amount of points associated with the reward |
| string | No | The reward expiration date |
| string | Yes* | The reward identification value. *This field is required if the offers Object is provided. |
| string | Yes* | The reward name. *This field is required if the offers Object is provided. |
| string | No | The reward program identifier (ID) |
| string | No | The reward type |
| string | Yes* | The reward status:
*This field is required if the offers Object is provided. |
TerminalRequestBody
Terminal attributes.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The terminal number (previously known as the register number) |
| string | No | The terminal title. Examples: front counter, drive thru |
| string | No | The terminal number |
AddRefundItemsRequestBody
Add items to the Order request body.
Field Name | Type | Required | Description |
|---|---|---|---|
| number | No | The number of item quantity to refund. Minimum: 1 |
| string | No | The unique order item identifier |
AddChildItemsRequestBody
Add child items body.
Field Name | Type | Required | Description |
|---|---|---|---|
| No | Individual item structure |
AddItemRequestBody
Individual item structure.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique product identifier. Either |
| string | No | The unique identifier (GUID) relating to the |
| string | No | The type of the item. Examples: product, modifier |
| integer | No | The quantity of the items ordered. Default: 1 |
| string | No | The name of the item |
| number | No | The unit price of the item |
| No | Add the Discount Information request body | |
| string | No | The user comments about the item |
| object | No | The child items are of a type item object |
| string | No | The unique donation identifier. Minimum length: 1 |
| string | No | How the amount value should be applied to the order. fixed: The amount is added as a fixed currency value. percentage: The amount is calculated as a percentage of the total of the order. Enum: round-up, fixed |
| No | Add the Fee Configuration request body | |
| string | No | Examples: plain, replace, augment |
AddCustomerRequestBody
Add a customer to the Order request body.
Field Name | Type | Required | Description |
|---|---|---|---|
| No | Add a customer to the Order request body |
PaymentMethodRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The payment method type |
| string | No | The card reference identifier |
| string | No | The card company brand. Examples: Visa, Mastercard, American Express |
| string | No | A customer chosen name for the card |
| string | No | The account identifier |
| boolean | No | |
| boolean | No |
AccountFeeRequestBody
Field Name | Type | Required |
|---|---|---|
| string | No |
| string | No |
| object | No |
| string | No |
| number | No |
| number | No |
AccountRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The account identifier |
| No | Add the Payment Method request body | |
| No | Add the Account Fee request body |
AddRefundItemsRequestBody
Add items to the Order request body.
Field Name | Type | Required | Description |
|---|---|---|---|
| number | No | The number of item quantity to refund. Minimum: 1 |
| string | No | The unique order item identifier |
CustomerRequestBody
Add a customer to the Order request body.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The user defined unique identifier for the customer record |
| string | No | The first name of the customer |
| string | No | The last name of the customer |
| string | No | The home phone number of the customer |
| string | No | The work phone number of the customer |
| string | No | The cell phone number of the customer |
| string | No | The email of the customer |
| string | No | The address of the customer |
| string | No | The secondary address of the customer |
| string | No | The city of the customer |
| string | No | The state of residence of the customer |
| string | No | The zip code of residence of the customer |
| string | No | The pickup date and time |
| string | No | The delivery date and time |
| No | Add the Account request body |
AddDiscountInfoRequestBody
Add discount information to the request body.
Field Name | Type | Required | Description |
|---|---|---|---|
| No | Adds discount information to the order |
AddDiscountRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique identifier specific to a discount |
| string | No | The unique code specific to a discount |
| number | No | The value specified when calculating variable discounts |
| string | No | The list of order item IDs to add to a discount. NoteThis can be used only if the items exist. |
| boolean | No | If set to true, the discount is ignored in the calculation |
| string | No | The unique value specified for linking discounts |
| Yes | The loyalty information of a customer added to the order |
loyalty_info Object
Field Name | Type | Required | Description |
|---|---|---|---|
| boolean | Yes | The flag that indicates if the discount should be applied to the order automatically |
| number | Yes | The loyalty discount quantity |
| string | Yes | The loyalty discount identifier (ID) |
| string | Yes | The loyalty Object discount type |
| string | Yes | The loyalty discount status, which should be validated when the order is |
| string | No | The loyalty Object discount code |
| string | No | The loyalty discount program ID |
| number | Yes | The loyalty discount amount |
| array | No | The list of loyalty offers added to the order. This parameter is added for order-level loyalty information only. |
DeleteDiscountRequestBody
Remove the Discount request body.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The list of discount identifiers to remove |
AddDestinationRequestBody
Add a destination to the request body.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique identifier of a destination |
| string | No | The name of the destination |
| boolean | No | |
| boolean | No | If this flag is enabled and set to |
DeleteItemsRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The list of order item identifiers ( |
AddPaymentRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| object | No | The list of payments to add |
| number | No | The payment amount rounded to "n" decimal digits based on the currency settings |
| string | No | The payment type identifier |
| string | No | The name as shown on the card |
| string | No | The card company brand. Examples: Visa, Mastercard, American Express |
| string | No | The payment type. Examples: Cash, Credit, Debit, Gift Card, EBT |
| string | No | Electronic signature |
| string | No | The terminal where the payment was processed |
| string | No | The Host reference transaction identifier |
CloseOrderRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| object | No | The Payment Object |
| number | No | The payment amount rounded to n decimal digits based on the currency settings |
| string | No | The payment type identifier |
| string | No | The name as shown on the card |
| string | No | The card company brand. Examples: Visa, Mastercard, American Express |
| string | No | The payment type. Examples: Cash, Credit, Debit, Gift Card, EBT |
| string | No | Electronic signature |
| string | No | The terminal where the payment was processed |
| string | No | The Host reference transaction identifier |
| No | The owner's information | |
| No | Adds suite information to the Order Object. If only the | |
| No | Adds table information to the Order Object | |
| string | No | If the |
DeletePaymentRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The list of payment identifiers to delete |
UpdateOrderRequestBody
Optional fields to update on the order.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The order point. Examples: Kiosk1, Register1, Terminal1 |
| string | No | The integrator specific identifier to link to their system |
| string | No | The origin of the order. Default: Mobile |
| No | Adds a customer to the Order request body | |
| string | No | The reference to an existing order |
TableInfoRequestBody
Add table information to the Order Object.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The table identifier |
| string | No | The table name |
EventRequestBody
Adding event information to the Order Object.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique identifier (UID) for the event |
FeeRequestBody
The fee type item. One of [fee_id, entity_id] is required.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique identifier (UID) of the fee. Minimum length: 1 Maximum length: 255 |
| string | No | The unique Minimum length: 1 Maximum length: 255 |
| number | No | The fixed percentage/fixed amount value. Minimum: 0 Default: 0 |
SuiteInfoRequestBody
Add suite information to the Order Object. If only the suite_id is provided, then the other data is taken from the xcat API.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique identifier (UID) for the suite |
| string | No | The entity identifier |
| string | No | The suite name |
| string | No | The suite short name |
SiteInfoObject
These fields contain details for an order site or location. Typically, Online Ordering orders only populate the bare minimum of SiteInfo in order to identify to which site the order should be sent.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The first address line for the site |
| string | No | The second address line for the site |
| string | No | The site city |
| string | No | The email for a site |
| string | No | The site identifier |
| string | No | The site name |
| string | No | The site phone |
| string | No | The United States (US) state or country province for the site |
| string | No | The store number defined by the company |
| string | No | The website for the site |
| string | No | The site zip code |
| string | No | The site type |
EmployeeObject
This object contains employee information, populated in-store.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The employee identifier |
| string | No | The employee's first and last name |
| string | No | The employee's job title. Examples: cashier, manager |
TerminalObject
These fields define the information for the terminal associated with a particular order or event.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The terminal identifier (previously knows as register ID) |
| string | No | The terminal title. Examples: front counter, drive thru |
| string | No | The terminal number |
ContributorObject
Additional employees or terminals involved in this order. This information designates the origin of the order.
Field Name | Type | Required | Description |
|---|---|---|---|
| No | An object containing the information of the employee who created or modified the order | |
| No | An object containing the information of the terminal at which the order was created or modified | |
| string | No | The time at which the order was created or modified in an ISO8601 format |
DestinationObject
This information describes the Order Destination, which is the "point of issue" of the order. For example, Drive-thru, Dine-in, To Go. The Order Destination can alter what menu content is available and what pricing rules apply to the order.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique identifier (UID) of a destination |
| string | No | The name of the destination |
| string | No | The consumption type of the destination for the tax calculation |
TimeObject
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | ISO-8601 Formatted |
| string | No | ISO-8601 Formatted |
| string | No | ISO-8601 Formatted |
| string | No | ISO-8601 Formatted |
| string | No | ISO-8601 Formatted |
| string | No | ISO-8601 Formatted |
| string | No | ISO-8601 Formatted |
CustomerObject
These fields comprise all customer-related information, which is either provided by the customers in-store or on third-party client user interfaces (UIs) or delivery service applications. Users can update some of these fields after an order has already been committed to Online Ordering API.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The user defined unique identifier for the customer record |
| string | No | The first name of the customer |
| string | No | The last name of the customer |
| string | No | The work phone number of the customer |
| string | No | The cell phone number of the customer |
| string | No | The home phone number of the customer |
| string | No | The email of the customer |
| string | No | The address of the customer |
| string | No | The secondary address of the customer |
| string | No | The city of the customer |
| string | No | The state of residence of the customer |
| string | No | The zip code of residence of the customer |
| string | No | The tent number |
| string | No | The pickup date and time |
| string | No | The delivery date and time |
| boolean | No |
FeeConfigRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | |
| string | No | A fee type item. Example: donation |
ItemObject
This object contains information for an individual item within the order.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique product identifier |
| string | No | The unique identifier (GUID) relating to the |
| string | No | The unique item instance identifier |
| string | No | An ISO-8601 formatted date-time of the product when the item is added to the order |
| string | No | The name of the item |
| string | No | The type of the item. Examples: product, modifier |
| string | No | The state of the item. Examples: Saved, Voided, Deleted |
| string | No | The payment status. Examples: Paid, Refunded |
| array | No | An array of strings |
| number | No | The calculated price of the item |
| number | No | The unit price of the item |
| integer | No | The quantity of the items ordered |
| No | The fractional quantity of the item ordered | |
| No | The item discount information | |
| No | The item tax information | |
| No | The item tax inclusive information | |
| No | The item tax group | |
| object | No | A nested item object |
| string | No | The identifier of the base item (used for modifiers) |
| string | No | The user comments about the item |
| number | No | The item tax inclusive price |
| No | Defines the configuration for a "fee" type order item | |
| string | No | A hash code order |
| string | No | A list of strings that tells us which kitchen printer an item should be sent to on "send to kitchen" |
| object | No | The order item reporting category |
| boolean | No | The item tax inclusive information |
| No | The item time information |
FeeConfigObject
This information defines the configuration of a fee applied to the order.
Field Name | Type | Required | Description |
|---|---|---|---|
| number | No | The amount of the fee. For percentage fees, this is the percentage to use when calculating the fee, written as a decimal number. Example: 0.20 for 20% |
| boolean | No | When set to true, the fee will be calculated on the subtotal, without discounts, before taxes are added. When false, the fee is calculated on the full total (subtotal + taxes - discounts). |
| string | No | How the "amount" value should be applied to the order. The valid values are as follows:
|
| string | No | Specifies what type of fee the object represents. The valid values are as follows:
|
DiscountInfoObject
This object contains information for all discounts applied to the order.
Field Name | Type | Required | Description |
|---|---|---|---|
| No | The list of discounts applied to the item or order | |
| number | No | The total discount amount applied to the item or order |
| number | No | The total discount amount rounded to "n" number of decimal digits based on currency settings |
DiscountObject
This information describes a specific discount that applies to the order. Our system offers many type of discount configurations, including order level and Item level discounts, manual and automatic, percentage and fixed amount, and quantity-based.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique discount identifier |
| string | No | The unique discount instance identifier |
| number | No | The variable discount amount value |
| string | No | How the discount is applied. Examples: Manual, Automatic |
| integer | No | The quantity of the specified discount applied |
| number | No | The amount of discount applied unrounded (5-digit decimal precision) |
| number | No | The amount of discount applied rounded to "n" number of decimal digits based on the currency settings |
| boolean | No | True: Distributed discount amount False: Actual full discount amount |
| boolean | No | True: Ignore the discount in all calculations False (default): Discounts are applied (not ignored) |
TaxInfoObject
These fields contain information for all taxes applied to an order, item, or tax.
Field Name | Type | Required | Description |
|---|---|---|---|
| No | The list of taxes applied to the item or order | |
| number | No | The total unrounded tax amount applied to the item or order |
| number | No | The total tax applied to the item/order rounded to "n" digits based on the currency settings |
TaxInclusiveInfoObject
These fields define the inclusive taxes applied to an order, item, or tax.
Field Name | Type | Required | Description |
|---|---|---|---|
| No | The list of taxes applied to the item, order, or tax | |
| number | No | The total tax amount included in the item's price |
| number | No | The total tax amount included in the item's price rounded to "n" digits based on the currency settings |
TaxGroupObject
These fields describe a specific tax group.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The entity identifier of the tax group |
| string | No | Tax Code/Tax Group identifier |
| string | No | The name of the tax group |
TaxExemptInfoObject
These fields provide information about tax exemptions.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The tax exempt identifier |
| string | No | The reason text for tax exemption |
| No | The list of taxes exempted | |
| number | No | The total tax exempted rounded to "n" digits based on the currency settings |
TaxObject
These fields provide information for an individual tax.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique tax identifier |
| string | No | The name of the tax |
| number | No | The amount of the tax applied to the order/item |
| number | No | The amount of the tax applied to the order/item rounded to "n" decimal digits based on the currency settings |
| object | No | The Tax Info Object (Nested tax on tax) |
| boolean | No | Determines if the discount is visible |
PaymentInfoObject
These fields provide information for all payments on an order.
Field Name | Type | Required | Description |
|---|---|---|---|
| No | The list of payments used to pay the order |
PaymentObject
These fields store information for an individual payment on an order. Online orders can contain payment information already, or they can be committed as an unpaid order, allowing point of sale (POS) employees to populate payment information in-store. An order can also might be updated in-store if the order content changes.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The account identifier |
| string | No | An authorization identifier. For Europay, Mastercard, and Visa (EMV) transactions, this is the application identifier (AID) field. |
| number | No | The payment amount rounded to "n" decimal digits based on the currency settings |
| string | No | The name of card processing application. Examples: MasterCardCredit, AMEX For EMV transactions, this is the APL field. |
| string | No | The authentication code |
| number | No | The balance on the card |
| string | No | The type of acquisition. Examples: MANUAL, SWIPE, CONTACTLESS, SCANNER, CHIP, or CHIP_FALL_BACK_SWIPE. For EMV transactions, this is the CEM field. |
| string | No | The name as shown on the card |
| string | No | The unique payment identifier |
| string | No | The payment type identifier |
| string | No | The card company brand. Examples: Visa, Mastercard, American Express |
| string | No | The number of points left in a customer's house account. For example, a customer could have 30 points left for rewards after the order transaction. |
| string | No | The transaction identifier in batch |
| string | No | The transaction identifier |
| string | No | A cryptogram field |
| string | No | A cryptogram field |
| string | No | The EMV format for Portico |
| string | No | The electronic signature |
| string | No | The terminal where the payment was processed |
| string | No | Examples: Cash, Credit, Debit, Gift Card, EBT |
| boolean | No | If true, the printer prints the signature line |
| string | No | The specified verification method. Examples: SIGNATURE VERIFIED, PIN VERIFIED, NO SIGNATURE REQUIRED |
| string | No | If the PIN is supplied, the signature is not required |
| string | No | The Portico requirement added for certification |
| string | No | The Portico requirement added for certification |
PrintInfoArray
Field Name | Type | Required | Description |
|---|---|---|---|
| No | The list of print records |
PrintRecordObject
These fields provide information for an individual print record.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The first and last name of who printed the receipt |
| string | No | The employee identifier |
| string | No | An ISO-8601 formatted timestamp of when the receipt was printed |
OrderObject
These fields comprise the Order Object itself.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique Order Object identifier |
| string | No | The system that the order or notification originated from. This is set to |
| string | No | The unique identifier (UID) of the company |
| No | The site details. Examples: name, phone, address, website, and email | |
| string | No | The store number defined by the company |
| No | Additional employees or terminals involved in this order | |
| No | The owner's information | |
| No | Additional employees or terminals involved in this order | |
| string | No | The unique number for a particular company and particular site |
| string | No | The Order Object version |
| string | No | An ISO-8601 formatted current business date |
| string | No | The Order Object state: Open, Saved, Deleted, Voided, Overringed, Parked, Split, Suspended, Voided-post-payment, Committed, Checkedin, Bumped, and Purged |
| string | No | Default: Open The transaction type: Open, Paid, Partial, Post-adjusted, and Refunded |
| string | No | The Order Object status: Open, Committed, Committed-ack, Checkedin, Checkedin-ack, Voided, Voided-ack, and Bumped |
| No | The order destination. Available options are: dine-in, carry-out, drive thru, and delivery. | |
| No | The order dates and times in ISO8601 format | |
| No | The customer details information | |
| No | An array of the order items | |
| number | No | The subtotal (total before taxes and discounts) of the order |
| number | No | The order tax inclusive price |
| number | No | The total of the order |
| No | The order level discount information | |
| number | No | The total of all order and item level discounts |
| No | The order level tax information | |
| No | The tax exempt information | |
| No | The tax inclusive information | |
| No | The payment information | |
| No | The list of print records | |
| string | No | The order type. The available options include: Order, Refund, or Waste. |
| string | No | The unique order identifier of the order being refunded |
| string | No | The comments about the order |
| No | The suite information | |
| No | The table information | |
| string | No | The table name |
| object | No | An object which allows additional key-value pairs to be stored on an order Example: |
| No | The deleted items | |
| number | No | The guest count |
| string | No | The life cycle of the order from total, tender, and save |
| string | No | The name or other identifier of the specific device that created the order. Example: kiosk1 |
| string | No | The device from which the order originated. This value is set by the client ordering application and is specific to customer requirements. It is not used for system-level management of orders. Note
|
| object | No | The point from which the order originated |
| string | No | The identifier of the device from which the order originated |
| string | No | The order name |
| boolean | No | |
| boolean | No | |
| object | No | The order status |
| string | No | Enum: Pending, Suspended, Closed, Saved, Deleted, Voided |
| object | No | The reason code for a declined order |
| object | No | The refunds information. A separate object is created for each refunded item with the reference to the refunded order. |
| string | No | The order item identifier |
| number | No | The order quantity |
| string | No | The refund reference identifier |
| No | Describes the Day Part during which the order was sent | |
| No | The Event Object information | |
| string | No | The external order identifier |
| string | No | The fulfillment date of the order |
| No | The Segment Object information | |
| string | No | The unformatted order number. Example: 1004 |
SuiteInfoObject
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique suite identifier |
| string | No | The suite name |
| string | No | The suite short name |
TableInfoObject
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique table identifier |
| string | No | The table number |
| string | No | The table name |
SegmentObject
Users can divide orders into segments, defined in these fields. Data Management provides settings for configuring segment names.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The name of the segment (Tray1, Tray2 or Seat1, Seat2). This name depends on how it was created as Tray or Seat, which is set on Data Management. |
| number | No | The number of the corresponding segment that will be included in the |
| string | No | The unique segment identifier |
DayPartObject
These fields describe the Day Part during which the order was sent. Day parts are time periods during the day, each belonging to a particular day part type and assigned to a specific day of the week. Day parts allow users to track orders or restrict menus by time of day.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique identifier (UID) of the Day Part Type. This field matches the |
| string | No | The name of the Day Part Type. Examples: Morning, Afternoon, Evening |
| string | No | The external identifier used to reference the Day Part Type |
EventObject
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique event identifier |
| string | No | The event name |
| object | No | The event type |
| string | No | The event type entity identifier |
| string | No | The external identifier used to reference the event type |
| string | No | The event type name |
SiteStatusResponse
The list of statuses for each requested site.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The enterprise specific store number |
| string | No | The enterprise specific store name |
| string | No | An ISO-8601 formatted date-time stamp of the last time the cloud made contact with the specified site |
| string | No | The business date of the specified site status |
| string | No | The type of point of sale (POS) device at the site |
| string | No | The version of the POS at the site |
| string | No | An ISO-8601 formatted date-time stamp of when the site status was pushed from the store |
| string | No | The unique identifier of the specified site |
| string | No | The unique identifier of the company at which the site resides |
SiteStatusObject
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The enterprise specific store number |
| string | No | The enterprise specific store name |
| string | No | The ISO-8601 formatted date-time stamp of last time the cloud made contact with the specified site |
| string | No | The business date of the specified site |
| string | No | The type of point of sale (POS) at the site |
| string | No | The version of the POS at the site |
| string | No | The ISO-8601 formatted date-time stamp of when the site status was pushed from the store |
| string | No | The unique identifier (UID) of the specified site |
| string | No | The UID of the company at which the site resides |
GeneralErrorStructure
The General Error Object structure.
Field Name | Type | Required | Description |
|---|---|---|---|
| object | No | The object of the error properties |
| string | No | The detail description of the operational error |
| number | No | See: Error Responses for potential error codes |
| string | No | The company identifier of the request |
| string | No | The site identifier of the request |
| array | No | The list of objects that give more details about the specified error |
| string | No | The detail description of the error context |
| number | No | See: Error Responses for potential error codes |
Integrator specified identifier in question | string | No | This field can be one of the following: |
ComponentInfo
Field Name | Type | Required |
|---|---|---|
| string | No |
| number | No |
| string | No |
| string | No |
| string | No |
| string | No |
| string | No |
| string | No |
| string | No |
| string | No |
UpdateOrderItemRequestBody
Update the Order Item request body.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The unique identifier (UID) of the order item |
| string | No | The order item name |
| integer | No | Minimum: 1 |
| No | The Fractional Quantity Object information | |
| integer | No | Minimum: 1 |
| number | No | Minimum: 0 |
| string | No | The order item's serial number |
| No | The Destination Object information |
FractionalQuantity
These fields define a factional modifier quantity.
Field Name | Type | Required | Description |
|---|---|---|---|
| integer | No | The numerator of the fractional quantity. Minimum: 1 |
| integer | No | The denominator of the fractional quantity. Minimum: 1 |
CompanyInfo
Our Portal provides this basic company information.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The company identifier stored in Portal API |
| string | No | The company name stored in Portal API |
OrderItemReportingCategory
These fields describe the reporting categories of an order item.
Field Name | Type | Required | Description |
|---|---|---|---|
| No | The major reporting category information | |
| No | The minor reporting category information |
OrderSourceInfo
The Order Source fields define the specific source where this order has been created. For example, "Delivery." Order sources differ from the Origin field, which is system definable, as opposed to Order Sources which are defined by integrators. For an example of the usage of the two entities, "Origin: In store" could be applicable for several order sources like "drive thru" and "dine in." Order Source is used in the our ecosystem heavily to filter and restrict certain items, menus, prices, and time periods for different ordering platforms.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The given name of the order source. Examples: web, Terminal 47 |
| object | No | The object for |
| string | No | The unique identifier (UID) for a particular order source |
RefundReference
These fields provide reference information for a refund.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The refunded order item identifier |
| number | No | The refunded item quantity |
| string | No | The refunded order identifier (reference to created refund order) |
ReportingCategory
These fields describe a reporting category.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The reporting category name |
| string | No | The entity identifier of the reporting category |
TaxJurisdiction
These fields identify the jurisdiction that imposes a particular tax.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The jurisdiction identifier |
| string | No | The jurisdiction name |
| string | No | The level of the jurisdiction |
| string | No | The unique external identifier of the TaxJurisdiction Object to which the tax is associated |
TimeInfo
These fields record the time at which a particular event occurred.
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The time for last addition of an item/reason to the collection |
| string | No | The created date-time in ISO8601 format |
| string | No | The time that the customer of a mobile order has checked in at the restaurant or that the order was sent to kitchen to be prepared |
| string | No | The closed time for the item or reason |
| string | No | The first saved (totaled, sent to kitchen) time for order |
| string | No | The time that an item of any type was first added to order |
| string | No | The time when the first item from some other order was added during a split operation |
| string | No | The sent date-time to kitchen in ISO8601 format |
| string | No | The time that the order was completed by the kitchen (bumped) |
| string | No | The last modified date-time in ISO8601 format |
AddRefundOrderPaymentRequestBody
Field Name | Type | Required | Description |
|---|---|---|---|
| Yes | The list of the payment information for the refund |
payments Array
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The payment account identifier (ID) |
| number | Yes | The payment amount |
| string | No | The card brand name |
| string | No | The payment code |
| string | No | A free text field to include notes about the payment |
| string | Yes | The payment type ID |
| string | No | The payment type name |
| string | Yes | The original order ID |
| string | No | The ID of the terminal where the payment was processed |
| number | No | The amount of the tip included in the payment |
| string | No | The host reference transaction ID |
Sample Request Body
{
"payments": [
{
"account": "**************4817",
"amount": 33,
"tip_amount": 0,
"payment_id": "8c891f9c-5841-4b2b-9e30-c606f228d0d8",
"pay_type_id": "02",
"pay_type_name": "Credit Card",
"code": "CREDIT",
"card_brand_name": "Discover",
"transaction_id": "4839847396",
"refund_reference_id": "{{order_id1}}",
"notes": "test"
}
]
}AddOrderDiscountsRequestBody
To add discounts at the order_level use the following structure:
Field Name | Type | Required | Description |
|---|---|---|---|
array | Yes | The list of discounts to be applied to the order |
discount Object
Field Name | Type | Required | Description |
|---|---|---|---|
| string | No | The name of the discount |
| string | Yes | The reference code for the discount |
| string | No | The definition identifier (ID) of the discount |
| string | Yes | The value specified when calculating variable discounts |
| Yes | The loyalty information of a customer added to the order | |
| array (string) | No | The list of order item IDs to add a discount to. It should be provided only if items exist. |
Sample Request Body
{
"discounts": [
{
"discount_code": "defaultLoyaltyItemLevelDiscount",
"discount_variable_value": 4.2,
"loyalty_info": {
"amount": 2,
"apply_automatically": false,
"quantity_redeemed": 1,
"reward_id": "B67543",
"reward_type": "reward",
"status": "validated"
},
"name": "Dname",
"order_item_ids": [
"dbdc0ece-12ab-34cd-56ef-2009023f6342"
],
"quantity": 3
}
],
}loyalty_info Object for Discounts
Field Name | Type | Required | Description |
|---|---|---|---|
| boolean | Yes | The flag that indicates if the discount should be applied to the order automatically |
| number | Yes | The loyalty discount quantity |
| string | Yes | The loyalty discount identifier (ID) |
| string | Yes | The loyalty Object discount type |
| string | Yes | The loyalty discount status, which should be validated when the order is unpaid, redeemed, and fully paid |
| string | No | The loyalty Object discount code |
| string | No | The loyalty discount program ID |
| number | Yes | The loyalty discount amount |
order_item Object
Field Name | Type | Required | Description |
|---|---|---|---|
| string | Yes* | The entity identifier (ID) of the item. *One of the following is required for the request:
|
| string | Yes* | The reference code for the discount. *One of the following is required for the request:
If this field is included the request should also include |
| string | No | The name of the item |
| string | Yes* | The product ID related to the item. *One of the following is required for the request:
|
| string | Yes* | The donation ID of the order. *One of the following is required for the request:
|
| array | No | The list of order item IDs to add a discount to. It should be provided only if items exist. |
| integer | No | The quantity of the item included |
| No | The increment values for the quantity of the item | |
| number | No | The unit price of the item |
| array (order_item) | No | The list of the child items of the parent item |
| No | The discount applied to the specified product. To add discounts at the | |
| string | No | The comment added for the item |
| string | No | How the
|
| No | The fee configuration for the item | |
| string | No | Examples: plain, replace, augment |
Sample Request Body
{
"items": [
{
"discount_info": {
"discounts": [
{
"discount_code": "123456",
"discount_variable_value": 3
}
]
},
"product_id": "234567",
"quantity": 1
},
{
"child_items": [
{
"product_id": "456789",
"quantity": 1
},
{
"product_id": "124578",
"quantity": 1
}
],
"discount_info": {
"discounts": [
{
"discount_code": "986532",
"discount_variable_value": 3.29
}
]
},
"product_id": "258963",
"quantity": 1
}
],
"reference_id": "1111",
"store_number": "258",
"terminal": {
"id": "9"
}
}fractional_quantity Object
Field Name | Type | Required | Description |
|---|---|---|---|
| number | Yes* | The increment numerator of the modifier build. *This field is required if the fractional quantity condition is met. |
| number | Yes* | The increment denominator of the modifier build. *This field is required if the fractional quantity condition is met. |
Error Responses
The following table defines the error responses returned by Online Ordering:
Code | Details |
|---|---|
-1 | Message Failed to get Order Destinations Description Online Ordering cannot identify the location that will prepare the order for one of the following reasons:
Sample Response Message {
"error": {
"code": -1,
"message": "Failed to get Order Destinations",
"company_id": "9999999999999999",
"site_id": "999999"
}
} |
1 | Message Error code 1 will include a message with one of the following formats:
Description Error code 1 indicates a missing or invalid required value in the request body. The error response message indicates which property is missing and any parent element of the missing property. If the missing property belongs to a child of a parent attribute, the response will include the index of the child item that caused the error. If more than one error results in error code 1, the error messages are separated by a comma. If the property is invalid, the error message indicates the correct format. Sample Response Message {
"error": {
"code": 1,
"message": "data should have required property 'store_number',
... data.terminal should have required property 'id'",
"company_id": "9999999999999999",
"site_id": "9999999999999999"
}
} |
4 | Message Invalid Request - Order must have items Description The request did not include the required Order Object with an items array. Sample Response Message {
"error": {
"detail": "Failed to commit order",
"code": 61,
"context": [
{
"detail": "Invalid Request - Order must have items",
"code": 4
}
],
"company_id": "9999999999999999",
"site_id": "9999999999999999",
"_id": "9999999999999999",
"order_number": "999999",
"store_number": "9999"
}
} |
14 | Message Order Already Tendered Description The order had already been paid in full. Sample Response Message {
"error": {
"detail": "Failed to add payment",
"code": 58,
"context": [
{
"detail": "Order Already Tendered",
"code": 14
}
],
"company_id": "9999999999999999",
"site_id": "9999999999999999",
"_id": "9999999999999999",
"order_number": "999999",
"store_number": "9999"
}
} |
16 | Message Missed or Invalid Auth Token Description Request header does not include a valid auth token. Sample Response Message {
"error": {
"code": 16,
"message": "Missed or Invalid Auth Token"
}
} |
22 | Message Customer not found Description Online Ordering cannot find a customer with the Sample Response Message {
"error": {
"detail": "Failed to add payment",
"code": 58,
"context": [
{
"detail": "Customer not found",
"code": 22
}
],
"company_id": "9999999999999999",
"site_id": "9999999999999999",
"_id": "9999999999999999",
"order_number": "999999",
"store_number": "9999"
}
} |
37 | Message Missing Company or Site ID in Header Description Request header does not include a value for the required Sample Response Message {
"error": {
"code": 37,
"message": "Missing Company or Site ID in Header"
}
} |
43 | Message Failed to add item Description The Add Item request failed. This error response includes child errors that state why the request failed. Sample Response Message {
"error": {
"detail": "Failed to add item",
"code": 43,
"context": [
{
"detail": "Failed to get products",
"code": 76,
"entity_ids": [],
"product_ids": [
"asdf"
]
}
],
"company_id": "9999999999999999",
"site_id": "9999999999999999",
"_id": "9999999999999999",
"order_number": "999999",
"store_number": "9999"
}
} |
58 | Message Failed to add payment Description The Add Payment request failed. This error response includes child errors that state why the request failed. Sample Response Message {
"error": {
"detail": "Failed to add payment",
"code": 58,
"context": [
{
"detail": "Customer not found",
"code": 22
}
],
"company_id": "9999999999999999",
"site_id": "9999999999999999",
"_id": "9999999999999999",
"order_number": "999999",
"store_number": "9999"
}
} |
61 | Message Failed to commit order Description The Commit Order request failed. This error response includes child errors that state why the request failed. Sample Response Message {
"error": {
"detail": "Failed to commit order",
"code": 61,
"context": [
{
"detail": "Invalid Request - Order must have items",
"code": 4
}
],
"company_id": "9999999999999999",
"site_id": "9999999999999999",
"_id": "9999999999999999",
"order_number": "999999",
"store_number": "9999"
}
} |
76 | Message Failed to get products. Description Online Ordering cannot find a product with the Sample Response Message {
"error": {
"detail": "Failed to add item",
"code": 43,
"context": [
{
"detail": "Failed to get products",
"code": 76,
"entity_ids": [],
"product_ids": [
"asdf"
]
}
],
"company_id": "9999999999999999",
"site_id": "9999999999999999",
"_id": "9999999999999999",
"order_number": "999999",
"store_number": "9999"
}
} |