List all markets

How to fetch a collection of markets via API

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

Request

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

Example

The following request fetches a collection of markets:

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

  • name

  • code

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

  • disabled_at

Filterable fields

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

Attributes

  • name

  • code

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

  • metadata

  • disabled_at

Relationships

  • merchant

  • price_list

  • inventory_model

  • subscription_model

  • tax_calculator

  • customer_group

  • price_list_schedulers

  • attachments

Last updated