PUT v1/Orders/{siteId}

(NOTE: This endpoint will be deprecated and replaced by PUT /v2/Orders/{siteId}/{orderId} and POST /v2/Orders/{siteId} in the future). Creates an order on the server and sends it down to the site to calculate the tax and total for the given order. If Loyalty is turned on for a given company and a loyalty number is provided with the order, merit will be accrued for the transaction, and an attempt to redeem rewards will be made. The result of the loyalty redemption process will be reflected through the LoyaltyResultCode field. The order check out will happen whether or not Loyalty Redemption succeeds.

URI template

v1/Orders/{siteId}?verbose={verbose}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

siteId

integer

Required

verbose

Optional query param. If true, then returns a filled out OrderResults object. If any other value, returns the OrderResults object with only the OrderId having a value

boolean

Default value is False

Body Parameters

The order that is to be saved off and the tax and total will be calculated with

InOrder
NameDescriptionTypeAdditional information
SiteId

The site that the order is being submitted to, value retrieved from get sites

integer

Required

Range: inclusive between 1 and 9.22337203685478E+18

OrderId

Nullable The order id that you are updating, when creating a new order pass in null

integer

Range: inclusive between 0 and 9.22337203685478E+18

DesignId

The web design id that user is ordering from

integer

None.

MenuId

The menu that the user is ordering from

integer

None.

PromiseDateTime

When the order is ready for pick up by the customer, and it follows Prep Time and Capacity management from ATO, Do not send timezone info with this This parameter is required unless valid QuoteId is provided.

date

PromiseDateTime or QuoteId required

LineItems

The list of items that the customer is ordering form

Collection of InOrderLineItem

None.

ComboItems

Distinct List of items in a websales group( i.e Combo Items)

Collection of ComboItem

None.

OrderMode

How the food is being ordered

OrderModeType

Required

UpdateTimeDisabled

Nullable Drives whether we increment the PromiseTime if the user doesn’t submit the order before the promise time, If no value is provided defaults to false

boolean

None.

PaymentMode

How the customer is going to pay for the order

PaymentMode

Required

OrderSource

Nullable How the customer is placing the order

OrderSourceType

None.

Destination

Nullable Identifies the location in store to deliver an order

DestinationType

None.

ShouldManualRelease

States whether an order should automatically be released at the time given, or if it should be held for manual release

boolean

None.

TaxJurisdictionId

Identifies the tax jurisdiction that is used to calculated taxes

integer

None.

Customer

The customer that is placing the order, If the customer already exists send up the customer's First and Last name also

OrderCustomer

Required

CustomerAddressForOrder

Nullable The delivery address if the order is to be delivered

CustomerAddress

None.

SpecialInstructions

Instructions that the customer wants to give the site about the order

string

None.

LoyaltyNumber

Nullable The loyalty card number for the order

string

None.

CompId

Nullable The Comp that is to be placed on the order

integer

None.

Comps

Comps to be applied to the Order. Comps collection and CompId are mutually exclusive. CompId used within Comps collection is the ID of the comp defined in POS, not the ID defined in Aloha Online Ordering admin.

Collection of InComp

None.

Guests

Represents a guest (seat) on the order and the items associated with that guest. Also includes sub-elements for total, tax, and order charge information.

Collection of Guest

None.

ReferenceNumber

Nullable An open field for you want to attach to the order, for example a third party id for this order

integer

None.

ExternalOrderId

Nullable A string field to attach an external id for this order

string

None.

AssignLoyalty

Nullable This flag determines whether loyalty is processed for the order

boolean

None.

DeliveryFeeAmount

The Delivery fee amount to be attached to the order in the scenario UseSiteLevelDeliveryFees is disabled and no Zone fees are set

decimal number

None.

Channel

DEPRECATED. Please use the X-Api-Channel header instead.

string

None.

DineIn

If it's a dinein order

boolean

None.

TableNumber

Dine in table number

integer

None.

TableId

Dine in check id

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "SiteId": 0,
  "OrderId": null,
  "DesignId": 0,
  "MenuId": 0,
  "PromiseDateTime": "0001-01-01T00:00:00",
  "LineItems": null,
  "ComboItems": [],
  "OrderMode": 0,
  "UpdateTimeDisabled": null,
  "PaymentMode": 0,
  "OrderSource": null,
  "Destination": null,
  "ShouldManualRelease": null,
  "TaxJurisdictionId": null,
  "Customer": {
    "$id": "2",
    "CustomerId": null,
    "EMail": null,
    "FirstName": null,
    "LastName": null,
    "BusinessName": null,
    "VoicePhone": null,
    "VoicePhoneExtension": null,
    "DepartmentName": null,
    "AltPhone": null,
    "AltPhoneExtension": null,
    "FavoriteSiteId": null,
    "FavoriteSiteIds": null,
    "LoyaltyCardNumber": null,
    "SecondaryEmailAddress": null,
    "Addresses": null,
    "Birthday": null,
    "LoyaltyZipCode": null
  },
  "CustomerAddressForOrder": null,
  "SpecialInstructions": null,
  "LoyaltyNumber": null,
  "CompId": null,
  "Comps": null,
  "Guests": [],
  "ReferenceNumber": null,
  "ExternalOrderId": null,
  "AssignLoyalty": null,
  "DeliveryFeeAmount": 0.0,
  "QuoteId": null,
  "Channel": "Unknown",
  "DineIn": false,
  "TableNumber": 0,
  "TableId": 0
}

application/xml, text/xml

Sample:
<InOrder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Inbound">
  <AssignLoyalty i:nil="true" />
  <Channel>Unknown</Channel>
  <ComboItems />
  <CompId i:nil="true" />
  <Comps i:nil="true" />
  <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1">
    <d2p1:Addresses i:nil="true" />
    <d2p1:AltPhone i:nil="true" />
    <d2p1:AltPhoneExtension i:nil="true" />
    <d2p1:Birthday i:nil="true" />
    <d2p1:BusinessName i:nil="true" />
    <d2p1:CustomerId i:nil="true" />
    <d2p1:DepartmentName i:nil="true" />
    <d2p1:EMail i:nil="true" />
    <d2p1:FavoriteSiteId i:nil="true" />
    <d2p1:FavoriteSiteIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
    <d2p1:FirstName i:nil="true" />
    <d2p1:LastName i:nil="true" />
    <d2p1:LoyaltyCardNumber i:nil="true" />
    <d2p1:LoyaltyZipCode i:nil="true" />
    <d2p1:SecondaryEmailAddress i:nil="true" />
    <d2p1:VoicePhone i:nil="true" />
    <d2p1:VoicePhoneExtension i:nil="true" />
  </Customer>
  <CustomerAddressForOrder xmlns:d2p1="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1" i:nil="true" />
  <DeliveryFeeAmount>0</DeliveryFeeAmount>
  <DesignId>0</DesignId>
  <Destination i:nil="true" />
  <DineIn>false</DineIn>
  <ExternalOrderId i:nil="true" />
  <Guests xmlns:d2p1="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1" />
  <LineItems i:nil="true" />
  <LoyaltyNumber i:nil="true" />
  <MenuId>0</MenuId>
  <OrderId i:nil="true" />
  <OrderMode />
  <OrderSource i:nil="true" />
  <PaymentMode>Unknown</PaymentMode>
  <PromiseDateTime>0001-01-01T00:00:00</PromiseDateTime>
  <QuoteId i:nil="true" />
  <ReferenceNumber i:nil="true" />
  <ShouldManualRelease i:nil="true" />
  <SiteId>0</SiteId>
  <SpecialInstructions i:nil="true" />
  <TableId>0</TableId>
  <TableNumber>0</TableNumber>
  <TaxJurisdictionId i:nil="true" />
  <UpdateTimeDisabled i:nil="true" />
</InOrder>

Response Information

Resource Description

OrderResults. Known internal errors are BadRequest, OrderModeNotSupported, SiteNotInAcceptableOrderingState, Error

OrderResults
NameDescriptionTypeAdditional information
ResultCode

Gets or sets the ResultCode

OrderResultCodes

None.

OrderId

ID of newly created order.

integer

None.

Order

Gets or sets the modified Order to be returned

ExternalOrder

None.

HasFailedItems

Indicates whether or not any of the items in the order failed

boolean

None.

FailedItems

List of all the Items that either failed or have modifiers that failed

Collection of ExternalLineItem

None.

FailedModifiers

List of all the Modifiers that either failed or have modifiers that failed

Collection of ExternalLineItemModifier

None.

ErrorMessage

The error message received from the AppDomain

string

None.

ErrorCode

The site communication error code

integer

None.

AmountDueAtSite

The payment amount due at the site upon pickup

decimal number

None.

LoyaltyResultCode

Result code of loyalty processing

LoyaltyResultCode

None.

FinancialSummary

This field will provide all the financial details related to the Order

FinancialSummary

None.

Response Formats

application/json, text/json

Sample:
{
  "ResultCode": 0,
  "OrderId": 0,
  "Order": {
    "SiteId": 0,
    "OrderId": 0,
    "MenuId": 0,
    "PromoId": 0,
    "DesignId": 0,
    "OrderMode": 0,
    "LastModifiedTimestamp": "0001-01-01T00:00:00",
    "Status": 0,
    "PromiseDateTime": null,
    "PaymentMode": 0,
    "Customer": null,
    "CustomerAddressForOrder": null,
    "LineItems": null,
    "SubTotalAmount": 0.0,
    "TotalSurchargeAmount": 0.0,
    "TaxAmount": 0.0,
    "PaymentAmount": 0.0,
    "TotalAmount": 0.0,
    "BalanceDueAmount": 0.0,
    "LoyaltyCardNumber": null,
    "LoyaltyRewards": null,
    "OrderSource": null,
    "Destination": null,
    "NextItemLineNumber": 0,
    "SpecialInstructions": null,
    "SubmitCommandId": null,
    "SubmitOrderNumber": null,
    "HumanReadableSubmitOrderNumber": null,
    "SubmitMessage": null,
    "CreationDateTime": null,
    "CompId": 0,
    "CompValue": 0.0,
    "CompName": null,
    "DeliveryFeeAmount": 0.0,
    "TaxJurisdictionId": null,
    "SubmitOrderId": null,
    "IsFailover": false,
    "ReferenceNumber": null,
    "ExternalOrderId": null,
    "ComboItems": null,
    "Guests": null,
    "SVCAmount": 0.0,
    "Payments": null,
    "NextOrderOfProcessing": 0,
    "SiteNotes": null,
    "IsVisible": false,
    "DiscountTotal": 0.0,
    "Metadata": null,
    "ComputedDiscount": 0.0,
    "OrderDiscounts": null,
    "TipAmount": 0.0,
    "PromotionsServiceResponse": null
  },
  "HasFailedItems": false,
  "FailedItems": null,
  "FailedModifiers": null,
  "ErrorMessage": null,
  "ErrorCode": 0,
  "AmountDueAtSite": 0.0,
  "LoyaltyResultCode": 0,
  "FinancialSummary": null
}

application/xml, text/xml

Sample:
<OrderResults xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1.Response">
  <AmountDueAtSite>0</AmountDueAtSite>
  <ErrorCode>0</ErrorCode>
  <ErrorMessage i:nil="true" />
  <FailedItems xmlns:d2p1="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1" i:nil="true" />
  <FailedModifiers xmlns:d2p1="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1" i:nil="true" />
  <FinancialSummary xmlns:d2p1="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1" i:nil="true" />
  <HasFailedItems>false</HasFailedItems>
  <LoyaltyResultCode>Error</LoyaltyResultCode>
  <OrderId>0</OrderId>
  <ResultCode>Success</ResultCode>
</OrderResults>