List all flex promotions

How to fetch a collection of flex promotions via API

To fetch a collection of flex promotions, send a GET request to the /api/flex_promotions endpoint.

Request

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

Example

The following request fetches a collection of flex promotions:

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

Attributes

  • name

  • type

  • exclusive

  • priority

  • starts_at

  • expires_at

  • total_usage_limit

  • total_usage_count

  • id

  • disabled_at

  • created_at

  • updated_at

  • reference

  • reference_origin

Filterable fields

The list of flex promotions can be filtered by the following fields:

Attributes

  • name

  • type

  • priority

  • starts_at

  • expires_at

  • total_usage_limit

  • total_usage_count

  • rules

  • id

  • disabled_at

  • created_at

  • updated_at

  • reference

  • reference_origin

  • metadata

Relationships

  • coupon_codes_promotion_rule

  • coupons

  • attachments

  • events

  • tags

Last updated