# Orders

Orders represent a business transaction between two parties. They typically consist of a collection of line items, a payment method, tax and shipping information, etc. The platform defines various "actions" that can be performed against orders, such as Submit, Approve, Ship, etc. These actions transform the state of the order and often trigger external events such as financial transactions.

## List orders

 - [GET /orders/{direction}](https://api-docs.sitecore.com/ordercloud/orders/orders.list.md)

## Create an order

 - [POST /orders/{direction}](https://api-docs.sitecore.com/ordercloud/orders/orders.create.md)

## Retrieve an order

 - [GET /orders/{direction}/{orderID}](https://api-docs.sitecore.com/ordercloud/orders/orders.get.md)

## Create or update an order

 - [PUT /orders/{direction}/{orderID}](https://api-docs.sitecore.com/ordercloud/orders/orders.save.md): If an object with the same ID already exists, it will be overwritten.

## Delete an order

 - [DELETE /orders/{direction}/{orderID}](https://api-docs.sitecore.com/ordercloud/orders/orders.delete.md)

## Partially update an order

 - [PATCH /orders/{direction}/{orderID}](https://api-docs.sitecore.com/ordercloud/orders/orders.patch.md)

## Auto-apply promotions to an order

 - [POST /orders/{direction}/{orderID}/applypromotions](https://api-docs.sitecore.com/ordercloud/orders/orders.applypromotions.md): Apply up to 100 eligible promotions where AutoApply=true.

## List order approvals

 - [GET /orders/{direction}/{orderID}/approvals](https://api-docs.sitecore.com/ordercloud/orders/orders.listapprovals.md): Returns all Approvals associated with the Order.

## Approve an order

 - [POST /orders/{direction}/{orderID}/approve](https://api-docs.sitecore.com/ordercloud/orders/orders.approve.md)

## Set a billing address

 - [PUT /orders/{direction}/{orderID}/billto](https://api-docs.sitecore.com/ordercloud/orders/orders.setbillingaddress.md): Use only when the address is not to be saved/reused.To use a saved address (i.e. from the Addresses resource), PATCH the order's BillingAddressID property instead.

## Partially update an order billing address

 - [PATCH /orders/{direction}/{orderID}/billto](https://api-docs.sitecore.com/ordercloud/orders/orders.patchbillingaddress.md): Not allowed on unsubmitted orders where BillingAddressID has been set. In that case, use the Addresses resource to update the saved address.

## Cancel an order

 - [POST /orders/{direction}/{orderID}/cancel](https://api-docs.sitecore.com/ordercloud/orders/orders.cancel.md)

## Complete an order

 - [POST /orders/{direction}/{orderID}/complete](https://api-docs.sitecore.com/ordercloud/orders/orders.complete.md): Use only when an order doesn't need a shipment. You will not be able to ship or reopen an order after completing it.

## Decline an order

 - [POST /orders/{direction}/{orderID}/decline](https://api-docs.sitecore.com/ordercloud/orders/orders.decline.md)

## List order eligible approvers

 - [GET /orders/{direction}/{orderID}/eligibleapprovers](https://api-docs.sitecore.com/ordercloud/orders/orders.listeligibleapprovers.md): Returns all Users who can approve or decline this order (but have not done so).

## List eligible promotions for an order

 - [GET /orders/{direction}/{orderID}/eligiblepromotions](https://api-docs.sitecore.com/ordercloud/orders/orders.listeligiblepromotions.md)

## Forward an order

 - [POST /orders/{direction}/{orderID}/forward](https://api-docs.sitecore.com/ordercloud/orders/orders.forward.md): Creates and submits 0 or more outgoing Orders to Suppliers, one for each unique Product.DefaultSupplierID on this Order.

## Partially update an order from user

 - [PATCH /orders/{direction}/{orderID}/fromuser](https://api-docs.sitecore.com/ordercloud/orders/orders.patchfromuser.md): Only FirstName, LastName, and Email can be updated.Primarily used to facilitate guest checkout scenarios.

## List order promotions

 - [GET /orders/{direction}/{orderID}/promotions](https://api-docs.sitecore.com/ordercloud/orders/orders.listpromotions.md)

## Add a promotion to an order

 - [POST /orders/{direction}/{orderID}/promotions/{promoCode}](https://api-docs.sitecore.com/ordercloud/orders/orders.addpromotion.md)

## Remove a promotion from an order

 - [DELETE /orders/{direction}/{orderID}/promotions/{promoCode}](https://api-docs.sitecore.com/ordercloud/orders/orders.removepromotion.md)

## Refresh promotions on an order

 - [POST /orders/{direction}/{orderID}/refreshpromotions](https://api-docs.sitecore.com/ordercloud/orders/orders.refreshpromotions.md): Re-calculates promotion discounts, removes promotions that are no longer valid, and adds eligible promotions where AutoApply=true (up to limit of 100)

## Repeat an order

 - [POST /orders/{direction}/{orderID}/repeat](https://api-docs.sitecore.com/ordercloud/orders/orders.repeat.md): Creates a new unsubmitted order from a previously submitted order, copying available line items with recalculated prices.

## Create a new shipment containing all items on an order

 - [POST /orders/{direction}/{orderID}/ship](https://api-docs.sitecore.com/ordercloud/orders/orders.ship.md)

## List shipments for an order

 - [GET /orders/{direction}/{orderID}/shipments](https://api-docs.sitecore.com/ordercloud/orders/orders.listshipments.md)

## Set a shipping address

 - [PUT /orders/{direction}/{orderID}/shipto](https://api-docs.sitecore.com/ordercloud/orders/orders.setshippingaddress.md): Use only when the address is not to be saved/reused. To use a saved address (i.e. from the Addresses resource), PATCH the order's ShippingAddressID property instead. The address used will be populated on the ShippingAddress property of each LineItem.

## Partially update an order shipping address

 - [PATCH /orders/{direction}/{orderID}/shipto](https://api-docs.sitecore.com/ordercloud/orders/orders.patchshippingaddress.md): Not allowed on unsubmitted orders where ShippingAddressID has been set. In that case, use the Addresses resource to update the saved address.

## Split an order

 - [POST /orders/{direction}/{orderID}/split](https://api-docs.sitecore.com/ordercloud/orders/orders.split.md): Creates, but does not submit, 0 or more outgoing Orders to Suppliers, one for each unique Product.DefaultSupplierID on this Order.

## Submit an order

 - [POST /orders/{direction}/{orderID}/submit](https://api-docs.sitecore.com/ordercloud/orders/orders.submit.md)

## Validate an order in its current state

 - [POST /orders/{direction}/{orderID}/validate](https://api-docs.sitecore.com/ordercloud/orders/orders.validate.md)

