Sign in

List Campaigns

GET https://{organization}.myguper.com/api/loyalty/campaign

Paginated list of loyalty/cashback campaigns. Filter by name, trigger or type through the shared listing grammar. Returns the campaign setup, not its results — for cards generated, value distributed and redeemed, see the campaign report.

Every row carries a derived status: active, draft, paused or finished. draft is a campaign saved but not published yet (isDraft): it never runs and wins over every other status. finished is not a column: for audience-list campaigns it means the send is over (audience-status = finished); for every other trigger it means the campaign period (finishAt) has ended. finished wins over isActive — a campaign whose period ended but is still switched on comes back as finished. The status is read-only: it never changes isActive.

Try-it values populated from environment ACME (Demo)


Authentication

Token

Send your user token in the x-guper-authorization header. Endpoints that support a Public mode (e.g. acúmulo and resgate previews) accept the same request without the header — Private mode adds customer data and a confirmation token to the response.

Headers

Name Type Description
x-guper-authorization * string User token issued by Guper. Omit only on endpoints that explicitly support a Public mode.
Content-Type * string Always `application/json` for endpoints that accept a JSON body.

Query parameters

Name Type Description
q[column][operator] string Filter using the `q[column][operator]=value` grammar. See [List query parameters](/docs/{lang}/guides/list-query-parameters) for the full operator table.
o[column] string Sort by column. Direction: `ASC`, `DESC`, `1` or `0`.
e integer Entries per page.
default: 20
p integer Page number.
default: 1
status string
active | draft | paused | finished
Only campaigns in this derived status. One of `active`, `draft`, `paused`, `finished`.
statusCounts integer When `1`, the response adds `statusCounts` (`{active, draft, paused, finished}`) computed with the same `q[...]` filters, ignoring `status`.
sortByStatus integer When `1`, active campaigns come first, then drafts, then paused, then finished; the requested ordering applies inside each group.
q[field][OP] string Standard Listing filter. `OP` is the operator code (`S` strict, `L` like, `IN`, ...).

Responses

Related

Copied to clipboard