GET
/
carts
/
available-promotions
Retrieve all promotions
curl --request GET \
  --url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/carts/available-promotions \
  --header 'Authorization: Bearer <token>'
{
  "message": "<string>",
  "success": true,
  "content": {
    "promotions": [
      {
        "id": "<string>",
        "name": "<string>",
        "description": "<string>",
        "tags": [
          "<string>"
        ],
        "redemption_limits": {
          "total_redemptions": 123,
          "per_customer_redemptions": 123,
          "per_coupon_code_redemptions": 123
        },
        "redemption_count": 123,
        "minimum_order_total": 0,
        "starts_at": "2023-11-07T05:31:56Z",
        "expires_at": "2023-11-07T05:31:56Z",
        "details": {
          "discount_type": "<string>",
          "discount_percent": 123,
          "maximum_discount_amount": 123,
          "products": [
            {
              "product_id": "<string>",
              "variant_id": "<string>",
              "minimum_quantity": 123,
              "maximum_quantity": 123,
              "minimum_value": 123,
              "maximum_value": 123
            }
          ],
          "category_id": [
            "<string>"
          ]
        },
        "applies_to_product": "all",
        "promotion_type": "discount",
        "can_be_used_with_other_promotion": true
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Access token

Headers

x-customer-group-id
string

This param is used to determine product pricing, promotions, and subscription rates. If a valid customer group id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer group id, the system will fall back to the default customer group id. If no data is found for the default group either, the highest applicable price will be returned.

Response

200
application/json

OK

The response is of type object.