skus

Create a SKU

post/skus

Request

  • Base URL
    https://{your_organization_slug}.commercelayer.io/api
  • URL
    https://{your_organization_slug}.commercelayer.io/api/skus
  • Auth
    HTTP bearer

Request body

Example request

{
  "data": {
    "attributes": {
      "code": "TSHIRTMM000000FFFFFFXLXX",
      "name": "Men's Black T-shirt with White Logo (XL)",
      "description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
      "image_url": "https://img.yourdomain.com/skus/xYZkjABcde.png",
      "pieces_per_pack": 6,
      "weight": 300,
      "unit_of_weight": "gr",
      "hs_tariff_number": "4901.91.0020",
      "reference": "ANY-EXTERNAL-REFEFERNCE",
      "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
      "metadata": {
        "foo": "bar"
      }
    },
    "relationships": {
      "shipping_category": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "tags": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      }
    }
  }
}

Response

The created SKU object

Changes

    • breaking

      added the new required request property ///

    • breaking

      request property // was restricted to a list of enum values

    • breaking

      request property / was restricted to a list of enum values

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • info

      added the new optional request property //

    • info

      the request property default value skus was removed

    • info

      added the new gr enum value to the request property //

    • info

      added the new lb enum value to the request property //

    • info

      added the new oz enum value to the request property //

    • info

      added the new skus enum value to the request property /

    • info

      added the media type application/vnd.api+json for the response with the status