- Auto-apply promotions to an order
Apply up to 100 eligible promotions where AutoApply=true.
- Production sever for Ordercloudhttps://api.ordercloud.io/v1/orders/{direction}/{orderID}/applypromotions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
curl -i -X POST \
'https://api.ordercloud.io/v1/orders/{direction}/{orderID}/applypromotions' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Apply up to 100 eligible promotions where AutoApply=true.
User placing the order.
{ "ID": "", "CompanyID": "", "Username": "", "Password": "", "FirstName": "", "LastName": "", "Email": "", "Phone": "", "TermsAccepted": "2018-01-01T00:00:00-06:00", "Active": false, "xp": {}, "AvailableRoles": [ "" ], "Locale": { "ID": "", "OwnerID": "", "Currency": "", "Language": "" }, "DateCreated": "2018-01-01T00:00:00-06:00", "LastActive": "2018-01-01T00:00:00-06:00", "PasswordLastSetDate": "2018-01-01T00:00:00-06:00" }
ID of the Buyer placing the order, or the marketplace owner when an order is being forwarded. Mainly useful to the marketplace owner or supplier receiving it.
ID of the marketplace owner or supplier receiving the order, only writable on create. Mainly useful to the user placing it.
This property is only writable when creating an order on behalf of a buyer user.
{ "ID": "", "DateCreated": "2018-01-01T00:00:00-06:00", "CompanyName": "", "FirstName": "", "LastName": "", "Street1": "", "Street2": "", "City": "", "State": "", "Zip": "", "Country": "", "Phone": "", "AddressName": "", "xp": {} }
ID of the ShippingAddress for all line items on the order. Null when there are multiple shipping addresses defined.
Null until the order passes from the buyer to the marketplace owner, including when Status is PendingApproval.
Populated when all items on an order have shipped, or the order is explicitly completed.
Sum of all discount amounts from discount assignments applied to line items on this order.
Sum of all promotion amounts applied to the order.
Subtotal - BaseDiscount - PromotionDiscount + TaxCost + ShippingCost + Gratuity + Fees
True if this order has been passed from the Buyer to the marketplace owner or supplier.
ID of the subscription used to create an order in an automated process.
{ "ID": "", "FromUser": { "ID": "", "CompanyID": "", "Username": "", "Password": "", "FirstName": "", "LastName": "", "Email": "", "Phone": "", "TermsAccepted": "2018-01-01T00:00:00-06:00", "Active": false, "xp": {}, "AvailableRoles": [ … ], "Locale": { … }, "DateCreated": "2018-01-01T00:00:00-06:00", "LastActive": "2018-01-01T00:00:00-06:00", "PasswordLastSetDate": "2018-01-01T00:00:00-06:00" }, "FromCompanyID": "", "ToCompanyID": "", "FromUserID": "", "BillingAddressID": "", "BillingAddress": { "ID": "", "DateCreated": "2018-01-01T00:00:00-06:00", "CompanyName": "", "FirstName": "", "LastName": "", "Street1": "", "Street2": "", "City": "", "State": "", "Zip": "", "Country": "", "Phone": "", "AddressName": "", "xp": {} }, "ShippingAddressID": "", "Comments": "", "LineItemCount": 0, "Status": "Unsubmitted", "DateCreated": "2018-01-01T00:00:00-06:00", "DateSubmitted": "2018-01-01T00:00:00-06:00", "DateApproved": "2018-01-01T00:00:00-06:00", "DateDeclined": "2018-01-01T00:00:00-06:00", "DateCanceled": "2018-01-01T00:00:00-06:00", "DateCompleted": "2018-01-01T00:00:00-06:00", "LastUpdated": "2018-01-01T00:00:00-06:00", "Subtotal": 0, "ShippingCost": 0, "TaxCost": 0, "Gratuity": 0, "Fees": 0, "BaseDiscount": 0, "PromotionDiscount": 0, "Currency": "", "Total": 0, "IsSubmitted": false, "SubscriptionID": "", "xp": {} }