Skip to main content

Field Inclusion

Use the fields query parameter to limit which fields are returned in the response. By default, all fields are included, except those marked as Deferred which need to be targeted with the expand parameter. When fields is provided, only the specified fields are returned. This parameter is available on all API requests, and applies to the response only. It works on single retrieved objects as well as listed collections.

This helps reduce response size and improve performance, especially for deeply nested or large objects.

Syntax

Pass a comma-separated list of field names in the query string. To request fields from nested objects, use dot notation.

Examples

Request only top-level fields

GET /api/v2/customers/123?fields=id,email

{
"id": 123,
"email": "jane@example.com"
}

Request nested fields

GET /api/v2/attendances?fields=event.name,customer.id,customer.email

{
"count": 2323,
"results": [
{
"event": {
"name": "Spin"
},
"customer": {
"id": 123,
"email": "jane@example.com"
}
}
/// more results...
]
}