Update many SKUs at once

POST/v2/experiences/{experienceId}/retail-skus/bulk-update

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

Applies partial updates to up to 500 SKUs of this product. Send either {ids, patch} to apply one patch to several SKUs, or {updates: [{id, patch}]} for a patch per SKU; both shapes, neither, or an empty list is a 400. Organizer only (403 otherwise). Each row follows the rules of PATCH .../retail-skus/{skuId} and succeeds or fails on its own, so the call returns 200 with an ok or error result per id (not_found for a SKU that is not on this product).

Requestbash
curl -X POST "https://api.turneo.co/v2/experiences/8e7d6c5b-4a39-4281-90ef-1a2b3c4d5e6f/retail-skus/bulk-update" \
  -H "X-API-Key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      "8f14e45f-ceea-4e5b-b0d4-9f3c1a2b3c4d",
      "3b241101-e2bb-4255-8caf-4136c566a962"
    ],
    "patch": {
      "price": "24.00",
      "isEnabled": true
    }
  }'

Path parameters

  • experienceIdstring (uuid)required

    UUID of the retail product.

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

Request bodyapplication/json, required

  • idsstring (uuid)[]

    SKUs to apply the shared patch to.

  • patchobject

    The patch applied to every SKU in ids.

    Child fields
    • skuCodestringnullable

      Your own stock-keeping code for this SKU.

      Limits:
      up to 64 characters
      Example:
      TSHIRT-RED-M
    • sortOrderinteger

      Position of the SKU in the grid.

      Example:
      0
    • pricestringnullable

      Unit price as a decimal string (a number is accepted too), in the organizer's default currency.

      Example:
      24.00
    • tracksStockboolean

      Count stock for this SKU (true) or sell it without limit (false).

      Example:
      true
    • isEnabledboolean

      Put the SKU on sale. Rejected while the SKU has no price.

      Example:
      true
    • imageIdstring (uuid)nullable

      One of the product's images. Null clears it.

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

      Questions the buyer answers when buying this SKU.

      Child fields
      • idstring (uuid)

        UUID of an existing question of this SKU (or of one removed earlier, which brings it back). Omit to create a new question. An id from another SKU returns 400 (RETAIL_EXTRA_FIELD_UNAVAILABLE).

        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. Defaults to 0.

        Example:
        0
      • fieldTypestring

        Defaults to QUESTION. Any other type returns 400 (RETAIL_EXTRA_FIELD_TYPE_UNSUPPORTED).

        Allowed values:
        QUESTIONCHECKBOX
        Example:
        QUESTION
      • requiredboolean

        Whether the question must be answered before the order can be confirmed. Defaults to false.

        Example:
        false
  • updatesobject[]

    One patch per SKU.

    Child fields
    • idstring (uuid)required

      UUID of a SKU of this product.

      Example:
      3b241101-e2bb-4255-8caf-4136c566a962
    • patchobjectrequired

      Writable settings of a SKU. All are optional. The combination (attributeValueIds) comes from the generate endpoint and stockQuantity from the stock actions, so neither is writable. When extraFields is present it replaces the whole question set: entries with an id are updated, entries without one are created, and questions left out are removed.

      Child fields
      • skuCodestringnullable

        Your own stock-keeping code for this SKU.

        Limits:
        up to 64 characters
        Example:
        TSHIRT-RED-M
      • sortOrderinteger

        Position of the SKU in the grid.

        Example:
        0
      • pricestringnullable

        Unit price as a decimal string (a number is accepted too), in the organizer's default currency.

        Example:
        24.00
      • tracksStockboolean

        Count stock for this SKU (true) or sell it without limit (false).

        Example:
        true
      • isEnabledboolean

        Put the SKU on sale. Rejected while the SKU has no price.

        Example:
        true
      • imageIdstring (uuid)nullable

        One of the product's images. Null clears it.

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

        Questions the buyer answers when buying this SKU.

        Child fields
        • idstring (uuid)

          UUID of an existing question of this SKU (or of one removed earlier, which brings it back). Omit to create a new question. An id from another SKU returns 400 (RETAIL_EXTRA_FIELD_UNAVAILABLE).

          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. Defaults to 0.

          Example:
          0
        • fieldTypestring

          Defaults to QUESTION. Any other type returns 400 (RETAIL_EXTRA_FIELD_TYPE_UNSUPPORTED).

          Allowed values:
          QUESTIONCHECKBOX
          Example:
          QUESTION
        • requiredboolean

          Whether the question must be answered before the order can be confirmed. Defaults to false.

          Example:
          false
Example: Price and enable several SKUs
Price and enable several SKUsjson
{
  "ids": [
    "8f14e45f-ceea-4e5b-b0d4-9f3c1a2b3c4d",
    "3b241101-e2bb-4255-8caf-4136c566a962"
  ],
  "patch": {
    "price": "24.00",
    "isEnabled": true
  }
}
Example: A different patch per SKU
A different patch per SKUjson
{
  "updates": [
    {
      "id": "8f14e45f-ceea-4e5b-b0d4-9f3c1a2b3c4d",
      "patch": {
        "price": "19.00"
      }
    },
    {
      "id": "3b241101-e2bb-4255-8caf-4136c566a962",
      "patch": {
        "tracksStock": true
      }
    }
  ]
}

Responses

200object

One result per id. Row-level failures are reported here, not as a 400.

  • resultsobject[]

    One entry per requested id, in request order.

    Child fields
    • idstring (uuid)

      The SKU this result is for.

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

      Whether this SKU was saved.

      Allowed values:
      okerror
      Example:
      ok
    • errorobject

      Present only when status is error, in the standard error envelope.

      Child fields
      • typestring
        Example:
        validation_error
      • errorsobject[]
        Child fields
        • codestring
          Example:
          RETAIL_SKU_PRICE_REQUIRED
        • fieldstringnullable
          Example:
          is_enabled
        • messagestring
          Example:
          Cannot enable a SKU without a price.
        • attrstringnullable
          Example:
          is_enabled
Response 200: One saved, one rejectedjson
{
  "results": [
    {
      "id": "8f14e45f-ceea-4e5b-b0d4-9f3c1a2b3c4d",
      "status": "ok"
    },
    {
      "id": "3b241101-e2bb-4255-8caf-4136c566a962",
      "status": "error",
      "error": {
        "type": "validation_error",
        "errors": [
          {
            "code": "RETAIL_SKU_PRICE_REQUIRED",
            "field": "is_enabled",
            "message": "Cannot enable a SKU without a price.",
            "attr": "is_enabled"
          }
        ]
      }
    }
  ]
}

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."
    }
  ]
}