SignupTokens

Create a SignupToken

Use this endpoint to create a new SignupToken. The token is bound to a MembershipType and optionally to a non-default MembershipRate. You can pre-populate the customer's name and email, and cap how many times the token can be used.

post/customers/signup-tokens

Request body

membership_type_idstring required

The MembershipType this token allows signups as

membership_rate_idstring

The MembershipRate this token allows signups as. This must belong to the same MembershipType as the one provided. If omitted, the default rate of the given type will be used.

start_datestring date

Optionally, you can specify the date which the membership should start. This should not be specified if a duration is given.

end_datestring date nullable

Optionally, you can specify the date which the membership should end. This should not be specified if a duration is given.

durationstring

Optionally, you can specify the duration of the membership as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations. This should not be specified if either a start_date or end_date is given.

max_usesinteger nullable

The maximum number of times this signup token can be used. If null, it can be used an unlimited number of times. When the number of uses reaches the max_uses, it is soft-deleted.

first_namestring

The first name of the customer this token allows signups as.

last_namestring

The last name of the customer this token allows signups as.

emailstring nullable

The email of the customer this token allows signups as.

Example request

{
  "membership_type_id": "000000-000000-000000-000000",
  "membership_rate_id": "000000-000000-000000-000000",
  "start_date": "2021-02-21",
  "end_date": "2022-02-21",
  "duration": "P1M",
  "max_uses": 1,
  "first_name": "Dan",
  "last_name": "Johnson",
  "email": "dan.johnson@example.com"
}

Response

The signup token was successfully retrieved or updated.

Example response

{
  "data": {
    "id": "000000-000000-000000-000000",
    "membership_type_id": "000000-000000-000000-000000",
    "membership_rate_id": "000000-000000-000000-000000",
    "start_date": "2021-02-21",
    "end_date": "2022-02-21",
    "duration": "P1M",
    "first_name": "Dan",
    "email": "dan@try.be"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.