Configure a SKU

PATCH/v2/experiences/{experienceId}/retail-skus/{skuId}

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

Sets a SKU's price, code, stock mode, image, purchase-time questions and whether it is on sale. Organizer only (403 otherwise). isEnabled can't be turned on while price is null (400, RETAIL_SKU_PRICE_REQUIRED). stockQuantity is read-only: move stock with the add-stock and remove-stock actions. imageId must be one of the product's images (400, RETAIL_IMAGE_SCOPE_INVALID). extraFields, when sent, replaces the whole question set; omit it to leave the questions as they are. Price and on-sale changes also refresh the product's minPrice and maxPrice shortly afterwards.

Requestbash
curl -X PATCH "https://api.turneo.co/v2/experiences/8e7d6c5b-4a39-4281-90ef-1a2b3c4d5e6f/retail-skus/8f14e45f-ceea-4e5b-b0d4-9f3c1a2b3c4d" \
  -H "X-API-Key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "price": "24.00",
    "isEnabled": true
  }'

Path parameters

  • experienceIdstring (uuid)required

    UUID of the retail product.

    Example:
    8e7d6c5b-4a39-4281-90ef-1a2b3c4d5e6f
  • skuIdstring (uuid)required

    UUID of the SKU.

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

Request bodyapplication/json, required

  • 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 a SKU and put it on sale
Price a SKU and put it on salejson
{
  "price": "24.00",
  "isEnabled": true
}
Example: Count stock for this SKU
Count stock for this SKUjson
{
  "tracksStock": true
}
Example: Ask a question at purchase time
Ask a question at purchase timejson
{
  "extraFields": [
    {
      "name": {
        "en": "Gift message"
      },
      "fieldType": "QUESTION",
      "required": false
    }
  ]
}

Responses

200object

The updated SKU.

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