Developers

Search for documents

Dev

Filtering, Sorting & Fields

List endpoints accept query parameters to filter, sort, shape, and expand the data they return.

Filtering and sorting

The filter and sort parameters take a JSON object expressed in MongoDB Query Language (MQL), passed as a URL-encoded string.

Parameter

Type

Description

filter

string

JSON object of MQL filter criteria, e.g. {"status":"open"}.

sort

string

JSON object of MQL sort criteria, e.g. {"createdAt":-1}.

curl "https://api.valpay.com/v1/disputes?limit=50&page=0&filter=%7B%22status%22%3A%22open%22%7D" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-API-KEY: YOUR_API_KEY"
curl "https://api.valpay.com/v1/disputes?limit=50&page=0&filter=%7B%22status%22%3A%22open%22%7D" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-API-KEY: YOUR_API_KEY"
curl "https://api.valpay.com/v1/disputes?limit=50&page=0&filter=%7B%22status%22%3A%22open%22%7D" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-API-KEY: YOUR_API_KEY"
Selecting fields

Parameter

Type

Description

selectFields

string

Comma-separated list of fields to include. If provided, excludeFields is ignored.

excludeFields

string

Comma-separated list of fields to exclude. Defaults to all fields.

populateOptions

string

JSON object describing related data to include (populate) in the results.

Not every list endpoint supports every parameter; check the Parameters table on each resource page for what an endpoint accepts.

Try it out
POST