> For the complete documentation index, see [llms.txt](https://docs.hotwax.co/documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hotwax.co/documents/integrate-with-hotwax/components/order-routing/orders.md). Agents can also search and read this documentation through its [MCP server](https://docs.hotwax.co/documents/~gitbook/mcp).

# Orders

orders

## POST /orders/{orderId}/reject

> reject OrderItems

```json
{"openapi":"3.1.1","info":{"title":"Commerce order routing REST API","version":"4.0.0"},"tags":[{"name":"orders","description":"orders"}],"servers":[{"url":"https://dev-maarg.hotwax.io/rest/s1/order-routing"}],"security":[{"basicAuth":[]},{"api_key":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"api_key":{"type":"apiKey","name":"api_key","in":"header","description":"HTTP Header api_key"}},"schemas":{"co.hotwax.order.routing.OrderRoutingServices.rejectOrderItems.Out":{"type":"object","properties":{"rejectedItemsList":{"type":"array","items":{"type":"object","properties":{"orderId":{"type":"string"},"orderItemSeqId":{"type":"string"},"shipGroupSeqId":{"type":"string"},"shipmentMethodTypeId":{"type":"string"},"quantity":{"type":"string"}}}}}},"co.hotwax.order.routing.OrderRoutingServices.rejectOrderItems.In":{"type":"object","properties":{"orderId":{"type":"string"},"notify":{"type":"boolean","description":"If set to true, an email notification will be sent on rejection, provided it is configured.","default":"false"},"items":{"type":"array","items":{"type":"object","description":"A map containing details of the items to be rejected or moved.","properties":{"facilityId":{"type":"string","description":"The facility ID of the order item's ship group."},"shipmentMethodTypeId":{"type":"string","description":"The shipment method of the order item's ship group."},"quantity":{"type":"string","description":"The quantity of the order item to be rejected. Defaults to 1.","default":"1"},"orderItemSeqId":{"type":"string","description":"The sequence ID of the order item."},"toFacilityId":{"type":"string","description":"The destination facility ID where the item will be moved after rejection."},"recordVariance":{"type":"string","description":"Set to true if a variance record needs to be created."},"rejectReason":{"type":"string","description":"The reason for rejecting the item."}}}}},"required":["orderId","items"]}}},"paths":{"/orders/{orderId}/reject":{"post":{"tags":["orders"],"summary":"reject OrderItems","description":null,"parameters":[{"schema":{"type":"string"},"name":"orderId","in":"path","required":true,"description":null}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/co.hotwax.order.routing.OrderRoutingServices.rejectOrderItems.Out"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access Forbidden (no authz)"},"429":{"description":"Too Many Requests (tarpit)"},"500":{"description":"General Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/co.hotwax.order.routing.OrderRoutingServices.rejectOrderItems.In"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/co.hotwax.order.routing.OrderRoutingServices.rejectOrderItems.In"}}},"required":true}}}}}
```

## GET /orders/{orderId}/routing-history/recent

> get RecentRoutingHistory

```json
{"openapi":"3.1.1","info":{"title":"Commerce order routing REST API","version":"4.0.0"},"tags":[{"name":"orders","description":"orders"}],"servers":[{"url":"https://dev-maarg.hotwax.io/rest/s1/order-routing"}],"security":[{"basicAuth":[]},{"api_key":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"api_key":{"type":"apiKey","name":"api_key","in":"header","description":"HTTP Header api_key"}},"schemas":{"co.hotwax.order.routing.OrderRoutingServices.getRecentRoutingHistory.Out":{"type":"object","properties":{"routingHistoryList":{"type":"array","items":{"type":"string"}}}}}},"paths":{"/orders/{orderId}/routing-history/recent":{"get":{"tags":["orders"],"summary":"get RecentRoutingHistory","description":null,"parameters":[{"schema":{"type":"string"},"name":"orderId","in":"path","required":true,"description":null}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/co.hotwax.order.routing.OrderRoutingServices.getRecentRoutingHistory.Out"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access Forbidden (no authz)"},"429":{"description":"Too Many Requests (tarpit)"},"500":{"description":"General Error"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hotwax.co/documents/integrate-with-hotwax/components/order-routing/orders.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
