Create an inventory model

How to create an inventory model via API

To create a new inventory model, send a POST request to the /api/inventory_models endpoint, passing the resource arguments in the request body.

Request

POST https://yourdomain.commercelayer.io/api/inventory_models

Arguments

Example

The following request creates a new inventory model:

curl -g -X POST \
  'https://yourdomain.commercelayer.io/api/inventory_models' \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer your-access-token' \
  -H 'Content-Type: application/vnd.api+json' \
  -d '{
  "data": {
    "type": "inventory_models",
    "attributes": {
      "name": "EU Inventory Model"
    }
  }
}'

Last updated