List all stock line items

How to fetch a collection of stock line items via API

To fetch a collection of stock line items, send a GET request to the /api/stock_line_items endpoint.

Request

GET https://yourdomain.commercelayer.io/api/stock_line_items

Example

The following request fetches a collection of stock line items:

curl -g -X GET \
  'https://yourdomain.commercelayer.io/api/stock_line_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 line items can be sorted by the following fields:

Attributes

  • quantity

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

Relationships

  • shipment

  • line_item

  • stock_item

  • sku

  • stock_reservation

Filterable fields

The list of stock line items can be filtered by the following fields:

Attributes

  • sku_code

  • quantity

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

  • metadata

Relationships

  • shipment

  • line_item

  • stock_item

  • sku

  • stock_reservation

Last updated