JSONAPI Quick reference
The API follows the JSONAPI spec. This page provides a summary of some of the relevant points of the specification.
Common parameters between endpoints
The include
parameter
include
parameterThe include request parameter can be included to customize which related resources should also be returned as part of the request. See JSONAPI reference on including related resources for more information.
This include parameter must be a comma-separated list of relationship paths. A relationship path is a dot-separated list of relationship names.
The extra_fields
parameter
extra_fields
parameterUse this parameter to explicitly request a field that isn't usually returned. These fields are often computationally expensive, hence why they need to be requested explicitly.
Request any extra fields of included resources in the same way as extra fields are requested on the main resource.
Examples
Including all offer information when requesting an application
Use the include
param to return all offers associated with an application, along with the offers' creator, manager, and custom attributes:
include=offers,offers.creator,offers.manager,offers.custom_attributes
To return the offers attachments use the extra_fields
param:
extra_fields[offers]=attachments
curl --request GET \
--url 'https://{your-subdomain}.pinpointhq.com/api/v1/applications/{id}?include=offers,offers.creator,offers.manager,offers.custom_attributes&extra_fields\[offers\]=attachments \
--header 'Accept: application/vnd.api+json'
--header 'X-API-KEY: {api-key}'
Updated over 3 years ago