BizKitHub
DocsAPI ReferenceVoucher/bff/voucher/analyze
getVoucherAdmin BFF

/bff/voucher/analyze

Returns a lightweight snapshot of a voucher: whether it exists in the organisation and, if it does, its computed status (active / inactive / expired / not-yet-valid / limit-reached). Unlike /full-detail, this endpoint does NOT throw when the voucher is missing.

VouchergetBffVoucherAnalyze

Parameters

1 query

Query parameters

· 1
codestringRequired

Voucher code to analyze.

ExampleSUMMER2024

Response schema

1 status code documented

200SuccessVoucher analysis result.
object | object

Voucher analysis result.

One of 2:
Variant 1

Voucher not found.

exists"false"Required

Voucher with this code does not exist.

Variant 2

Voucher exists — snapshot with computed status.

exists"true"Required
codestringRequired

Voucher code (canonical, uppercase).

type"fixed" | "percentage" | "free-credit" | "free-product"Required

Discount type.

valuestringRequired

Discount value.

activebooleanRequired

Database active flag (does NOT consider expiration/limit).

effectivelyActivebooleanRequired

True if voucher is currently usable (active + within validity + below limit).

isValidbooleanRequired

Alias of effectivelyActive — convenient flag for UI consumers.

status"active" | "inactive" | "expired" | "not-yet-valid" | "limit-reached"Required

Computed status enum.

usedCountnumberRequired

Number of times voucher has been used.

usageLimitnumber | nullRequired

Maximum number of uses, or null if unlimited.

One of 2:
Variant 1
number
Variant 2
null
remainingUsagenumber | nullRequired

Remaining uses, or null if unlimited.

One of 2:
Variant 1
number
Variant 2
null
validFromDate | string | string | number | nullRequired

Validity start date.

One of 2:
Variant 1
Date | string | string | number
One of 4:
Variant 1
Date
Variant 2
stringdate-time
Variant 3
stringdate
Variant 4
number
Variant 2
null
validToDate | string | string | number | nullRequired

Validity end date.

One of 2:
Variant 1
Date | string | string | number
One of 4:
Variant 1
Date
Variant 2
stringdate-time
Variant 3
stringdate
Variant 4
number
Variant 2
null
daysUntilExpirationnumber | nullRequired

Days remaining until expiration, or null if no expiration or already expired.

One of 2:
Variant 1
number
Variant 2
null
lastUsedDateDate | string | string | number | nullRequired

Last usage date.

One of 2:
Variant 1
Date | string | string | number
One of 4:
Variant 1
Date
Variant 2
stringdate-time
Variant 3
stringdate
Variant 4
number
Variant 2
null
notestringRequired

Internal note (full content).

Response example

application/json
{
  "exists": false
}

Request example

GET /bff/voucher/analyze

get
curl -X GET "https://api.bizkithub.com/bff/voucher/analyze?code=SUMMER2024" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key