Add participants to an event (ie. insert, not update)

📘

NOTE: The following features are not yet implemented

  • Question capacity checking

🚧

Do you know how Lyyti's registration types work?

Lyyti events can have one of three different registration types. Before adding a participant to an event, we recommend you take a moment to learn what these types are, and how they may affect your work. Read more here!

POST data structure

This resource accepts POST data in several formats, and you can choose the one that makes the most sense to you, the use case, and the event's enrollment type.

No POST data

As you may have noticed, none of the POST body parameters are mandatory. If no body parameters are given, a single empty participant is added. In this case, you should remember that if the participant does not continue the enrollment, there will be no data with which to identify them.

In group enrollments, the added participant will also be the contact person, and no data will be added to the group itself. In companion enrollments, the added participant will be the main participant, without a companion.

Inserting a single participant

The simplest and most common use case is adding a single participant, as in the example above. In this case, POST data is a key-value list of the parameters given.

In group enrollments, the added participant will also be the contact person, and no data will be added to the group itself. In companion enrollments, the added participant will be the main participant, without a companion.

Inserting a list of participants

You can also POST a list where each item is a key-value list of participant data.

In group enrollments, the added participants will each get a separate group. They will also be the contact persons of their respective groups, and no data will be added to the groups themselves. In companion enrollments, the added participants will all be main participants, without companions.

As you can see, this is mostly useful in single enrollments, or group/companion enrollments which are mainly used as single enrollments.

(NEW) Inserting Avecs

Inserting Avecs is possible by adding both the main participant and the avec as objects. This differs from inserting a list of participants and inserting a group by not having arrays, but only objects.

Inserting groups

Insertion of groups works the same way as inserting lists of participants, but in addition, there should be one list item with "group" as its key. This will tell the API to handle the participant list as one group enrollment. The contact person and group data will be taken from the "group" entry, and the rest will be handled as participants belonging to that group.

This insertion type only works with group enrollments.

{
 "firstname":"firstname",
 "lastname":"lastname",
 "email":"[email protected]",
 "saved":1,
 "language":"en",
 "participant_type_id":3203712,
 "standard_answers": {
     "380": "Just text",
     "381": {"3": 1}, /* radio button */
     "382": {"1": 1, "3": 1}, /* checkboxes */
     "383": {"2": 5} /* numeric options */
	}
}  
{
  "participant": {
     "firstname":"firstname1",
     "lastname":"lastname1",
     "email":"[email protected]",
     "saved":1
    },
  "avec": {
     "firstname":"firstname2",
     "lastname":"lastname2",
     "email":"[email protected]",
     "saved":1
    }
}
{
  "group": 
  {
    "firstname":"firstname1",
    "lastname":"lastname1",
    "email":"[email protected]",
    "saved":1
  },
  "participants":[
    {
    "firstname":"firstnam2",
    "lastname":"lastname2",
    "email":"[email protected]",
    "saved":1
    },
    {
    "firstname":"firstname3",
    "lastname":"lastname3",
    "email":"[email protected]",
    "saved":1
    }
   ]
  }
{
  "participants": [
{
  "firstname":"firstname1",
  "lastname":"lastname1",
  "email":"[email protected]",
  "saved":1
	},
{
  "firstname":"firstname2",
  "lastname":"lastname2",
  "email":"[email protected]",
  "saved":1
    }
  ]
}
Language