Event registration types API

Add, update, and remove the registration types on an event through the Heylo API, including caps, prices, and guests.

The API is included on the Business plan. See plans.

A registration type object is one way to register for an event, such as a general spot or a paid ticket, with its own cap, price, and guest rules. See event registration for how members use registration types. The registration types of an existing event change one at a time, and a registration type keeps its registrations when it changes. Every operation needs an API key with write access that covers the event's group.

Operations

  • Add a registration type: POST https://api.heylo.com/apiv1-create with type set to "eventRegistrationType"
  • Update a registration type: POST https://api.heylo.com/apiv1-update with type set to "eventRegistrationType"
  • Remove a registration type: POST https://api.heylo.com/apiv1-remove with type set to "eventRegistrationType"

To set the registration types of a new event, send registrationTypes when you create the event.

Registration type object

Registration types are returned inside an event object, in registrationTypes. That field is an object keyed by registration type ID, so a registration type's ID is its key. Heylo assigns the ID, and it cannot be chosen.

Attributes

  • cap (number): the most people who can register with this type.
  • closed (boolean): true when people can no longer register with this type.
  • closesAt (number): when registration closes, in Unix milliseconds.
  • currency (string): the three-letter currency code of the price, in lowercase. Empty for a free type.
  • description (string): the description registrants see.
  • guestSettings (object): present when a registrant can bring guests.
    • max (number): the most guests per registrant.
    • priceInCents (number): the price per guest.
  • name (string): the name registrants see.
  • opensAt (number): when registration opens, in Unix milliseconds.
  • order (number): the display position, lowest first.
  • priceInCents (number): the price, in the smallest unit of the group's currency. Left out or 0 for a free type.
  • roleIds (object): the roles that can register with this type, keyed by role ID. Left out when any member can.
  • teamSettings (object): present on a team registration type.
    • sizeMax (number): the most people on a team.
    • sizeMin (number): the fewest people on a team.
json
{
  "HEYLO_REGISTRATION_TYPE_ID": {
    "cap": 50,
    "currency": "usd",
    "guestSettings": {"max": 2, "priceInCents": 1000},
    "name": "General",
    "order": 1,
    "priceInCents": 1500
  }
}

The API writes cap, description, guestSettings, name, order, and priceInCents. Closing a type, opening and closing times, role restrictions, and team settings are set in Heylo. An update through the API leaves them as they are.

Add a registration type

Adds one registration type to an event and returns the event. The event's other registration types stay as they are, and Heylo does not notify members. An event can have up to 50 registration types.

POST https://api.heylo.com/apiv1-create

Parameters

  • eventId (string, required): the event ID. The request takes no communityId.
  • registrationType (object, required): the registration type to add. Do not send an id: Heylo assigns it.
    • name (string, required): the name registrants see, up to 100 characters.
    • cap (number, optional): the most people who can register with this type, a whole number from 1 to 1,000,000.
    • description (string, optional): the description, up to 1,000 characters.
    • guestSettings (object, optional): lets a registrant bring guests.
      • max (number, optional): the most guests per registrant, from 1 to 100.
      • priceInCents (number, optional): the price per guest.
    • order (number, optional): the display position, lowest first, from 0 to 1,000. A new type goes after the existing ones by default.
    • priceInCents (number, optional): the price in the smallest unit of your group's currency, so 1500 is $15.00 for a group that charges in US dollars. Leave it out or send 0 for a free type.
  • type (string, required): "eventRegistrationType".

A price needs your group to be set up for paid event tickets, with a linked bank account that is ready for payouts. Without one, a request with a price returns a 400. Prices are charged in your group's currency, and the API does not accept a currency.

Returns

  • event (object): the event object after the change.
  • registrationTypeId (string): the ID Heylo assigned to the new registration type.
bash
curl -X POST https://api.heylo.com/apiv1-create \
  -H "Authorization: Bearer HEYLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "eventId": "HEYLO_EVENT_ID",
    "registrationType": {
      "cap": 20,
      "guestSettings": {"max": 2, "priceInCents": 1000},
      "name": "Early bird",
      "priceInCents": 1500
    },
    "type": "eventRegistrationType"
  }'
json
{
  "event": {
    "eventId": "HEYLO_EVENT_ID",
    "name": "Saturday long run",
    "registrationTypes": {
      "HEYLO_REGISTRATION_TYPE_ID": {
        "cap": 20,
        "currency": "usd",
        "guestSettings": {"max": 2, "priceInCents": 1000},
        "name": "Early bird",
        "order": 2,
        "priceInCents": 1500
      }
    }
  },
  "registrationTypeId": "HEYLO_REGISTRATION_TYPE_ID"
}

Update a registration type

Changes one registration type and returns the event. Only the fields you send change, and the type keeps its registrations. Heylo does not notify members.

POST https://api.heylo.com/apiv1-update

Parameters

  • eventId (string, required): the event ID.
  • registrationTypeId (string, required): the registration type's key in the event's registrationTypes.
  • type (string, required): "eventRegistrationType".
  • updates (object, required): the fields to change. Send null to clear a field marked clearable.
    • cap (number, clearable): the most people who can register with this type. Clearing it removes the cap.
    • description (string, clearable): the description, up to 1,000 characters.
    • guestSettings (object, clearable): the guest rules. Clearing it turns guests off. Guests cannot be turned on for a team registration type.
      • max (number, clearable): the most guests per registrant, from 1 to 100. Clearing it removes the limit.
      • priceInCents (number): the price per guest.
    • name (string): the name registrants see, up to 100 characters.
    • order (number): the display position, lowest first, from 0 to 1,000.
    • priceInCents (number): the price. Send 0 to make the type free. A price needs a linked bank account that is ready for payouts.

Returns

bash
curl -X POST https://api.heylo.com/apiv1-update \
  -H "Authorization: Bearer HEYLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "eventId": "HEYLO_EVENT_ID",
    "registrationTypeId": "HEYLO_REGISTRATION_TYPE_ID",
    "type": "eventRegistrationType",
    "updates": {"cap": 80}
  }'

Remove a registration type

Removes one registration type from an event and returns the event. The event's other registration types stay as they are, and Heylo does not notify members.

POST https://api.heylo.com/apiv1-remove

Parameters

  • eventId (string, required): the event ID.
  • registrationTypeId (string, required): the registration type's key in the event's registrationTypes.
  • type (string, required): "eventRegistrationType".

Returns

bash
curl -X POST https://api.heylo.com/apiv1-remove \
  -H "Authorization: Bearer HEYLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "eventId": "HEYLO_EVENT_ID",
    "registrationTypeId": "HEYLO_REGISTRATION_TYPE_ID",
    "type": "eventRegistrationType"
  }'

Errors for registration types

Registration type operations return the standard errors, with these cases:

  • 404: the event or the registration type does not exist, or your key does not cover the event's group.
  • 400: the event is canceled. The registration types of a canceled event cannot change.
  • 400: the change would give the event more than 50 registration types.
  • 400: the request sets a price, and your group has no linked bank account that is ready for payouts.

Related articles

Still need help?

Contact us and we typically reply within one business day. Or message us in Heylo Support chat.