CalculateOrder
Calculate an Order's taxes and totals after automatically applied promotions, discounts, and surcharges at the location.
Request Parameters
-
Options
OrderingOptions— (optional) Specify the Ordering options for this request.OrderingOptions Properties
- CalculateItemPrice
bool— True if item prices should be calculated by the server, False to use custom prices in the request. Default is False.
- CalculateItemPrice
-
Order
NewOrder— Specify the NewOrder to calculate.NewOrder Properties
-
CustomerId
Guid— Maps to the Id of the Customer on this NewOrder, or an empty guid if there was no specific Customer -
DestinationId
int— Maps to the Id of the Destination for this NewOrder -
Discounts
Array of NewOrderDiscount— Discounts to apply to this NewOrderNewOrderDiscount Properties
- Amount
decimal— Amount of discount to apply to the NewOrder - DiscountId
int— Maps to the Id of the Discount of this NewOrderDiscount - Id
int— Incremental Id within the NewOrder - LoyaltyRewardId
int— Maps to the Id of the Award of the customer associated with the NewOrder, if using PAR POS Loyalty program - Name
string— Name of this NewOrderDiscount - OrderItemIds
List<int>— List of Id(s) of the Item(s) this NewOrderDiscount will be applied to - Percent
decimal— Percentage of discount to apply to the NewOrder
- Amount
-
ExternalLoyaltyAccount
string— External Loyalty Account Number associated with NewOrder, if Loyalty is used outside PAR POS Loyalty program -
FutureOrder
NewFutureOrderDetails— Details for this new FutureOrderNewFutureOrderDetails Properties
-
Delivery
NewDeliveryDetails— Details for this NewFutureOrder, if it's a deliveryNewDeliveryDetails Properties
- Address1
string— Address line 1 for this new Delivery - Address2
string— Address line 2 for this new Delivery - City
string— City for this new Delivery - Country
string— Country for this new Delivery - PostalCode
string— Postal code for this new Delivery - StateCode
string— State code for this new Delivery
- Address1
-
EmailAddress
string— Contact email address for this NewFutureOrder -
ManualSend
bool— True if you would like to tell the Register to not send the order to the Kitchen based on the Configured Send Time rules, False if not -
PhoneNumber
string— Contact phone number for this NewFutureOrder -
PickupTime
DateTimeOffset— Time for this NewFutureOrder to be picked up or delivered in UTC. The time specified here must be later than the time at which you submit your NewOrder. -
SendReminderEmail
bool— True if the Reminder Email is to be sent to the customer regarding their pending future order, False if not
-
-
IsTaxExempt
bool— True if this Order is exempt from taxes, False if not. Default is False if not specified. -
Items
Array of NewOrderItem— Items being ordered in this NewOrderNewOrderItem Properties
-
ComboItems
Array of NewOrderItem— Combo component items in this NewOrderItem, if this NewOrderItem is a combo and applicable (recursively uses NewOrderItem) -
ComponentId
int?— Maps to the Id of the ItemCompositeComponent for this OrderItem, if this NewOrderItem is part of a combo -
Description
string— Description of this NewOrderItem -
DestinationId
int— Maps to the Id of the Destination of this NewOrderItem -
Id
int— Incremental Id within the NewOrder -
ItemId
int— Maps to the Id of the Item of this NewOrderItem -
MenuItemId
int— Maps to the Id of the MenuItem if this NewOrderItem is from a specific menu -
Modifiers
Array of NewOrderItemModifier— Modifiers to apply to this NewOrderItemNewOrderItemModifier Properties
- Description
string— Description of this NewOrderItemModifier - Id
int— Incremental Id within the NewOrder - ItemId
int— Maps to the Id of the Item for this NewOrderItemModifier - MenuItemId
int— Maps to the Id of the MenuItem if this NewOrderItem is from a specific menu. Affects valid modifier choices. - ModifierCodeId
int— Maps to the Id of the ModifierCode for this NewOrderItemModifier - ModifierGroupId
int— Maps to the Id of the ModifierGroup for this NewOrderItemModifier - Modifiers
Array of NewOrderItemModifier— Nested modifiers to apply to this NewOrderItemModifier (recursively uses NewOrderItemModifier) - Price
decimal— Price of this NewOrderItemModifier - Quantity
int— Quantity of this NewOrderItemModifier
- Description
-
Note
string— Note for this NewOrderItem -
Price
decimal— Price of this NewOrderItem -
Quantity
int— Quantity of this NewOrderItem -
Seat
byte— Seat number of this NewOrderItem
-
-
LaneId
int?— Maps to the Id of the Lane associated to this NewOrder -
Name
string— Name of this NewOrder -
Payments
Array of NewOrderPayment— Payments to apply to this NewOrder. A NewOrderPayment can be of type NewCheckPayment, NewCreditCardPayment, NewExternalPayment, NewGiftCardPayment, NewGiftCertificatePayment, or NewExternallyTokenizedCreditCardPayment.NewCheckPayment Properties
- Amount
decimal— Amount of the check for this NewCheckPayment - CheckNumber
string— Number of the check for this NewCheckPayment - Id
int— Incremental Id within the NewOrder - TenderId
int— Maps to the Id of the Tender of this NewCheckPayment - TipAmount
decimal— Tip amount for this NewCheckPayment, if applicable
NewCreditCardPayment Properties
- AccountNumber
string— Account number of the credit card for this NewCreditCardPayment - Amount
decimal— Amount to be charged to the credit card for this NewCreditCardPayment - City
string— City of the billing address of the credit card for this NewCreditCardPayment - Country
string— Country of the billing address of the credit card for this NewCreditCardPayment - Cvv
string— CVV code of the credit card for this NewCreditCardPayment - ExpirationDate
string— Expiration date of the credit card for this NewCreditCardPayment - Id
int— Incremental Id within the NewOrder - NameOnCard
string— Name on the credit card for this NewCreditCardPayment - PostalCode
string— Postal code of the billing address of the credit card for this NewCreditCardPayment - State
string— State of the billing address of the credit card for this NewCreditCardPayment - StreetAddress
string— Street address of the billing address of the credit card for this NewCreditCardPayment - TenderId
int— Maps to the Id of the Tender of this NewCreditCardPayment - TipAmount
decimal— Tip amount for this NewCreditCardPayment, if applicable
NewExternalPayment Properties
-
Amount
decimal— Amount charged to the external account from this NewExternalPayment -
Id
int— Incremental Id within the NewOrder -
ReferenceDetails
Array of PaymentReferenceDetail— Optional list of reference details to include about this NewExternalPaymentPaymentReferenceDetail Properties
- Name
string— Name of the reference item, e.g. "Card Type" - Value
string— Value of the reference item, e.g. "Visa"
- Name
-
TenderId
int— Maps to the Id of the Tender of this NewExternalPayment -
TipAmount
decimal— Tip amount for this NewExternalPayment, if applicable
NewGiftCardPayment Properties
- AccountNumber
string— Account number of the gift card for this NewGiftCardPayment - Amount
decimal— Amount to be charged to the gift card for this NewGiftCardPayment - Cvv
string— Cvv of the gift card for this NewGiftCardPayment - ExpirationDate
string— Expiration date of the gift card for this NewGiftCardPayment - Id
int— Incremental Id within the NewOrder - TenderId
int— Maps to the Id of the Tender of this NewGiftCardPayment - TipAmount
decimal— Tip amount for this NewGiftCardPayment, if applicable
NewGiftCertificatePayment Properties
- Amount
decimal— Amount of the gift certificate for this NewGiftCertificatePayment - Id
int— Incremental Id within the NewOrder - TenderId
int— Maps to the Id of the Tender of this NewGiftCertificatePayment - TipAmount
decimal— Tip amount for this NewGiftCertificatePayment, if applicable
NewExternallyTokenizedCreditCardPayment Properties
- Amount
decimal— Amount charged to the external account from this NewExternalTokenizedCreditCardPayment - CardExpirationDate
string— Expiration date of the credit card for this NewExternalTokenizedCreditCardPayment - City
string— City of the billing address of the credit card for this NewExternalTokenizedCreditCardPayment - Country
string— Country of the billing address of the credit card for this NewExternalTokenizedCreditCardPayment - Cvv
string— CVV code of the credit card for this NewExternalTokenizedCreditCardPayment - Id
int— Id of the NewExternalTokenizedCreditCardPayment - NameOnCard
string— Name on the credit card for this NewExternalTokenizedCreditCardPayment - PostalCode
string— Postal code of the billing address of the credit card for this NewExternalTokenizedCreditCardPayment - State
string— State of the billing address of the credit card for this NewExternalTokenizedCreditCardPayment - StreetAddress
string— Street address of the billing address of the credit card for this NewExternalTokenizedCreditCardPayment - TenderId
int— Maps to the Id of the Tender of this NewExternalTokenizedCreditCardPayment - TipAmount
decimal— Tip amount for this NewExternalTokenizedCreditCardPayment, if applicable - Token
string— Token for this NewExternalTokenizedCreditCardPayment
- Amount
-
Promotions
Array of NewOrderPromotion— Promotions to apply to this NewOrderNewOrderPromotion Properties
- Amount
decimal— Amount of promotion to apply to the NewOrder - Code
string— Code of the promotion of this NewOrderPromotion - Id
int— Incremental Id within the NewOrder - Name
string— Name of this NewOrderPromotion - PromotionId
int— Maps to the Id of the Promotion of this NewOrderPromotion - RequiredOrderItemIds
List<int>— List of Id(s) of the Item(s) that are required by this NewOrderPromotion - TargetOrderItemIds
List<int>— List of Id(s) of the Item(s) that are targeted by this NewOrderPromotion
- Amount
-
SectionId
int— Maps to the Id of the Section of this NewOrder -
Surcharges
Array of NewOrderSurcharge— Surcharges to apply to this NewOrderNewOrderSurcharge Properties
- Amount
decimal— Amount of surcharge to apply to the NewOrder - Id
int— Incremental Id within the NewOrder - Name
string— Name of this NewOrderSurcharge - SurchargeId
int— Maps to the Id of the Surcharge of this NewOrderSurcharge
- Amount
-
Taxes
Array of NewOrderTax— Order taxes applied to this NewOrderNewOrderTax Properties
- Amount
decimal— Amount that will be applied as tax amount. - Id
int— Chronologically created unique identifier of tax object which will be applied on order. - TaxId
int— Unique identifier of this tax, setup in Settings Editor against this location.
- Amount
-
AdditionalData
Dictionary<string,string>— Any additional information
-
Response Parameters
-
Message
string— Returns a PAR POS Error message if the request did not go through. Otherwise, this field will be null. -
ResultCode
int— Returns one of the following:- 0 — Success
- 1 — Unknown Error
- 2 — Invalid Request
- 3 — Server Unavailable
- 4 — Access Denied
- 101 — Order could not be calculated
-
Order
Order— Order calculated from the NewOrder submitted.Order Properties
-
Balance
decimal— Balance remaining on this Order -
BusinessDate
DateTime— Business date of this Order (the time component will always return as 00:00:00) -
CreatedTime
DateTimeOffset— Date and time this Order was created in UTC -
CustomerId
Guid— Id of the Customer on this Order, or an empty guid if there was no assigned Customer -
DestinationId
int— Maps to the Id of the Destination of this Order -
Discounts
Array of OrderDiscount— Discounts applied to this OrderOrderDiscount Properties
- Amount
decimal— Amount of discount applied to the Order - DiscountId
int— Maps to the Id of the Discount of this OrderDiscount - Id
int— Unique Id of this OrderDiscount within the Order - LoyaltyRewardId
int— Maps to the Id of the LoyaltyReward of this OrderDiscount - Name
string— Name of this OrderDiscount
- Amount
-
Entries
Array of OrderEntry— Entries for this Order. An OrderEntry can either be of type OrderItem or an OrderGiftCard.OrderEntry — OrderItem Properties
-
ComboItems
Array of OrderItem— Combo component items in this OrderItem, if this OrderItem is a combo -
ComponentId
int?— Maps to the Id of the ItemCompositeComponent for this OrderItem, if part of a combo -
CompositeOrderItemId
int— Maps to the Id of the OrderItem within the Order that is the CompositeOrderItem, if part of a combo -
Denominator
byte— Denominator by which this OrderItem was split -
Description
string— Description of this OrderItem -
DestinationId
int— Maps to the Id of the Destination of this OrderItem -
Discounts
Array of OrderItemDiscount— Discounts applied to this OrderItemOrderItemDiscount Properties
- Amount
decimal— Amount of discount applied to the OrderItem - Id
int— Unique Id of this OrderItemDiscount within the OrderItem - OrderDiscountId
int— Maps to the Id of the Discount for this OrderItemDiscount
- Amount
-
Id
int— Unique Id of this OrderItem within the Order -
ItemId
int— Maps to the Id of the Item of this OrderItem -
Modifiers
Array of OrderItemModifier— Modifiers applied to this OrderItemOrderItemModifier Properties
- Description
string— Description of this OrderItemModifier - Id
int— Unique Id of this OrderItemModifier within the OrderItem - ItemId
int— Maps to the Id of the Item for this OrderItemModifier - ModifierCodeId
int— Maps to the Id of the ModifierCode for this OrderItemModifier - ModifierGroupId
int— Maps to the Id of the ModifierGroup for this OrderItemModifier - Modifiers
Array of OrderItemModifier— Nested modifiers - Price
decimal— Price of this OrderItemModifier - Taxes
Array of OrderEntryTax— Taxes applied to this OrderItemModifier
- Description
-
Note
string— Note for this OrderItem -
Promotions
Array of OrderEntryPromotion— Promotions applied to this OrderItemOrderEntryPromotion Properties
- Amount
decimal— Amount of promotion applied to the OrderEntry - Id
int— Unique Id of this OrderItemPromotion within the OrderEntry - OrderPromotionId
int— Maps to the Id of the Promotion of this OrderEntryPromotion
- Amount
-
Price
decimal— Price of this OrderItem -
Seat
byte— Seat number of this OrderItem -
SplitItemId
short— Id of the SplitItem if this OrderItem is Split, 0 if not split -
Taxes
Array of OrderEntryTax— Taxes applied to this OrderItemOrderEntryTax Properties
- Amount
decimal— Amount of tax applied to the OrderEntry - Id
int— Unique Id of this OrderEntryTax within the OrderEntry - TaxId
int— Maps to the Id of the Tax of this OrderEntryTax
- Amount
OrderEntry — OrderGiftCard Properties
-
Description
string— Description of this OrderGiftCard -
Id
int— Unique Id of this OrderGiftCard within the Order -
ItemId
int— Maps to the Id of the Item of this OrderGiftCard -
Price
decimal— Price of this OrderGiftCard -
Promotions
Array of OrderEntryPromotion— Promotions applied to this OrderGiftCardOrderEntryPromotion Properties
- Amount
decimal— Amount of promotion applied to the OrderEntry - Id
int— Unique Id of this OrderItemPromotion within the OrderEntry - OrderPromotionId
int— Maps to the Id of the Promotion of this OrderEntryPromotion
- Amount
-
-
FutureOrder
FutureOrderDetails— Details for this future OrderFutureOrderDetails Properties
-
Delivery
DeliveryDetails— Details for this FutureOrder, if it's a deliveryDeliveryDetails Properties
- Address1
string— Address line 1 for this Delivery - Address2
string— Address line 2 for this Delivery - City
string— City for this Delivery - Country
string— Country for this Delivery - PostalCode
string— Postal code for this Delivery - StateCode
string— State code for this Delivery
- Address1
-
EmailAddress
string— Contact email address for this FutureOrder -
IsCancelled
bool— True if the future order is cancelled, False if not -
ManualSend
bool— True if the order will not be sent to the Kitchen automatically based on the Configured Send Time rules, False if not -
PhoneNumber
string— Contact phone number for this FutureOrder -
PickupTime
DateTimeOffset— Time for this FutureOrder to be picked up or delivered in UTC
-
-
Id
long— Unique Id of this Order -
IdEncoded
string— Unique encoded Id of this Order -
IsClosed
bool— True if this Order is closed, False if not -
IsSent
bool— True if this Order has been sent to the kitchen, False if not -
IsTaxExempt
bool— True if this Order is exempt from taxes, False if not -
LaneId
int— Id of the Lane for this Order -
Name
string— Name of this Order -
Number
int— Order, receipt, or call out number that cashiers use to call the customer for this Order -
Payments
Array of OrderPayment— Payments applied to this OrderOrderPayment Properties
-
AccountNumber
string— Account number of this OrderPayment, populated for credit card, gift card, and house account payments -
AccountType
int— Account type for credit card payments. 0=Unspecified, 1=MasterCard, 2=Visa, 3=American Express, 4=Diners, 5=Discover, 6=enRoute, 7=JCB, 8=Private -
Amount
decimal— Amount of this OrderPayment -
BusinessDate
DateTime— Business date this OrderPayment was applied (time component is 00:00:00) -
CardHolderName
string— Name of the cardholder of this OrderPayment, for card payments -
CreditCardTransactionInformation
CreditCardTransactionInformation— Additional credit card transaction information returned by VantivCreditCardTransactionInformation Properties
- AuthorizationCode
string— Authorization code returned from Vantiv - CardToken
string— Card token returned from Vantiv - ClientTransactionIdentifier
string— Client transaction identifier returned from Vantiv - Result
string— Result returned from Vantiv
- AuthorizationCode
-
Id
int— Id of this OrderPayment within the Order -
IsDeposit
bool— True if this OrderPayment was a deposit, False if not -
ReferenceNumber
string— Reference number, populated with the authorization code for credit card and gift card payments -
TenderId
int— Maps to the Id of the Tender of this OrderPayment -
Time
DateTimeOffset— Date and time that this OrderPayment was made in UTC -
TipAmount
decimal— Tip amount for this OrderPayment -
AdditionalData
Array of NameValuePair— Any additional information
-
-
Promotions
Array of OrderPromotion— Promotions applied to this OrderOrderPromotion Properties
- Amount
decimal— Amount of promotion applied to the Order - Code
string— Code for this OrderPromotion - Id
int— Unique Id of this OrderPromotion within the Order - IsSystemApplied
bool— True if this OrderPromotion is system applied, False if not - Name
string— Name of this OrderPromotion - PromotionId
int— Maps to the Id of the Promotion of this OrderPromotion
- Amount
-
Rounding
decimal— Amount by which the Order was rounded to, reflecting the rounding settings -
SectionId
int— Maps to the Id of the Section of this Order -
Subtotal
decimal— Subtotal of this Order -
Surcharges
Array of OrderSurcharge— Surcharges applied to this OrderOrderSurcharge Properties
-
Amount
decimal— Amount of surcharge applied to the Order -
Id
int— Unique Id of this OrderSurcharge within the Order -
IsSystemApplied
bool— True if this OrderSurcharge is system applied, False if not -
Name
string— Name of this OrderSurcharge -
SurchargeId
int— Maps to the Id of the Surcharge of this OrderSurcharge -
Taxes
Array of OrderEntryTax— Taxes applied to this OrderSurchargeOrderEntryTax Properties
- Amount
decimal— Amount that will be applied as tax amount. - Id
int— Chronologically created unique identifier of tax object which will be applied on order. - TaxId
int— Unique identifier of this tax, setup in Settings Editor against this location.
- Amount
-
-
Tax
decimal— Total tax for this Order -
Taxes
Array of OrderTax— Order taxes applied to this OrderOrderTax Properties
- Amount
decimal— Amount of tax applied to the Order - Id
int— Unique Id of this OrderTax within the Order - TaxId
int— Maps to the Id of the Tax of this OrderTax
- Amount
-
Total
decimal— Total for this Order
-
- Type: stringS
O A P Action required
SOAP envelope containing the CalculateOrder request with Options and Order.
- text/xml; charset=utf-8
curl --request POST \
--url 'https://{server_name_goes_here}.parpos.com/Ordering.svc?CalculateOrder' \
--header 'Content-Type: text/xml; charset=utf-8' \
--header 'AccessToken: your-access-token' \
--header 'LocationToken: your-location-token' \
--header 'SOAPAction: "http://www.brinksoftware.com/webservices/ordering/20140219/IOrderingWebService/CalculateOrder"' \
--data '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.brinksoftware.com/webservices/ordering/20140219"
xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays"
xmlns:sys="http://schemas.datacontract.org/2004/07/System">
<soapenv:Header/>
<soapenv:Body>
<ns:CalculateOrder>
<ns:request>
<ns:Options>
<ns:CalculateItemPrice>true</ns:CalculateItemPrice>
</ns:Options>
<ns:Order>
<ns:DestinationId>1</ns:DestinationId>
<ns:IsTaxExempt>false</ns:IsTaxExempt>
<ns:Items>
<ns:NewOrderItem>
<ns:Description>Cheeseburger</ns:Description>
<ns:Id>1</ns:Id>
<ns:ItemId>123</ns:ItemId>
<ns:DestinationId>1</ns:DestinationId>
</ns:NewOrderItem>
</ns:Items>
<ns:Name>Test Order</ns:Name>
</ns:Order>
</ns:request>
</ns:CalculateOrder>
</soapenv:Body>
</soapenv:Envelope>'
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<CalculateOrderResponse xmlns="http://www.brinksoftware.com/webservices/ordering/20140219">
<CalculateOrderResult>
<Message>Success</Message>
<ResultCode>0</ResultCode>
<Order>
<Subtotal>8.99</Subtotal>
<Tax>0.72</Tax>
<Total>9.71</Total>
</Order>
</CalculateOrderResult>
</CalculateOrderResponse>
</s:Body>
</s:Envelope>