# Check a complete recipe change without saving

[All field references](/en/developers/field-reference) · [Product structures](/en/developers/fields-group-product-structures)

`POST /v1/product-structures/commands/preview`

The same business validation, then rolled back. saved=false does not activate a version, does not release goods and is not a stored operation record. Changes to the starting state require a new check.

Required scopes: `"products:write"`, `"product_structures:write"`, `"products:read"`.

[How to read these tables](/en/developers/field-reference#reading-the-field-tables)

## Request body

Request body required.

Content type: `application/json`

| Field | Type | Presence | null | Meaning, limits and examples |
| --- | --- | --- | --- | --- |
| $ (whole value) | object | Whole value | Not allowed | Additional properties are not allowed. |
| request_id | string | Required when parent is present | Not allowed | Identifier for this intended request; retain it when retrying the same operation. format: `"uuid"`. |
| operation | alternative (anyOf) | Required when parent is present | Not allowed | Action to perform. Select kind first, then supply the fields required by that action variant. |
| operation | object | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Action to perform. Select kind first, then supply the fields required by that action variant. Additional properties are not allowed. |
| operation.kind | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Action or record discriminator; selects the applicable fields and requirements in this object. const: `"save"`. |
| operation.definition | object | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Complete native recipe. Components cannot reference the parent article; every route target must reference a listed component slot. Saving does not silently rewrite existing orders. Additional properties are not allowed. x-meykt-unique-by: `{"parts":[["slotId"]]}`. |
| operation.definition.parentProductId | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Meykt article identifier whose native recipe is being defined. format: `"uuid"`. |
| operation.definition.parentProductVariantId | alternative (anyOf) | Required when parent is present | Allowed by schema | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Native parent variant identifier; null selects the main article recipe. |
| operation.definition.parentProductVariantId | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`.; anyOf 1/2: At least one alternative must match. Native parent variant identifier; null selects the main article recipe. format: `"uuid"`. |
| operation.definition.parentProductVariantId | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`.; anyOf 2/2: At least one alternative must match. Native parent variant identifier; null selects the main article recipe. |
| operation.definition.expectedRevision | integer | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Current recipe revision; use the revision read from the current recipe. minimum: `0`. maximum: `2147483647`. |
| operation.definition.parts | array | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Complete list of component slots. Slot UUIDs must be unique. A parent article cannot be its own component. minItems: `1`. maxItems: `100`. |
| operation.definition.parts[] | object | Every array item | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Additional properties are not allowed. |
| operation.definition.parts[].slotId | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Stable component slot UUID; retain it when editing the same component slot. format: `"uuid"`. |
| operation.definition.parts[].productId | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Meykt article identifier used by this component slot. format: `"uuid"`. |
| operation.definition.parts[].productVariantId | alternative (anyOf) | Required when parent is present | Allowed by schema | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Native variant identifier selected for this component; null selects its main article. |
| operation.definition.parts[].productVariantId | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`.; anyOf 1/2: At least one alternative must match. Native variant identifier selected for this component; null selects its main article. format: `"uuid"`. |
| operation.definition.parts[].productVariantId | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`.; anyOf 2/2: At least one alternative must match. Native variant identifier selected for this component; null selects its main article. |
| operation.definition.parts[].label | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Display label explaining this attachment or entry to the user. minLength: `1`. maxLength: `120`. |
| operation.definition.parts[].quantity | integer | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Quantity in the stated unit, represented as a JSON number by this contract. exclusiveMinimum: `0`. maximum: `1000000000`. |
| operation.definition.parts[].sortOrder | integer | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Display ordering of this component slot, starting at zero. minimum: `0`. maximum: `99`. |
| operation.definition.routes | array | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Rules deciding which personalization reaches which component slots. Targets must name slots in parts; the total number of targets across all routes must stay within the recipe limit. maxItems: `500`. |
| operation.definition.routes[] | object | Every array item | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Additional properties are not allowed. |
| operation.definition.routes[].source | alternative (anyOf) | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Source personalization field selected for this routing rule. |
| operation.definition.routes[].source | object | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`.; anyOf 1/2: At least one alternative must match. Applies to kind = `"provider_field"`. Source personalization field selected for this routing rule. Additional properties are not allowed. |
| operation.definition.routes[].source.kind | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`.; anyOf 1/2: At least one alternative must match. Applies to kind = `"provider_field"`. Action or record discriminator; selects the applicable fields and requirements in this object. const: `"provider_field"`. |
| operation.definition.routes[].source.provider | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`.; anyOf 1/2: At least one alternative must match. Applies to kind = `"provider_field"`. Provider code for this external condition mapping or source field. enum: `["shopify","etsy","woocommerce","amazon","ebay","billbee","pos","manual","b2b_portal","b2c_portal","api"]`. |
| operation.definition.routes[].source.sourceKey | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`.; anyOf 1/2: At least one alternative must match. Applies to kind = `"provider_field"`. Exact field key used by the selected source provider. minLength: `1`. maxLength: `500`. |
| operation.definition.routes[].source | object | Conditional: anyOf 2/2 | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`.; anyOf 2/2: At least one alternative must match. Applies to kind = `"compiler_variable"`. Source personalization field selected for this routing rule. Additional properties are not allowed. |
| operation.definition.routes[].source.kind | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`.; anyOf 2/2: At least one alternative must match. Applies to kind = `"compiler_variable"`. Action or record discriminator; selects the applicable fields and requirements in this object. const: `"compiler_variable"`. |
| operation.definition.routes[].source.variableId | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`.; anyOf 2/2: At least one alternative must match. Applies to kind = `"compiler_variable"`. Identifier of the configured variable selected as the source. format: `"uuid"`. |
| operation.definition.routes[].source.variableKey | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`.; anyOf 2/2: At least one alternative must match. Applies to kind = `"compiler_variable"`. Published key of the configured variable. minLength: `1`. maxLength: `120`. |
| operation.definition.routes[].mode | string | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Selected behavior from the supported modes; each mode has its own documented requirements. enum: `["append","replace","exclude"]`. |
| operation.definition.routes[].targetSlotIds | array | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Component slot identifiers receiving the selected personalization. maxItems: `100`. uniqueItems: `true`. |
| operation.definition.routes[].targetSlotIds[] | string | Every array item | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. format: `"uuid"`. |
| operation.definition.routes[].overwriteExisting | boolean | Required when parent is present | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Whether this route may replace an existing value on its selected targets. |
| operation.definition.routes[].compileTargetVariable | string | Optional | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. Optional target variable name: starts with a letter or underscore, then letters, digits or underscores. Whitespace is trimmed; a surrounding {{...}} is accepted and removed. An empty value means not set. maxLength: `120`. pattern: `"^[A-Za-z_][A-Za-z0-9_]*$"`. |
| operation.definition.fulfillmentMode | string | Optional | Not allowed | anyOf 1/2: At least one alternative must match. Applies to kind = `"save"`. atomic fulfills the set as a whole; per_part fulfills its components separately. Default: `"atomic"`. enum: `["atomic","per_part"]`. |
| operation | object | Conditional: anyOf 2/2 | Not allowed | anyOf 2/2: At least one alternative must match. Applies to kind = `"archive"`. Action to perform. Select kind first, then supply the fields required by that action variant. Additional properties are not allowed. |
| operation.kind | string | Required when parent is present | Not allowed | anyOf 2/2: At least one alternative must match. Applies to kind = `"archive"`. Action or record discriminator; selects the applicable fields and requirements in this object. const: `"archive"`. |
| operation.product_id | string | Required when parent is present | Not allowed | anyOf 2/2: At least one alternative must match. Applies to kind = `"archive"`. Meykt article identifier; not its SKU or an external system identifier. format: `"uuid"`. |
| operation.structure_id | string | Required when parent is present | Not allowed | anyOf 2/2: At least one alternative must match. Applies to kind = `"archive"`. Identifier of the native recipe being archived. format: `"uuid"`. |
| operation.expected_revision | integer | Required when parent is present | Not allowed | anyOf 2/2: At least one alternative must match. Applies to kind = `"archive"`. Current native recipe revision; an outdated revision rejects the archive request. minimum: `0`. maximum: `2147483647`. |

## Response 200

200: Success

Content type: `application/json`

| Field | Type | Presence | null | Meaning, limits and examples |
| --- | --- | --- | --- | --- |
| $ (whole value) | object | Whole value | Not allowed | Additional properties are not allowed. |
| data | object | Required when parent is present | Not allowed | Authorized response payload or documented event data. Additional properties are not allowed. |
| data.saved | boolean | Required when parent is present | Not allowed | Whether this operation persisted a change; false identifies a preview rather than a booking. const: `false`. |
| data.product_id | string | Required when parent is present | Not allowed | Meykt article identifier; not its SKU or an external system identifier. format: `"uuid"`. |
| data.variant_id | alternative (anyOf) | Required when parent is present | Allowed by schema | Native Meykt variant identifier; null refers to the main article where allowed. |
| data.variant_id | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Native Meykt variant identifier; null refers to the main article where allowed. format: `"uuid"`. |
| data.variant_id | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/2: At least one alternative must match. Native Meykt variant identifier; null refers to the main article where allowed. |
| data.structure_id | alternative (anyOf) | Required when parent is present | Allowed by schema | Identifier of the native recipe being archived. |
| data.structure_id | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Identifier of the native recipe being archived. format: `"uuid"`. |
| data.structure_id | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/2: At least one alternative must match. Identifier of the native recipe being archived. |
| data.before_fingerprint | string | Required when parent is present | Not allowed | Opaque fingerprint of the state inspected by the preview. pattern: `"^[a-f0-9]{64}$"`. |
| data.current_revision | integer | Required when parent is present | Not allowed | Current saved recipe revision inspected by this preview. minimum: `0`. maximum: `2147483647`. |
| data.result_revision | integer | Required when parent is present | Not allowed | Recipe revision that saving this change would produce. minimum: `0`. maximum: `2147483647`. |
| data.reused | boolean | Required when parent is present | Not allowed | Whether an existing identical version was reused. |
| data.part_count | integer | Required when parent is present | Not allowed | Number of component slots in the recipe. minimum: `0`. maximum: `100`. |
| data.route_count | integer | Required when parent is present | Not allowed | Number of personalization routing rules in the recipe. minimum: `0`. maximum: `500`. |
| data.activation | string | Required when parent is present | Not allowed | Outcome of activating this native recipe version. enum: `["activated_by_save","archived"]`. |
| data.stock_publication_stale | boolean | Required when parent is present | Not allowed | Whether the warehouse publication no longer matches the current native recipe and needs explicit republishing. |

## Response 401, 403, 404, 409, 422, 429, 500, 503

401: The key is missing, unknown, revoked or expired. 403: The key lacks a required scope, or the operation requires a live key. 404: Not found. Also applies to IDs that belong to another organization — we deliberately do not distinguish between "does not exist" and "does not belong to you". 409: The same ID already exists with different content. It is never overwritten. 422: Content validation failed. The response lists all affected locations at once. 429: A rate limit was reached and the request did not run. Wait for Retry-After, then repeat it unchanged. X-RateLimit-Scope names the limit: key (120 requests per minute), organization (300 per minute across all keys), write (1,000 at once, refilling at 60 per minute) or list (300 unfiltered list pages at once, refilling at 10 per minute). 500: Unexpected error on our side. 503: Temporarily unavailable. Repeat the same request with the same business identity.

Content type: `application/json`

| Field | Type | Presence | null | Meaning, limits and examples |
| --- | --- | --- | --- | --- |
| $ (whole value) | object | Whole value | Not allowed | — |
| error | object | Required when parent is present | Not allowed | Machine-readable error code; use it to select the documented recovery path. |
| error.code | string | Required when parent is present | Not allowed | Machine-readable, permanently stable error code. Program against it, not against message. |
| error.message | string | Required when parent is present | Not allowed | Explanation for humans. May change at any time. |
| error.field | string | Optional | Not allowed | Affected location in the request, if it can be determined. |
| error.doc_url | string | Required when parent is present | Not allowed | Documentation link explaining this API error. format: `"uri"`. |
