What It Does
The Identifiers API provides two RPCs for managing product identifiers: one for reading all identifiers (active and retired) and one for creating or updating identifiers.Who It’s For
API integrators and automated systems that need to manage product identifiers programmatically.Reading Identifiers
list_product_identifiers
Returns all identifiers for a product, including both active and retired entries.
Required inputs:
| Parameter | Type | Description |
|---|---|---|
_brand_id | UUID | The brand the product belongs to |
_product_id | UUID | The product to query |
- Results are ordered: active identifiers first, then most recently retired.
- Numeric types (GTIN, EAN, UPC) include both
identifier_value(raw stored value) andidentifier_value_normalized(digits-only presentation value). - SKU values have the same raw and normalised value.
Writing Identifiers
set_product_identifier
Creates or updates an identifier for a product. If an active identifier of the same type already exists, it is retired and replaced.
Required inputs:
| Parameter | Type | Description |
|---|---|---|
_brand_id | UUID | The brand the product belongs to |
_product_id | UUID | The product to update |
_identifier_type | String | One of: sku, gtin, ean, upc |
_raw_value | String | The new identifier value |
- SKU: routed through the SKU alias swap mechanism with case-insensitive uniqueness.
- GTIN / EAN / UPC: routed through the numeric alias helper with digits-only normalisation.
- The previous active identifier (if any) is automatically retired.
- Cached fields (
products.sku,products.gtin) are updated automatically via write-through.
Limits & Notes
- Both RPCs require authentication; they are not callable by unauthenticated or anonymous users.
- Write access requires the admin role — read access requires brand membership.
- Identifier type is case-insensitive on input but stored in a canonical form.
- An identifier value cannot be shared across products within the same brand and type while active.
FAQ
Can I read identifiers without admin access?
Can I read identifiers without admin access?
Yes.
list_product_identifiers requires brand access (any role), not specifically admin.What happens if I set the same value that's already active?
What happens if I set the same value that's already active?
The operation is idempotent for the same value — no unnecessary retire/create cycle occurs.
Can I reactivate a retired identifier?
Can I reactivate a retired identifier?
Not directly via this API. Setting the same value again effectively creates a new active entry.