Skip to Content
StoreOSv0.27.1
Core GraphQL APIReferenceQueries

Report__coupon Report

Discount redemptions (codes and automatic discounts) and totals for the selected dates. Optional from/to (YYYY-MM-DD). Requires a signed-in staff user. Needs the `report__Analytics` `read` permission. Send the `x-tenant` header (the gateway sets it from your API key).

QUERYreport__couponReport(from: String, to: String): CouponReport!

Discount redemptions (codes and automatic discounts) and totals for the selected dates. Optional from/to (YYYY-MM-DD). Requires a signed-in staff user. Needs the report__Analytics read permission. Send the x-tenant header (the gateway sets it from your API key).

Arguments

from?String
to?String

Returns

  1. report__couponReport
byCode*
discountByPeriod*
totals*
Example Request
query Report__couponReport {  report__couponReport {    byCode {      code      discountTotal      redemptionCount      usesLimit    }    discountByPeriod {      amount      period    }  }}
Example Response
{  "data": {    "report__couponReport": {      "byCode": [        {          "code": "string",          "discountTotal": 10.5,          "redemptionCount": 10,          "usesLimit": 10        }      ],      "discountByPeriod": [        {          "amount": 10.5,          "period": "string"        }      ]    }  }}