Skip to main content

Operation Definitions

Endpoints

POST /api/ds/pipeline/pos.order

Summary

Use the POST /api/ds/pipeline/pos.order endpoint to send orders to Portal API.

Request Parameters

In

Field Name

Type

Required

Description

header

AUTHORIZATION

string

Yes

The integrator token created previously

header

X-COMPANY-ID

string

Yes

The unique identifier (UID) for the company provided by us

header

X-SITE-IDs

string

Yes

The UID for the location

body

body

POS Order External API Example

Yes

The send order request information

Responses

Code

Description

Schema

202

Accepted

POS Order External API Example

401

Unauthorized error

403

Forbidden error

Data Models

POSOrderMessage Array

Field Name

Type

Required

Description

platform

string

Yes

payload

string

Yes

platform_version

string

Yes

msg_id

string

Yes

content_type

string

Yes

msg_type

string

Yes

POSOrderPayload

object

Yes

The POSOrderPayload object information

POSOrderPayload Object

Field Name

Type

Required

Description

order

string

Yes

 

POSOrder Object

Field Name

Type

Required

Description

_id

string

Yes

The entity primary key

additional_properties

object

No

The additional properties type

business_date

string

Yes

comment

string

No

company_id

string

Yes

contributors

contributors Array

No

The list of contributor items

creator

creator Object

No

The creator information

customer

customer Object

No

The customer information

deleted_items

deleted_items Array

No

The list of deleted items

destination

destination Object

No

The destination information

discount_info

discount_info Object

No

The discount information

discount_total

number

No

drawer_id

string

No

expo_number

string

No

guest_count

number

No

items

array

No

lifecycle

string

No

notification_status

string

Yes

order_number

string

Yes

order_point

string

No

order_source

string

No

order_source_ext

order_source_ext Object

No

The order source information

order_type

string

Yes

origin

string

No

owner

owner Object

No

The owner information

payment_info

payment_info Object

No

The payment information

payment_status

string

Yes

print_info

print_info Array

No

The list of printed items

reason_code

reason_code Object

No

The reason code information

reference_id

string

No

refunds

refunds Array

No

The list of refund items

segments

segments Array

No

The list of segment items

sequetial_order_number

string

Yes

site_info

site_info Object

Yes

The site information

state

string

Yes

subtotal

number

No

table_name

string

No

tax_exempt_info

tax_exempt_info Object

No

The tax exempt information

tax_inclusive_subtotal

number

No

tax_inclusive_info

tax_inclusive_info Object

No

The tax inclusive information

tax_info

tax_info Object

No

The tax information

time

time Object

Yes

The time information

total

number

No

version

string

Yes

voided_items

array

No

contributors Array

Field Name

Type

Required

Description

employee

employee Object

No

terminal

terminal Object

No

time

string

Yes

action

string

No

employee Object

Field Name

Type

Required

Description

id

string

Yes

name

string

Yes

title

string

Yes

badge_number

string

No

email

string

No

employee_corporate_code

string

No

birth_date

string

No

job_code

array

No

order_count

number

No

primary_job_code

string

No

permissions

permissions Array

No

company_id

string

No

employee_payroll_code

string

No

first_name

string

No

middle_name

string

No

pin_updated_at

number

No

pin

string

No

pos_id

string

No

status

string

No

role_id

string

No

nick_name

string

No

last_name

string

No

updated_at

string

No

permissions Array

Field Name

Type

Required

Description

app_code

string

Yes

name

string

Yes

type

string

Yes

value

boolean

Yes

terminal Object

Field Name

Type

Required

Description

_id

string

Yes

terminal_number

string

Yes

title

string

Yes

creator Object

Field Name

Type

Required

Description

employee

employee Object

No

terminal

terminal Object

No

time

string

Yes

action

string

No

customer Object

Field Name

Type

Description

address1

string

address2

string

city

string

country

string

delivery_date_time

string

email

string

first_name

string

id

string

last_name

string

phone_cell

array

phone_home

array

phone_work

array

pickup_date_time

string

social_number

string

social_role

string

state

string

table_tent

string

zip_code

string

deleted_items Array

Field Name

Type

Required

Description

btnIndex

number

No

child_items

array

No

comment

string

No

discount_info

discount_info Object

No

entity_id

string

No

fee_config

fee_config Object

No

grp_index

number

No

is_bundle

boolean

No

hash_code

string

No

item_count_quantity

number

No

item_type

string

No

kitchen_routing_categories

array

No

liability_type

string

No

master

string

No

modifiers

array

No

name

string

No

order_item_id

string

No

payment_status

string

No

price

number

No

price_changes

price_changes Array

No

product_id

string

Yes

quantity

number

No

reason_code

reason_code Object

No

reporting_category

reporting_category Object

No

required_position

boolean

No

revenue_class

array, string

No

rules

rules Array

No

segment_id

string

No

share_part

string

No

share_parts

share_parts Array

No

sort_order

number

No

state

string

No

tags

array, string

No

tax_group

tax_group Object

No

tax_inclusive_price

number

No

tax_inclusive_info

tax_inclusive_info Object

No

tax_info

tax_info Object

No

time

time Object

No

time_stamp

number

No

unit_price

number

No

discount_info Object

Field Name

Type

Required

Description

discounts

discounts Array

Yes

total_unrounded

number

Yes

total

number

Yes

discounts Array

Field Name

Type

Required

Description

amount

number

Yes

amount_unrounded

number

Yes

apply_type

string

Yes

distributed

boolean

Yes

id

string

No

ignore

boolean

No

order_discount_id

string

Yes

apply_post_tax

boolean

No

created_at

string

Yes

discount_code

string

Yes

discount_definition_id

string

Yes

name

string

Yes

use_loyalty

boolean

No

updated_at

string

No

quantity

number

Yes

fee_config Object

Field Name

Type

Required

Description

amount

number

No

apply_as

string

Yes

apply_pre_tax

boolean

Yes

fee_type

string

Yes

precision

number

No

price_changes Array

Field Name

Type

Required

Description

change_time

string

Yes

previous_price

number

Yes

reason_code

reason_code Object

No

reporting_category Object

Field Name

Type

Required

Description

major_reporting_category

major_reporting_category Object

Yes

minor_reporting_category

minor_reporting_category Object

Yes

major_reporting_category Object

Field Name

Type

Required

Description

name

string

Yes

is_major

boolean

Yes

minor_reporting_category_entity_ids

array

No

entity_id

string

Yes

minor_reporting_category Object

Field Name

Type

Description

name

string

entity_id

string

is_major

boolean

major_reporting_category_entity_id

string

_id

rules Array

Field Name

Type

Description

_id

string

allowed_destination_entity_ids

array, string

component_type

string

default_products

default_products Array

default_quantity

number

entity_id

string

is_enabled

boolean

maximum_quantity

number

minimum_quantity

number

name

string

pricing_change_action

string

productChoices

array

product_choices_entity_ids

array, string

sort_order

number

default_products Array

Field Name

Type

Required

Description

default_quantity

number

Yes

product_entity_id

string

Yes

share_parts Array

Field Name

Type

Required

Description

segment_id

string

Yes

numerator

number

Yes

denominator

number

Yes

unit_price

number

Yes

tax_group Object

Field Name

Type

Required

Description

tax_code

string

Yes

entity_id

string

Yes

_id

string

Yes

name

string

Yes

destination Object

Field Name

Type

Required

Description

entity_id

string

Yes

background_color

string

No

default_taxable_destination

boolean

No

optional_customer_info

array

No

required_customer_info

array

No

segment_name

string

No

short_name

string

No

text_color

string

No

consumption_type

string

No

_id

string

No

id

string

Yes

is_active

boolean

No

is_master

boolean

No

name

string

Yes

tags

array, string

No

order_source_ext Object

Field Name

Type

Required

Description

name

string

Yes

order_source_id

string

Yes

owner Object

Field Name

Type

Description

id

string

name

string

title

string

employee

employee Object

terminal

terminal Object

time

string

action

string

payment_info Object

Field Name

Type

Required

Description

change

number

Yes

payments

payments Array

Yes

payments Array

Field Name

Type

Required

Description

account

string

No

agreement

string

No

aid_number

string

No

allow_deposit

boolean

No

allow_tip

boolean

No

amount

number

Yes

application_name

string

No

application_response_code

string

No

arqc

string

No

auth

string, number

No

balance

number

No

card_acquisition

string

No

change_back

boolean

No

card_brand_name

string

No

check_number

string

No

code

string

No

entity_id

string

No

e_signature

string

No

emv

boolean

No

external_pay_type

string

No

_id

string

No

id

string

No

issuer_application_data

string

No

name_on_card

string

No

payment_class

number

No

open_cash_drawer

boolean

No

payment_id

string

No

payment_source

string

No

payment_source_ext

payment_source_ext Object

No

pay_type_id

string

No

pay_type_name

string

No

point_balance

number

No

print_tip_lines

boolean

No

prompt_for_receipt_on_final_payment

boolean

No

processed_at

string

No

quickpay

boolean

No

refund_policy

string

No

request_id

string

No

routing_number

string

No

signature_capture_threshold_amount

number

No

signature_capture_threshold

boolean

No

signature

boolean

No

status

string

No

tip_threshold

number

No

tc

string

No

terminal_id

string, number

No

terminal_verification_results

string

No

tip_amount

number

No

trace_number

string

No

transaction_id

string

No

transaction_status_indicator

string

No

transaction_type

string

No

verification_method

string

No

payment_source_ext Object

Field Name

Type

Required

Description

name

string

Yes

order_source_id

string

Yes

print_info Array

Field Name

Type

Required

Description

printed_by

string

Yes

user_id

string

Yes

time

string

Yes

printer_type

string

No

reason_code Object

Field Name

Type

Required

Description

_id

string

Yes

action

string, array

No

comment

string

No

employee

employee Object

No

entity_id

string

Yes

name

string

Yes

prompt_reason

boolean

Yes

time

time Object

No

refunds Array

Field Name

Type

Required

Description

order_item_id

string

Yes

quantity

number

Yes

refund_order_reference_id

string

Yes

segments Array

Field Name

Type

Required

Description

title

string

Yes

num

number

Yes

id

string

Yes

site_info Object

Field Name

Type

Required

Description

id

string

Yes

name

string

No

timezone

string

No

company

company Object

Yes

store_number

string

Yes

company Object

Field Name

Type

Required

Description

id

string

Yes

name

string

Yes

tax_exempt_info Object

Field Name

Type

Required

Description

id

string

Yes

reason

string

No

taxes

taxes Array

Yes

total

number

No

tax_inclusive_info Object

Field Name

Type

Required

Description

taxes

taxes Array

Yes

total

number

Yes

total_unrounded

number

Yes

taxes Array

Field Name

Type

Required

Description

id

string

Yes

name

string

Yes

amount_unrounded

number

Yes

amount

number

Yes

tax_info

tax_info Object

Yes

visible

boolean

Yes

tax_info Object

Field Name

Type

Required

Description

taxes

array

Yes

taxes_inclusive

array

No

total_exclusive

number

No

total_exclusive_unrounded

number

No

total_unrounded

number

Yes

total

number

Yes

total_inclusive_unrounded

number

No

total_inclusive

number

Yes

time Object

Field Name

Type

Description

added

string

created

string

checkedin

string

closed

string

confirmed

string

kitchen_printed

string

kitchen_sent

string

kitchen_bump

string

last_modified

string

unconfirmed

string

Sample Code

POS Order External API Example

A YAML example of the POST /api/ds/pipeline/pos.order operation is shown below broken into sections:

paths

openapi: 3.1.0
info:
  title: POS Order External API
  description: API to ingest POS orders to Portal API
  version: 1.0.0
security:
  - IntegratorToken: []
servers:
  - url: https://connect.xenial.com
    description: production
  - url: https://uat-connect.xenial.com
    description: staging
paths:
  "/ds/pipeline/pos.order":
    post:
      summary: POS Orders messages delivering.
      security:
        - IntegratorToken: []
      parameters:
        - "$ref": "#/components/parameters/CompanyIdHeader"
        - "$ref": "#/components/parameters/SiteIdHeader"
        - "$ref": "#/components/parameters/TerminalIdHeader"
        - "$ref": "#/components/parameters/UserAgentHeader"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/POSOrderMessage"
      responses:
        '202':
          "$ref": "#/components/responses/202Accepted"
        '400':
          "$ref": "#/components/responses/BadRequestResponse"
        '401':
          "$ref": "#/components/responses/401Unauthorized"
        '403':
          "$ref": "#/components/responses/403Forbidden"

components

components:
  securitySchemes:
    IntegratorToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: An integrator token represents a grant of access for a 
3rd party to all of some company’s sites.
  schemas:
    UnauthorizedError:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              type: string
              examples:
                - '401'
            message:
              type: string
	      examples:
                - No token header was provided
    ForbiddenError:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              type: string
              examples:
                - '403'
            message:
              type: string
              examples:
                - Token Verify Failure

POSOrderMessage

POSOrderMessage:
      type: array
      items:
        type: object
        required:
          - platform
          - payload
          - platform_version
          - msg_id
          - content_type
          - msg_type
        properties:
          platform:
            type: string
            examples:
              - XENIAL
          platform_version:
            type: string
            examples:
              - 2.7.55
          msg_id:
            type: string
            examples:
              - b9c661dc-bf43-403d-a4b5-fac047204abb
          msg_type:
            type: string
            enum:
              - pos.order
          content_type:
            type: string
            examples:
              - application/json
          payload:
            type: string
            description: Stringified JSON data following POSOrderPayload 
schema
            "$ref": "#/components/schemas/POSOrderPayload"
            examples:
              - '{"order": {"_id":"5bf477fc-de42-4ab0-85aa-cc462b000126",
"business_date":"2019-01-02T09:08:51.106Z","company_id":
"6141aadfb290560007bd29a7","notification_status":"committed",
"order_number":"7770000001","order_type":"order",
"payment_status":"paid","sequential_order_number":"1","site_info":{"id":
"6141aded80fc9800075b4034","store_number":"0123456","company":{"id":
"6141aadfb290560007bd29a7","name":"AlexY_Clear data"}},"state":"closed","time":
{"created":"2019-01-02T12:00:00.106Z","last_modified":
"2019-01-03T07:08:51.106Z",
"notification_committed":"2019-01-02T09:08:51.106Z","closed":
"2019-01-02T12:02:00.106Z"},"version":"1"}}'
    POSOrderPayload:
      type: object
      properties:
        order:
          $ref: "#/components/schemas/POSOrder"
      required:
        - order

POSOrder

POSOrder:
	type: object
      properties:
        _id:
          description: Entity primary key (objectId | UUIDv4)
          type: string
          pattern: "^[0-9A-Fa-f]{24}$|^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-
[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
        additional_properties:
          type: object
          description: AdditionalPropertiesType
        business_date:
          type: string
          format: date-time
        comment:
          type:
            - string
            - 'null'
        company_id:
          type: string
          pattern: "^[0-9A-Fa-f]{24}$|^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-
[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
        contributors:
          type: array
          items:
            type: object
            description: Contributor
            properties:
              employee:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  title:
                    type: string
                  badge_number:
                    type:
                      - string
                      - 'null'
                  email:
                    type:
                      - string
                      - 'null'
                  employee_corporate_code:
                    type: string
                  birth_date:
                    type:
                      - string
                      - 'null'
                  job_code:
                    type: array
                    items:
                      type: string
                  order_count:
                    type: number
                  primary_job_code:
                    type:
                      - string
                      - 'null'
                  permissions:
                    type: array
                    items:
                      type: object
                      properties:
                        app-code:
                          type: string
                        name:
                          type: string
                        type:
				type: string
                        value:
                          type: boolean
                      required:
                        - app-code
                        - name
                        - type
                        - value
                  company_id:
                    type: string
                    pattern: "^[0-9A-Fa-f]{24}$|^[0-9A-Fa-f]{8}-[0-9A-Fa-f]
{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                  employee_payroll_code:
                    type:
                      - string
                      - 'null'
                  first_name:
                    type:
                      - string
                      - 'null'
                  middle_name:
                    type:
                      - string
                      - 'null'
                  pin_updated_at:
                    type: number
                  pin:
                    type: string
                  pos_id:
                    type: string
                  status:
                    type: string
                  role_id:
                    type:
                      - string
                      - 'null'
                  nick_name:
                    type:
                      - string
                      - 'null'
                  last_name:
                    type:
                      - string
                      - 'null'
                  updated_at:
                    type:
                      - string
                      - 'null'
                required:
                  - id
                  - name
                  - title
              terminal:
                type: object
                properties:
                  _id:
                    type: string
                  terminal_number:
                    type: string
                  title:
                    type: string
                required:
                  - _id
                  - terminal_number
                  - title
              time:
                type: string
              action:
                type: string
            required:
		 - time
        creator:
          type: object
          description: Creator
          properties:
            employee:
              type: object
              properties:
                id:
                  type: string
                name:
                  type: string
                title:
                  type: string
              required:
                - id
                - name
                - title
            terminal:
              type: object
              properties:
                _id:
                  type: string
                terminal_number:
                  type: string
                title:
                  type: string
              required:
                - _id
                - terminal_number
                - title
            time:
              type: string
            action:
              type: string
          required:
            - time
        customer:
          type: object
          description: Customer
          properties:
            address1:
              type: string
            address2:
              type: string
            city:
              type: string
            country:
              type: string
            delivery_date_time:
              type: string
            email:
              type:
                - string
                - 'null'
            first_name:
              type:
                - string
                - 'null'
            id:
              type: string
            last_name:
              type:
                - string
                - 'null'
            phone_cell:
              type:
                - array
                - string
                - 'null'
	     phone_home:
              type:
                - array
                - string
                - 'null'
            phone_work:
              type:
                - array
                - string
                - 'null'
            pickup_date_time:
              type: string
            social_number:
              type: string
            social_role:
              type: string
            state:
              type: string
            table_tent:
              type:
                - string
                - 'null'
            zip_code:
              type: string
        deleted_items:
          type: array
          items:
            type: object
            description: OrderItem
            properties:
              btnIndex:
                type: number
              child_items:
                type: array
              comment:
                type: string
              discount_info:
                type: object
                description: DiscountInfo
                properties:
                  discounts:
                    type: array
                    items:
                      type: object
                      description: Discount
                      properties:
                        amount:
                          type: number
                          minimim: 0
                        amount_unrounded:
                          type: number
                          minimim: 0
                        apply_type:
                          type: string
                        distributed:
                          type: boolean
                        id:
                          type: string
                        ignore:
                          type: boolean
                        order_discount_id:
                          type: string
                        apply_post_tax:
                          type: boolean
                        created_at:
                          type: string
                        discount_code:
                          type: string
                        discount_definition_id:
                          type: string
			name:
                          type: string
                        use_loyalty:
                          type: boolean
                        updated_at:
                          type: string
                        quantity:
                          type: number
                      required:
                        - amount
                        - amount_unrounded
                        - apply_type
                        - distributed
                        - order_discount_id
                        - created_at
                        - discount_code
                        - discount_definition_id
                        - name
                        - quantity
                  total_unrounded:
                    type: number
                  total:
                    type: number
                required:
                  - discounts
                  - total_unrounded
                  - total
              entity_id:
                type: string
              fee_config:
                type: object
                description: FeeConfig
                properties:
                  amount:
                    type: number
                  apply_as:
                    type: string
                  apply_pre_tax:
                    type: boolean
                  fee_type:
                    type: string
                  precision:
                    type: number
                required:
                  - amount
                  - apply_as
                  - apply_pre_tax
                  - fee_type
              grpIndex:
                type: number
              is_bundle:
                type: boolean
              hash_code:
                type: string
              item_count_quantity:
                type: number
              item_type:
                type: string
              kitchen_routing_categories:
                type: array
                items:
                  type: string
              liability_type:
                type: string
              master:
                type: string
              modifiers:
                type: array
              name:
                type: string
	      order_item_id:
                type: string
              payment_status:
                type: string
              price:
                type: number
              price_changes:
                type: array
                items:
                  type: object
                  description: PriceChangeReasonInfo
                  properties:
                    change_time:
                      type: string
                    previous_price:
                      type: number
                    reason_code:
                      type: object
                      description: ReasonCode
                      properties:
                        _id:
                          type: string
                        action:
                          type:
                            - string
                            - array
                        comment:
                          type: string
                        employee:
                          type: object
                          description: Employee
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            title:
                              type: string
                          required:
                            - id
                            - name
                            - title
                        entity_id:
                          type: string
                        name:
                          type: string
                        prompt_reason:
                          type: boolean
                        time:
                          type: object
                          description: TimeInfo
                          properties:
                            added:
                              type: string
                            created:
                              type: string
                            checkedin:
                              type: string
                            closed:
                              type: string
                            confirmed:
                              type: string
                            kitchen_printed:
                              type: string
                            kitchen_sent:
                              type: string
                            kitchen_bump:
                              type: string
                            last_modified:
                              type: string
			    unconfirmed:
                              type: string
                      required:
                        - _id
                        - entity_id
                        - name
                        - prompt_reason
                  required:
                    - change_time
                    - previous_price
              product_id:
                type: string
              quantity:
                type: number
              reason_code:
                type: object
                description: ReasonCode
                properties:
                  _id:
                    type: string
                    pattern: "^[0-9A-Fa-f]{24}$|^[0-9A-Fa-f]{8}-[0-9A-Fa-f]
{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                  action:
                    type:
                      - string
                      - array
                  comment:
                    type: string
                  employee:
                    type: object
                    description: Employee
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      title:
                        type: string
                    required:
                      - id
                      - name
                      - title
                  entity_id:
                    type: string
                  name:
                    type: string
                  prompt_reason:
                    type: boolean
                  time:
                    type: object
                    description: TimeInfo
                    properties:
                      added:
                        type: string
                      created:
                        type: string
                        format: date-time
                      checkedin:
                        type: string
                      closed:
                        type: string
                      confirmed:
                        type: string
                      kitchen_printed:
                        type: string
                      kitchen_sent:
                        type: string
                      kitchen_bump:
                        type: string
                      last_modified:
			type: string
                      unconfirmed:
                        type: string
                required:
                  - entity_id
                  - name
                  - prompt_reason
              reporting_category:
                oneOf:
                  - type:
                      - object
                    description: OrderItemReportingCategory
                    properties:
                      major_reporting_category:
                        type: object
                        description: ReportingCategory
                        properties:
                          name:
                            type: string
                          is_major:
                            type: boolean
                          minor_reporting_category_entity_ids:
                            type: array
                            items:
                              type: string
                          entity_id:
                            type: string
                        required:
                          - name
                          - is_major
                          - entity_id
                      minor_reporting_category:
                        type: object
                        description: ReportingCategory
                        properties:
                          name:
                            type: string
                          entity_id:
                            type: string
                          is_major:
                            type: boolean
                          major_reporting_category_entity_id:
                            type: string
                          _id:
                            type: string
                  - type: 'null'
                required:
                  - major_reporting_category
                  - minor_reporting_category
              required_position:
                type: boolean
              revenue_class:
                oneOf:
                  - type: array
                    items:
                      type: string
                  - type: string
              rules:
                type: array
                items:
                  type: object
                  description: ItemRule
                  properties:
                    _id:
                      type: string
                    allowed_destination_entity_ids:
                      type: array
                      items:
                        type: string
                    component_type:
			type: string
                    default_products:
                      type: array
                      items:
                        type: object
                        description: DefaultProducts
                        properties:
                          default_quantity:
                            type: number
                          product_entity_id:
                            type: string
                        required:
                          - default_quantity
                          - product_entity_id
                    default_quantity:
                      type: number
                    entity_id:
                      type: string
                    is_enabled:
                      type: boolean
                    maximum_quantity:
                      type: number
                    minimum_quantity:
                      type: number
                    name:
                      type: string
                    pricing_change_action:
                      type: string
                    productChoices:
                      type: array
                    product_choices_entity_ids:
                      type: array
                      items:
                        type: string
                    sort_order:
                      type: number
              segment_id:
                type: string
              share_part:
                type: string
              share_parts:
                type: array
                items:
                  type: object
                  description: SharedItemInfo
                  properties:
                    segment_id:
                      type: string
                    numerator:
                      type: number
                    denominator:
                      type: number
                    unit_price:
                      type: number
                  required:
                    - segment_id
                    - numerator
                    - denominator
                    - unit_price
              sort_order:
                type: number
              state:
                type: string
              tags:
                type: array
                items:
                  type: string
              tax_group:
                type: object
                description: TaxGroup
		properties:
                  tax_code:
                    type: string
                  entity_id:
                    type: string
                  _id:
                    type: string
                  name:
                    type: string
                required:
                  - tax_code
                  - entity_id
                  - _id
                  - name
              tax_inclusive_price:
                type: number
              tax_inclusive_info:
                type: object
                description: TaxInclusiveInfo
                properties:
                  taxes:
                    type: array
                    items:
                      type: object
                      description: Tax
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        amount_unrounded:
                          type: number
                        amount:
                          type: number
                        tax_info:
                          type: object
                          description: TaxInfo
                          properties:
                            taxes:
                              type: array
                            taxes_inclusive:
                              type: object
                            total_unrounded:
                              type: number
                            total:
                              type: number
                            total_inclusive_unrounded:
                              type: number
                            total_inclusive:
                              type: number
                          required:
                            - taxes
                            - total_unrounded
                            - total
                            - total_inclusive_unrounded
                            - total_inclusive
                        visible:
                          type: boolean
                      required:
                        - id
                        - name
                        - amount_unrounded
                        - amount
                        - tax_info
                        - visible
                  total:
                    type: number
                  total_unrounded:
                    type: number
                required:
			- taxes
                  - total
                  - total_unrounded
              tax_info:
                type: object
                description: TaxInfo
                properties:
                  taxes:
                    type: array
                  taxes_inclusive:
                    type: array
                  total_exclusive:
                    type: number
                  total_exclusive_unrounded:
                    type: number
                  total_unrounded:
                    type: number
                  total:
                    type: number
                  total_inclusive_unrounded:
                    type: number
                  total_inclusive:
                    type: number
                required:
                  - taxes
                  - total_unrounded
                  - total
                  - total_inclusive
              time:
                type: object
                description: TimeInfo
                properties:
                  added:
                    type: string
                  created:
                    type: string
                  checkedin:
                    type: string
                  closed:
                    type: string
                  confirmed:
                    type: string
                  kitchen_printed:
                    type: string
                  kitchen_sent:
                    type: string
                  kitchen_bump:
                    type: string
                  last_modified:
                    type: string
                  unconfirmed:
                    type: string
              timestamp:
                type: number
              unit_price:
                type: number
                number: 0
            required:
              - product_id
        destination:
          type: object
          description: Destination
          properties:
            entity_id:
              type: string
            background_color:
              type: string
            default_taxable_destination:
              type: boolean
            optional_customer_info:
	      type: array
            required_customer_info:
              type: array
            segment_name:
              type: string
            short_name:
              type: string
            text_color:
              type: string
            consumption_type:
              type: string
            _id:
              type: string
            id:
              type: string
            is_active:
              type: boolean
            is_master:
              type: boolean
            name:
              type: string
            tags:
              type: array
              items:
                type: string
          required:
            - entity_id
            - id
            - name
        discount_info:
          type: object
          description: DiscountInfo
          properties:
            discounts:
              type: array
            total_unrounded:
              type: number
            total:
              type: number
          required:
            - discounts
            - total_unrounded
            - total
        discount_total:
          type: number
        drawer_id:
          type: string
          pattern: "^[0-9A-Fa-f]{24}$|^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-
[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
        expo_number:
          type: string
        guest_count:
          type: number
        items:
          type: array
        lifecycle:
          type: string
        notification_status:
          type: string
        order_number:
          type: string
        order_point:
          type: string
        order_source:
          type: string
        order_source_ext:
          type: object
          description: OrderSourceInfo
          properties:
            name:
	      type: string
            order_source_id:
              type: string
          required:
            - name
            - order_source_id
        order_type:
          type: string
        origin:
          type: string
        owner:
          type: object
          description: Employee/Contributor
          properties:
            id:
              type: string
            name:
              type: string
            title:
              type: string
            employee:
              type: object
              description: Contributor/Employee
              properties:
                id:
                  type: string
                name:
                  type: string
                title:
                  type: string
            terminal:
              type: object
              properties:
                _id:
                  type: string
                terminal_number:
                  type: string
                title:
                  type: string
            time:
              type: string
            action:
              type: string
        payment_info:
          type: object
          description: PaymentInfo
          properties:
            change:
              type: number
            payments:
              type: array
              items:
                type: object
                description: Payment
                properties:
                  account:
                    type: string
                  agreement:
                    type: string
                  aid_number:
                    type: string
                  allow_deposit:
                    type: boolean
                  allow_tip:
                    type: boolean
                  amount:
                    type:
                      - number
                      - 'null'
                  application_name:
		    type: string
                  application_response_code:
                    type: string
                  arqc:
                    type: string
                  auth:
                    type:
                      - string
                      - number
                      - 'null'
                  balance:
                    type:
                      - number
                      - 'null'
                  card_acquisition:
                    type: string
                  change_back:
                    type: boolean
                  card_brand_name:
                    type: string
                  check_number:
                    type: string
                  code:
                    type: string
                  entity_id:
                    type: string
                  e_signature:
                    type:
                      - string
                      - 'null'
                      - boolean
                  emv:
                    type: boolean
                  external_pay_type:
                    type: string
                  _id:
                    type: string
                    pattern: "^[0-9A-Fa-f]{24}$|^[0-9A-Fa-f]{8}-[0-9A-Fa-f]
{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                  id:
                    type: string
                  issuer_application_data:
                    type: string
                  name_on_card:
                    type: string
                  payment_class:
                    type: number
                  open_cash_drawer:
                    type: boolean
                  payment_id:
                    type: string
                  payment_source:
                    type: string
                  payment_source_ext:
                    type: object
                    description: OrderSourceInfo
                    properties:
                      name:
                        type: string
                      order_source_id:
                        type: string
                    required:
                      - name
                      - order_source_id
                  pay_type_id:
                    type: string
                  pay_type_name:
                    type: string
                  point_balance:
                    type: number
		  print_tip_lines:
                    type: boolean
                  prompt_for_receipt_on_final_payment:
                    type: boolean
                  processed_at:
                    type: string
                    format: date-time
                  quickpay:
                    type: boolean
                  refund_policy:
                    type: string
                  request_id:
                    type: string
                  routing_number:
                    type: string
                  signature_capture_threshold_amount:
                    type: number
                  signature_capture_threshold:
                    type: boolean
                  signature:
                    type:
                      - boolean
                      - 'null'
                  status:
                    type: string
                  tip_threshold:
                    type: number
                  tc:
                    type: string
                  terminal_id:
                    type:
                      - string
                      - 'null'
                      - number
                  terminal_verification_results:
                    type: string
                  tip_amount:
                    type: number
                  trace_number:
                    type:
                      - string
                      - 'null'
                  transaction_id:
                    type:
                      - string
                      - 'null'
                  transaction_status_indicator:
                    type: string
                  transaction_type:
                    type: string
                  verification_method:
                    type: string
                required:
                  - amount
          required:
            - change
            - payments
        payment_status:
          type: string
        print_info:
          type: array
          items:
            type: object
            description: PrintRecord
            properties:
              printed_by:
                type: string
              user_id:
                type: string
              time:
		type: string
              print_type:
                type:
                  - string
                  - 'null'
            required:
              - printed_by
              - user_id
              - time
        reason_code:
          type:
            - object
            - 'null'
          description: ReasonCode
          properties:
            _id:
              type: string
            action:
              type:
                - string
                - array
            comment:
              type: string
            employee:
              type: object
              description: Employee
              properties:
                id:
                  type: string
                name:
                  type: string
                title:
                  type: string
              required:
                - id
                - name
                - title
            entity_id:
              type: string
            name:
              type: string
            prompt_reason:
              type: boolean
            time:
              type: object
              description: TimeInfo
              properties:
                added:
                  type: string
                created:
                  type: string
                checkedin:
                  type: string
                closed:
                  type: string
                confirmed:
                  type: string
                kitchen_printed:
                  type: string
                kitchen_sent:
                  type: string
                kitchen_bump:
                  type: string
                last_modified:
                  type: string
                unconfirmed:
                  type: string
          required:
            - _id
            - entity_id
	    - name
            - prompt_reason
        reference_id:
          type: string
        refunds:
          type: array
          items:
            type: object
            description: RefundReference
            properties:
              order_item_id:
                type: string
              quantity:
                type: number
              refund_order_reference_id:
                type: string
            required:
              - order_item_id
              - quantity
              - refund_order_reference_id
        segments:
          type: array
          items:
            type: object
            description: OrderSegment
            properties:
              title:
                type: string
              num:
                type: number
              id:
                type: string
            required:
              - title
              - num
              - id
        sequential_order_number:
          type: string
        site_info:
          type: object
          description: SiteInfo
          properties:
            id:
              type: string
              pattern: "^[0-9A-Fa-f]{24}$|^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-
[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
            name:
              type: string
            timezone:
              type: string
            company:
              type: object
              description: CompanyInfo
              properties:
                id:
                  type: string
                name:
                  type: string
              required:
                - id
                - name
            store_number:
              type: string
          required:
            - id
            - company
            - store_number
        state:
          type: string
        subtotal:
	  type: number
        table_name:
          type: string
        tax_exempt_info:
          typo: object
          description: TaxExemptInfo
          properties:
            id:
              type: string
            reason:
              type: string
            taxes:
              type: array
              items:
                type:
                  - string
                  - object
                description: Tax
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  amount_unrounded:
                    type: number
                  amount:
                    type: number
                  tax_info:
                    type: object
                    description: TaxInfo
                    properties:
                      taxes:
                        type: array
                      taxes_inclusive:
                        type: array
                      total_exclusive:
                        type: number
                      total_exclusive_unrounded:
                        type: number
                      total_unrounded:
                        type: number
                      total:
                        type: number
                      total_inclusive_unrounded:
                        type: number
                      total_inclusive:
                        type: number
                    required:
                      - taxes
                      - total_unrounded
                      - total
                      - total_inclusive_unrounded
                      - total_inclusive
                  visible:
                    type: boolean
                required:
                  - id
                  - name
                  - amount_unrounded
                  - amount
                  - tax_info
            total:
              type: number
          required:
            - id
            - taxes
        tax_inclusive_subtotal:
          type: number
        tax_inclusive_info:
          type: object
	    description: TaxInclusiveInfo
          properties:
            taxes:
              type: array
              items:
                type: object
                description: Tax
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  amount_unrounded:
                    type: number
                  tax_definition_id:
                    type: string
                  amount:
                    type: number
                  tax_info:
                    type: object
                    description: TaxInfo
                    properties:
                      taxes:
                        type: array
                      total_exclusive:
                        type: number
                      total_exclusive_unrounded:
                        type: number
                      taxes_inclusive:
                        type: array
                      total_unrounded:
                        type: number
                      total:
                        type: number
                      total_inclusive_unrounded:
                        type: number
                      total_inclusive:
                        type: number
                    required:
                      - taxes
                      - total_unrounded
                      - total
                      - total_inclusive_unrounded
                      - total_inclusive
                  visible:
                    type: boolean
                required:
                  - name
                  - amount_unrounded
                  - amount
                  - visible
            total:
              type: number
            total_unrounded:
              type: number
          required:
            - taxes
            - total
            - total_unrounded
        tax_info:
          type: object
          description: TaxInfo
          properties:
            taxes:
              type: array
            taxes_inclusive:
              type: array
            total_unrounded:
              type: number
            total_exclusive:
	      type: number
            total_exclusive_unrounded:
              type: number
            total:
              type: number
            total_inclusive_unrounded:
              type: number
            total_inclusive:
              type: number
          required:
            - total_unrounded
            - total
        time:
          type: object
          description: TimeInfo
          properties:
            added:
              type: string
            created:
              type: string
              format: date-time
            checkedin:
              type: string
            closed:
              type: string
              format: date-time
            confirmed:
              type: string
            kitchen_printed:
              type: string
            kitchen_sent:
              type: string
            kitchen_bump:
              type: string
            last_modified:
              type: string
              format: date-time
            notification_committed:
              type: string
            unconfirmed:
              type: string
              format: date-time
        total:
          type: number
        version:
          type: string
        voided_items:
          type: array
      required:
        - _id
        - business_date
        - company_id
        - notification_status
        - order_number
        - order_type
        - payment_status
        - sequential_order_number
        - site_info
        - state
        - time
        - version

parameters

parameters:
    CompanyIdHeader:
      name: x-company-id
      in: header
      description: Company id
      required: true
      schema:
        type: string
    UserAgentHeader:
      name: x-user-agent
      in: header
      description: User agent
      required: false
      schema:
        type: string
    TerminalIdHeader:
      name: x-terminal-id
      in: header
      description: Terminal id
      required: false
      schema:
        type: string
    SiteIdHeader:
      name: x-site-ids
      in: header
      description: List of sites ids (comma separated)
      required: true
      schema:
        type: string
        examples:
        - "6141aadfb290560007bd29a7,6142aadfb290560007bd29a4"

responses

responses:
    401Unauthorized:
      description: Unauthorized error
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/UnauthorizedError"
    403Forbidden:
      description: Forbidden error
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/ForbiddenError"
    202Accepted:
      description: Accepted
      content:
        application/json:
          schema:
            type: object
            properties:
              request_id:
                type: string
                examples:
                  - 5d979d74-11e0-4a9c-b002-ac967e62917e
              failed_count:
                type: integer
                examples:
                  - 0
              records:
                type: array
                items:
                  type: object
                  properties:
                    status:
                      type: string
                      examples:
                        - accepted
    BadRequestResponse:
      description: Request body invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              request_id:
                type: string
                examples:
                  - 5d979d74-11e0-4a9c-b002-ac967e62917e
		failed_count:
                type: integer
                examples:
                  - 0
              records:
                type: array
                items:
                  type: object
                  properties:
                    ErrorMessage:
                      type: string
                      examples:
                        - Invalid message payload
                    ErrorCode:
                      type: string
                      examples:
                        - ErrorCode