Deregister participants

Set all participants with a given booking id to deregistered

Request

PUT https://www.kursguiden.no/api/v2/booking/:id/deregister

For every API request you make, you'll need to present the API access key in the HTTP Header as X-API-Key to be authenticated.

Parameters

Name Required Value Description
config optional object
Name Required Value Description
with_fee optional boolean If this property is set to true the users will be set to deregistered with fee. Default: false
send_receipt_email_to_participant optional boolean If this property is set to true an email receipt will be sent to the participant. Default: false

Example code in PHP

$request_url = 'https://www.kursguiden.no/api/v2/booking/:id/deregister';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'X-API-Key: {your-api-key}',
  'Accept: application/json',
));
$result = curl_exec($ch);
curl_close($ch);
               

Response

If the method is successful it responds with an JSON structure, as it is shown below.

{
    "successful": true,
    "booking_id": "473576",
    "participants": [
        .. a list of participants that were affected (Same object structure as "Get Participants" endpoint)
    ]
}

Unsuccessful response sample:

{
    "successful": false,
    "errors": [
       {
        "code" => some_error_code,
        "message" => "A human readable error response"
       }
    ]
}      



Error codes

unauthorized You are not authorized to execute this operation.
resource_not_found 'We can not find any booking with given ID.
© 2024 FrontCore