Skip to main content

Order Object

The Online Ordering API stores the information for each online order within a unique order object. Users generate an order object with the Create Order operation, and can then modify the order with other operations that add or remove information from the order object. See below for an example order object and a description of the fields it can contain:Xenial Online Ordering

{
    "order": {
        "contributors": [
            {
                "time": "20YY-03-14T16:57:41.714Z",
                "terminal": {
                    "terminal_number": "9",
                    "id": "9"
                }
            }
        ],
        "creator": {
            "time": "20YY-03-14T16:57:41.714Z",
            "terminal": {
                "terminal_number": "9",
                "id": "9"
            }
        },
        "origin": "mobile",
        "order_source": "mobile",
        "_id": "9999999999999999",
        "business_date": "20YY-03-14T00:00:00.000Z",
        "company_id": "9999999999999999",
        "notification_status": "open",
        "order_number": "9999999999999999",
        "order_type": "order",
        "order_status": {
            "status": "pending"
        },
        "payment_status": "open",
        "payment_info": {
            "change": 0,
            "payments": [],
            "tips": 0,
            "total": 0,
            "change_info": [],
            "hash_code": "9999999999999999"
        },
        "sequential_order_number": "2",
        "segments": [],
        "site_info": {
            "id": "9999999999999999",
            "timezone": "America/Los_Angeles",
            "store_number": "9999",
            "name": "99999",
            "apps": [
                {
                    "app_code": "XPOS",
                    "preferred_version": {
                        "version": "3.6.X",
                        "uri": "https://s3.amazonaws.com/com.xenial.shell/99/",
                    },
                    "installed_version": {
                        "version": "3.6.X",
                        "uri": "https://s3.amazonaws.com/com.xenial.shell/99/",
                    }
                }
            ]
        },
        "state": "open",
        "time": {
            "created": "20YY-03-14T16:57:41.714Z",
            "last_modified": "20YY-03-14T16:57:41.720Z",
            "first_item_added": "20YY-03-14T16:57:41.717Z"
        },
        "version": "99",
        "guest_count": 1,
        "destination": {
            "id": "carry-out",
            "name": "Carry Out",
            "consumption_type": "OffPremises"
        },
        "customer": {
            "id": "9999999999999999",
            "first_name": "test",
            "last_name": "test",
            "phone_cell": "9999999999999999",
            "loyalty_customer": false,
            "vehicle_type": "Van",
            "vehicle_color": "White",
            "vehicle_comment": "Nice whip"
        },
        "additional_properties": {},
        "items": [
            {
                "product_id": "9999999999999999",
                "order_item_id": "9999999999999999",
                "quantity": 1,
                "unit_price_source": "xenial",
                "entity_id": "9999999999999999",
                "item_type": "standard",
                "reporting_category": {
                    "minor_reporting_category_entity_id": "9999999999999999",
                    "major_reporting_category_entity_id": "9999999999999999",
                    "9999999999999999": {
                        "_id": "9999999999999999",
                        "name": "Drinks",
                        "is_major": true,
                        "minor_reporting_category_entity_ids": [
                            "9999999999999999",
                            "9999999999999999",
                            "9999999999999999",
                        ],
                        "entity_id": "9999999999999999",
                        "external_category_id": "",
                        "transaction_id": "9999999999999999"
                    },
                    "9999999999999999": {
                        "_id": "9999999999999999",
                        "name": "Americano",
                        "is_major": false,
                        "major_reporting_category_entity_id": "9999999999999999",
                        "entity_id": "9999999999999999"
                    }
                },
                "name": "Medium Hot Americano",
                "tags": [
                    "9999999999999999",
                    "9999999999999999",
                    "9999999999999999",
                ],
                "tax_group": {
                    "entity_id": "9999999999999999"
                },
                "kitchen_routing_categories": [],
                "tax_inclusive": false,
                "unit_price": 3.25,
                "roll_up_price": "do_not_roll_up",
                "time": {
                    "added": "20YY-03-14T16:57:41.717Z",
                    "last_modified": "20YY-03-14T16:57:41.720Z"
                },
                "state": "pending",
                "payment_status": "open",
                "child_items": [],
                "hash_code": "9999999999999999",
                "rollup_after_tax_amount": 0,
                "9999999999999999": 0,
                "taxable_price": 3.25,
                "price": 3.25,
                "tax_info": {
                    "taxes": [
                        {
                            "tax_definition_id": "9999999999999999",
                            "name": "Sales Tax 8.2%",
                            "tax_inclusive": true,
                            "amount_unrounded": 0.2463,
                            "amount": 0.25,
                            "marketplace_liable": false
                        }
                    ],
                    "total_marketplace_liable_unrounded": 0,
                    "9999999999999999": 0,
                    "total_inclusive_unrounded": 0.2463,
                    "total_inclusive": 0.25,
                    "total_exclusive_unrounded": 0,
                    "total_exclusive": 0,
                    "total_unrounded": 0.2463,
                    "total": 0.25
                },
                "tax_inclusive_price": 3.25
            }
        ],
        "subtotal": 3.25,
        "tax_inclusive_subtotal": 3.25,
        "discount_info": {
            "discounts": [],
            "total": 0,
            "total_unrounded": 0,
            "discount_map": []
        },
        "discount_total": 0,
        "tax_info": {
            "taxes": [
                {
                    "tax_definition_id": "9999999999999999",
                    "name": "Sales Tax 8.2%",
                    "tax_inclusive": true,
                    "amount_unrounded": 0.2463,
                    "amount": 0.25,
                    "marketplace_liable": false
                }
            ],
            "total_marketplace_liable_unrounded": 0,
            "9999999999999999": 0,
            "total_inclusive_unrounded": 0.2463,
            "total_inclusive": 0.25,
            "total_exclusive_unrounded": 0,
            "total_exclusive": 0,
            "total_unrounded": 0.2463,
            "total": 0.25
        },
        "total": 3.25
    },
    "extended_info": {}
}

The order object can contain the following fields, divided by category or code object:

  • CompanyInfo fields - Our Portal provides this basic company information.CompanyInfo

  • Contributor fields - This information designates the origin of the order.

  • Customer fields - These fields comprise all customer-related information, which is either provided by the customers in-store or on third-party client user interfaces (UI) or delivery service applications.

  • DayPartInfo fields - These fields describe the Day Part during which the order was sent.

  • DefaultProducts fields - This section of the Order Object lists all default products included in the order.

  • Destination fields - This information describes the Order Destination, which is the "point of issue" of the order. For example, Drive-thru, Dine-in, and To Go.

  • Discount fields - This information describes a specific discount that applies to the order.

  • DiscountInfo fields - This object contains information for all discounts applied to the order.

  • Employee fields - This object contains employee information, populated in-store.

  • FeeConfig fields - This information defines the configuration of a fee applied to the order.

  • FractionalQuantity fields - These fields define a factional modifier quantity.

  • ItemRule fields - This information defines item-specific rules. For example, availability per destination and default content.

  • KitchenTime fields - This object contains information regarding a kitchen event connected to the order.

  • OrderItem fields - This object contains information for an individual item within the order.

  • OrderItemReportingCategory fields - These fields describe the reporting categories of an order item.

  • OrderObject fields - These fields comprise the order object itself.

  • OrderSegment fields - Users can divide orders into segments, defined in these fields.

  • OrderSourceInfo fields - Order Source fields define the specific source where this order has been created.

  • Payment fields - These fields store information for an individual payment on an order.

  • PaymentInfo fields - These fields provide information for all payments on an order.

  • PrintRecord fields - These fields provide information for an individual print record.

  • ReasonCode fields - These fields provide context information for a refunded order.

  • RefundReference fields - These fields provide reference information for a refund.

  • ReportingCategory fields - These fields describe a reporting category.

  • SiteInfo fields - These fields contain details for an order site or location.

  • Tax fields - These fields provide information for an individual tax.

  • TaxExemptInfo fields - These fields provide information about tax exemptions.

  • TaxGroup fields - These fields describe a specific tax group.

  • TaxInclusiveInfo fields - These fields define the inclusive taxes applied to an order, item, or tax.

  • TaxInfo fields - These fields contain information for all taxes applied to an order, item, or tax.

  • TaxJurisdiction fields - These fields identify the jurisdiction that imposes a particular tax.

  • Terminal fields - These fields define the information for the terminal associated with a particular order or event.

  • TimeInfo fields - These fields record the time at which a particular event occurred.