List all packages

How to fetch a collection of packages via API

To fetch a collection of packages, send a GET request to the /api/packages endpoint.

Request

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

Example

The following request fetches a collection of packages:

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

Attributes

  • name

  • code

  • length

  • width

  • height

  • unit_of_length

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

Relationships

  • stock_location

Filterable fields

The list of packages can be filtered by the following fields:

Attributes

  • name

  • code

  • length

  • width

  • height

  • unit_of_length

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

  • metadata

Relationships

  • stock_location

  • parcels

  • attachments

Last updated