Payments & Vouchers

Discount Usage

The DiscountUsage group of reports cover the usage of promo codes and discount types across individual orders and across all orders.

get/shop/reports/promo-code-usage/summary

Promo code usage summary

listUsedPromoCodesSummary

This endpoint summarises the total discount usage by promo code across all orders matching the given parameters.

Query parameters

  • site_iduuidrequired

    Filter the summary list of used promo codes by site.

  • revenue_date_fromdateoptional

    Filter the summary list of used promo codes by revenue date of the order. The promo code must have been used on orders with bookings on or after this date.

  • revenue_date_todateoptional

    Filter the summary list of used promo codes by revenue date of the order. The promo code must have been used on orders with bookings on or before this date.

  • submitted_at_fromdateoptional

    Filter the summary list of used promo codes by submitted date of the order. The promo code must have been used on orders submitted on or after this date.

  • submitted_at_todateoptional

    Filter the summary list of used promo codes by submitted date of the order. The promo code must have been used on orders submitted on or before this date.

Responses

  • 200

    The summary of Used Promo Codes was successfully retrieved

  • 401

    The user is unauthenticated

get/shop/reports/promo-code-usage/summary/queue

Promo code usage summary queue

getUsedPromoCodesSummaryQueue

This endpoint queues an export of the summary of the total discount usage by promo code across all orders matching the given parameters.

Query parameters

  • site_iduuidrequired

    Filter the summary list of used promo codes by site.

  • revenue_date_fromdateoptional

    Filter the summary list of used promo codes by revenue date of the order. The promo code must have been used on orders with bookings on or after this date.

  • revenue_date_todateoptional

    Filter the summary list of used promo codes by revenue date of the order. The promo code must have been used on orders with bookings on or before this date.

  • submitted_at_fromdateoptional

    Filter the summary list of used promo codes by submitted date of the order. The promo code must have been used on orders submitted on or after this date.

  • submitted_at_todateoptional

    Filter the summary list of used promo codes by submitted date of the order. The promo code must have been used on orders submitted on or before this date.

Responses

  • 200

    The job was successfully queued

  • 400

    The request failed.

  • 401

    The user is unauthenticated

get/shop/reports/promo-code-usage/breakdown

Promo code usage breakdown

listUsedPromoCodesBreakdown

This endpoint provides a breakdown of discount usage by promo code for individual orders matching the given parameters.

Query parameters

  • site_iduuidrequired

    Filter the breakdown list of used promo codes by site.

  • revenue_date_fromdateoptional

    Filter the breakdown list of used promo codes by revenue date of the order. The promo code must have been used on orders with bookings on or after this date.

  • revenue_date_todateoptional

    Filter the breakdown list of used promo codes by revenue date of the order. The promo code must have been used on orders with bookings on or before this date.

  • submitted_at_fromdateoptional

    Filter the breakdown list of used promo codes by submitted date of the order. The promo code must have been used on orders submitted on or after this date.

  • submitted_at_todateoptional

    Filter the breakdown list of used promo codes by submitted date of the order. The promo code must have been used on orders submitted on or before this date.

  • pageintegeroptional

    The page to retrieve results from

  • per_pageintegeroptional

    The number of results to return per page

  • sortstringoptional

    The field to order results by.

  • sort_orderstringoptional

    The direction to order results by.

    Possible values:ascdesc
  • applied_byuuidoptional

    Filter the breakdown list of used promo codes by the user who applied the promo code. This can be either 'Customer' or a member of staff.

Responses

  • 200

    The breakdown of UsedPromoCodes was successfully retrieved

  • 401

    The user is unauthenticated

get/shop/reports/promo-code-usage/breakdown/queue

Promo code usage breakdown queue

getUsedPromoCodesBreakdownQueue

This endpoint queues an export of the breakdown of discount usage by promo code for individual orders matching the given parameters.

Query parameters

  • site_iduuidrequired

    Filter the breakdown list of used promo codes by site.

  • revenue_date_fromdateoptional

    Filter the breakdown list of used promo codes by revenue date of the order. The promo code must have been used on orders with bookings on or after this date.

  • revenue_date_todateoptional

    Filter the breakdown list of used promo codes by revenue date of the order. The promo code must have been used on orders with bookings on or before this date.

  • submitted_at_fromdateoptional

    Filter the breakdown list of used promo codes by submitted date of the order. The promo code must have been used on orders submitted on or after this date.

  • submitted_at_todateoptional

    Filter the breakdown list of used promo codes by submitted date of the order. The promo code must have been used on orders submitted on or before this date.

  • sortstringoptional

    The field to order results by.

  • sort_orderstringoptional

    The direction to order results by.

    Possible values:ascdesc
  • applied_byuuidoptional

    Filter the breakdown list of used promo codes by the user who applied the promo code. This can be either 'Customer' or a member of staff.

Responses

  • 200

    The job was successfully queued

  • 400

    The request failed.

  • 401

    The user is unauthenticated

get/shop/reports/discount-type-usage/summary

Discount type usage summary

listUsedDiscountTypesSummary

This endpoint summarises the total discount usage by discount type across all orders matching the given parameters.

Query parameters

  • site_iduuidrequired

    Filter the summary list of used discount types by site.

  • revenue_date_fromdateoptional

    Filter the summary list of used discount types by revenue date of the order. The discount type must have been used on orders with bookings on or after this date.

  • revenue_date_todateoptional

    Filter the summary list of used discount types by revenue date of the order. The discount type must have been used on orders with bookings on or before this date.

  • submitted_at_fromdateoptional

    Filter the summary list of used discount types by submitted date of the order. The discount type must have been used on orders submitted on or after this date.

  • submitted_at_todateoptional

    Filter the summary list of used discount types by submitted date of the order. The discount type must have been used on orders submitted on or before this date.

  • discount_typestring[]optional

    Filter the summary list of used discount types by the applied discount(s).

Responses

  • 200

    The summary of Used Discount Types was successfully retrieved

  • 401

    The user is unauthenticated

get/shop/reports/discount-type-usage/summary/queue

Discount type usage summary queue

getUsedDiscountTypesSummaryQueue

This endpoint queues an export of the summary of the total discount usage by discount type across all orders matching the given parameters.

Query parameters

  • site_iduuidrequired

    Filter the summary list of used discount types by site.

  • revenue_date_fromdateoptional

    Filter the summary list of used discount types by revenue date of the order. The discount type must have been used on orders with bookings on or after this date.

  • revenue_date_todateoptional

    Filter the summary list of used discount types by revenue date of the order. The discount type must have been used on orders with bookings on or before this date.

  • submitted_at_fromdateoptional

    Filter the summary list of used discount types by submitted date of the order. The discount type must have been used on orders submitted on or after this date.

  • submitted_at_todateoptional

    Filter the summary list of used discount types by submitted date of the order. The discount type must have been used on orders submitted on or before this date.

  • discount_typestring[]optional

    Filter the summary list of used discount types by the applied discount(s).

Responses

  • 200

    The job was successfully queued

  • 400

    The request failed.

  • 401

    The user is unauthenticated

get/shop/reports/discount-type-usage/breakdown

Discount type usage breakdown

listUsedDiscountTypesBreakdown

This endpoint provides a breakdown of discount usage by discount type for individual orders matching the given parameters.

Query parameters

  • site_iduuidrequired

    Filter the breakdown list of used discount types by site.

  • revenue_date_fromdateoptional

    Filter the breakdown list of used discount types by revenue date of the order. The discount type must have been used on orders with bookings on or after this date.

  • revenue_date_todateoptional

    Filter the breakdown list of used discount types by revenue date of the order. The discount type must have been used on orders with bookings on or before this date.

  • submitted_at_fromdateoptional

    Filter the breakdown list of used discount types by submitted date of the order. The discount type must have been used on orders submitted on or after this date.

  • submitted_at_todateoptional

    Filter the breakdown list of used discount types by submitted date of the order. The discount type must have been used on orders submitted on or before this date.

  • pageintegeroptional

    The page to retrieve results from

  • per_pageintegeroptional

    The number of results to return per page

  • sortstringoptional

    The field to order results by.

  • sort_orderstringoptional

    The direction to order results by.

    Possible values:ascdesc
  • applied_byuuidoptional

    Filter the breakdown list of used discount types by the user who applied the discount type.

Responses

  • 200

    The breakdown of UsedDiscountTypes was successfully retrieved

  • 401

    The user is unauthenticated

get/shop/reports/discount-type-usage/breakdown/queue

Discount type usage breakdown queue

getUsedDiscountTypesBreakdownQueue

This endpoint queues an export of the breakdown of discount usage by discount type for individual orders matching the given parameters.

Query parameters

  • site_iduuidrequired

    Filter the breakdown list of used discount types by site.

  • revenue_date_fromdateoptional

    Filter the breakdown list of used discount types by revenue date of the order. The discount type must have been used on orders with bookings on or after this date.

  • revenue_date_todateoptional

    Filter the breakdown list of used discount types by revenue date of the order. The discount type must have been used on orders with bookings on or before this date.

  • submitted_at_fromdateoptional

    Filter the breakdown list of used discount types by submitted date of the order. The discount type must have been used on orders submitted on or after this date.

  • submitted_at_todateoptional

    Filter the breakdown list of used discount types by submitted date of the order. The discount type must have been used on orders submitted on or before this date.

  • applied_byuuidoptional

    Filter the breakdown list of used discount types by the user who applied the discount type.

  • discount_typestring[]optional

    Filter the summary list of used discount types by the applied discount(s).

Responses

  • 200

    The job was successfully queued

  • 400

    The request failed.

  • 401

    The user is unauthenticated

get/shop/reports/discount-usage

Discount usage report

listDiscountUsage

Display-formatted table of how each discount type has been used across orders in the filter range. For JSON-native consumption use /shop/reports/discount-usage-v2; for large exports use /shop/reports/discount-usage/queue.

Query parameters

  • site_iduuidoptional

    Restrict to baskets at the given site.

  • revenue_date_fromdateoptional

    Restrict to baskets with a revenue date on or after this date.

  • revenue_date_todateoptional

    Restrict to baskets with a revenue date on or before this date.

  • submitted_at_fromdateoptional

    Restrict to baskets submitted on or after this date.

  • submitted_at_todateoptional

    Restrict to baskets submitted on or before this date.

Responses

  • 200

    The report was successfully generated.

  • 400

    The request failed.

  • 401

    The user is unauthenticated

get/shop/reports/discount-usage-v2

Discount usage report (v2)

listDiscountUsageV2

Returns discount usage as a JSON-native list: one row per discount type, with counts and total amounts (in minor units) for baskets, items, and the combined total.

Prefer this endpoint over /shop/reports/discount-usage when integrating with another system.

Query parameters

  • site_iduuidoptional

    Restrict to baskets at the given site.

  • revenue_date_fromdateoptional

    Restrict to baskets with a revenue date on or after this date.

  • revenue_date_todateoptional

    Restrict to baskets with a revenue date on or before this date.

  • submitted_at_fromdateoptional

    Restrict to baskets submitted on or after this date.

  • submitted_at_todateoptional

    Restrict to baskets submitted on or before this date.

Responses

  • 200

    The report was successfully generated.

  • 400

    The request failed.

  • 401

    The user is unauthenticated

get/shop/reports/discount-usage/queue

Queue an export of the discount usage report

queueDiscountUsageExport

Queues a CSV export of the discount usage report to be generated asynchronously.

Query parameters

  • site_iduuidoptional

    Restrict to baskets at the given site.

  • revenue_date_fromdateoptional

    Restrict to baskets with a revenue date on or after this date.

  • revenue_date_todateoptional

    Restrict to baskets with a revenue date on or before this date.

  • submitted_at_fromdateoptional

    Restrict to baskets submitted on or after this date.

  • submitted_at_todateoptional

    Restrict to baskets submitted on or before this date.

  • emailbooleanoptional

    If true, email the completed CSV to the authenticated user when the background job finishes. Defaults to false, in which case the queued job's output URL must be polled via the queued-jobs endpoint.

Responses

  • 200

    The job was successfully queued

  • 400

    The request failed.

  • 401

    The user is unauthenticated