Overview
The header_only=true parameter is an API query option used to retrieve only header-level (summary) data of a resource, excluding all nested or child-level details.
This parameter is supported across key modules such as:
- Customers
- Subscriptions
- Invoices
- Payments
- Workflow
It is primarily used to optimize performance and reduce response payload size.
Purpose
The header_only parameter enables:
- Faster API response times
- Reduced payload size
- Targeted data retrieval
- Efficient bulk data processing
How It Works
With header_only=true
- Returns:
- Only top-level fields
- Excludes the child objects:
- Line items
- Child objects
- Detailed transactional data
Supported Modules & Endpoints
Subscription API
| GET {{url}}/api/v1/subscriptions/{id}?header_only=true |
Sample Response:
Includes
- Subscription ID
- Customer details
- Status
- Contract dates
- Currency
- Custom fields
Invoice API
| GET {{url}}/api/v1/invoices/{id}?header_only=true |
Includes
- Invoice ID
- Customer details
- Invoice amount
- Status
- Dates
- Billing contact
Payment API
| GET {{url}}/api/v1/payments/{id}?header_only=true |
Includes
- Payment ID
- Customer details
- Payment amount
- Status
- Applied/unapplied amounts
Response Structure
Header-Level Fields (Included)
- ID
- Customer ID / Name
- Status
- Dates (created, updated, effective dates)
- Currency
- Summary amounts
- Custom fields
Excluded Fields
- Line items
- Pricing breakdown
- Usage data
- Nested child objects
- Detailed transaction records
Filtering & Data Retrieval
Identifier-Based Retrieval
Fetch a specific record:
| GET /api/v1/subscriptions/S-00001?header_only=true |
Bulk Retrieval (Optimized)
- Use:
- Filters
- Pagination
- header_only=true
Ensures:
- Minimal payload
- Faster execution
Conditional Data Control
- Include/exclude child attributes using:
- true / false flags
- Combine with filters for precise queries
Sample Examples
Subscription
| GET {{url}}/api/v1/subscriptions/S-00001?header_only=true |
Invoice
| GET {{url}}/api/v1/invoices/INV-00001?header_only=true |
Payment
| GET {{url}}/api/v1/payments/PMT-00003?header_only=true |
For more information, see List Customer API documentation
Comments
0 comments
Please sign in to leave a comment.