Migrate product clients for FAMILY and response changes
Prepare MAPI and PAPI integrations for the FAMILY product type, new hierarchy fields, and removal of legacy Sync fields.
A coordinated Bluestone PIM API release introduces the FAMILY product type and removes three deprecated legacy Sync fields from product responses.
The hierarchy additions are backward-compatible for clients that accept unknown properties and enum values. The field removal can break generated DTOs, strict response schemas, or application code that still expects the removed properties.
Use this guide to review Management API (MAPI) and Public API (PAPI) integrations before adopting an updated API definition.
Changes at a glance
| API | Change | Main compatibility risk |
|---|---|---|
| MAPI | Adds FAMILY, groupParentId, and productGroups | Strict schemas or enums may reject new properties or the new enum value |
| MAPI | Removes state, contextStates, and dataSynced from product responses | Code or schemas that require the removed properties may fail |
| PAPI | Adds FAMILY, groups, and groupParentId | Strict ProductType handling may reject published FAMILY products |
The changes ship together so integrations need one coordinated compatibility review.
Determine whether you need to act
| Client behavior | Action |
|---|---|
| Ignores unknown response properties and does not use the removed fields | Run regression tests; a code change is usually not required |
| Uses generated DTOs or strict JSON Schema validation | Regenerate the client from the updated OpenAPI definition and retest |
Reads state, contextStates, or dataSynced | Remove those references before adopting the updated response schemas |
| Strictly validates the MAPI or PAPI product type enum | Add support for FAMILY |
| Consumes PAPI but does not publish FAMILY products | The new type will not appear yet, but update and test enum handling before FAMILY products are published |
MAPI hierarchy additions
MAPI adds a third hierarchy level:
FAMILY -> GROUP -> VARIANTThe product type enum gains FAMILY. Existing product responses can also contain:
| Field | Type | Meaning |
|---|---|---|
groupParentId | string or null | ID of the FAMILY containing a GROUP; null for a standalone GROUP |
productGroups | string[] | Ordered GROUP product IDs assigned to a FAMILY |
The existing variantParentId and productVariants fields do not change.
These additions affect product detail, list, view, filter, cursor, and connection responses where the new fields apply.
For instructions on creating and managing the hierarchy, see Work with product families, groups, and variants.
Removed MAPI fields
The following legacy Sync fields are removed from product response schemas:
| Field | Previous type | Removed from |
|---|---|---|
state | PublishState | ProductAll, ProductConnectionMetadata |
contextStates | Map<string, PublishState> | ProductAll, ProductConnectionMetadata, ProductMetadataViewDto |
dataSynced | boolean | ProductAll, ProductConnectionMetadata, ProductMetadataViewDto |
The fields were deprecated and returned null for current integrations. Remove application logic, generated-model overrides, fixtures, and schema requirements that still reference them.
The PublishState enum is no longer referenced by these product responses.
Affected MAPI operations
Any operation that returns one of the affected schemas can change. Review at least:
GET /pim/products/{id};- product list and filter operations;
- product view operations, including requests by ID;
- cursor and view-cursor operations; and
- product connection, variant, and group subresources that return
ProductConnectionMetadata.
This list is not exhaustive. Use the updated PIM OpenAPI definition to find every operation that returns ProductAll, ProductConnectionMetadata, or ProductMetadataViewDto.
PAPI response changes
PAPI adds the FAMILY value to ProductType and adds two optional product properties:
| Field | Returned for | Meaning |
|---|---|---|
groups | FAMILY products | Ordered list of GROUP product IDs |
groupParentId | GROUP products assigned to a FAMILY | ID of the containing FAMILY |
The fields are absent for SINGLE and VARIANT products and for standalone GROUP products.
FAMILY products appear in PAPI only after they are published. A generated client or strict validator that accepts only the previous product type values can fail as soon as a FAMILY product is published.
Migration procedure
1. Find strict assumptions
Search your integration for:
- closed product type enums;
- required-property lists for product response schemas;
- generated DTOs containing
state,contextStates, ordataSynced; - custom serialization or deserialization logic;
- database mappings and analytics transformations based on the removed fields; and
- fixtures or contract tests that compare complete product response objects.
2. Download the correct OpenAPI definitions
Use the definitions for the environment and documentation version your integration targets. See Environments and Generate SDKs and client code from OpenAPI.
Do not generate a Production client from a Test definition without confirming that the API changes have reached Production.
3. Regenerate typed clients
Regenerate MAPI clients from the updated PIM definition and PAPI clients from the updated Bluestone Public API definition.
Review the generated diff before merging it. Confirm that:
FAMILYis present in every relevant product type enum;groupParentIdandproductGroupsare optional or nullable according to the MAPI schema;groupsandgroupParentIdare optional in the PAPI model; andstate,contextStates, anddataSyncedare no longer required or referenced in the affected MAPI models.
4. Update application code
- Remove reads and transformations based on the three legacy Sync fields.
- Add
FAMILYhandling to switches, match expressions, validators, and user-interface mappings. - Keep GROUP-to-VARIANT logic unchanged.
- Distinguish MAPI's
productGroupsfrom PAPI'sgroupswhen mapping between models. - Treat a missing PAPI
groupParentIdas not applicable rather than as a malformed response.
5. Run compatibility tests
Test at least the following cases:
- Deserialize an existing SINGLE product.
- Deserialize a standalone GROUP with no FAMILY parent.
- Deserialize a FAMILY with an ordered
productGroupslist. - Deserialize an assigned GROUP with both
groupParentIdandproductVariants. - Deserialize a VARIANT and confirm
variantParentIdbehavior is unchanged. - Process a product response in which
state,contextStates, anddataSyncedare absent. - Process a PAPI FAMILY response with
typeset toFAMILYand agroupslist. - Confirm that complete-object fixtures and schema snapshots do not require the removed fields.
Run these tests against the Test environment before deploying the updated client to Production.
6. Coordinate publication of FAMILY products
Update strict PAPI consumers before publishing FAMILY products. If multiple downstream systems consume PAPI, confirm that each system accepts ProductType=FAMILY before the first FAMILY is published.
Rollout checklist
- Confirm the API change is deployed in the target environment.
- Regenerate strict or generated MAPI and PAPI clients.
- Add
FAMILYto product type handling. - Remove
state,contextStates, anddataSynceddependencies. - Update fixtures, schema snapshots, and database mappings.
- Run MAPI product detail, list, view, cursor, and connection tests.
- Run a PAPI test with a published FAMILY product if your integration consumes PAPI.
- Deploy updated PAPI consumers before publishing FAMILY products in Production.
Related guides
Updated about 2 months ago
