packages

Create a package

Changed on

Create a package

post/packages

Request

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

Request body

Example request

{
  "data": {
    "attributes": {
      "name": "Large (60x40x30)",
      "code": "YYYY 2000",
      "length": 40,
      "width": 40,
      "height": 25,
      "unit_of_length": "gr",
      "reference": "ANY-EXTERNAL-REFEFERNCE",
      "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
      "metadata": {
        "foo": "bar"
      }
    },
    "relationships": {
      "stock_location": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      }
    }
  }
}

Response

The created package object

Changes

    • breaking

      added the new required request property ///

    • breaking

      request property / was restricted to a list of enum values

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • info

      the request property default value packages was removed

    • info

      added the new packages enum value to the request property /

    • info

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