The Include Parameter

All endpoints support an optional include query parameter that controls which fields are returned in the response. When provided, only the specified fields are included instead of the full object — useful for reducing payload size when you only need a subset of data.

Usage

include accepts a comma-separated list of field paths. Nested paths are supported using dot notation.

include=firstName,lastName,emailAddress
include=firstName,contact.phone,contact.mobile.number

Example

Retrieve only the name and email of a customer:

$curl -X GET "https://api.astutepayroll.com/customers/45b0d09b-bc25-4b45-af21-dc15cba56ce2?include=entityName,email" \
> -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
> -H "x-tenant-id: YOUR_TENANT_ID"
1{
2 "entityName": "Acme Corp",
3 "email": "billing@acme.com"
4}

When include is omitted, the full object is returned.