Work with the Reach Team for ImplementationWhile this documentation provides comprehensive details on custom resources & schema references, we recommend working directly with our team during implementation. Schema references are powerful but complex, and our team can provide guidance, best practices, and hands-on support to ensure a smooth integration.Please contact Reach to schedule a collaborative session for implementing custom resources and schemas in your integration.
$ref
keyword along with our custom URI scheme reach:schemas/{schemaIdOrName}
.
All schemas in the platform are fully compliant with JSON Schema, an industry standard for defining the structure of JSON data. If you’re new to JSON Schema, we recommend reviewing the official documentation to understand the syntax and capabilities.
Customer
Order_Items
shipping-method
product_variant_2023
Customer Schema
(contains space)Order & Items
(contains special character)User's Profile
(contains apostrophe)Schema lookups are case-insensitive, but the original capitalization is preserved. This means you cannot have both “Order” and “ORDER” as separate schemas, as they are considered the same schema for lookup purposes.
user_schema
: Used for storing user-related information and profiles.custom_schema
: Used for data models which do not have any info related to billing or users.contacts_schema
: Used for storing contact information.transactions_schema
: Used for transaction-related data.combined_schema
: A special category that can contain both user data and event data. This is useful when you need to track both user information and billable event information in a single schema.$ref
properties:
You can use either schema IDs or schema names in your $ref
values.
When using schema names in references, the referenced schemas must exist and be defined for the same platform. References are case-insensitive, so"$ref": "reach:schemas/order"
and"$ref": "reach:schemas/Order"
both work.
reference_schemas
array$ref
keyword in your schema properties to reference the other schema/api/resources/:schemaDefinitionNameOrId
endpoint, you can create or update resources with schema references. This endpoint automatically validates the data against the schema definition including any references.
The referenced resources (in this case, order-456, etc.) must already exist in the system. If they don’t, the validation will fail.
/api/resources/:schemaDefinitionNameOrId/:externalId
endpoint with the include parameter, the system will automatically resolve references to their full objects:
/api/resources/:schemaDefinitionNameOrId
endpoint:
include
query parameter to automatically resolve references:
filters
query parameter:
%20
).
reference_schemas
array.
For example, a Company
schema might reference both Customer
and Order
schemas:
description
field that provides details about the schema’s purpose and usage. This makes it easier for developers to understand the schema’s intent and improves documentation.
The description should:
reference_schemas
field of the schema definitionreach:schemas/
prefix