> ## Documentation Index
> Fetch the complete documentation index at: https://exchanger-api.iexexchanger.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer profile, order history, and reviews

> Display a customer's profile and exchange history, open an order by its identifier, and submit the owner's review for moderation using signed requests.

Read the key owner's profile, load their orders, and add a review form to the exchange details page. Private requests require a [Bearer token and HMAC v2 signature](https://exchanger-api.iexexchanger.com/en/start/authentication.md). The examples use `request.mjs`, the HTTP script from the [quickstart](https://exchanger-api.iexexchanger.com/en/start/quickstart.md).

## Load the profile

Call [GET /private/client](https://exchanger-api.iexexchanger.com/en/api-reference/client/get-private-client.md) with the `public-api:client:read` scope. The response describes the token owner. For `403 api_user_disabled`, check whether API access is enabled for the account. For `api_admin_account_denied`, check the exchanger's restrictions for administrators. For `scope_denied`, check the key's scopes. [Configure API access](https://exchanger-api.iexexchanger.com/en/start/access.md)

```bash theme={null}
node request.mjs GET '/api/v3/private/client'
```

Excerpt from a `200` response for a key without balance access.

```json theme={null}
{
  "state": 0,
  "result": {
    "id": 42,
    "name": "Test customer",
    "is_email_verified": true,
    "is_account_verified": false,
    "balance": null,
    "orders": { "total": 8, "completed": 6, "rejected": 1, "active": 1 }
  }
}
```

Use `orders` for the counts and `api_token.scopes` to inspect the current key's access. With `public-api:client:balance:read`, `balance` contains `available`, `hold`, and `currency`. Handle `null` separately from an available balance of `"0"`.

## Display exchange history

| To | Request | Scope |
| - | - | - |
| Find the owner's orders | [GET /private/orders](https://exchanger-api.iexexchanger.com/en/api-reference/orders/get-private-orders.md) | `public-api:orders:read` |
| Open one order | [GET /private/orders/{order}](https://exchanger-api.iexexchanger.com/en/api-reference/orders/get-private-orders-by-order.md) | `public-api:orders:detail:read` or `public-api:orders:read` |
| Read the order status catalog | [GET /public/orders/statuses](https://exchanger-api.iexexchanger.com/en/api-reference/orders/get-public-orders-statuses.md) | Public request |

Request the first page of paid and completed orders, newest first. The example URL already encodes the indexed parameters `filter[status][0]` and `filter[status][1]`.

```bash theme={null}
node request.mjs GET '/api/v3/private/orders?page=1&per_page=25&sort=-created_at&filter%5Bstatus%5D%5B0%5D=paid&filter%5Bstatus%5D%5B1%5D=completed'
```

The list is in `result[]`. Use the selected item's `tracking_id` or `public_id` in the detail path. Store both as strings. The operation also accepts the internal positive `id` and returns the order directly in `result`. A missing order or an order belonging to another customer returns `404`. If an identifier matches multiple orders for the same owner, the API returns `422` with a validation issue for `order`. Retry the read with the `tracking_id` from the list.

```bash theme={null}
node request.mjs GET '/api/v3/private/orders/review-owned-order'
```

* Use `status.key` for application logic and the localized `status.name` for display. The catalog returns status definitions in `result.statuses`.
* Use `filter[status]` with a built-in status key or the `active` and `final` groups. Use `filter[status_id]` with numeric IDs for built-in statuses. Combining the two filters returns `422`.
* `filter[currency]` matches the currency code or export designation on either side of the route. `filter[amount_min]` and `filter[amount_max]` apply to the amount the customer gives.
* For a long history, start with `pagination=cursor&sort=-id`. Pass `meta.pagination.next_cursor` unchanged on the next request and keep the same filters and sort order. Use page-based pagination to sort by `created_at`. [Response format and pagination](https://exchanger-api.iexexchanger.com/en/start/protocol.md)

## Show published reviews

Call [GET /private/reviews](https://exchanger-api.iexexchanger.com/en/api-reference/reviews/get-private-reviews.md) with `public-api:reviews:read`. For example, `filter%5Brating%5D=5` returns reviews rated 5. `result[]` contains published reviews for orders eligible for public display. The `order` field is populated for the order owner. Other readers receive `null`.

```bash theme={null}
node request.mjs GET '/api/v3/private/reviews?filter%5Brating%5D=5&sort=-created_at'
```

For `filter[order_id]` on the review list, use the order's internal numeric `id`. A published record with a rating of `0` has no customer rating.

## Submit a review for moderation

Take the `tracking_id` of an order you own and send a signed [POST /private/reviews](https://exchanger-api.iexexchanger.com/en/api-reference/reviews/post-private-reviews.md) with `public-api:reviews:write`. If there is no `tracking_id`, pass `public_id` or the internal `id` as a string in `order_id`. Send one identifier of up to 64 characters. The `name` and `text` fields are required and limited to 40 and 200 characters. `rating` is optional. If you include it, send an integer from 1 to 5.

Save this example as `review.json` and substitute your own test order identifier.

```json review.json theme={null}
{
  "tracking_id": "review-owned-order",
  "name": "Test customer",
  "text": "I could see the order status at each step.",
  "rating": 5
}
```

```bash theme={null}
node request.mjs POST '/api/v3/private/reviews' --json review.json --idempotency-key review-test-001
```

The `201` response contains `result.review.id`, `result.review.rating`, and `result.review.status.name: "moderation"`. The review appears in the feed after publication. A customer can submit one review per order. Submitting a review also publishes a [`review.created`](https://exchanger-api.iexexchanger.com/en/guides/reliability/webhooks) event.

If you lose the response, retry with the original body, the same `Idempotency-Key`, and a fresh signature. While the HTTP receipt is retained, a replay can return it with `Idempotency-Replayed: true`. After receipt expiry, the same order returns `422` if its review was already saved. The API also returns `422` when review submissions are disabled. An order belonging to another customer returns `404`. [Idempotency](https://exchanger-api.iexexchanger.com/en/guides/reliability/idempotency.md) · [Error codes](https://exchanger-api.iexexchanger.com/en/guides/reliability/errors.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.