Ordering.svc


Sending a Request to Ordering.svc
All calls to Ordering.svc require the AccessToken and the LocationToken in the HTTP Web Request Headers of the request. The parameters for the request body of each call are outlined in the sections below.

Ordering.svc Endpoint
Endpoint
https://{{server}}.brinkpos.net/Ordering.svc


HTTP Web Request Headers
Header Name
Header Value
AccessToken
{{AccessToken}}
LocationToken
{{LocationToken}}
This call is to apply a partial or complete payment to an order created (In-store or outside the store) or to orders that are not auto-closed at a location.

ApplyPayment Request
Data Name
Data Type
Data Description
OrderId
long
Specify the OrderId you would like to add a payment to.
Payment
A NewOrderPayment with an External tender.


ApplyPayment Response
Data Name
Data Type
Data Description
Message
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied

ResultCodes specific to ApplyPayment:
  • 101 = Payment could not be processed
  • 102 = Order not found
  • 103 = Order already closed
  • 104 = Store is offline
  • 106 = Error corresponding to the tender specified in the ApplyPayment request
This call is to calculate an Order's taxes and totals after automatically applied promotions, discounts, and surcharges at the location.

CalculateOrder Request
Data Name
Data Type
Data Description
Options
(Optional) Specify the Ordering options for this request
Order
Specify the NewOrder to calculate


CalculateOrder Response
Data Name
Data Type
Data Description
Message
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied

ResultCodes specific to CalculateOrder:
  • 101 = Order could not be calculated due to one or more errors in the request
Order
Order calculated from the NewOrder submitted, if the request was successful
This call is to cancel an open Order at the location.

CancelOrder Request
Data Name
Data Type
Data Description
OrderId
long
Specify the Id of the Order you would like to cancel
SuppressCancellationEmail
bool
(Optional) True if you would like the cancellation email suppressed, False if not. Default is False if not specified.


CancelOrder Response
Data Name
Data Type
Data Description
Message
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied

ResultCodes specific to CancelOrder:
  • 101 = OrderId you specified in the request was not found and could not be cancelled
  • 102 = The Order you specified has already been sent to the kitchen and could not be cancelled
  • 103 = The Order you specified has already been closed and could not be cancelled
  • 104 = The Order you specified is currently being edited and could not be cancelled
  • 106 = Store is offline and could not be cancelled
  • 108 = Payment(s) in the request could not be cancelled, so the Order could not be cancelled
This call is to get the availability of one or more Items at the location.

GetItemAvailability Request
Data Name
Data Type
Data Description
ItemIds
List<int>
List one or more Ids of Item(s) to retrieve their availability


GetItemAvailability Response
Data Name
Data Type
Data Description
Mesage
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied
Details
Details about the respective Item's availability


This call is to check whether the Primary Register of the location is online (connected to the cloud) or offline.

GetMasterTerminalStatus Response
Data Name
Data Type
Data Description
Message
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied - check that your AccessToken and LocationToken are correct and you are properly provisioned
Status
byte
Returns a status result:
  • 0 = Offline
  • 1 = Online
This call is to retrieve an open Order at the location.

GetOrder Request
Data Name
Data Type
Data Description
OrderId
long
Specify the Id of the Order you would like to retrieve


GetOrder Response
Data Name
Data Type
Data Description
Message
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied - check that your AccessToken and LocationToken are correct and you are properly provisioned

ResultCodes specific to GetOrder
  • 101 = An Order with an Id equal to the OrderId you specified in the request was not found
Order
Order with the OrderId you specified, if one is found


This call is to retrieve an open Party at the location.

GetParty Request
Data Name
Data Type
Data Description
BusinessDate
DateTime
The Current Business Date of the location
TableId
int
Specify the Table that contains the party we want to retrieve information for


GetParty Response
Data Name
Data Type
Data Description
Message
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied - check that your AccessToken and LocationToken are correct and you are properly provisioned

ResultCodes specific to GetParty
  • 101 = Party not found
Party
Party with the BusinessDate and TableId you specified, if one is found


This call is to retrieve the list of item IDs that are active but unavailable at the location on current business date.

GetUnavailableItems Response
Data Name
Data Type
Data Description
Message
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied - check that your AccessToken and LocationToken are correct and you are properly provisioned
ItemIds
Array of int
Returns the list of item IDs that are active but unavailable.
This call is to manually send an Order of the current business date to kitchen at the location.

SendOrder Request
Data Name
Data Type
Data Description
OrderId
long
Specify the Id of the Order you would like to manual send


SendOrder Response
Data Name
Data Type
Data Description
Message
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied

ResultCodes specific to SendOrder:
  • 101 = Order sent
  • 102 = Order not found
  • 103 = Order is not flagged for Manual Send
This call is used to submit an Order at a location. Previously, the maximum number of successful SubmitOrder calls per location per business date was capped at 2048. Starting from the 5.0M release onwards, this limit has been increased to 18431.

SubmitOrder Request
Data Name
Data Type
Data Description
Options
Ordering options for this SubmitOrder request
Order
NewOrder to submit
SuppressConfirmationEmail
bool
True if you would like the confirmation email suppressed, False if not. Default is False if not specified.


SubmitOrder Response
Data Name
Data Type
Data Description
Mesage
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied

ResultCodes specific to SubmitOrder:
  • 101 = Store is Offline
  • 102 = Loyalty award already redeemed
  • 103 = Ordering not allowed
  • 104 = Error corresponding to the order specified in the SubmitOrder request
  • 105 = Order already submitted
  • 106 = Future date orders not allowed
  • 107 = One or more of the payments could not be processed
  • 108 = One or more of the payments on the order could not be cancelled
  • 109 = No more of item is available
OrderId
long
Id of the Order you submitted, if the request was successful


This call is to update the availability of one or more Items at the location.

UpdateItemAvailability Request
Data Name
Data Type
Data Description
Details
Array of ItemAvailabilityDetails to update the available quantity of one or more Items


UpdateItemAvailability Response
Data Name
Data Type
Data Description
Message
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied
Global Type
All the Types available in Ordering.svc will be displayed below.

CreditCardTransactionInformation Type
Data Name
Data Type
Data Description
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


FutureOrderDetails Type
Data Name
Data Type
Data Description
Delivery
Details for this FutureOrder, if it's a delivery
EmailAddress
string
Contact email address for this FutureOrder
IsCancelled
bool
True if the future order is cancelled, False if not
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 FutureOrder
PickupTime
DateTimeOffset
Time for this FutureOrder to be picked up or delivered in UTC. The time specified here must be later than the time at which you submit your Order.


ItemAvailabilityDetail Type
Data Name
Data Type
Data Description
IsAvailable
bool
True if the Item is still available, False if not.

When updating: If you specify True, the default for QuantityAvailable is -1 to indicate an unlimited supply, unless a quantity is specified. If you specify False, the QuantityAvailable is set to 0.
ItemId
int
Maps to the Id of the Item for this ItemAvailabilityDetail
QuantityAvailable
int?
Quantity still available for the Item, or -1 if Item has unlimited availability


NewDeliveryDetails Type
Data Name
Data Type
Data Description
Address1
string
Address for this new Delivery
Address2
string
Address 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


NewFutureOrderDetails Type
Data Name
Data Type
Data Description
Delivery
Details for this NewFutureOrder, if it's a delivery
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


NewOrder Type
Data Name
Data Type
Data Description
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 NewOrder
ExternalLoyalty Account
string
External Loyalty Account Number associated with NewOrder, if Loyalty is used outside Brink Loyalty program
FutureOrder
Details for this new FutureOrder
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 NewOrder
LaneId
int?
Maps to the Id of the Lane associated to this NewOrder
Name
string
Name of this NewOrder
Payments
Array of NewOrderPayment
Promotions
Promotions to apply to this NewOrder
SectionId
int
Maps to the Id of the Section of this NewOrder
Surcharges
Surcharges to apply to this NewOrder
AdditionalData
Dictionary<string,string>
Any additional information


NewOrderDiscount Type
Data Name
Data Type
Data Description
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 Brink 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


NewOrderItemModifier Type
Data Name
Data Type
Data Description
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
Modifiers to apply to this NewOrderItemModifier
Price
decimal
Price of this NewOrderItemModifier
Quantity
int
Quantity of this NewOrderItemModifier


NewOrderPayment - NewCheckPayment Type
Data Name
Data Type
Data Description
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


NewOrderPayment - NewCreditCardPayment Type
Data Name
Data Type
Data Description
Amount
decimal
Amount to be charged to the credit card for this NewCreditCardPayment
Id
int
Incremental Id within the NewOrder
TenderId
int
Maps to the Id of the Tender of this NewCreditCardPayment
TipAmount
decimal
Tip amount for this NewCreditCardPayment, if applicable


NewOrderPayment - NewExternalPayment Type
Data Name
Data Type
Data Description
Amount
decimal
Amount charged to the external account from this NewExternalPayment
Id
int
Incremental Id within the NewOrder
ReferenceDetails
Optional list of reference details to include about this NewExternalPayment
TenderId
int
Maps to the Id of the Tender of this NewExternalPayment
TipAmount
decimal
Tip amount for this NewExternalPayment, if applicable


NewOrderPayment - NewExternallyTokenizedCreditCardPayment Type
Data Name
Data Type
Data Description
Amount
decimal
Amount charged to the external account from this NewExternalTokenizedCreditCardPayment
Id
int
Id of the 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
CardExpirationDate
string
Expiration date of the credit card for this NewExternalTokenizedCreditCardPayment
Cvv
string
CVV code of the credit card for this NewExternalTokenizedCreditCardPayment
NameOnCard
string
Name on the credit card for this NewExternalTokenizedCreditCardPayment
StreetAddress
string
Street address of the billing address 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
State
string
State of the billing address of the credit card for this NewExternalTokenizedCreditCardPayment
PostalCode
string
PostalCode of the billing address of the credit card for this NewExternalTokenizedCreditCardPayment


NewOrderPayment - NewGiftCardPayment Type
Data Name
Data Type
Data Description
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 NewGiftPayment, if applicable


NewOrderPayment - NewGiftCertificatePayment Type
Data Name
Data Type
Data Description
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


NewOrderPromotion Type
Data Name
Data Type
Data Description
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 NewOrderItem that are required by this NewOrderPromotion (Required field for BOGO promotion)
TargetOrderItemIds
List<int>
List of Id(s) of the NewOrderItem that are targeted by this NewOrderPromotion (Required field for All type of promotions)


NewOrderSurcharge Type
Data Name
Data Type
Data Description
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


Order Type
Data Name
Data Type
Data Description
Balance
decimal
Balance remaining on this Order
BusinessDate
DateTime
Business date of this Order (the time component will always return as 00:00:00)
Entries
Array of OrderEntry
Entries for this Order. An OrderEntry can either be of type OrderItem or an OrderGiftCard.
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
Name
string
Name of this Order
Payments
Array of OrderPayment
Payments applied to this Order
Total
decimal
Total for this Order


OrderDiscount Type
Data Name
Data Type
Data Description
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


OrderEntry - OrderGiftCard Type
Data Name
Data Type
Data Description
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 OrderItem
Price
decimal
Price of this OrderGiftCard
Promotions
Promotions applied to this OrderGiftCard


OrderEntry - OrderItem Type
Data Name
Data Type
Data Description
Description
string
Description of this OrderItem
Id
int
Unique Id of this OrderItem within the Order
ItemId
int
Maps to the Id of the Item of this OrderItem
Price
decimal
Price of this OrderItem


OrderEntryPromotion Type
Data Name
Data Type
Data Description
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


OrderEntryTax Type
Data Name
Data Type
Data Description
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


OrderItemDiscount Type
Data Name
Data Type
Data Description
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


OrderItemModifier Type
Data Name
Data Type
Data Description
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
Modifiers applied to this OrderItemModifier
Price
decimal
Price of this OrderItemModifier
Taxes
Array of OrderEntryTax
Taxes applied to this OrderItemModifier


OrderPayment Type
Data Name
Data Type
Data Description
Amount
decimal
Amount of this OrderPayment
BusinessDate
DateTime
Business date this OrderPayment was applied (the time component will always return as 00:00:00)
Id
int
Id of this OrderPayment within the Order
TenderId
int
Maps to the Id of the Tender of this OrderPayment


OrderPromotion Type
Data Name
Data Type
Data Description
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


OrderSurcharge Type
Data Name
Data Type
Data Description
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 OrderSurcharge


OrderingOptions Type
Data Name
Data Type
Data Description
CalculateItemPrice
bool
True if the item prices should be calculated by the server, or False if the specified custom prices in the request should be used. Default is False if not specified.


Party Type
Data Name
Data Type
Data Description
CreatedTime
DateTime
Date and time this Party was created in UTC
Id
long
Unique Id of this Party
Name
string
Name of this Party
Orders
Array of Orders
Orders in this Party
OwnerEmployeeId
int
Maps to the Id of the Employee who served this Party
Size
decimal
Size of this Party
TableId
int
Maps to the Id of the Table this party was served at


PaymentReferenceDetail Type
Data Name
Data Type
Data Description
Name
string
Name of the reference item, e.g. "Card Type"
Value
string
Value of the reference item, e.g. "Visa"


NewOrderItem Type
Data Name
Data Type
Data Description
ComboItems
Array of NewOrderItem
Combo component items in this NewOrderItem, if this NewOrderItem is a combo and applicable
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
Modifiers to apply to this NewOrderItem
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


                
                    
                    
ApplyPayment Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel.Web; using System.ServiceModel; using Ordering_ApplyPayment.OrderingServiceReference; namespace Ordering_ApplyPayment { class Program { static void Main(string[] args) { //Connect to Ordering service client var client = new OrderingWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; long orderId = 12345; //Include OrderId and Payment parameter in request body var request = new ApplyPaymentRequest() { OrderId = orderId, Payment = new NewExternalPayment() { Amount = 10.75m, Id = 1, TenderId = 1, TipAmount = 0, ReferenceDetails = new PaymentReferenceDetail[] { new PaymentReferenceDetail() { Name = "Card Type", Value = "Visa", } } } }; //Make ApplyPayment call var response = client.ApplyPayment(request); if (response.ResultCode == 0) { Console.WriteLine($"Payment has been applied to Order {orderId}."); Console.WriteLine("---------------------------"); Console.WriteLine("End"); } else { Console.WriteLine("Error Code: " + response.ResultCode); Console.WriteLine("Message: " + response.Message); } Console.ReadKey(); } } } }
ApplyPayment Sample Code
using ServiceReference3; using System.Diagnostics.Contracts; using System.ServiceModel; using System.ServiceModel.Channels; namespace Ordering_ApplyPayment { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddOrderingServiceClient() { services.AddTransient<IOrderingWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IOrderingWebService> factory = new ChannelFactory<IOrderingWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } static void Main(string[] args) { AddOrderingServiceClient(); IOrderingWebService client = services.BuildServiceProvider().GetRequiredService<IOrderingWebService>(); try { int count = 1; using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = "AccessToken"; httpRequestProperty.Headers["LocationToken"] = "LocationToken"; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; long orderId = 183479810048; //Include OrderId and Payment parameter in request body var request = new ApplyPaymentRequest() { OrderId = orderId, Payment = new NewExternalPayment() { Amount = 10.75m, Id = 1, TenderId = 4004092, TipAmount = 0, ReferenceDetails = new PaymentReferenceDetail[] { new PaymentReferenceDetail() { Name = "Card Type", Value = "Visa", } } } }; //Make ApplyPayment call var response = client.ApplyPaymentAsync(request); Console.WriteLine("ApplyPayments"); Console.WriteLine("--------------"); if (response.Result.ResultCode == 0) { Console.WriteLine($"Payment has been applied to Order {orderId}."); Console.WriteLine("---------------------------"); Console.WriteLine("End"); } else { Console.WriteLine($"Error Code: {response.Result.ResultCode}"); Console.WriteLine($"Message: {response.Result.Message}"); } Console.ReadKey(); } } catch (Exception ex) { Console.WriteLine("Error calling ApplyPayment operation: " + ex.Message); } } } }
ApplyPayment Sample Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.brinksoftware.com/webservices/ordering/20140219"> <soapenv:Header/> <soapenv:Body> <ns:ApplyPayment> <ns:request> <ns:OrderId>12345</ns:OrderId> <ns:Payment> <ns:Amount>10.75</ns:Amount> <ns:Id>1</ns:Id> <ns:TenderId>1</ns:TenderId> <ns:TipAmount>0</ns:TipAmount> <ns:ReferenceDetails> <ns:PaymentReferenceDetail> <ns:Name>Card Type</ns:Name> <ns:Value>Visa</ns:Value> </ns:PaymentReferenceDetail> </ns:ReferenceDetails> </ns:Payment> </ns:request> </ns:ApplyPayment> </soapenv:Body> </soapenv:Envelope>
ApplyPayment Sample Code
from zeep import Client from zeep.transports import Transport from decimal import Decimal import requests accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken': access_token, 'LocationToken': location_token}) transport = Transport(session=session) #Connect to Ordering service client client = Client(wsdl='{YOUR_WSDL_URL_GOES_HERE}', transport=transport) service = client.create_service( '{http://www.brinksoftware.com/webservices/ordering/20140219}BasicHttpBinding_IOrderingWebService', 'https://{YourStack}.brinkpos.net/Ordering.svc' ) orderId = 12345 #Prepare the dynamic type for ApplyPaymentRequest factory = client.type_factory('ns0') ReferenceDetails = [] ReferenceDetail = factory.PaymentReferenceDetail( Name='Card Type', Value='Visa', ) ReferenceDetails.append(ReferenceDetail) ReferenceDetailsArray = factory.ArrayOfPaymentReferenceDetail(PaymentReferenceDetail=ReferenceDetails) payment = factory.NewExternalPayment( Amount=Decimal(10.75), Id=1, TenderId=1, TipAmount=0, ReferenceDetails=ReferenceDetailsArray, ) req = factory.ApplyPaymentRequest(OrderId=orderId, Payment=payment) try: #Make ApplyPayment call res = service.ApplyPayment(req) #If call is successful if(res.ResultCode == 0): print("Payment has applied to Order {}.").format(orderId) print("--------------------------") print("End") else: print("Error Code: " + str(res.ResultCode)) print("Message: " + res.Message) except Exception as e: print(e)

                
                    
                    
CalculateOrder Minified Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using Ordering_CalculateOrder.OrderingServiceReference; namespace Ordering_CalculateOrder { class Program { public static CalculateOrderRequest CreateOrder() { int positiveId = 1; var request = new CalculateOrderRequest() { Options = new OrderingOptions() { CalculateItemPrice = true, }, Order = new NewOrder() { DestinationId = 1, IsTaxExempt = false, Items = new NewOrderItem[] { new NewOrderItem() { Description = "Cheeseburger", Id = positiveId, ItemId = 123, DestinationId = 1, }, }, Name = "Online Order", } }; return request; } static void Main(string[] args) { //Connect to Ordering service client var client = new OrderingWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; //Include ordering options and an order as parameters in request body var request = CreateOrder(); //Make CalculateOrder call var response = client.CalculateOrder(request); //If call is successful if (response.ResultCode == 0) { var order = response.Order; Console.WriteLine("Balance: " + order.Balance); Console.WriteLine("Entries:"); //Loop through collection of OrderEntry objects returned if (order.Entries != null) { foreach (var entry in order.Entries.OfType<OrderItem>()) { Console.WriteLine("\tDescription: " + entry.Description); Console.WriteLine("\tId: " + entry.Id); Console.WriteLine("\tItemId: " + entry.ItemId); Console.WriteLine("\tPrice: " + entry.Price); Console.WriteLine("\t------------"); } } Console.WriteLine("Id: " + order.Id); Console.WriteLine("Name: " + order.Name); Console.WriteLine("Subtotal: " + order.Subtotal); Console.WriteLine("Tax: " + order.Tax); Console.WriteLine("Total: " + order.Total); Console.WriteLine("---------------------------"); Console.WriteLine("End"); Console.ReadKey(); } } } } }
CalculateOrder Minified Sample Code
using ServiceReference3; using System.Diagnostics.Contracts; using System.ServiceModel; using System.ServiceModel.Channels; namespace Ordering_CalculateOrder { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddOrderingServiceClient() { services.AddTransient<IOrderingWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IOrderingWebService> factory = new ChannelFactory<IOrderingWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } public static CalculateOrderRequest CreateOrder() { int positiveId = 1; var request = new CalculateOrderRequest() { Options = new OrderingOptions() { CalculateItemPrice = true, }, Order = new NewOrder() { DestinationId = 1, IsTaxExempt = false, Items = new NewOrderItem[] { new NewOrderItem() { Description = "Cheeseburger", Id = positiveId, ItemId = 4003467, DestinationId = 1, }, }, Name = "Online Order", } }; return request; } static void Main(string[] args) { AddOrderingServiceClient(); IOrderingWebService client = services.BuildServiceProvider().GetRequiredService<IOrderingWebService>(); try { int count = 1; using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = "AccessToken"; httpRequestProperty.Headers["LocationToken"] = "LocationToken"; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; var request = CreateOrder(); //Make CalculateOrder call var response = client.CalculateOrderAsync(request); Console.WriteLine("CalculateOrders"); Console.WriteLine("----------------"); //If call is successful if (response.Result.ResultCode == 0) { var order = response.Result.Order; Console.WriteLine("Balance: " + order.Balance); Console.WriteLine("Entries:"); //Loop through collection of OrderEntry objects returned if (order.Entries != null) { foreach (var entry in order.Entries.OfType<OrderItem>()) { Console.WriteLine("\tDescription: " + entry.Description); Console.WriteLine("\tId: " + entry.Id); Console.WriteLine("\tItemId: " + entry.ItemId); Console.WriteLine("\tPrice: " + entry.Price); Console.WriteLine("\t------------"); } } Console.WriteLine("Id: " + order.Id); Console.WriteLine("Name: " + order.Name); Console.WriteLine("Subtotal: " + order.Subtotal); Console.WriteLine("Tax: " + order.Tax); Console.WriteLine("Total: " + order.Total); Console.WriteLine("---------------------------"); Console.WriteLine("End"); } else { Console.WriteLine($"Error Code: {response.Result.ResultCode}"); Console.WriteLine($"Message: {response.Result.Message}"); } Console.ReadKey(); } } catch (Exception ex) { Console.WriteLine("Error calling CalculateOrder operation: " + ex.Message); } } } }
CalculateOrder Minified Sample Code
<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>?</ns:Name> </ns:Order> </ns:request> </ns:CalculateOrder> </soapenv:Body> </soapenv:Envelope>
CalculateOrder Minified Sample Code
from zeep import Client from zeep.transports import Transport import requests # Helper function for index generator num = 0 def Next(): global num num = num + 1 return num #Helper function to create order def create_order(factory): items = [] newOrderItem = factory.NewOrderItem( Id=Next(), ItemId=123, Description='Cheeseburger', DestinationId=1, ) items.append(newOrderItem) newOrderItemArray = factory.ArrayOfNewOrderItem(NewOrderItem=items) newOrder = factory.NewOrder( DestinationId=1, IsTaxExempt=False, Items=newOrderItemArray, Name='Online Order' ) return newOrder accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken':accessToken, 'LocationToken':locationToken}) transport = Transport(session=session) #Connect to Ordering service client client = Client(wsdl={YOUR_WSDL_URL_GOES_HERE}, transport=transport) service = client.create_service( '{http://www.brinksoftware.com/webservices/ordering/20140219}BasicHttpBinding_IOrderingWebService', 'https://{YourStack}.brinkpos.net/ordering.svc' ) #Include ordering options and an order as parameters in request body factory = client.type_factory('ns1') orderingOptions = factory.OrderingOptions(CalculateItemPrice=True) calculateOrderRequest = factory.CalculateOrderRequest( Options=orderingOptions, Order=CreateOrder(client) ) try: #Make CalculateOrder call res = service.CalculateOrder(calculateOrderRequest) #If call is successful if(res.ResultCode == 0): order = res.Order print('Balance: ' + str(order.Balance)) if(order.Entries != None): print('Entries:') #Loop through collection of OrderEntry objects returned for entry in order.Entries.OrderEntry: print('\tDescription: ' + str(entry.Description)) print('\tId: ' + str(entry.Id)) print('\tItemId: ' + str(entry.ItemId)) print('\tPrice: ' + str(entry.Price)) print('\t------------') print('Id: ' + str(order.Id)) print('Name: ' + str(order.Name)) print('Subtotal: ' + str(order.Subtotal)) print('Tax: ' + str(order.Tax)) print('Total: ' + str(order.Total)) print('---------------------------') print('End') else: print('Error Code: ' + str(res.ResultCode)) print('Message: ' + res.Message) except Exception as e: print(e)

                
                    
                    
CancelOrder Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using Ordering_CancelOrder.OrderingServiceReference; namespace Ordering_CancelOrder { class Program { static void Main(string[] args) { //Connect to Ordering service client var client = new OrderingWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; long orderId = 12345; //Include ordering options and an order as parameters in request body var request = new CancelOrderRequest() { OrderId = orderId, SuppressCancellationEmail = true, }; //Make CancelOrder call var response = client.CancelOrder(request); //If call is successful if (response.ResultCode == 0) { Console.WriteLine("Order " + orderId + " successfully cancelled."); Console.WriteLine("---------------------------"); Console.WriteLine("End"); Console.ReadKey(); } else { Console.WriteLine("Error Code: " + response.ResultCode); Console.WriteLine("Message: " + response.Message); Console.ReadKey(); } } } } }
CancelOrder Sample Code
using ServiceReference3; using System.Diagnostics.Contracts; using System.ServiceModel; using System.ServiceModel.Channels; namespace Ordering_CancelOrder { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddOrderingServiceClient() { services.AddTransient<IOrderingWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IOrderingWebService> factory = new ChannelFactory<IOrderingWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } static void Main(string[] args) { AddOrderingServiceClient(); IOrderingWebService client = services.BuildServiceProvider().GetRequiredService<IOrderingWebService>(); try { int count = 1; using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = "AccessToken"; httpRequestProperty.Headers["LocationToken"] = "LocationToken"; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; long orderId = 183479810050; //Include ordering options and an order as parameters in request body var request = new CancelOrderRequest() { OrderId = orderId, SuppressCancellationEmail = true, }; //Make CancelOrder call var response = client.CancelOrderAsync(request); //If call is successful if (response.Result.ResultCode == 0) { Console.WriteLine("Order " + orderId + " successfully cancelled."); Console.WriteLine("---------------------------"); Console.WriteLine("End"); } else { Console.WriteLine($"Error Code: {response.Result.ResultCode}"); Console.WriteLine($"Message: {response.Result.Message}"); } Console.ReadKey(); } } catch (Exception ex) { Console.WriteLine("Error calling CancelOrder operation: " + ex.Message); } } } }
CancelOrder Sample Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.brinksoftware.com/webservices/ordering/20140219"> <soapenv:Header/> <soapenv:Body> <ns:CancelOrder> <ns:request> <ns:OrderId>12345</ns:OrderId> <ns:SuppressCancellationEmail>true</ns:SuppressCancellationEmail> </ns:request> </ns:CancelOrder> </soapenv:Body> </soapenv:Envelope>
CancelOrder Sample Code
from zeep import Client from zeep.transports import Transport import requests accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken':accessToken, 'LocationToken':locationToken}) transport = Transport(session=session) #Connect to Ordering service client client = Client(wsdl={YOUR_WSDL_URL_GOES_HERE}, transport=transport) service = client.create_service( '{http://www.brinksoftware.com/webservices/ordering/20140219}BasicHttpBinding_IOrderingWebService', 'https://{YourStack}.brinkpos.net/ordering.svc' ) #Include ordering options and an order as parameters in request body orderId = 12345 reqType = client.get_type('ns1:CancelOrderRequest') req = reqType(OrderId=orderId, SuppressCancellationEmail=True) try: #Make CancelOrder call res = service.CancelOrder(req) #If call is successful if(res.ResultCode == 0): print('Order ' + str(order_id) + ' successfully cancelled') print('---------------------------') print('End') else: print('Error Code: ' + str(res.ResultCode)) print('Message: ' + res.Message) except Exception as e: print(e)

                
                    
                    
GetItemAvailability Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using Ordering_GetItemAvailability.OrderingServiceReference; namespace Ordering_GetItemAvailability { class Program { static void Main(string[] args) { //Connect to Ordering service client var client = new OrderingWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; int count = 1; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; int itemId = 12345; //Include ordering options and an order as parameters in request body var request = new GetItemAvailabilityRequest() { ItemIds = new int[] { itemId, } }; //Make GetItemAvailability call var response = client.GetItemAvailability(request); //If call is successful if (response.ResultCode == 0) { //Loop through collection of SecurityLevel objects returned if (response.Details != null) { foreach (var detail in response.Details) { Console.WriteLine("Detail #" + count); Console.WriteLine("---------------------------"); Console.WriteLine("IsAvailable: " + detail.IsAvailable); Console.WriteLine("ItemId: " + detail.ItemId); Console.WriteLine("QuantityAvailable: " + detail.QuantityAvailable); Console.WriteLine("---------------------------"); count++; } } Console.WriteLine("End"); Console.ReadKey(); } else { Console.WriteLine("Error Code: " + response.ResultCode); Console.WriteLine("Message: " + response.Message); Console.ReadKey(); } } } } }
GetItemAvailability Sample Code
using ServiceReference3; using System.Diagnostics.Contracts; using System.ServiceModel; using System.ServiceModel.Channels; namespace Ordering_GetItemAvailability { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddOrderingServiceClient() { services.AddTransient<IOrderingWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IOrderingWebService> factory = new ChannelFactory<IOrderingWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } static void Main(string[] args) { AddOrderingServiceClient(); IOrderingWebService client = services.BuildServiceProvider().GetRequiredService<IOrderingWebService>(); try { int count = 1; using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = "AccessToken"; httpRequestProperty.Headers["LocationToken"] = "LocationToken"; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; int itemId = 4003467; //Include ordering options and an order as parameters in request body var request = new GetItemAvailabilityRequest() { ItemIds = new int[] { itemId, } }; //Make GetItemAvailability call var response = client.GetItemAvailabilityAsync(request); Console.WriteLine("GetItemAvailability"); Console.WriteLine("---------------------"); //If call is successful if (response.Result.ResultCode == 0) { //Loop through collection of SecurityLevel objects returned if (response.Result.Details != null) { foreach (var detail in response.Result.Details) { Console.WriteLine("Detail #" + count); Console.WriteLine("---------------------------"); Console.WriteLine("IsAvailable: " + detail.IsAvailable); Console.WriteLine("ItemId: " + detail.ItemId); Console.WriteLine("QuantityAvailable: " + detail.QuantityAvailable); Console.WriteLine("---------------------------"); count++; } } Console.WriteLine("End"); } else { Console.WriteLine($"Error Code: {response.Result.ResultCode}"); Console.WriteLine($"Message: {response.Result.Message}"); } Console.ReadKey(); } } catch (Exception ex) { Console.WriteLine("Error calling GetItemAvailability operation: " + ex.Message); } } } }
GetItemAvailability Sample Code
<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"> <soapenv:Header/> <soapenv:Body> <ns:GetItemAvailability> <ns:request> <ns:ItemIds> <!--Zero or more repetitions:--> <arr:int>12345</arr:int> </ns:ItemIds> </ns:request> </ns:GetItemAvailability> </soapenv:Body> </soapenv:Envelope>
GetItemAvailability Sample Code
from zeep import Client from zeep.transports import Transport import requests #Helper Class to Get Type Without Knowing Namespace Level class RequestType(object): def __init__(self, client, name): self.client = client self.name = name def MakeElementDictionary(self, client): elmDict = {} for elmObj in sorted(client.wsdl.types.elements, key=lambda k: k.qname or ""): value = elmObj.signature(schema=client.wsdl.types) if (value != ''): elm = value.split('(')[0] elmNs, elmType = elm.split(':') elmDict[elmType] = elmNs return elmDict def SearchNameSpaceFromName(self, client, name): elmDict = self.MakeElementDictionary(client) if name in elmDict: return elmDict[name] @property def _type(self): return self.client.get_type(self.SearchNameSpaceFromName(self.client, self.name) + ':' + self.name) accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken':accessToken,'LocationToken':locationToken}) transport = Transport(session=session) #Connect to Ordering service client client = Client(wsdl={YOUR_WSDL_URL_GOES_HERE}, transport=transport) service = client.create_service( '{http://www.brinksoftware.com/webservices/ordering/20140219}BasicHttpBinding_IOrderingWebService', 'https://{YourStack}.brinkpos.net/Ordering.svc' ) #Prepare the dynamic type for GetItemAvailabilityRequest items = [] itemId = 12345 items.append(itemId) reqType = Request_Type(client, 'GetItemAvailabilityRequest')._type itemArrayType = Request_Type(client, 'ArrayOfint')._type itemArray = itemArrayType(int = items) req = reqType(ItemIds = itemArray) count = 1 try: #Make GetItemAvailability call res = service.GetItemAvailability(req) #If call is successful if(res.ResultCode == 0): if(res.Details != None): for detail in res.Details.ItemAvailabilityDetail: print("Detail # " + str(count)) print("--------------------------") print("IsAvailable: " + str(detail.IsAvailable)) print("ItemId: " + str(detail.ItemId)) print("QuantityAvailable: " + str(detail.QuantityAvailable)) print("--------------------------") count += 1 print("End") else: print("Error Code: " + str(res.ResultCode)) print("Message: " + res.Message) except Exception as e: print(e)

                
                    
                    
GetMasterTerminalStatus Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using Ordering_GetMasterTerminalStatus.OrderingServiceReference; namespace Ordering_GetMasterTerminalStatus { class Program { static void Main(string[] args) { //Connect to Ordering service client var client = new OrderingWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; //Make GetMasterTerminalStatus call var response = client.GetMasterTerminalStatus(); //If call is successful if (response.ResultCode == 0) { Console.WriteLine("Status: " + response.Status); if (response.Status == 1) { Console.WriteLine("Master Terminal is Online."); } else { Console.WriteLine("Master Terminal is Offline."); } Console.WriteLine("---------------------------"); Console.WriteLine("End"); Console.ReadKey(); } else { Console.WriteLine("Error Code: " + response.ResultCode); Console.WriteLine("Message: " + response.Message); Console.ReadKey(); } } } } }
GetMasterTerminalStatus Sample Code
using ServiceReference3; using System.Diagnostics.Contracts; using System.ServiceModel; using System.ServiceModel.Channels; namespace Ordering_GetMasterTerminalStatus { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddOrderingServiceClient() { services.AddTransient<IOrderingWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IOrderingWebService> factory = new ChannelFactory<IOrderingWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } static void Main(string[] args) { AddOrderingServiceClient(); IOrderingWebService client = services.BuildServiceProvider().GetRequiredService<IOrderingWebService>(); try { int count = 1; using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = "AccessToken"; httpRequestProperty.Headers["LocationToken"] = "LocationToken"; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; var response = client.GetMasterTerminalStatusAsync(); Console.WriteLine("GetMasterTerminalStatus"); Console.WriteLine("-----------------------"); //If call is successful if (response.Result.ResultCode == 0) { Console.WriteLine("Status: " + response.Status); if (response.Result.Status == 1) { Console.WriteLine("Master Terminal is Online."); } else { Console.WriteLine("Master Terminal is Offline."); } Console.WriteLine("---------------------------"); Console.WriteLine("End"); } else { Console.WriteLine($"Error Code: {response.Result.ResultCode}"); Console.WriteLine($"Message: {response.Result.Message}"); } Console.ReadKey(); } } catch (Exception ex) { Console.WriteLine("Error calling GetMasterTerminalStatus operation: " + ex.Message); } } } }
GetMasterTerminalStatus Sample Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.brinksoftware.com/webservices/ordering/20140219"> <soapenv:Header/> <soapenv:Body> <ns:GetMasterTerminalStatus/> </soapenv:Body> </soapenv:Envelope>
GetMasterTerminalStatus Sample Code
from zeep import Client from zeep.transports import Transport import requests accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken':accessToken,'LocationToken':locationToken}) transport = Transport(session=session) #Connect to Ordering service client client = Client(wsdl={YOUR_WSDL_URL_GOES_HERE}, transport=transport) service = client.create_service( '{http://tempuri.org/}BasicHttpBinding_IOrderingWebService', 'https://{YourStack}.brinkpos.net/Ordering.svc' ) try: #Make GetMasterTerminalStatus call res = service.GetMasterTerminalStatus() #If call is successful if(res.ResultCode == 0): print("Status: {}".format(res.Status)) if(res.Status == 1): print("Master Terminal is Online.") else: print("Master Terminal is Offline.") else: print("Error Code: " + str(res.ResultCode)) print("Message: " + res.Message) except Exception as e: print(e)

                
                    
                    
GetOrder Minified Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using Ordering_GetOrder.OrderingServiceReference; namespace Ordering_GetOrder { class Program { static void Main(string[] args) { //Connect to Ordering service client var client = new OrderingWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; long orderId = 12345; //Include OrderId parameter in request body var request = new GetOrderRequest() { OrderId = orderId, }; //Make GetOrder call var response = client.GetOrder(request); //If call is successful if (response.ResultCode == 0) { var order = response.Order; Console.WriteLine("Balance: " + order.Balance); Console.WriteLine("Entries:"); //Loop through collection of OrderEntry objects returned if (order.Entries != null) { foreach (var entry in order.Entries.OfType<OrderItem>()) { Console.WriteLine("\tDescription: " + entry.Description); Console.WriteLine("\tId: " + entry.Id); Console.WriteLine("\tItemId: " + entry.ItemId); Console.WriteLine("\tPrice: " + entry.Price); Console.WriteLine("\t------------"); } } Console.WriteLine("Id: " + order.Id); Console.WriteLine("Name: " + order.Name); Console.WriteLine("Subtotal: " + order.Subtotal); Console.WriteLine("Tax: " + order.Tax); Console.WriteLine("Total: " + order.Total); Console.WriteLine("---------------------------"); Console.WriteLine("End"); Console.ReadKey(); } } } } }
GetOrder Minified Sample Code
using ServiceReference3; using System.Diagnostics.Contracts; using System.ServiceModel; using System.ServiceModel.Channels; namespace Ordering_GetOrder { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddOrderingServiceClient() { services.AddTransient<IOrderingWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IOrderingWebService> factory = new ChannelFactory<IOrderingWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } static void Main(string[] args) { AddOrderingServiceClient(); IOrderingWebService client = services.BuildServiceProvider().GetRequiredService<IOrderingWebService>(); try { int count = 1; using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = "AccessToken"; httpRequestProperty.Headers["LocationToken"] = "LocationToken"; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; long orderId = 183479810049; //Include OrderId parameter in request body var request = new GetOrderRequest() { OrderId = orderId, }; //Make GetOrder call var response = client.GetOrderAsync(request); Console.WriteLine("Getorder"); Console.WriteLine("----------"); //If call is successful if (response.Result.ResultCode == 0) { var order = response.Result.Order; Console.WriteLine("Balance: " + order.Balance); Console.WriteLine("Entries:"); //Loop through collection of OrderEntry objects returned if (order.Entries != null) { foreach (var entry in order.Entries.OfType<OrderItem>()) { Console.WriteLine("\tDescription: " + entry.Description); Console.WriteLine("\tId: " + entry.Id); Console.WriteLine("\tItemId: " + entry.ItemId); Console.WriteLine("\tPrice: " + entry.Price); Console.WriteLine("\t------------"); } } Console.WriteLine("Id: " + order.Id); Console.WriteLine("Name: " + order.Name); Console.WriteLine("Subtotal: " + order.Subtotal); Console.WriteLine("Tax: " + order.Tax); Console.WriteLine("Total: " + order.Total); Console.WriteLine("---------------------------"); Console.WriteLine("End"); } else { Console.WriteLine($"Error Code: {response.Result.ResultCode}"); Console.WriteLine($"Message: {response.Result.Message}"); } Console.ReadKey(); } } catch (Exception ex) { Console.WriteLine("Error calling GetOrder operation: " + ex.Message); } } } }
GetOrder Sample Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.brinksoftware.com/webservices/ordering/20140219"> <soapenv:Header/> <soapenv:Body> <ns:GetOrder> <ns:request> <ns:OrderId>12345</ns:OrderId> </ns:request> </ns:GetOrder> </soapenv:Body> </soapenv:Envelope>
GetOrder Minified Sample Code
from zeep import Client from zeep.transports import Transport import requests accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken':accessToken, 'LocationToken':locationToken}) transport = Transport(session=session) #Connect to Ordering service client client = Client(wsdl={YOUR_WSDL_URL_GOES_HERE}, transport=transport) service = client.create_service( '{http://www.brinksoftware.com/webservices/ordering/20140219}BasicHttpBinding_IOrderingWebService', 'https://{YourStack}.brinkpos.net/ordering.svc' ) #Include OrderId parameter in request body orderId = 12345 reqType = client.get_type('ns1:GetOrderRequest') req = reqType(OrderId=orderId) try: #Make GetOrder call res = service.GetOrder(req) #If call is successful if(res.ResultCode == 0): order = res.Order print('Balance: ' + str(order.Balance)) if(order.Entries != None): print('Entries:') #Loop through collection of OrderEntry objects returned for entry in order.Entries.OrderEntry: print('\tDescription: ' + str(entry.Description)) print('\tId: ' + str(entry.Id)) print('\tItemId: ' + str(entry.ItemId)) print('\tPrice: ' + str(entry.Price)) print('\t------------') print('Id: ' + str(order.Id)) print('Name: ' + str(order.Name)) print('Subtotal: ' + str(order.Subtotal)) print('Tax: ' + str(order.Tax)) print('Total: ' + str(order.Total)) print('---------------------------') print('End') else: print("Error Code: " + str(res.ResultCode)) print("Message: " + res.Message) except Exception as e: print(e)

                
                    
                    
GetParty Minified Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using Ordering_GetParty.OrderingServiceReference; namespace Ordering_GetParty { class Program { public static void DisplayModifiers(OrderItemModifier1[] modifiers) { //Loop through collection of OrderItemModifier objects returned foreach (var mod in modifiers) { Console.WriteLine("\t\t\tId: " + mod.Id); Console.WriteLine("\t\t\tItemId: " + mod.ItemId); Console.WriteLine("\t\t\tModifierCodeId: " + mod.ModifierCodeId); Console.WriteLine("\t\t\tModifierGroupId: " + mod.ModifierGroupId); //Loop through collection of OrderItemModifier objects returned if (mod.Modifiers != null) { DisplayModifiers(mod.Modifiers); } Console.WriteLine("\t\t\t------------"); } } static void Main(string[] args) { //Connect to Ordering service client var client = new OrderingWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; DateTime businessDate = DateTime.Today.Date; int tableId = 12345; //Include BusinessDate and TableId parameter in request body var request = new GetPartyRequest() { BusinessDate = businessDate, TableId = tableId }; //Make GetParty call var response = client.GetParty(request); //If call is successful if (response.ResultCode == 0) { var party = response.Party; Console.WriteLine("CreatedTime: " + party.CreatedTime); Console.WriteLine("Id: " + party.Id); Console.WriteLine("Name: " + party.Name); foreach (var order in party.Orders) { Console.WriteLine("\tBusinessDate: " + order.BusinessDate); Console.WriteLine("\tCount: " + order.Count); Console.WriteLine("\tCustomerId: " + order.CustomerId); Console.WriteLine("\tEmployeeId: " + order.EmployeeId); Console.WriteLine("\tEntries:"); //Loop through collection of OrderEntry objects returned if (order.Entries != null) { foreach (var entry1 in order.Entries.OfType<OrderItem1>) { Console.WriteLine("\t\tModifiers:"); //Loop through collection of OrderItemModifier objects returned if (entry1.Modifiers != null) { DisplayModifiers(entry1.Modifiers); } Console.WriteLine("\t\t------------"); } } Console.WriteLine("\tFirstSendTime: " + order.FirstSendTime); Console.WriteLine("\tGuestCount: " + order.GuestCount); Console.WriteLine("\tId: " + order.Id); Console.WriteLine("\tIsClosed: " + order.IsClosed); Console.WriteLine("\tModifiedTime: " + order.ModifiedTime); Console.WriteLine("\tName: " + order.Name); Console.WriteLine("\tOpenedTime: " + order.OpenedTime); Console.WriteLine("\tPayments:"); //Loop through collection of OrderPayment objects returned if (order.Payments != null) { foreach (var payment in order.Payments) { Console.WriteLine("\t\tAmount: " + payment.Amount); Console.WriteLine("\t\tBusinessDate: " + payment.BusinessDate); Console.WriteLine("\t\tId: " + payment.Id); Console.WriteLine("\t\t------------"); } } Console.WriteLine("\tPickupTime: " + order.PickupTime); Console.WriteLine("\tTotal: " + order.Total); Console.WriteLine("\t\t------------"); } Console.WriteLine("Size: " + party.Size); Console.WriteLine("TableId: " + party.TableId); Console.WriteLine("---------------------------"); Console.WriteLine("End"); } else { Console.WriteLine("Error Code: " + response.ResultCode); Console.WriteLine("Message: " + response.Message); } Console.ReadKey(); } } } }
GetParty Minified Sample Code
using Microsoft.Extensions.DependencyInjection; using ServiceReference3; using System.ServiceModel; using System.ServiceModel.Channels; namespace Ordering_GetParty { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddOrderingServiceClient() { services.AddTransient<IOrderingWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IOrderingWebService> factory = new ChannelFactory<IOrderingWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } public static void DisplayModifiers(OrderItemModifier1[] modifiers) { //Loop through collection of OrderItemModifier objects returned foreach (var mod in modifiers) { Console.WriteLine("\t\t\tId: " + mod.Id); Console.WriteLine("\t\t\tItemId: " + mod.ItemId); Console.WriteLine("\t\t\tModifierCodeId: " + mod.ModifierCodeId); Console.WriteLine("\t\t\tModifierGroupId: " + mod.ModifierGroupId); //Loop through collection of OrderItemModifier objects returned if (mod.Modifiers != null) { DisplayModifiers(mod.Modifiers); } Console.WriteLine("\t\t\t------------"); } } static void Main(string[] args) { AddOrderingServiceClient(); IOrderingWebService client = services.BuildServiceProvider().GetRequiredService<IOrderingWebService>(); try { int count = 1; using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = 'AccessToken'; httpRequestProperty.Headers["LocationToken"] = 'LocationToken'; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; DateTime businessDate = new DateTime(2022,5,24); int tableId = 4003467; //Include BusinessDate and TableId parameter in request body var request = new GetPartyRequest() { BusinessDate = businessDate, TableId = tableId }; //Make GetParty call var response = client.GetPartyAsync(request); Console.WriteLine("GetParty"); Console.WriteLine("---------"); //If call is successful if (response.Result.ResultCode == 0) { var party = response.Result.Party; Console.WriteLine("CreatedTime: " + party.CreatedTime); Console.WriteLine("Id: " + party.Id); Console.WriteLine("Name: " + party.Name); foreach (var order in party.Orders) { Console.WriteLine("\tBusinessDate: " + order.BusinessDate); Console.WriteLine("\tCount: " + order.Count); Console.WriteLine("\tCustomerId: " + order.CustomerId); Console.WriteLine("\tEmployeeId: " + order.EmployeeId); Console.WriteLine("\tEntries:"); //Loop through collection of OrderEntry objects returned if (order.Entries != null) { foreach (var entry in order.Entries) { var entry1 = (OrderItem1)entry; Console.WriteLine("\t\tModifiers:"); //Loop through collection of OrderItemModifier objects returned if (entry1.Modifiers != null) { DisplayModifiers(entry1.Modifiers); } Console.WriteLine("\t\t------------"); } } Console.WriteLine("\tFirstSendTime: " + order.FirstSendTime); Console.WriteLine("\tGuestCount: " + order.GuestCount); Console.WriteLine("\tId: " + order.Id); Console.WriteLine("\tIsClosed: " + order.IsClosed); Console.WriteLine("\tModifiedTime: " + order.ModifiedTime); Console.WriteLine("\tName: " + order.Name); Console.WriteLine("\tOpenedTime: " + order.OpenedTime); Console.WriteLine("\tPayments:"); //Loop through collection of OrderPayment objects returned if (order.Payments != null) { foreach (var payment in order.Payments) { Console.WriteLine("\t\tAmount: " + payment.Amount); Console.WriteLine("\t\tBusinessDate: " + payment.BusinessDate); Console.WriteLine("\t\tId: " + payment.Id); Console.WriteLine("\t\t------------"); } } Console.WriteLine("\tPickupTime: " + order.PickupTime); Console.WriteLine("\tTotal: " + order.Total); Console.WriteLine("\t\t------------"); } Console.WriteLine("Size: " + party.Size); Console.WriteLine("TableId: " + party.TableId); Console.WriteLine("---------------------------"); Console.WriteLine("End"); } else { Console.WriteLine("Error Code: " + response.Result.ResultCode); Console.WriteLine("Message: " + response.Result.Message); } Console.ReadKey(); } } catch (Exception ex) { Console.WriteLine("Error calling GetParty operation: " + ex.Message); } } } }
GetParty Sample Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.brinksoftware.com/webservices/ordering/20140219"> <soapenv:Header/> <soapenv:Body> <ns:GetParty> <ns:request> <ns:BusinessDate>2001-01-01</ns:BusinessDate> <ns:TableId>12345</ns:TableId> </ns:request> </ns:GetParty> </soapenv:Body> </soapenv:Envelope>
GetParty Minified Sample Code
from zeep import Client from zeep.transports import Transport from datetime import datetime import requests def display_modifiers(modifiers, depth = 2): print('\t' * (depth) + 'Modifiers:') #Loop through collection of OrderItemModifier objects returned for mod in modifiers.OrderItemModifier: print('\t' * (depth + 1) + 'Id: ' + str(mod.Id)) print('\t' * (depth + 1) + 'ItemId: ' + str(mod.ItemId)) print('\t' * (depth + 1) + 'ModifierCodeId: ' + str(mod.ModifierCodeId)) print('\t' * (depth + 1) + 'ModifierGroupId: ' + str(mod.ModifierGroupId)) print('\t' * (depth + 1) + 'Price: ' + str(mod.Price)) if (mod.Modifiers != None): display_modifiers(mod.Modifiers, (depth + 2)) else: print('\t' * (depth + 1) + 'Modifiers: None') accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken': access_token, 'LocationToken': location_token}) transport = Transport(session=session) #Connect to Ordering service client client = Client(wsdl={YOUR_WSDL_URL_GOES_HERE}, transport=transport) service = client.create_service( '{http://www.brinksoftware.com/webservices/ordering/20140219}BasicHttpBinding_IOrderingWebService', 'https://{YourStack}.brinkpos.net/Ordering.svc' ) businesdate = datetime(2001, 01, 01) tableId = 12345 #Prepare the dynamic type for GetPartyRequest factory = client.type_factory('ns0') req = factory.GetPartyRequest(BusinessDate=businesdate, TableId=tableId) try: #Make GetPartyRequest call res = service.GetParty(req) #If call is successful if(res.ResultCode == 0): party = res.Party print("CreatedTime: " + str(party.CreatedTime)) print("Id: " + str(party.Id)) print("Name: " + party.Name) #Loop through collection of Order objects returned for order in party.Orders.Order: print('\tBusinessDate: ' + str(order.BusinessDate)) print('\tClosedTime:') print('\t\tDatetime: ' + str(order.ClosedTime.DateTime)) print('\t\tOffsetMinutes: ' + str(order.ClosedTime.OffsetMinutes)) print('\tCustomerId: ' + str(order.CustomerId)) print('\tEmployeeId: ' + str(order.EmployeeId)) if(order.Entries != None): print('\tEntries:') #Loop through collection of OrderEntry objects returned for entry in order.Entries.OrderEntry: if(entry.Modifiers != None): display_modifiers(entry.Modifiers) else: print('\t\tModifiers: None') else: print('\tEntries: None') print('\tFirstSendTime:') print('\t\tDateTime: ' + str(order.FirstSendTime.DateTime)) print('\t\tOffsetMinutes: ' + str(order.FirstSendTime.OffsetMinutes)) print('\tId: ' + str(order.Id)) print('\tModifiedTime:') print('\t\tDateTime: ' + str(order.ModifiedTime.DateTime)) print('\t\tOffsetMinutes: ' + str(order.ModifiedTime.OffsetMinutes)) print('\tName: ' + str(order.Name)) print('\tOpenedTime:') print('\t\tDateTime: ' + str(order.OpenedTime.DateTime)) print('\t\tOffsetMinutes: ' + str(order.OpenedTime.OffsetMinutes)) if(order.Payments != None): print('\tPayments:') #Loop through collection of OrderPayment objects returned for payment in order.Payments.OrderPayment: print('\t\tId: ' + str(payment.Id)) print('\t\tAmount: ' + str(payment.Amount)) print('\t\tBusinessDate: ' + str(payment.BusinessDate)) print('\t\t------------') else: print('\tPayments: None') print("\tPickupTime: " + str(order.PickupTime)) print('\tTotal: ' + str(order.Total)) print("OwnerEmployeeId: " + str(party.OwnerEmployeeId)) print("Size: " + str(party.Size)) print("TableId: " + str(party.TableId)) print("--------------------------") print("End") else: print("Error Code: " + str(res.ResultCode)) print("Message: " + res.Message) except Exception as e: print(e)

                
                    
                    
GetUnavailableItems Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using Ordering_GetUnavailableItems.OrderingServiceReference; namespace Ordering_GetUnavailableItems { class Program { static void Main(string[] args) { //Connect to Ordering service client var client = new OrderingWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; //Make GetUnavailableItems call var response = client.GetUnavailableItems(); //If call is successful if (response.ResultCode == 0) { //Retrieve and print item IDs from the response Console.WriteLine("Unavailable Item IDs:"); if (response.ItemIds != null && response.ItemIds.Any()) { foreach (var itemId in response.ItemIds) { Console.WriteLine(itemId); } } else { Console.WriteLine("No unavailable items found."); } Console.WriteLine("---------------------------"); Console.WriteLine("End"); Console.ReadKey(); } else { //Print error information Console.WriteLine("Error Code: " + response.ResultCode); Console.WriteLine("Message: " + response.Message); Console.ReadKey(); } } } } }
GetUnavailableItems Sample Code
using ServiceReference3; using System.Diagnostics.Contracts; using System.ServiceModel; using System.ServiceModel.Channels; namespace Ordering_GetUnavailableItems { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddOrderingServiceClient() { services.AddTransient<IOrderingWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IOrderingWebService> factory = new ChannelFactory<IOrderingWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } static void Main(string[] args) { AddOrderingServiceClient(); IOrderingWebService client = services.BuildServiceProvider().GetRequiredService<IOrderingWebService>(); try { int count = 1; using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = "AccessToken"; httpRequestProperty.Headers["LocationToken"] = "LocationToken"; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; var response = client.GetUnavailableItemsAsync(); Console.WriteLine("GetUnavailableItems"); Console.WriteLine("-----------------------"); //If call is successful if (response.Result.ResultCode == 0) { //Retrieve and print item IDs from the response Console.WriteLine("Unavailable Item IDs:"); if (response.Result.ItemIds != null && response.Result.ItemIds.Any()) { foreach (var itemId in response.Result.ItemIds) { Console.WriteLine(itemId); } } else { Console.WriteLine("No unavailable items found."); } Console.WriteLine("---------------------------"); Console.WriteLine("End"); } else { //Print error information Console.WriteLine($"Error Code: {response.Result.ResultCode}"); Console.WriteLine($"Message: {response.Result.Message}"); } Console.ReadKey(); } } catch (Exception ex) { Console.WriteLine("Error calling GetUnavailableItems operation: " + ex.Message); } } } }
GetUnavailableItems Sample Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.brinksoftware.com/webservices/ordering/20140219"> <soapenv:Header/> <soapenv:Body> <ns:GetUnavailableItems/> </soapenv:Body> </soapenv:Envelope>
GetUnavailableItems Sample Code
from zeep import Client from zeep.transports import Transport import requests accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken':accessToken,'LocationToken':locationToken}) transport = Transport(session=session) #Connect to Ordering service client client = Client(wsdl={YOUR_WSDL_URL_GOES_HERE}, transport=transport) service = client.create_service( '{http://tempuri.org/}BasicHttpBinding_IOrderingWebService', 'https://{YourStack}.brinkpos.net/Ordering.svc' ) try: #Make GetUnavailableItems call res = service.GetUnavailableItems() #If call is successful if(res.ResultCode == 0): print("Unavailable Item IDs:") if(res.ItemIds): for (item_id) in res.ItemIds: print(item_id) else: print("No unavailable items found.") else: print("Error Code: " + str(res.ResultCode)) print("Message: " + res.Message) except Exception as e: print(e)

                
                    
                    
SendOrder Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using Ordering_SendOrder.OrderingServiceReference; namespace Localhost_Ordering_SendOrder_SampleCode { class Program { static void Main(string[] args) { //Connect to Ordering service client var client = new OrderingWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; long orderId = 12345; //Include OrderId parameter in request body var request = new SendOrderRequest() { OrderId = orderId, }; //Make SendOrder call var response = client.SendOrder(request); //If call is successful if (response.ResultCode == 0) { Console.WriteLine($"Order {orderId} has been sent."); Console.WriteLine("---------------------------"); Console.WriteLine("End"); } else { Console.WriteLine("Error Code: " + response.ResultCode); Console.WriteLine("Message: " + response.Message); } Console.ReadKey(); } } } }
SendOrder Sample Code
using ServiceReference3; using System.Diagnostics.Contracts; using System.ServiceModel; using System.ServiceModel.Channels; namespace Ordering_SendOrder { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddOrderingServiceClient() { services.AddTransient<IOrderingWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IOrderingWebService> factory = new ChannelFactory<IOrderingWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } static void Main(string[] args) { AddOrderingServiceClient(); IOrderingWebService client = services.BuildServiceProvider().GetRequiredService<IOrderingWebService>(); try { int count = 1; using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = "AccessToken"; httpRequestProperty.Headers["LocationToken"] = "LocationToken"; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; long orderId = 183479810049; var request = new SendOrderRequest() { OrderId = orderId, }; //Make SendOrder call var response = client.SendOrderAsync(request); //If call is successful if (response.Result.ResultCode == 0) { Console.WriteLine($"Order {orderId} has been sent."); Console.WriteLine("---------------------------"); Console.WriteLine("End"); } else { Console.WriteLine($"Error Code: {response.Result.ResultCode}"); Console.WriteLine($"Message: {response.Result.Message}"); } Console.ReadKey(); } } catch (Exception ex) { Console.WriteLine("Error calling SendOrder operation: " + ex.Message); } } } }
SendOrder Sample Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.brinksoftware.com/webservices/ordering/20140219"> <soapenv:Header/> <soapenv:Body> <ns:SendOrder> <ns:request> <ns:OrderId>12345</ns:OrderId> </ns:request> </ns:SendOrder> </soapenv:Body> </soapenv:Envelope>
SendOrder Sample Code
from zeep import Client from zeep.transports import Transport import requests accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken':accessToken,'LocationToken':locationToken}) transport = Transport(session=session) #Connect to Ordering service client client = Client(wsdl={YOUR_WSDL_URL_GOES_HERE}, transport=transport) service = client.create_service( '{http://www.brinksoftware.com/webservices/ordering/20140219}BasicHttpBinding_IOrderingWebService', 'https://{YourStack}.brinkpos.net/Ordering.svc' ) #Prepare the dynamic type for SendOrderRequest orderId = 12345 sendOrderRequestType = client.get_type('ns0:SendOrderRequest') req = sendOrderRequestType(OrderId=orderId) try: #Make SendOrder call res = service.SendOrder(req) #If call is successful if(res.ResultCode == 0): print("Order {} has been sent.").format(orderId) print("--------------------------") print("End") else: print("Error Code: " + str(res.ResultCode)) print("Message: " + res.Message) except Exception as e: print(e)

                
                    
                    
SubmitOrder Minified Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using Ordering_SubmitOrder.OrderingServiceReference; namespace Ordering_SubmitOrder { class Program { public static NewOrder CreateOrder() { int positiveId = 1; var order = new NewOrder() { DestinationId = 1, FutureOrder = new NewFutureOrderDetails() { PickupTime = new DateTimeOffset(DateTime.Now.AddMinutes(30)), SendReminderEmail = false, }, Items = new NewOrderItem[] { new NewOrderItem() { Description = "Cheeseburger", Id = positiveId, ItemId = 123, DestinationId = 1, }, }, Name = "Online Order", }; return order; } static void Main(string[] args) { //Connect to Ordering service client var client = new OrderingWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; //Include ordering options and an order as parameters in request body var request = new SubmitOrderRequest() { Options = new OrderingOptions() { CalculateItemPrice = true, }, Order = CreateOrder(), SuppressConfirmationEmail = true, }; //Make SubmitOrder call var response = client.SubmitOrder(request); //If call is successful if (response.ResultCode == 0) { Console.WriteLine("Order " + response.OrderId + " successfully submitted."); Console.WriteLine("---------------------------"); Console.WriteLine("End"); Console.ReadKey(); } } } } }
SubmitOrder Minified Sample Code
using ServiceReference3; using System.Diagnostics.Contracts; using System.ServiceModel; using System.ServiceModel.Channels; namespace Ordering_SubmitOrder { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddOrderingServiceClient() { services.AddTransient<IOrderingWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IOrderingWebService> factory = new ChannelFactory<IOrderingWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } public static NewOrder CreateOrder() { int positiveId = 1; var order = new NewOrder() { DestinationId = 1, FutureOrder = new NewFutureOrderDetails() { PickupTime = new DateTimeOffset(DateTime.Now.AddMinutes(30)), SendReminderEmail = false, }, Items = new NewOrderItem[] { new NewOrderItem() { Description = "Cheeseburger", Id = positiveId, ItemId = 4003467, DestinationId = 1, }, }, Name = "Online Order", }; return order; } static void Main(string[] args) { AddOrderingServiceClient(); IOrderingWebService client = services.BuildServiceProvider().GetRequiredService<IOrderingWebService>(); try { int count = 1; using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = "AccessToken"; httpRequestProperty.Headers["LocationToken"] = "LocationToken"; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; var request = new SubmitOrderRequest() { Options = new OrderingOptions() { CalculateItemPrice = true, }, Order = CreateOrder(), SuppressConfirmationEmail = true, }; //Make SubmitOrder call var response = client.SubmitOrderAsync(request); Console.WriteLine("SubmitOrder"); Console.WriteLine("------------"); //If call is successful if (response.Result.ResultCode == 0) { Console.WriteLine("Order " + response.Result.OrderId + " successfully submitted."); Console.WriteLine("---------------------------"); Console.WriteLine("End"); } else { Console.WriteLine($"Error Code: {response.Result.ResultCode}"); Console.WriteLine($"Message: {response.Result.Message}"); } Console.ReadKey(); } } catch (Exception ex) { Console.WriteLine("Error calling SubmitOrder operation: " + ex.Message); } } } }
SubmitOrder Minified Sample Code
<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" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header/> <soapenv:Body> <ns:SubmitOrder> <ns:request> <ns:Options> <ns:CalculateItemPrice>true</ns:CalculateItemPrice> </ns:Options> <ns:Order> <ns:DestinationId>1</ns:DestinationId> <ns:FutureOrder> <ns:PickupTime> <sys:DateTime>2001-01-01T12:00:00Z</sys:DateTime> </ns:PickupTime> <ns:SendReminderEmail>false</ns:SendReminderEmail> </ns:FutureOrder> <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>Online Order</ns:Name> </ns:Order> </ns:request> </ns:SubmitOrder> </soapenv:Body> </soapenv:Envelope>
SubmitOrder Minified Sample Code
from zeep import Client from zeep.transports import Transport from datetime import datetime, timedelta import requests # Helper function for index generator num = 0 def Next(): global num num = num + 1 return num #Helper function to create order def CreateOrder(client): factory = client.type_factory('ns1') pickupTimeType = client.get_type('ns4:DateTimeOffset') pickupTime = pickupTimeType( DateTime = datetime.utcnow() + timedelta(minutes=30), OffsetMinutes=0 ) newFutureOrderDetails = factory.NewFutureOrderDetails( PickupTime=pickupTime, SendReminderEmail=False ) items = [] newOrderItem = factory.NewOrderItem( Id=Next(), ItemId=123, Description='Cheeseburger', DestinationId=1, ) items.append(newOrderItem) newOrderItemArray = factory.ArrayOfNewOrderItem(NewOrderItem=items) newOrder = factory.NewOrder( DestinationId=1, FutureOrder=newFutureOrderDetails, Items=newOrderItemArray, Name='Online Order' ) return newOrder accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken':accessToken, 'LocationToken':locationToken}) transport = Transport(session=session) #Connect to Ordering service client client = Client(wsdl={YOUR_WSDL_URL_GOES_HERE}, transport=transport) service = client.create_service( '{http://www.brinksoftware.com/webservices/ordering/20140219}BasicHttpBinding_IOrderingWebService', 'https://{YourStack}.brinkpos.net/ordering.svc' ) #Prepare the dynamic type for SubmitOrderRequest orderingOptionsType = client.get_type('ns1:OrderingOptions') submitOrderRequestType = client.get_type('ns1:SubmitOrderRequest') #Include ordering options and an order as parameters in request body orderingOptions = orderingOptionsType(CalculateItemPrice=False) submitOrderRequest = submitOrderRequestType( Options=orderingOptions, Order=CreateOrder(client), SuppressConfirmationEmail=False ) try: #Make SubmitOrder call res = service.SubmitOrder(submitOrderRequest) #If call is successful if(res.ResultCode == 0): print('Order ' + str(res.OrderId) + ' successfully submitted') print('---------------------------') print('End') else: print('Error Code: ' + str(res.ResultCode)) print('Message: ' + res.Message) except Exception as e: print(e)

                
                    
                    
UpdateItemAvailability Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using Ordering_UpdateItemAvailability.OrderingServiceReference; namespace Ordering_UpdateItemAvailability { class Program { static void Main(string[] args) { //Connect to Ordering service client var client = new OrderingWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; int itemId = 12345; int quantityAvailable = -1; //Include details parameter in request body var request = new UpdateItemAvailabilityRequest() { Details = new ItemAvailabilityDetail[] { new ItemAvailabilityDetail() { IsAvailable = true, ItemId = itemId, QuantityAvailable = quantityAvailable, }, } }; //Make UpdateItemAvailability call var response = client.UpdateItemAvailability(request); //If call is successful if (response.ResultCode == 0) { Console.WriteLine("Availability of Item " + itemId + " has successfully been updated."); Console.WriteLine("---------------------------"); Console.WriteLine("End"); Console.ReadKey(); } else { Console.WriteLine("Error Code: " + response.ResultCode); Console.WriteLine("Message: " + response.Message); Console.ReadKey(); } } } } }
UpdateItemAvailability Sample Code
using Microsoft.Extensions.DependencyInjection; using ServiceReference3; using System.ServiceModel; using System.ServiceModel.Channels; namespace Ordering_UpdateItemAvailability { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddOrderingServiceClient() { services.AddTransient<IOrderingWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IOrderingWebService> factory = new ChannelFactory<IOrderingWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } static void Main(string[] args) { AddOrderingServiceClient(); IOrderingWebService client = services.BuildServiceProvider().GetRequiredService<IOrderingWebService>(); try { int count = 1; using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = 'AccessToken'; httpRequestProperty.Headers["LocationToken"] = 'LocationToken'; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; int itemId = 4003467; int quantityAvailable = -1; //Include details parameter in request body var request = new UpdateItemAvailabilityRequest() { Details = new ItemAvailabilityDetail[] { new ItemAvailabilityDetail() { IsAvailable = true, ItemId = itemId, QuantityAvailable = quantityAvailable, }, } }; //Make UpdateItemAvailability call var response = client.UpdateItemAvailabilityAsync(request); Console.WriteLine("UpdateItemAvailability"); Console.WriteLine("-----------------------"); //If call is successful if (response.Result.ResultCode == 0) { Console.WriteLine("Availability of Item " + itemId + " has successfully been updated."); Console.WriteLine("---------------------------"); Console.WriteLine("End"); } else { Console.WriteLine($"Error Code: {response.Result.ResultCode}"); Console.WriteLine($"Message: {response.Result.Message}"); } Console.ReadKey(); } } catch (Exception ex) { Console.WriteLine("Error calling UpdateItemAvailability operation: " + ex.Message); } } } }
UpdateItemAvailability Sample Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.brinksoftware.com/webservices/ordering/20140219"> <soapenv:Header/> <soapenv:Body> <ns:UpdateItemAvailability> <ns:request> <ns:Details> <ns:ItemAvailabilityDetail> <ns:IsAvailable>true</ns:IsAvailable> <ns:ItemId>12345</ns:ItemId> <ns:QuantityAvailable>-1</ns:QuantityAvailable> </ns:ItemAvailabilityDetail> </ns:Details> </ns:request> </ns:UpdateItemAvailability> </soapenv:Body> </soapenv:Envelope>
UpdateItemAvailability Sample Code
from zeep import Client from zeep.transports import Transport import requests accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken':accessToken,'LocationToken':locationToken}) transport = Transport(session=session) #Connect to Ordering service client client = Client(wsdl={YOUR_WSDL_URL_GOES_HERE}, transport=transport) service = client.create_service( '{http://www.brinksoftware.com/webservices/ordering/20140219}BasicHttpBinding_IOrderingWebService', 'https://{YourStack}.brinkpos.net/Ordering.svc' ) #Prepare the dynamic type for UpdateItemAvailabilityRequest reqType = client.get_type('ns1:UpdateItemAvailabilityRequest') arrayType = client.get_type('ns1:ArrayOfItemAvailabilityDetail') itemType = client.get_type('ns1:ItemAvailabilityDetail') #Include details parameter in request body itemId = 12345 quantityAvailable = -1 items = [] item = itemType(IsAvailable=True, ItemId = item_id, QuantityAvailable = quantityAvailable) items.append(item) items_array = arrayType(ItemAvailabilityDetail=items) req = reqType(Details=items_array) try: #Make UpdateItemAvailability call res = service.UpdateItemAvailability(req) #If call is successful if(res.ResultCode == 0): print("Availability of Item {} has successfully been updated.").format(item_id) print("--------------------------") print("End") else: print("Error Code: " + str(res.ResultCode)) print("Message: " + res.Message) except Exception as e: print(e)