APICredit

Get credits

GET
/public/v1/credits

List store credits held by your customers, newest first (by creation datetime, then id). A credit is an amount a customer can apply toward what they owe; each row carries its live computed status and remaining_balance.

Only credits belonging to your company are returned; soft-deleted credits are excluded. Filter by customer (company_ids), by brand (brand_ids, include_no_brand), by the invoices a credit has been applied to (invoice_ids), by amount range, by source, status, credit_number, or the creation/last-modified windows. All filters below are combined with AND — a credit must match every filter you send.

This endpoint returns eventually consistent data: a credit you just created, updated, canceled, or deleted (and any change to its status/remaining_balance) can take up to 1 second to be reflected here.

Required permission: credits_permissions_view. Only credits the authenticated user can access under their team restrictions are returned.

Authorization

Bearer
headerAuthorizationBearer <token>

API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.

Query Parameters

ids[]?array<string>

Restrict the result to specific credits by ID (the same ID returned as each credit's id). Repeat the bracketed key once per ID. Unknown IDs simply match nothing; an empty list is treated as no filter. At most 200 IDs may be given.

amount?string

Filter by the credit's current amount as an inclusive min,max decimal range separated by a comma. Either bound may be omitted: 100, keeps credits of 100 or more, ,500 those of 500 or less, 100,500 those in between. A range with both bounds empty is rejected.

brand_ids[]?array<string>

Restrict to credits for specific brands by company ID (the same ID returned as each credit's brand.id). Repeat the bracketed key once per ID; matches ANY. Combine with include_no_brand=true to also keep credits without a brand. Unknown IDs match nothing; an empty list is no filter. At most 200 IDs.

company_ids[]?array<string>

Restrict to credits held by specific customers by company ID (the same ID returned as each credit's company.id). Repeat the bracketed key once per ID; matches ANY. Unknown IDs match nothing; an empty list is no filter. At most 200 IDs.

credit_number?string

Case-insensitive substring match on the credit number (partial matches count; e.g. 100 matches CR-1001).

include_no_brand?boolean

When true, keep credits that have no brand. Alone it returns only credits without a brand; with brand_ids it returns credits for those brands OR without a brand. Omitted or false applies no brand-less filter.

invoice_ids[]?array<string>

Restrict to credits that have been applied to any of the given invoices by invoice ID (a credit is applied to an invoice through its credit uses; the applied invoice is visible under each credit's credit_uses[].payment.invoice.id, except that payment is null when your team can't see that invoice). Repeat the bracketed key once per ID; matches ANY. Credits never applied to one of these invoices are excluded. Unknown IDs match nothing; an empty list is no filter. At most 200 IDs.

owner_ids[]?array<string>

Restrict to credits owned by any of these Distru users (each credit's owner.id). Repeat the bracketed key once per ID; matches ANY. Unknown IDs match nothing; an empty list is no filter. At most 200 IDs.

inserted_datetime?string

Filter by creation datetime as an ISO8601 after,before range separated by a comma. Either bound may be left empty for an open-ended range: 2022-07-10T00:00:00Z, means on or after that instant, ,2022-07-10T00:00:00Z means on or before it. Both sides empty is rejected.

page?string

Page selector. Page size is fixed by the server; paginate by following the next_page URL in each response rather than building page selectors yourself — it is null on the last page. next_page uses page[after]=<cursor>, an opaque token marking where the next page resumes; pass it back exactly as given, and only to the endpoint that issued it. This is seek-based, so every page stays fast no matter how deep you page.

source?string

Filter by how the credit was created (SCREAMING_CASE): USER (added by hand), RETURN (generated from a return), INVOICE_PAYMENT (an invoice overpayment in Distru), QB_PAYMENT / QB_CREDIT_MEMO (originated in QuickBooks Online). Exact match.

Value in"INVOICE_PAYMENT""QB_CREDIT_MEMO""QB_PAYMENT""RETURN""USER"
status?string

Filter by the credit's live computed status (SCREAMING_CASE): ACTIVE (has a remaining balance still to spend), REDEEMED (fully applied, nothing left), CANCELED (voided; its balance can no longer be applied). Exact match.

Value in"ACTIVE""CANCELED""REDEEMED"
updated_datetime?string

Filter by last-modified datetime as an ISO8601 after,before range, same comma format as inserted_datetime. Either bound may be empty for an open-ended range.

Response Body

A list of credits

*/*
  1. response

A collection of Credits

data?array<>

Credits

next_page?string

URL for the next page of results; null when there is no next page

Example Request
curl -X GET 'https://app.distru.com/public/v1/credits'
Example Response
{  "data": [    {      "amount": "100",      "brand": null,      "canceled_datetime": null,      "company": {        "id": "00000000-0000-0000-0000-00000000014b",        "name": "Company 982",        "updated_datetime": "2026-10-13T15:03:28.554515Z"      },      "creator": {        "banned": false,        "deleted_at": null,        "email": "[email protected]",        "full_name": "FirstName3020 LastName3021",        "id": "00000000-0000-0000-0000-0000000005e7",        "inserted_datetime": "2026-10-13T15:03:28.566097Z",        "role": {          "id": "00000000-0000-0000-0000-000000000619",          "name": "Admin 1560"        },        "updated_datetime": "2026-10-13T15:03:28.566097Z"      },      "credit_number": "CRT-A",      "credit_uses": [        {          "amount": "40",          "credit": {            "amount": "100",            "credit_number": "CRT-A",            "id": "fd370363-dcc8-4600-979b-f2391a76b04d",            "source": "USER"          },          "id": "5188bede-5a35-4f9f-9d24-34a88d8662a3",          "inserted_datetime": "2026-10-13T15:03:28.576638Z",          "payment": null        }      ],      "deleted_in_qbo": false,      "external_note": "ext",      "id": "fd370363-dcc8-4600-979b-f2391a76b04d",      "inserted_datetime": "2026-10-13T15:03:28.568265Z",      "internal_note": "int",      "original_amount": "150",      "owner": null,      "payment": null,      "qb_credit_memo_id": null,      "qb_payment_id": null,      "qb_sync_status": null,      "remaining_balance": "60",      "return": null,      "source": "USER",      "status": "ACTIVE",      "updated_datetime": "2026-10-13T15:03:28.574064Z"    }  ],  "next_page": null}