inventory_models

Create an inventory model

Changed on

Create an inventory model

post/inventory_models

Request

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

Request body

Example request

{
  "data": {
    "attributes": {
      "name": "EU Inventory Model",
      "strategy": "no_split",
      "stock_locations_cutoff": 3,
      "stock_reservation_cutoff": 3600,
      "put_stock_transfers_on_hold": true,
      "manual_stock_decrement": true,
      "reference": "ANY-EXTERNAL-REFEFERNCE",
      "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
      "metadata": {
        "foo": "bar"
      }
    }
  }
}

Response

The created inventory model object

Changes

    • breaking

      request property / was restricted to a list of enum values

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      the request property // became optional

    • info

      the request property default value inventory_models was removed

    • info

      added the new inventory_models enum value to the request property /

    • info

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