Payments & Vouchers

Voucher Ledger

A report detailing voucher revenue balances.

get/shop/reports/voucher-ledger/list

List LedgerLines

listVoucherLedger

Use this endpoint to retrieve a list of VoucherLedgerVoucher resources.

Query parameters

  • site_iduuidoptional

    Retrieve the ledger voucher details for this site.

  • pageintegeroptional

    The page to retrieve results from

  • datedateoptional

    Retrieve the ledger voucher details as at this date.

Responses

  • 200

    The list of VoucherLedgerVoucher resources was successfully retrieved

  • 401

    The user is unauthenticated

get/shop/reports/voucher-ledger/summary

Get voucher ledger balances as of the given date

getVoucherLedgerSummary

Get voucher ledger balances as of the given date.

Query parameters

  • site_iduuidoptional

    Retrieve the ledger voucher details for this site.

  • datedateoptional

    Retrieve the ledger voucher details as at this date.

Responses

  • 200

    A summary of the voucher ledger balances on the given date.

  • 401

    The user is unauthenticated

get/shop/reports/voucher-ledger/queue

Queue an export of the voucher ledger.

actionQueueVoucherLedgerReport

Queue an export of the voucher ledger.

Query parameters

  • site_iduuidoptional

    Retrieve the ledger voucher details for this site.

  • datedateoptional

    Retrieve the ledger voucher details as at this date.

Responses

  • 200

    The job was successfully queued

  • 401

    The user is unauthenticated

get/shop/reports/voucher-ledger-detailed

Voucher ledger detailed

listVoucherLedgerDetailed

Returns a chronological line-by-line ledger of voucher sales, redemptions, and refunds in the requested period at a site. Each entry is annotated with the order, basket item, payment, voucher code, and (where relevant) refund it relates to so it can be linked back to the underlying records.

For a single-line aggregate of the same period, see /shop/reports/voucher-ledger-summary.

Query parameters

  • site_iduuidrequired

    The site to compute the voucher ledger for.

  • date_fromdaterequired

    Start of the date range covered by the ledger.

  • date_todaterequired

    End of the date range covered by the ledger.

Responses

  • 200

    The ledger was successfully generated.

  • 400

    The request failed.

  • 401

    The user is unauthenticated

get/shop/reports/voucher-ledger-summary

Voucher ledger summary

getVoucherLedgerSummaryReport

Returns a single-line summary of voucher sales, redemptions, and the resulting opening and closing voucher liability balances for the given period at a site. Use this to reconcile the deferred-revenue balance held against Trybe-issued vouchers. For a line-by-line breakdown, see /shop/reports/voucher-ledger-detailed.

Query parameters

  • site_iduuidrequired

    The site to compute the voucher ledger for.

  • date_fromdaterequired

    Start of the date range covered by the ledger.

  • date_todaterequired

    End of the date range covered by the ledger.

Responses

  • 200

    The summary was successfully generated.

  • 400

    The request failed.

  • 401

    The user is unauthenticated