# 2025-11-07: Schema Service - references

## Overview

The Schema Service has been enhanced with support for references. These updates include:

* New `REFERENCE` mixin schema attribute type for custom schema types, allowing references to products, orders, carts, customers, media, prices, price lists, customer segments, categories and other custom schema types.
* New `validateReferences` query parameter to control reference validation during create, upsert, and patch operations.
* New `expand` query parameter to retrieve expanded reference data.
* New `media` field in custom instance responses containing IDs of media assigned to the custom instance.

## Updated endpoints

| Endpoint                                                                                                                                                                                          | Description                                                                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [Creating a custom instance](https://developer.emporix.io/api-references/api-guides/utilities/schema/api-reference/custom-instance#post-schema-tenant-custom-entities-type-instances)             | Added `validateReferences` query parameter.                                                           |
| [Upserting a custom instance](https://developer.emporix.io/api-references/api-guides/utilities/schema/api-reference/custom-instance#put-schema-tenant-custom-entities-type-instances-id)          | Added `validateReferences` query parameter.                                                           |
| [Patching a custom instance](https://developer.emporix.io/api-references/api-guides/utilities/schema/api-reference/custom-instance#patch-schema-tenant-custom-entities-type-instances-id)         | Added `validateReferences` query parameter.                                                           |
| [Creating custom instances in bulk](https://developer.emporix.io/api-references/api-guides/utilities/schema/api-reference/custom-instance#post-schema-tenant-custom-entities-type-instances-bulk) | Added `validateReferences` query parameter.                                                           |
| [Upserting custom instances in bulk](https://developer.emporix.io/api-references/api-guides/utilities/schema/api-reference/custom-instance#put-schema-tenant-custom-entities-type-instances-bulk) | Added `validateReferences` query parameter.                                                           |
| [Retrieving all custom instances](https://developer.emporix.io/api-references/api-guides/utilities/schema/api-reference/custom-instance#get-schema-tenant-custom-entities-type-instances)         | Added `expand` query parameter for fetching expanded references. Added `media` field to the response. |
| [Retrieving a custom instance](https://developer.emporix.io/api-references/api-guides/utilities/schema/api-reference/custom-instance#get-schema-tenant-custom-entities-type-instances-id)         | Added `expand` query parameter for fetching expanded references. Added `media` field to the response. |
| [Searching for custom instances](https://developer.emporix.io/api-references/api-guides/utilities/schema/api-reference/custom-instance#post-schema-tenant-custom-entities-type-instances-search)  | Added `expand` query parameter for fetching expanded references. Added `media` field to the response. |
| [Creating a schema](https://developer.emporix.io/api-references/api-guides/utilities/schema/api-reference/schema#post-schema-tenant-schemas)                                                      | The `REFERENCE` attribute type is now available for custom schema types.                              |
| [Updating a schema](https://developer.emporix.io/api-references/api-guides/utilities/schema/api-reference/schema#put-schema-tenant-schemas-id)                                                    | The `REFERENCE` attribute type is now available for custom schema types.                              |

## Known problems

There are no known problems.
