Skip to Content
DocumentationAPI ReferencesetPayloadIncludeReference

setPayloadIncludeReference()

Sets the key ARM reads from each included item to determine which collection it belongs to.

Defaults to 'type', matching the JSON:API convention where included[].type names the resource type. Override this if your API uses a different field name.

Kind: global function

ParamTypeDescription
keystringThe property name to read from each included record (default: 'type').

Example

// JSON:API default - included items have a `type` field ARM.setPayloadIncludeReference('type')

Example

// Custom API that uses `resource_type` instead ARM.setPayloadIncludeReference('resource_type')
Last updated on