Programs

List program spending summary reports

Changed on

Returns all-time point-spending totals for the program, one row per card definition that has recorded spending. Filters rows with filters[card_definition_id]. Returns at most 10 rows (max number of card definitions per program), ordered by id descending. limit and order are not query parameters.

Returns 200 with an empty data array when no spending is recorded. Returns 400 when query validation fails. Returns 404 when the program does not exist.

get/v2/loyalties/programs/{programId}/reports/spending/summary

Request

  • Base URL
    https://api.voucherify.io
  • URL
    https://api.voucherify.io/v2/loyalties/programs/{programId}/reports/spending/summary
  • Auth
    • API key in header X-App-Id and API key in header X-App-Token
    • or HTTP bearer

Query parameters

junction'AND' | 'OR' nullable

Joins the field filters. Allowed values are AND and OR. Defaults to AND.

Filters the results. Pass a deep object, for example filters[card_definition_id][conditions][$is]=lcdef_.... Fields combine through junction, which defaults to AND. Omit filters to apply no field filter.

Response

Program spending summary report.

object'report' required

Object type marker. Always report.

Changes

    • warning

      for the query request parameter filters, the type of property card_definition_id/oneOf[SpendingReportFilterCardDefinitionIdConditions]/ changed from object to no type

    • breaking

      for the query request parameter filters, the type of property card_definition_id/oneOf[SpendingReportFilterCardDefinitionIdConditions]/ was specialized from no type to object