Hanzo
OpenapiMarketing

Prices a promo against a plan and seat count.

Prices a promo against a plan and seat count.

GET /v1/marketing/promos/{code}/eligibility

Addresshttps://api.hanzo.ai/v1/marketing/promos/{code}/eligibility
MethodGET
Operationget_marketing_promos_by_code_eligibility
AuthAuthorization: Bearer $HANZO_API_KEY

Prices a promo against a plan and seat count. It is PURE: nothing is redeemed, credited or counted, so it is safe to call from a pricing page on every keystroke. An inactive promo or an exhausted cap quotes ineligible with the reason rather than erroring.

Request

3 fields.

FieldInTypeRequiredDescription
codepathstringyesCode is the promo code from the path.
planquerystringPlan is the plan being priced: pro, max or team.
seatsqueryintegerSeats is the Team seat count; 0 means 1, and it is ignored for the single-seat plans.

Response

StatusBodyMeaning
200Quoteok

200 body — 9 fields.

FieldInTypeAlwaysDescription
chargeCentsbodyintegerChargeCents is what month one costs after the discount, in USD cents, totalled over the seats quoted.
codebodystringCode is the promo that was priced, as stored.
discountCentsbodyintegerDiscountCents is what the promo takes off month one, in USD cents.
eligiblebodybooleanEligible says whether a redeem would be accepted right now; Reason says why not when it would not.
listCentsbodyintegerListCents is the undiscounted month price in USD cents: PER SEAT on team, the whole month on pro and max, 0 for a plan with no list price.
planbodystringPlan is the tier priced, lower-cased and trimmed: pro, max or team.
reasonbodystringReason is why Eligible is false, drawn from: "promo redemption is closed" (the subsystem is off, which is how it ships), "promo redemption cap reached", "promo…
remainingbodyintegerRemaining is how many redemptions are left under the fleet-wide cap.
seatsbodyintegerSeats is the seat count priced; a request of 0 or less was read as 1.

Failure carries the platform error shape — see Errors.

Examples

hanzo marketing promos eligibility <code>

Marketing API · All Hanzo APIs · Interactive reference

How is this guide?

On this page