MembershipCharges

Queue a MembershipCharges export

Kicks off an asynchronous CSV export of MembershipCharges matching the supplied filters. Returns immediately with a QueuedJob envelope; poll getCustomerQueuedJob until the job transitions to complete or failed. On success, the job's output contains a signed download URL for the generated CSV.

Use this in preference to the synchronous listCustomerMembershipCharges endpoint when the result set is large (more than a few thousand rows) or when the export is intended to be emailed to the requesting user — pass email=true to have the finished CSV delivered as an email attachment instead of (or alongside) the pollable download URL.

Requires the reports.download permission on every site whose charges fall in scope.

Note: an earlier docs revision exposed this operation under /shop/membership-charges/queue. The Laravel controller has always lived in customer-api, so /customers/membership-charges/queue is the correct and canonical path.

get/customers/membership-charges/queue

Query parameters

site_idstring

Filter results by the site they belong to

organisation_idstring uuid

Filter customers that belong to the given organisation ID

membership_idstring

Filters charges by the membership ID

statusstring
Example:processing

Filters charges by the status

billing_period_from_startstring date
Example:2020-01-01

Filters charges to those with a 'billing period from' on or after the specified date

billing_period_from_endstring date
Example:2020-01-01

Filters charges to those with a 'billing period to' on or before the specified date

created_at_startstring date
Example:2020-01-01

Filters charges to those with a 'created at' on or after the specified date

created_at_endstring date
Example:2020-01-01

Filters charges to those with a 'created at' on or before the specified date

amount_fromnumber

Filters charges to those with an amount greater than or equal to the specified value

amount_tonumber

Filters charges to those with an amount less than or equal to the specified value

processorstring
Example:stripe

Filters charges by the processor

emailboolean

When true, the completed CSV is emailed to the requesting user once the job finishes (in addition to being available via the queued-job download URL). Defaults to false.

Response

The job was successfully queued

Example response

{
  "data": {
    "created_at": "2023-11-07T00:00:00+00:00",
    "updated_at": "2023-11-07T01:00:00+00:00"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.