List all stock items
How to fetch a collection of stock items via API
To fetch a collection of stock items, send a GET
request to the /api/stock_items
endpoint.
Request
GET https://yourdomain.commercelayer.io/api/stock_items
Example
The following request fetches a collection of stock items:
curl -g -X GET \
'https://yourdomain.commercelayer.io/api/stock_items/' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer your-access-token'
Remember that when you fetch a list of resources you get paginated result.
Sortable fields
The list of stock items can be sorted by the following fields:
Attributes
quantity
id
created_at
updated_at
reference
reference_origin
Relationships
stock_location
sku
reserved_stock
Filterable fields
The list of stock items can be filtered by the following fields:
Attributes
quantity
id
created_at
updated_at
reference
reference_origin
metadata
Relationships
stock_location
sku
reserved_stock
stock_reservations
attachments
Last updated