# GET /orders

## GET /orders/{reference}

> Get order status by reference ---- \[auth scope:  api-user]

```json
{"openapi":"3.0.0","info":{"title":"Merchant API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"GetOrderResponse":{"type":"object","properties":{"merchantReference":{"type":"string","description":"The merchant reference"},"status":{"type":"string","description":"The status of the order transaction"},"amount":{"type":"number","description":"The total order amount"},"surcharge":{"type":"number","description":"The fee charged to the payer"},"currency":{"type":"string","description":"The currency used for the order transaction"},"provider":{"type":"string","description":"The APM provider processing the order transaction"},"updatedAt":{"type":"string","description":"The last time an update was made to the order transaction"},"failureReason":{"type":"string","description":"The Failure reason for the error transactions"},"bnplOrderId":{"type":"string","description":"The APM OrderId for the transactions"},"transactionReference":{"type":"string","description":"The unique transaction reference"},"rejectReason":{"type":"string","description":"The Reject reason for the error transactions"},"partnerConfiguration":{"type":"object","description":"The partner configucation"},"cancelledBy":{"type":"string","description":"The order is cancelled by user, merchant or system"},"captureStatus":{"type":"string","description":"The capture status of an authorized order"}},"required":["merchantReference","status","amount","surcharge","currency","provider","updatedAt","failureReason","bnplOrderId","transactionReference","rejectReason","partnerConfiguration","cancelledBy","captureStatus"]},"BadRequestResponse":{"type":"object","properties":{"statusCode":{"type":"number","description":"statusCode"},"message":{"type":"string","description":"message"}},"required":["statusCode","message"]},"UnauthorizedResponse":{"type":"object","properties":{"statusCode":{"type":"number","description":"statusCode"},"message":{"type":"string","description":"message"}},"required":["statusCode","message"]},"NotFoundResponse":{"type":"object","properties":{"statusCode":{"type":"number","description":"statusCode"},"message":{"type":"string","description":"message"}},"required":["statusCode","message"]}}},"paths":{"/orders/{reference}":{"get":{"operationId":"OrdersController_getOrderStatus","summary":"Get order status by reference ---- [auth scope:  api-user]","deprecated":false,"parameters":[{"name":"reference","required":true,"in":"path","description":"The order reference received on payment order creation","schema":{}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}}},"tags":["orders"]}}}}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.optty.com/direct-api-orders/order-flow/get-orders.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
