List all subscription models

How to fetch a collection of subscription models via API

To fetch a collection of subscription models, send a GET request to the /api/subscription_models endpoint.

Request

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

Example

The following request fetches a collection of subscription models:

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

  • name

  • strategy

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

Filterable fields

The list of subscription models can be filtered by the following fields:

Attributes

  • name

  • strategy

  • auto_activate

  • auto_cancel

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

  • metadata

Relationships

  • attachments

Last updated