Preview a code for the signed-in person
/billing/offer-code/{code}
What a code gives, whether it is valid, and which of the person's teams can redeem it. For the redeem page (/redeem/<CODE>). Not tied to one team. Nothing is written. An invalid code is a 200 with valid: false and a refusal: credit_code_invalid, code_expired ("This link expired on 5 Jan 2027. Ask us for a new one."), credit_code_expired, credit_code_used_up or credit_code_locked (this link is for another email, compared without case).
Path Parameters
Response Body
Null for an unknown code.
10 properties
The sooner of the link's redeem_by and the offer's end.
What the offer gives. The staff-written display_lines when the offer has them.
["$500 in credits for 90 days","from the day you add a card."]The same as lines, in groups for a page.
3 properties
Pro features this offer leaves out. Services left out are not listed.
Feature and service names the team gets. For an offer about Pro, every Pro feature it keeps, then what the offer adds.
The credits, discount and Pro lines; or the offer's staff-written display_lines.
The last moment the link works. Null for no date.
Set when the code was already redeemed. The team is named only when it is one of the person's own; otherwise its fields are null.
3 properties
Why the code cannot be redeemed, as the redeem would answer. Null when it can.
2 properties
This link expired on 5 Jan 2027. Ask us for a new one.code_expiredEach team the person is in.
8 properties
The team's logo URL, if it has one.
What the team still needs, in plain lines.
["Add a card to unlock the credits"]Why the code cannot be redeemed, as the redeem would answer. Null when it can.
2 properties
This link expired on 5 Jan 2027. Ask us for a new one.code_expiredWhat changes for this team, in plain lines.
["Adds $500 to your credits ($4","210 left today)"]Errors
| Status | Description |
|---|---|
403 | Forbidden for anything but a signed-in session |
curl -X GET 'https://api.truto.one/billing/offer-code/{code}' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json'const response = await fetch('https://api.truto.one/billing/offer-code/{code}', {
method: 'GET',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/billing/offer-code/{code}"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
response = requests.get(url, headers=headers, params=params)
print(response.json())