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
Body Parameter | Type | Required |
---|---|---|
type |
| Required |
attributes.name |
| Required |
attributes.strategy |
| Optional, default is no_split |
attributes.stock_locations_cutoff |
| Optional, default is 2 |
attributes.stock_reservation_cutoff |
| Optional, default is 3600 |
attributes.put_stock_transfers_on_hold |
| Optional, default is 'false' |
attributes.manual_stock_decrement |
| Optional, default is 'false' |
attributes.reference |
| Optional |
attributes.reference_origin |
| Optional |
attributes.metadata |
| Optional |
Example
The following request creates a new inventory model:
Last updated