To update the registration status for one or more registrations within an event track, make a PUT call to the /events/{event_id}/tracks/{track_id}/registrations endpoint and specify the required path parameters.

Parameters

  • event_id: (path, string) Required. The ID that uniquely identifies the event. Example: 07216444-4e3b-41ea-a3b8-5a418fce41f4.

  • track_id: (path, string) Required. The track key that uniquely identifies the event track. Example: gqz1gb.

  • increase_count: (query, boolean) Optional. Override count flag.

  • increase_item_count: (query, boolean) Optional. Override item count flag.

  • return_items_to_inventory: (query, boolean) Optional. Return items to inventory flag. Defaults to true.

Request Examples

PUT https://api.cc.email/v3/events/{event_id}/tracks/{track_id}/registrations

Endpoint Requirements

User privileges: campaign:write

Authorization scopes: campaign_data

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.cc.email/v3/events/07216444-4e3b-41ea-a3b8-5a418fce41f4/tracks/gqz1gb/registrations',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
  "registration_ids": ["4460bdcd-1a8a-434a-a7bf-c72a500743b2", "2ed7e310-ab71-4e8f-8863-8784e7ee4183"],
  "registration_status": "CANCELED"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {access_token}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

curl --location --request PUT 'https://api.cc.email/v3/events/07216444-4e3b-41ea-a3b8-5a418fce41f4/tracks/gqz1gb/registrations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {access_token}' \
--data '{
  "registration_ids": ["4460bdcd-1a8a-434a-a7bf-c72a500743b2", "2ed7e310-ab71-4e8f-8863-8784e7ee4183"],
  "registration_status": "CANCELED"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
        .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"registration_ids\": [\"4460bdcd-1a8a-434a-a7bf-c72a500743b2\", \"2ed7e310-ab71-4e8f-8863-8784e7ee4183\"],\n  \"registration_status\": \"CANCELED\"\n}");
Request request = new Request.Builder()
        .url("https://api.cc.email/v3/events/07216444-4e3b-41ea-a3b8-5a418fce41f4/tracks/gqz1gb/registrations")
        .method("PUT", body)
        .addHeader("Content-Type", "application/json")
        .addHeader("Authorization", "Bearer {access_token}")
        .build();
Response response = client.newCall(request).execute();

Example Response

A successful update returns a 200 OK response. If some registrations fail to update, a 207 Multi-Status response is returned with details on which registrations failed.

Learn more about Registration schema.

Test the endpoint using our reference tester: Try it!

Tags: events