Build the SKU grid

POST/v2/experiences/{experienceId}/retail-skus/generate

Requires your API key in the X-API-Key header.

Builds the product's SKUs from its current variation values, one per combination, and returns them. Organizer only (403 otherwise); 400 (RETAIL_EXPERIENCE_REQUIRED) when the experience is not a retail product. No request body, and safe to repeat. New combinations arrive disabled and unpriced; existing SKUs keep their price, stock and settings; combinations that no longer exist leave the grid, and come back with their old settings if their values return. A product with no axes gets exactly one SKU; an axis with no values leaves the grid empty.

Requestbash
curl -X POST "https://api.turneo.co/v2/experiences/8e7d6c5b-4a39-4281-90ef-1a2b3c4d5e6f/retail-skus/generate" \
  -H "X-API-Key: <your-api-key>"

Path parameters

  • experienceIdstring (uuid)required

    UUID of the retail product.

    Example:
    8e7d6c5b-4a39-4281-90ef-1a2b3c4d5e6f

Responses

200object

What changed, plus the resulting SKUs.

  • summaryobject

    What the call changed.

    Child fields
    • createdinteger

      New combinations, created disabled and unpriced.

      Example:
      2
    • revivedinteger

      Combinations that came back, with their earlier settings.

      Example:
      1
    • deactivatedinteger

      SKUs whose combination no longer exists, taken out of the grid.

      Example:
      0
    • unchangedinteger

      SKUs left as they were.

      Example:
      4
  • skusobject[]

    Every SKU of the product after the call.

    Child fields
    • idstring (uuid)

      SKU UUID. Send it as retailSkuId to buy this SKU on an order.

      Example:
      8f14e45f-ceea-4e5b-b0d4-9f3c1a2b3c4d
    • skuCodestringnullable

      Your own stock-keeping code for this SKU.

      Limits:
      up to 64 characters
      Example:
      TSHIRT-RED-M
    • attributeValueIdsstring (uuid)[]

      The variation values this SKU is made of. Empty for a product without variations.

    • sortOrderinteger

      Position of the SKU in the grid.

      Example:
      0
    • pricestringnullable

      Unit price as a decimal string, in the organizer's default currency. Null until the SKU is priced.

      Example:
      24.00
    • tracksStockboolean

      Whether stock is counted for this SKU. When false it sells without limit.

      Example:
      true
    • stockQuantityintegernullable

      Units on hand. Read-only; it changes through the stock actions, sales and returns. Null until stock is first added. Units held in unconfirmed orders are not subtracted here.

      Example:
      12
    • isEnabledboolean

      Whether the SKU is on sale. Can't be true while price is null. New SKUs start disabled.

      Example:
      true
    • imageIdstring (uuid)nullable

      The SKU's own image, chosen from the product's images. Null means the product's first image is shown.

      Example:
      3c4d5e6f-7a8b-4c9d-8e1f-2a3b4c5d6e7f
    • extraFieldsobject[]

      Questions the buyer answers when buying this SKU.

      Child fields
      • idstring (uuid)

        Question UUID. Answers are keyed by it.

        Example:
        aa1bb2cc-3dd4-4ee5-9ff6-0a1b2c3d4e5f
      • namestring or map of string

        Multilingual text field. Stored as an object keyed by language code (en, de, it, es, fr, hr, sl, pt, zh, zh-hant, ja, ko, ru; machine translations are stored under <lang>_auto keys internally). On read it is returned as a single string resolved for the requested language (falling back to English when the object is not consistently translated), or as the full per-language object when showTranslations=true is passed. On write, either a plain string (stored as English) or a partial per-language object is accepted.

        Accepted shapes
        • Either string

        • Or map of string

      • sortOrderinteger

        Order the questions are asked in.

        Example:
        0
      • fieldTypestring

        QUESTION takes free text; CHECKBOX takes "true" or "false".

        Allowed values:
        QUESTIONCHECKBOX
        Example:
        QUESTION
      • requiredboolean

        Whether the question must be answered before the order can be confirmed. A required CHECKBOX must be ticked.

        Example:
        false
Response 200json
{
  "summary": {
    "created": 2,
    "revived": 1,
    "deactivated": 0,
    "unchanged": 4
  },
  "skus": [
    {
      "id": "8f14e45f-ceea-4e5b-b0d4-9f3c1a2b3c4d",
      "skuCode": "TSHIRT-RED-M",
      "attributeValueIds": [
        "9a8b7c6d-5e4f-4a3b-8c1d-0e9f8a7b6c5d"
      ],
      "sortOrder": 0,
      "price": "24.00",
      "tracksStock": true,
      "stockQuantity": 12,
      "isEnabled": true,
      "imageId": "3c4d5e6f-7a8b-4c9d-8e1f-2a3b4c5d6e7f",
      "extraFields": [
        {
          "id": "aa1bb2cc-3dd4-4ee5-9ff6-0a1b2c3d4e5f",
          "name": "Sunset Kayak Tour",
          "sortOrder": 0,
          "fieldType": "QUESTION",
          "required": false
        }
      ]
    }
  ]
}

Errors

400

Validation failed. Inspect errors[].field and errors[].code.

401

Missing or invalid X-API-Key header.

403

The API key is valid but not allowed to perform this action on this resource.

404

The resource does not exist or belongs to another partner (existence is not leaked across partners).

Error body
  • typestring

    Error class.

    Allowed values:
    validation_errorclient_errorserver_error
    Example:
    validation_error
  • errorsobject[]
    Child fields
    • codestring

      Machine-readable error code.

      Example:
      required
    • fieldstringnullable

      Offending field, or null/'general' for non-field errors.

      Example:
      startTime
    • messagestring

      Human-readable message.

      Example:
      This field is required.
Response 400json
{
  "type": "validation_error",
  "errors": [
    {
      "code": "required",
      "field": "startTime",
      "message": "This field is required."
    }
  ]
}