For the complete documentation index, see llms.txt. This page is also available as Markdown.

List all inventory models

How to fetch a collection of inventory models via API

To fetch a collection of inventory models, send a GET request to the /api/2026-05/inventory_models endpoint.

Request

GET https://yourdomain.commercelayer.io/api/2026-05/inventory_models

Example

The following request fetches a collection of inventory models:

curl -g -X GET \
  'https://yourdomain.commercelayer.io/api/2026-05/inventory_models/' \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer your-access-token'

On success, the API responds with a 200 OK status code, returning a paginated collection of resource objects:

{
  "data": [
    {
      "id": "XAyRWNUzyN",
      "type": "inventory_models",
      "links": {
        "self": "https://yourdomain.commercelayer.io/api/2026-05/inventory_models/XAyRWNUzyN"
      },
      "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,
        "created_at": "2018-01-01T12:00:00.000Z",
        "updated_at": "2018-01-01T12:00:00.000Z",
        "reference": "ANY-EXTERNAL-REFEFERNCE",
        "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
        "metadata": {
          "foo": "bar"
        }
      },
      "relationships": {
        "inventory_stock_locations": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/inventory_models/XAyRWNUzyN/relationships/inventory_stock_locations",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/inventory_models/XAyRWNUzyN/inventory_stock_locations"
          }
        },
        "inventory_return_locations": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/inventory_models/XAyRWNUzyN/relationships/inventory_return_locations",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/inventory_models/XAyRWNUzyN/inventory_return_locations"
          }
        },
        "attachments": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/inventory_models/XAyRWNUzyN/relationships/attachments",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/inventory_models/XAyRWNUzyN/attachments"
          }
        },
        "event_stores": {
          "links": {
            "self": "https://yourdomain.commercelayer.io/api/2026-05/inventory_models/XAyRWNUzyN/relationships/event_stores",
            "related": "https://yourdomain.commercelayer.io/api/2026-05/inventory_models/XAyRWNUzyN/event_stores"
          }
        }
      },
      "meta": {
        "created_with_version": "2026-05"
      }
    },
    {
      "other": "... 9 inventory_models (first page)"
    }
  ],
  "meta": {
    "record_count": 140,
    "page_count": 14,
    "page_size": 10,
    "page_number": 1,
    "trace_id": "69abaa3545913c78132e5578bd26208d44aa9043647d78698fd0021f3958cd74",
    "api_versions": [
      "2017-08",
      "2026-05"
    ]
  },
  "links": {
    "first": "https://yourdomain.commercelayer.io/api/2026-05/inventory_models?page[number]=1&page[size]=10",
    "next": "https://yourdomain.commercelayer.io/api/2026-05/inventory_models?page[number]=2&page[size]=10",
    "last": "https://yourdomain.commercelayer.io/api/2026-05/inventory_models?page[number]=14&page[size]=10"
  }
}

Remember that when you fetch a list of resources you get paginated result.

Sortable fields

The list of inventory models can be sorted by the following fields:

Attributes

  • name

  • strategy

  • stock_locations_cutoff

  • stock_reservation_cutoff

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

Filterable fields

The list of inventory models can be filtered by the following fields:

Attributes

  • name

  • strategy

  • stock_locations_cutoff

  • stock_reservation_cutoff

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

  • metadata

Relationships

  • inventory_stock_locations

  • inventory_return_locations

  • attachments

Last updated