Coupons

Coupon usage by date

Returns coupon usage and discount totals over time for a single coupon in
the selected period. Date buckets use the store timezone.

GET /api/v1/store/coupons/{coupon}/by-date

Coupon usage by date

curl --request GET \
  --url 'https://{baseUrl}/api/v1/store/coupons/{COUPON}/by-date' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "meta": {
    "resource_link": "https://app.metorik.com/coupons/321"
  },
  "resource": {
    "coupon_id": 321,
    "code": "SPRING10",
    "resource_link": "https://app.metorik.com/coupons/321"
  },
  "totals": {
    "usage_count": 1,
    "total_discounted": 15,
    "sales_generated": 120,
    "sales_generated_cost": 20,
    "sales_generated_gross_profit": 100
  },
  "data": [
    {
      "date": "2026-03-25",
      "label": "25 Mar",
      "usage_count": 1,
      "total_discounted": 15,
      "sales_generated": 120,
      "sales_generated_cost": 20,
      "sales_generated_gross_profit": 100
    }
  ]
}

No response description.

Authorizations

  • Authorization string required header

    Generate a store API key from the store's Metorik API settings in Metorik, and choose the scopes needed for the endpoints you want to call.

Path Parameters

  • coupon integer required

    The coupon ID. Example: 123

Query Parameters

  • end_date string required

    End date in the store timezone using YYYY-MM-DD format. Example: 2026-02-28

  • group_by string enum

    Time interval for grouping the results. Example: day

  • start_date string required

    Start date in the store timezone using YYYY-MM-DD format. Example: 2026-02-01

Headers

  • Accept string required

    Response format header. Example: application/json

Response

application/json
  • meta object
    + Show Child Attributes
    • resource_link string
  • resource object
    + Show Child Attributes
    • coupon_id integer
    • code string
    • resource_link string
  • totals object
    + Show Child Attributes
    • usage_count integer
    • total_discounted integer
    • sales_generated integer
    • sales_generated_cost integer
    • sales_generated_gross_profit integer
  • data[] object array
    + Show Child Attributes
    • date string
    • label string
    • usage_count integer
    • total_discounted integer
    • sales_generated integer
    • sales_generated_cost integer
    • sales_generated_gross_profit integer