# Get order

This endpoint is for fetching the details of an order. It can be used when a new webhook event is received. It can also be used to fetch the order at a later date if required.
> Note:
> For the best end user experience, we recommend to include the following fields when showing the order to the user (eg. on a docket, bump screen):
  > - origin.name - this displays the name of the App the order originated from,
  > - origin.orderReference - this displays the order reference that allows its easy identification,
  > - customers.firstName - this displays the name of the customer.
> Please keep in mind that those fields do not have restrictions on length and might need to be handled appropriately on your end to be displayed correctly to the end user.

Endpoint: GET /orders/{orderId}
Version: 1.0
Security: JWT

## Path parameters:

  - `orderId` (string, required)
    ID of order to retrieve

## Header parameters:

  - `Authorization` (string, required)

## Response 200 fields (application/json):

  - `origin` (object, required)
    Contains information about the food ordering partner that created the order.

  - `origin.orderId` (string, required)
    An identifier that has been generated by the origin. This can be used for reconciliation of orders in the app partner’s system.

  - `origin.orderReference` (string, required)
    Reference for the order. You should use it to facilitate the communication between the merchant and the eater during fulfillment by providing a short code that allows the order to be easily identifiable.

  - `origin.name` (string)
    This will be your name. It is mostly used by POS's to identify where an order came from

  - `locationId` (string, required)
    The id of the location as specified by the Tyro Connect system.

  - `status` (string, required)
    The current status of the order. When created, order status must be CREATED or ACCEPTED.
    Enum: "CREATED", "ACCEPTED", "REJECTED", "BEING_PREPARED", "READY", "OUT_FOR_DELIVERY", "CANCELLED_BY_MERCHANT", "CANCELLED_BY_CUSTOMER", "FULFILLED"

  - `notes` (string)
    A free text field with instructions from the customer to the merchant.

  - `items` (array, required)
    A list of all the items in the order.

  - `items.id` (string, required)
    An id unique to the order, representing the item within the overall order.
order, i.e. 2 of the same items will have unique ids.

  - `items.unitPrice` (object, required)
    The basic price of a single item in cents excluding discounts (if any).

  - `items.unitPrice.amount` (integer, required)
    This is the amount in smallest currency unit. e.g 12520 (in cents) is $125.20
    Example: 12520

  - `items.unitPrice.currency` (string, required)
    Enum: "AUD", "EUR", "NZD", "GBP", "USD"

  - `items.discounts` (array)
    Each entry in the discounts array will apply to each single item - it represents unit discounts (eg. if the quantity of this object is defined as 2 and the discounts array contains one $1 entry, each of the 2 items should be discounted by $1). item.total = (item.unitPrice + item.modifiersTotal - item.discounts) * item.quantity

  - `items.discounts.amount` (integer, required)
    This is the amount in smallest currency unit. e.g 12520 (in cents) is $125.20
    Example: 12520

  - `items.discounts.currency` (string, required)
    Enum: "AUD", "EUR", "NZD", "GBP", "USD"

  - `items.discounts.description` (string)
    A description of what this amount of money represents
    Example: "Tuesday Happy Hour Discount"

  - `items.modifiers` (array)
    A list of modifications to be made to the parent item. Each entry in this array will apply to each single item - it represents unit modifiers (eg. if the quantity of this object is defined as 2 and the modifiers array contains one $1 entry, each of the 2 items should be modified by $1). item.total = (item.unitPrice + item.modifiersTotal - item.discounts) * item.quantity'

  - `items.allergens` (array)
    Allergens that need to be removed from the parent item.

  - `items.allergens.description` (string)
    Fish Nuts etc

  - `items.sku` (string, required)
    Id of the item that is aligned with the ID of the item in the POS.

  - `items.description` (string, required)
    A human readable description of the item that can be used to resolve mismatches between the app and the POS.

  - `items.quantity` (integer, required)
    The number of units of this item required to fulfil the order. Please note that items with different modifiers or surcharges should be split into separate item objects.

  - `items.notes` (string)
    An instruction or message about this order item.

  - `table` (object)
    This object is optional, and if present will only have information about table and section.

  - `table.id` (string)

  - `table.section` (string)

  - `customers` (array)
    The object only has a single field firstName.

  - `customers.firstName` (string)

  - `discounts` (array)
    Each entry in the discounts array will apply to the whole order and is included in the order total value.

  - `surcharges` (array)
    Each entry in the surcharges array will apply to the whole order and is included in the order total value.

  - `total` (object, required)
    The order total is calculated as order.total = (item.unitPrice + item.modifiersTotal - item.discounts) * item.quantity + order.surcharges - order.discounts + order.tip. Please note that TyroConnect does not enforce this calculation to allow flexibility while creating an order.

  - `total.amount` (integer, required)
    This is the amount in smallest currency unit. e.g 12520 (in cents) is $125.20
    Example: 12520

  - `total.currency` (string, required)
    Enum: "AUD", "EUR", "NZD", "GBP", "USD"

  - `tip` (object)
    This value will apply to the whole order and is included in the order total value.

  - `tip.amount` (integer, required)
    This is the amount in smallest currency unit. e.g 12520 (in cents) is $125.20
    Example: 12520

  - `tip.currency` (string, required)
    Enum: "AUD", "EUR", "NZD", "GBP", "USD"

  - `fulfilment` (object, required)
    Details about how the customers expect to receive the order.

  - `fulfilment.type` (string, required)
    Type of fulfilment the customer expects
    Enum: "PICK_UP", "DINE_IN", "DELIVERY"

  - `paymentStatus` (string)
    Current payment status of the order. Can be either OPEN or CLOSED. OPEN payment status is only applicable for orders with fulfilment type of DINE_IN.

  - `id` (string)
    This is the Tyro Connect system order Id. It uniquely identifies the order.

  - `statusInfo` (string)
    This field provides additional information about the status of an order
    Enum: "AUTO_REJECTED_BY_TIMEOUT"


## Response 403 fields

## Response 404 fields
