Skip to content
GET /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

codestring
required

Response Body

resultobject
codestring
offerobject

Null for an unknown code.

10 properties
credit_centsinteger
credit_valid_daysinteger
ends_atstring · date-time

The sooner of the link's redeem_by and the offer's end.

idstring · uuid
keystring
linesstring[]

What the offer gives. The staff-written display_lines when the offer has them.

Example: ["$500 in credits for 90 days","from the day you add a card."]
namestring
pro_continue_askboolean
pro_onboolean
summaryobject

The same as lines, in groups for a page.

3 properties
excludedstring[]

Pro features this offer leaves out. Services left out are not listed.

includedstring[]

Feature and service names the team gets. For an offer about Pro, every Pro feature it keeps, then what the offer adds.

mainstring[]

The credits, discount and Pro lines; or the offer's staff-written display_lines.

redeem_bystring · date-time

The last moment the link works. Null for no date.

redeemed_byobject

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
team_idstring · uuid
team_namestring
team_offer_idstring · uuid
refusalobject

Why the code cannot be redeemed, as the redeem would answer. Null when it can.

2 properties
messagestring
Example: This link expired on 5 Jan 2027. Ask us for a new one.
truto_error_codestring
Example: code_expired
teamsobject[]

Each team the person is in.

8 properties
can_redeemboolean
idstring · uuid
is_adminboolean
logostring

The team's logo URL, if it has one.

namestring
needsstring[]

What the team still needs, in plain lines.

Example: ["Add a card to unlock the credits"]
refusalobject

Why the code cannot be redeemed, as the redeem would answer. Null when it can.

2 properties
messagestring
Example: This link expired on 5 Jan 2027. Ask us for a new one.
truto_error_codestring
Example: code_expired
replacesstring[]

What changes for this team, in plain lines.

Example: ["Adds $500 to your credits ($4","210 left today)"]
validboolean

Errors

StatusDescription
403Forbidden 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())