Create a promotional code
POST /api/v1/billing/promotional-codes
The code string drivers will enter (e.g.
SUMMER25). Must be unique within your organisation. Uppercase letters and numbers only, 4–20 characters.How the discount is calculated. Accepted values:
percent (percentage off the total), fixed (fixed amount off the total).The discount amount. For
percent, this is the percentage (e.g. 25 for 25% off). For fixed, this is the amount in your default currency.ISO 4217 currency code. Required when
discount_type is fixed.Maximum number of times this code can be redeemed across all users. Leave unset for unlimited uses.
Maximum number of times a single user can redeem this code. Leave unset for unlimited.
ISO 8601 date/time after which the code can no longer be applied. Leave unset for no expiry.
Internal description for the code — not shown to drivers.
Unique identifier for the promotional code.
The code string.
Number of times this code has been successfully redeemed.
Whether the code is currently redeemable. Set to
false automatically when max_uses is reached or expires_at passes.List promotional codes
GET /api/v1/billing/promotional-codes
Returns all promotional codes in your organisation.
Filter by active status.
Filter by discount type:
percent or fixed.Maximum number of codes to return.
Pagination offset.
Get a promotional code
GET /api/v1/billing/promotional-codes/{code_id}
The unique identifier of the promotional code.
Apply a promotional code to a session
POST /api/v1/billing/promotional-codes/sessions/{session_id}/apply-code
Applies a promotional code to a completed session. The discount is calculated and recorded against the session. This endpoint can be called by a driver application or by an operator on behalf of a driver.
The billing session to apply the code to.
The promotional code string to apply.
Session total before the code was applied.
Amount discounted from the session.
Session total after the discount.
Get promotional code usage stats
GET /api/v1/billing/promotional-codes/{code_id}/usage
Returns detailed usage statistics for a promotional code, including a breakdown of redemptions over time.
The unique identifier of the promotional code.
ISO 8601 start date/time to filter usage from.
ISO 8601 end date/time to filter usage to.
Total number of times the code has been applied.
Number of distinct users who redeemed the code.
Total value discounted across all redemptions.
Daily redemption counts and discount totals for the requested period.
User types
User types let you segment drivers into groups so billing rules can target them specifically. For example, you might create types likestaff, fleet, and public and then write rules that grant free sessions to staff drivers.
Create a user type
POST /api/v1/billing/user-types
Unique name for the user type (e.g.
staff, fleet-customer, vip).Optional description of who belongs to this type.
List user types
GET /api/v1/billing/user-types
Returns all user types in your organisation.
Assign a user type to a driver
PUT /api/v1/billing/user-types/users/{user_id}/user-type
Sets the user type for a specific driver. Replaces any previously assigned type.
The user to assign the type to.
The user type to assign.