Paytrim
Reports

Search orders

POST
/v1/search/orders/

Finds orders with a query and returns them as JSON, or as a CSV transaction report with ?format=csv.

Simple paging with start and size returns at most 10,000 results. Use search_after for more.

Authorization

apiKey
headerAuthorizationBasic <token>

Use your project's API key as the username and leave the password empty. Only use the API key from your server: it gives full access to your project.

Query Parameters

format?"csv"

csv returns a CSV report instead of JSON.

Value in"csv"

Request Body

application/json
  1. body
query*string

Search query. * matches all orders. Filter on a field with field:value, such as status:completed, or on a range with field:[from TO to], such as created:[2026-09-01 TO 2026-09-01].

size?integer

Number of results per page. Use the same value in every request.

Range1 <= value
start?integer

Position of the first result, for simple paging. Don't combine with search_after.

sort?string

Field and direction to sort on, such as created asc. Use the same value in every request.

search_after?string

Cursor for paging through more than 10,000 results. -1 for the first page, then the sort value of the previous response.

Response Body

The matching orders, as JSON or as a CSV report with one row per transaction.

  1. response

The matching orders, and the sort value to pass as search_after for the next page.

curl -X POST 'https://api.pay.paytrim.com/v1/search/orders/' \  -H 'Content-Type: application/json' \  -d '{  "query": "*",  "size": 100,  "start": 1,  "sort": "created asc"}'
{}