Creates a job for registering multiple registrants to a session.

The POST /sessions/:id/people/bulk endpoint that lets developers register multiple participants for a single event session at once is asynchronous and is based on a job scheduling mechanism. Here are the different steps:

πŸ’‘ We recommend you to subscribe to the `job.ended` webhook subscriptions to be informed when your jobs are processed, instead of using a polling mechanism to retrieve the latest status of your bulk registration job.
  1. First off, call the POST /sessions/:id/people/bulk endpoint with the list of people you want to register (with a maximum length of 50 items). The JSON payload should look like this:

    {
    	"type": "jobs",
    	"data": {
    		"attributes": {
    			"tasks": [
    				{
    					"attributes": {
    						... /* person #1 */
    					}
    				},
    				{
    					"attributes": {
    						... /* person #2 */
    					}
    				}
    			]
    		}
    	}
    }
    

    Please note that individual people attributes need to be the same as with the POST /sessions/:id/people endpoint. See the details of this endpoint here β†’

  2. Once you call this endpoint, Livestorm’s API will reply with an HTTP 202 accepted response code and the following JSON response.

    {
    	"type": "jobs",
    	"id": "e8a0efb9-a116-4e1e-a2c2-1f9105334545",
    	"attributes": {
    		"status": "processing",
    		"total_items": 127,
    		"total_processed_items": 0,
    		"total_fail": 0,
    		"total_success": 0
    	}
    }
    
  3. Later on, you can call the GET /jobs/:id endpoint with the ID provided in the above response. It will give you the status of your job, along with the number of items that have been β€”and that still needβ€” to be processed. The status of a job can either be processing, ended (if all tasks were successful), or failed (if at least one of the tasks failed). The number of successful and failed tasks will be provided in the payload.

  4. Once the job finishes (either successfully or with errors), the job.ended webhook will be triggered and will contain the same payload as in step #3 but with a different status.

  5. Finally, you can call the GET /jobs/:id/tasks to retrieve the list of registrants that needed to be created, as well as their creation status:

    1. Items that could successfully be created will include the details of each individual registrant.
    2. Items that couldn’t be created will contain the error code and its error details.

    You’ll receive an HTTP 207 multi-status response code and the following JSON response:

    {
    	"data": [
    		{
    			"status": "succeeded",
    			"errors": [],
    			"data": {
    				... /* people content */
    			}
    		},
    		{
    			"status": "failed",
    			"errors": [
    				{
    					"code": "already_registered",
    					"message": "User already registered for this session."
    				}
    			]
    		}
    	],
    	"meta": {
    		... /* pagination information */
    	}
    }
    

Here’s a flowchart that recaps the whole process:

πŸ’‘ Pro-tip: Using this bulk registration endpoint drastically reduces the number of API calls required to register a large number of registrants at once, as opposed to using individual POST /sessions/:id/people API calls to create them. As a result, you’ll preserve your API rate limits (both monthly and per-second)!
Language
Authorization
URL
Click Try It! to start a request and see the response here!