Skip to main content
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. The examples use request.mjs, the HTTP script from the quickstart.

Load the profile

Call GET /private/client 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
Excerpt from a 200 response for a key without balance access.
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

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].
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.
  • 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

Show published reviews

Call GET /private/reviews 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.
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 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.
review.json
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 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 · Error codes