# Get Order

## Get Order

<mark style="color:green;">**`GET`**</mark> `/v1/order/{id}`

Get an order by unique ID.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <idToken>` |

**Response**

{% tabs %}
{% tab title="201" %}

```json
{
    "statusCode": 200,
    "statusMessage": "OK",
    "order": {
            "id": "cdcf...",
            "code": "4JA...",
            "amount": "100",
            "receivedAmount": "90",
            "realAmount": "45",
            "product": "PS", // Product Code
            "status": "Issue", //
            "createdAt": "2024-10-20T12:30:31.995Z",
            "updatedAt": "2024-10-20T15:55:28.459Z"
        }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "statusCode": 400,
    "statusMessage": "Order ID is required"
}
```

{% endtab %}

{% tab title="404" %}

```json
{
    "statusCode": 404,
    "statusMessage": "Order not found or does not belong to you"
}
```

{% endtab %}

{% tab title="500" %}

```json
{
    "statusCode": 500,
    "statusMessage": "Internal Server Error",
    "error": "Cannot destructure property 'id' of 'body' as it is null."
}
```

{% endtab %}
{% endtabs %}


---

# 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.senmo.io/foundry-platform/orders/get-order.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.
