Create or update rich item

PUT /i/richItem/{businessId}/{sku}

Creates a new rich item or updates an existing rich item. To update the sku, set the new sku in the request body. The picture cannot be set using this method (use PATCH method).

Path parameters

  • businessId integer(int64) Required

    The id of the business

  • sku string Required

    A stock-keeping unit

    Maximum length is 25.

application/json

Body Required

  • businessId integer(int64) Required

    The id of the business

  • sku string Required

    A stock-keeping unit

    Maximum length is 25.

  • allergenCodes array[string]

    List of allergen codes

  • descriptions array[object]

    Stores a description with its locale code

    Hide descriptions attributes Show descriptions attributes object
    • localeCode string Required

      Language code (ISO 639) of the description

      Minimum length is 2, maximum length is 7.

    • Item description in the provided language

      Maximum length is 4000.

    • Display name (for the customer) in the provided language

Responses

  • 200 application/hal+json;charset=UTF-8

    Updated

    Hide response attributes Show response attributes object
    • businessId integer(int64)

      The id of the business

    • sku string

      A stock-keeping unit

    • descriptions array[object]

      Stores a description with its locale code

      Hide descriptions attributes Show descriptions attributes object
      • localeCode string Required

        Language code (ISO 639) of the description

        Minimum length is 2, maximum length is 7.

      • Item description in the provided language

        Maximum length is 4000.

      • Display name (for the customer) in the provided language

    • allergenCodes array[string]

      List of allergen codes

    • creationDate string(date-time)

      Creation date of the richItem

    • lastUpdateDate string(date-time)

      Last update date of the richItem

    • URL of the picture

    • URL of the raw picture

PUT /i/richItem/{businessId}/{sku}
curl \
 -X PUT https://api.lsk.lightspeed.app/i/richItem/454335871/UGG-BB-PUR-06 \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"businessId":454335871,"sku":"UGG-BB-PUR-06","allergenCodes":["milk","cereals"],"descriptions":[{"localeCode":"en","description":"This is a test for a rich item","displayName":"Rich Item 1"},{"localeCode":"de","description":"Das ist ein Test","displayName":"Rich Item 1 DE"}]}'
Request examples
{
  "businessId": 454335871,
  "sku": "UGG-BB-PUR-06",
  "allergenCodes": [
    "milk",
    "cereals"
  ],
  "descriptions": [
    {
      "localeCode": "en",
      "description": "This is a test for a rich item",
      "displayName": "Rich Item 1"
    },
    {
      "localeCode": "de",
      "description": "Das ist ein Test",
      "displayName": "Rich Item 1 DE"
    }
  ]
}
Response examples (200)
{
  "businessId": 454335871,
  "sku": "UGG-BB-PUR-06",
  "descriptions": [
    {
      "localeCode": "de",
      "description": "Das ist ein Test",
      "displayName": "Rich Item 1 DE"
    },
    {
      "localeCode": "en",
      "description": "This is a test for a rich item",
      "displayName": "Rich Item 1"
    }
  ],
  "allergenCodes": [
    "milk",
    "cereals"
  ],
  "creationDate": "2021-11-03T13:50:47Z",
  "lastUpdateDate": "2021-11-11T16:29:56Z",
  "pictureUrl": "http://s3-eu-west-1.amazonaws.com/com.ikentoo.trial.rich-content-store/25372_029b5ad1-08f7-4e1f-9087-3ca91ad818f7.png",
  "rawPictureUrl": "http://s3-eu-west-1.amazonaws.com/com.ikentoo.trial.rich-content-store/25372_029b5ad1-08f7-4e1f-9087-3ca91ad818f7_raw.png"
}