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:

Attributes

  • name

  • code

  • id

  • disabled_at

  • created_at

  • updated_at

  • reference

  • reference_origin

Relationships

  • price_list

  • inventory_model

  • subscription_model

  • tax_calculator

  • customer_group

  • geocoder

Filterable fields

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

Attributes

  • name

  • code

  • id

  • disabled_at

  • created_at

  • updated_at

  • reference

  • reference_origin

  • metadata

Relationships

  • merchant

  • price_list

  • inventory_model

  • subscription_model

  • tax_calculator

  • customer_group

  • geocoder

  • price_list_schedulers

  • attachments

Last updated