# Order

An order object is the parent for all other objects and contains attributes that are common to the entire order.
The Order REST API matches orders that have the same `referenceId` values and have `orderedAt` values (purchase dates) within two days of another.

## Create an order

 - [POST /v2.1/orders](https://api-docs.sitecore.com/cdp/order-rest-api/order/createorder.md): Creates an order. 

 In the response, ref contains the order reference. Use the order reference to interact with a specific order, for example, to retrieve it, update it, or create a data extension for it.

## List orders

 - [GET /v2.1/orders](https://api-docs.sitecore.com/cdp/order-rest-api/order/retrieveorders.md): Retrieves a list of orders that either have the same reference ID or belong to the same guest. You must include either the referenceId of the order or the guestRef as a query string parameter in the URI of the request, but not both.

 In the response, items.ref contains the order reference. Use the order reference to interact with a specific order, for example, to retrieve it, update it, or create a data extension for it.

## Retrieve an order

 - [GET /v2.1/orders/{orderRef}](https://api-docs.sitecore.com/cdp/order-rest-api/order/retrieveorder.md): Retrieves an order.

## Update an order

 - [PUT /v2.1/orders/{orderRef}](https://api-docs.sitecore.com/cdp/order-rest-api/order/updateorder.md): Updates an order. You can update orders that have the same referenceId and have orderedAt values (purchase dates) within two days of another. referenceId and orderedAt cannot be updated.

## Partially update an order

 - [PATCH /v2.1/orders/{orderRef}](https://api-docs.sitecore.com/cdp/order-rest-api/order/updateorder_1.md): Partially updates an order. You can update orders that have the same referenceId and have orderedAt values (purchase dates) within two days of another. referenceId and orderedAt cannot be updated.

## Delete an order

 - [DELETE /v2.1/orders/{orderRef}](https://api-docs.sitecore.com/cdp/order-rest-api/order/deleteorder_1.md): Deletes an order. An empty, 204 No Content response means that the deletion was successful.

