Private Events
Private Events represent scheduled training events in the system.
An event record is part of the events module and provides the following information:
- personnel_administrator
- personnel_tutor
- code
- personnel_administrator_id
- region_id
- price
- course
- tag
- course_id
- id
- delegates_max
- venue_id
- title
- personnel
- tax_type
- company_id
- delegates_reserved
- location
- is_sold_out
- notes2
- event_template_id
- type
- delegates_booked
- account_id
- registration_deadline
- tag_id
- disposition
- is_online
- is_cancelled
- delegates_actual
- account
- is_provisional
- non_working_days
- region
- is_lms
- venue
- overall_attendance
- account_venue
- personnel_tutor_id
- tax_type_id
- notes
- currency_code
- time_zone
- start_date
- start_time
- end_date
- end_time
- start_tz
- end_tz
- classroom_start
- classroom_end
- classroom_start_tz
- classroom_end_tz
Getting Private Events
GET (/api/v2/event/private_events/:id()
statuscode 200
no error
statuscode 404
does not exist
Using Curl:
curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events/4 -k -u (login):(password)
Using PHP:
<?php
$credentials = '(username):(password)';
$url = 'https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events/4';
$options = array(
'http' => array(
'method' => 'GET',
'header'=> "Accept: application/json\r\n" .
"Authorization: Basic " . base64_encode($credentials)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo $result;
Using Python:
import json
import requests
response = requests.get('http://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events/4',
auth=('<username>', '<password>'))
print response.json
Example response:
{
"personnel_administrator": null,
"personnel_tutor": {
"membership_number": null,
"last_name": "Smith",
"tel": null,
"address_unit": null,
"contract_notes": null,
"created_on": "2017-02-21T14:45:23",
"inactive": false,
"salutation": null,
"address_postcode": null,
"address_street": null,
"id": 1,
"first_name": "John",
"middle_name": null,
"import_ref": null,
"address_region": null,
"organisation": null,
"company_id": 1,
"department": null,
"address_locality": null,
"email": null,
"job_title": null,
"dont_mail": false,
"fax": null,
"account_id": 1,
"marketing_activity_id": null,
"lms_bio": null,
"address_town": null,
"source2": null,
"source1": null,
"is_admin": 0,
"is_tutor": false,
"tutor_bio": null,
"dormant": null,
"is_deleted": false,
"address_country_id": null,
"mobile": null,
"notes": null,
"is_staff": false,
"no_third_party": null,
"created_by_id": null,
"external_id": null
},
"code": null,
"personnel_administrator_id": null,
"region_id": "TEST",
"price": null,
"course": {
"days_text": null,
"import_id": null,
"code": null,
"related_courses": null,
"topics": null,
"days": null,
"price": null,
"course_text_9": null,
"course_text_8": null,
"mapped_items": [],
"language_code": null,
"pricing_band": null,
"location_id": 0,
"lms_summary": null,
"uk_vat_rate": null,
"title": null,
"introduction": null,
"course_text_7": null,
"level_id": null,
"company_id": null,
"id": 1,
"top_seller": null,
"course_text_13": null,
"course_text_12": null,
"course_text_11": null,
"course_text_10": null,
"method": null,
"course_text_14": null,
"company": null,
"registration_deadline_offset": null,
"disposition": null,
"prices": [],
"pre_requisites": null,
"categories": [],
"allowable_tutors": [],
"benefits": null,
"_lms_links": null,
"level": null,
"short_code": null,
"sales_tax_rate": null,
"pricing_band_id": null,
"cpe": null,
"summary": null,
"default_start_time": null,
"level_on_pdf": 0,
"is_archived": false,
"default_end_time": null,
"tax_type": null
},
"tag": null,
"course_id": 1,
"id": 4,
"end_time": "12:00:00",
"delegates_max": 10,
"venue_id": null,
"title": null,
"personnel": [],
"tax_type": null,
"company_id": 1,
"delegates_reserved": 0.0,
"location": null,
"classroom_end": "2013-02-03T12:00:00",
"is_sold_out": false,
"notes2": null,
"event_template_id": null,
"type": "private",
"start_date": "2013-01-02T00:00:00",
"delegates_booked": 0.0,
"account_id": null,
"end_date": "2013-02-03",
"start_time": "09:00:00",
"registration_deadline": null,
"tag_id": null,
"classroom_start": "2013-01-02T09:00:00",
"disposition": "normal",
"is_online": false,
"is_cancelled": false,
"delegates_actual": null,
"account": null,
"is_provisional": false,
"non_working_days": [],
"region": {
"name": "Test Region",
"default_tax": null,
"countries": [],
"invoice_numbering": "company",
"default_tax_id": null,
"company": {
"registration_numbers": null,
"code": "ACM",
"name": "Acme Corporation",
"settings": {
"time_format": "H:i",
"date_format": "Y-m-d",
"locale": "en_GB",
"week_starts": null,
"non_working_days": null
},
"bank_details": null,
"currency": {
"code": "GBP",
"name": "British Pound Sterling",
"symbol": "\u00a3",
"html_code": null,
"id": 1,
"is_base": true
},
"id": 1,
"currency_code": "GBP",
"account_id": null
},
"company_id": 1,
"mapped_countries": [],
"is_hidden": false,
"id": "TEST"
},
"is_lms": false,
"venue": null,
"overall_attendance": null,
"account_venue": null,
"personnel_tutor_id": 1,
"tax_type_id": null,
"notes": null,
"currency_code": "GBP",
"time_zone": "Europe/Paris",
"start_tz": "2013-01-02T09:00:00+01:00",
"end_tz": "2013-02-03T12:00:00+01:00",
"classroom_start_tz": "2013-01-02T09:00:00+01:00",
"classroom_end_tz": "2013-02-03T12:00:00+01:00"
}
Getting more than one Private Event
GET (/api/v2/event/private_events()
statuscode 200
no error
statuscode 404
does not exist
Using Curl:
curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events -k -u (login):(password)
Using PHP:
<?php
$credentials = '(username):(password)';
$url = 'https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events';
$options = array(
'http' => array(
'method' => 'GET',
'header'=> "Accept: application/json\r\n" .
"Authorization: Basic " . base64_encode($credentials)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo $result;
Using Python:
import json
import requests
response = requests.get('http://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events',
auth=('<username>', '<password>'))
print response.json
Example response:
[
{
"personnel_administrator": null,
"personnel_tutor": {
"membership_number": null,
"last_name": "Smith",
"tel": null,
"address_unit": null,
"contract_notes": null,
"created_on": "2017-02-21T14:45:23",
"inactive": false,
"salutation": null,
"address_postcode": null,
"address_street": null,
"id": 1,
"first_name": "John",
"middle_name": null,
"import_ref": null,
"address_region": null,
"organisation": null,
"company_id": 1,
"department": null,
"address_locality": null,
"email": null,
"job_title": null,
"dont_mail": false,
"fax": null,
"account_id": 1,
"marketing_activity_id": null,
"lms_bio": null,
"address_town": null,
"source2": null,
"source1": null,
"is_admin": 0,
"is_tutor": false,
"tutor_bio": null,
"dormant": null,
"is_deleted": false,
"address_country_id": null,
"mobile": null,
"notes": null,
"is_staff": false,
"no_third_party": null,
"created_by_id": null,
"external_id": null
},
"code": null,
"personnel_administrator_id": null,
"region_id": "TEST",
"price": null,
"course": {
"days_text": null,
"import_id": null,
"code": null,
"related_courses": null,
"topics": null,
"days": null,
"price": null,
"course_text_9": null,
"course_text_8": null,
"mapped_items": [],
"language_code": null,
"pricing_band": null,
"location_id": 0,
"lms_summary": null,
"uk_vat_rate": null,
"title": null,
"introduction": null,
"course_text_7": null,
"level_id": null,
"company_id": null,
"id": 1,
"top_seller": null,
"course_text_13": null,
"course_text_12": null,
"course_text_11": null,
"course_text_10": null,
"method": null,
"course_text_14": null,
"company": null,
"registration_deadline_offset": null,
"disposition": null,
"prices": [],
"pre_requisites": null,
"categories": [],
"allowable_tutors": [],
"benefits": null,
"_lms_links": null,
"level": null,
"short_code": null,
"sales_tax_rate": null,
"pricing_band_id": null,
"cpe": null,
"summary": null,
"default_start_time": null,
"level_on_pdf": 0,
"is_archived": false,
"default_end_time": null,
"tax_type": null
},
"tag": null,
"course_id": 1,
"id": 2,
"end_time": "12:00:00",
"delegates_max": 10,
"venue_id": null,
"title": null,
"personnel": [],
"tax_type": null,
"company_id": 1,
"delegates_reserved": 0.0,
"location": null,
"classroom_end": "2013-01-02T09:00:00",
"is_sold_out": false,
"notes2": null,
"event_template_id": null,
"type": "private",
"start_date": "2013-01-02T00:00:00",
"delegates_booked": 0.0,
"account_id": null,
"end_date": "2013-02-03",
"start_time": "09:00:00",
"registration_deadline": null,
"tag_id": null,
"classroom_start": "2013-01-02T09:00:00",
"disposition": "normal",
"is_online": false,
"is_cancelled": false,
"delegates_actual": null,
"account": null,
"is_provisional": false,
"non_working_days": [],
"region": {
"name": "Test Region",
"default_tax": null,
"countries": [],
"invoice_numbering": "company",
"default_tax_id": null,
"company": {
"registration_numbers": null,
"code": "ACM",
"name": "Acme Corporation",
"settings": {
"time_format": "H:i",
"date_format": "Y-m-d",
"locale": "en_GB",
"week_starts": null,
"non_working_days": null
},
"bank_details": null,
"currency": {
"code": "GBP",
"name": "British Pound Sterling",
"symbol": "\u00a3",
"html_code": null,
"id": 1,
"is_base": true
},
"id": 1,
"currency_code": "GBP",
"account_id": null
},
"company_id": 1,
"mapped_countries": [],
"is_hidden": false,
"id": "TEST"
},
"is_lms": false,
"venue": null,
"overall_attendance": null,
"account_venue": null,
"personnel_tutor_id": 1,
"tax_type_id": null,
"notes": null,
"currency_code": "GBP"
},
{
"personnel_administrator": null,
"personnel_tutor": {
"membership_number": null,
"last_name": "Smith",
"tel": null,
"address_unit": null,
"contract_notes": null,
"created_on": "2017-02-21T14:45:23",
"inactive": false,
"salutation": null,
"address_postcode": null,
"address_street": null,
"id": 1,
"first_name": "John",
"middle_name": null,
"import_ref": null,
"address_region": null,
"organisation": null,
"company_id": 1,
"department": null,
"address_locality": null,
"email": null,
"job_title": null,
"dont_mail": false,
"fax": null,
"account_id": 1,
"marketing_activity_id": null,
"lms_bio": null,
"address_town": null,
"source2": null,
"source1": null,
"is_admin": 0,
"is_tutor": false,
"tutor_bio": null,
"dormant": null,
"is_deleted": false,
"address_country_id": null,
"mobile": null,
"notes": null,
"is_staff": false,
"no_third_party": null,
"created_by_id": null,
"external_id": null
},
"code": null,
"personnel_administrator_id": null,
"region_id": "TEST",
"price": null,
"course": {
"days_text": null,
"import_id": null,
"code": null,
"related_courses": null,
"topics": null,
"days": null,
"price": null,
"course_text_9": null,
"course_text_8": null,
"mapped_items": [],
"language_code": null,
"pricing_band": null,
"location_id": 0,
"lms_summary": null,
"uk_vat_rate": null,
"title": null,
"introduction": null,
"course_text_7": null,
"level_id": null,
"company_id": null,
"id": 1,
"top_seller": null,
"course_text_13": null,
"course_text_12": null,
"course_text_11": null,
"course_text_10": null,
"method": null,
"course_text_14": null,
"company": null,
"registration_deadline_offset": null,
"disposition": null,
"prices": [],
"pre_requisites": null,
"categories": [],
"allowable_tutors": [],
"benefits": null,
"_lms_links": null,
"level": null,
"short_code": null,
"sales_tax_rate": null,
"pricing_band_id": null,
"cpe": null,
"summary": null,
"default_start_time": null,
"level_on_pdf": 0,
"is_archived": false,
"default_end_time": null,
"tax_type": null
},
"tag": null,
"course_id": 1,
"id": 3,
"end_time": "12:00:42",
"delegates_max": 80,
"venue_id": null,
"title": null,
"personnel": [],
"tax_type": null,
"company_id": 1,
"delegates_reserved": 0.0,
"location": null,
"classroom_end": "2013-02-03T10:23:30",
"is_sold_out": false,
"notes2": null,
"event_template_id": null,
"type": "private",
"start_date": "2013-02-03T00:00:00",
"delegates_booked": 0.0,
"account_id": null,
"end_date": "2013-04-05",
"start_time": "10:23:30",
"registration_deadline": null,
"tag_id": null,
"classroom_start": "2013-02-03T10:23:30",
"disposition": "normal",
"is_online": false,
"is_cancelled": false,
"delegates_actual": null,
"account": null,
"is_provisional": true,
"non_working_days": [],
"region": {
"name": "Test Region",
"default_tax": null,
"countries": [],
"invoice_numbering": "company",
"default_tax_id": null,
"company": {
"registration_numbers": null,
"code": "ACM",
"name": "Acme Corporation",
"settings": {
"time_format": "H:i",
"date_format": "Y-m-d",
"locale": "en_GB",
"week_starts": null,
"non_working_days": null
},
"bank_details": null,
"currency": {
"code": "GBP",
"name": "British Pound Sterling",
"symbol": "\u00a3",
"html_code": null,
"id": 1,
"is_base": true
},
"id": 1,
"currency_code": "GBP",
"account_id": null
},
"company_id": 1,
"mapped_countries": [],
"is_hidden": false,
"id": "TEST"
},
"is_lms": false,
"venue": null,
"overall_attendance": null,
"account_venue": null,
"personnel_tutor_id": 1,
"tax_type_id": null,
"notes": null,
"currency_code": "GBP",
"time_zone": "Europe/Paris",
"start_tz": "2013-01-02T09:00:00+00:01",
"end_tz": "2013-02-03T12:00:00+00:01",
"classroom_start_tz": "2013-01-02T09:00:00+00:01",
"classroom_end_tz": "2013-02-03T12:00:00+00:01"
}
]
Filtering
The results for a list of contacts can be filtered. See Filtering
Creating Private Events
POST (/api/v2/event/private_events()
Required fields:
- region_id
- end_date
- start_time
- personnel_tutor_id
- disposition
- course_id
- start_date
- currency_code
- end_time
For users who are trying our Time Zone feature this additional field is required:
- time_zone
The time_zone field will only accept valid time zones. See Valid Time Zones
statuscode 200
no error
statuscode 404
could not create
Using Curl:
curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events -H "Content-Type: application/json" -k -u (login):(password) -X POST -d '{"region_id": "TEST", "end_date": "2013-02-03", "start_time": "09:00", "is_provisional": false, "disposition": "normal", "course_id": 1, "delegates_max": 10, "personnel_tutor_id": 1, "start_date": "2013-01-02", "currency_code": "GBP", "end_time": "12:00"}'
Using PHP:
<?php
$credentials = '(username):(password)';
$url = 'https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events';
$data = array("delegates_max" => 10, "region_id" => u'TEST', "end_date" => u'2013-02-03', "start_time" => u'09:00', "is_provisional" => False, "personnel_tutor_id" => 1, "disposition" => u'normal', "course_id" => 1, "start_date" => u'2013-01-02', "currency_code" => u'GBP', "end_time" => u'12:00');
$options = array(
'http' => array(
'method' => 'POST',
'content' => json_encode($data),
'header'=> "Content-Type: application/json\r\n" .
"Accept: application/json\r\n" .
"Authorization: Basic " . base64_encode($credentials)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo $result;
Using Python:
import json
import requests
data = {u'delegates_max': 10, u'region_id': u'TEST', u'end_date': u'2013-02-03', u'start_time': u'09:00', u'is_provisional': False, u'personnel_tutor_id': 1, u'disposition': u'normal', u'course_id': 1, u'start_date': u'2013-01-02', u'currency_code': u'GBP', u'end_time': u'12:00'}
response = requests.post('http://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events',
data=json.dumps(data),
headers={'content-type': 'application/json'},
auth=('<username>', '<password>'))
print response.json
Example response:
{
"personnel_administrator": null,
"personnel_tutor": {
"membership_number": null,
"last_name": "Smith",
"tel": null,
"address_unit": null,
"contract_notes": null,
"created_on": "2017-02-21T14:45:23",
"inactive": false,
"salutation": null,
"address_postcode": null,
"address_street": null,
"id": 1,
"first_name": "John",
"middle_name": null,
"import_ref": null,
"address_region": null,
"organisation": null,
"company_id": 1,
"department": null,
"address_locality": null,
"email": null,
"job_title": null,
"dont_mail": false,
"fax": null,
"account_id": 1,
"marketing_activity_id": null,
"lms_bio": null,
"address_town": null,
"source2": null,
"source1": null,
"is_admin": 0,
"is_tutor": false,
"tutor_bio": null,
"dormant": null,
"is_deleted": false,
"address_country_id": null,
"mobile": null,
"notes": null,
"is_staff": false,
"no_third_party": null,
"created_by_id": null,
"external_id": null
},
"code": null,
"personnel_administrator_id": null,
"region_id": "TEST",
"price": null,
"course": {
"days_text": null,
"import_id": null,
"code": null,
"related_courses": null,
"topics": null,
"days": null,
"price": null,
"course_text_9": null,
"course_text_8": null,
"mapped_items": [],
"language_code": null,
"pricing_band": null,
"location_id": 0,
"lms_summary": null,
"uk_vat_rate": null,
"title": null,
"introduction": null,
"course_text_7": null,
"level_id": null,
"company_id": null,
"id": 1,
"top_seller": null,
"course_text_13": null,
"course_text_12": null,
"course_text_11": null,
"course_text_10": null,
"method": null,
"course_text_14": null,
"company": null,
"registration_deadline_offset": null,
"disposition": null,
"prices": [],
"pre_requisites": null,
"categories": [],
"allowable_tutors": [],
"benefits": null,
"_lms_links": null,
"level": null,
"short_code": null,
"sales_tax_rate": null,
"pricing_band_id": null,
"cpe": null,
"summary": null,
"default_start_time": null,
"level_on_pdf": 0,
"is_archived": false,
"default_end_time": null,
"tax_type": null
},
"tag": null,
"course_id": 1,
"id": 4,
"end_time": "12:00:00",
"delegates_max": 10,
"venue_id": null,
"title": null,
"personnel": [],
"tax_type": null,
"company_id": 1,
"delegates_reserved": 0.0,
"location": null,
"classroom_end": "2013-02-03T12:00:00",
"is_sold_out": false,
"notes2": null,
"event_template_id": null,
"type": "private",
"start_date": "2013-01-02T00:00:00",
"delegates_booked": 0.0,
"account_id": null,
"end_date": "2013-02-03",
"start_time": "09:00:00",
"registration_deadline": null,
"tag_id": null,
"classroom_start": "2013-01-02T09:00:00",
"disposition": "normal",
"is_online": false,
"is_cancelled": false,
"delegates_actual": null,
"account": null,
"is_provisional": false,
"non_working_days": [],
"region": {
"name": "Test Region",
"default_tax": null,
"countries": [],
"invoice_numbering": "company",
"default_tax_id": null,
"company": {
"registration_numbers": null,
"code": "ACM",
"name": "Acme Corporation",
"settings": {
"time_format": "H:i",
"date_format": "Y-m-d",
"locale": "en_GB",
"week_starts": null,
"non_working_days": null
},
"bank_details": null,
"currency": {
"code": "GBP",
"name": "British Pound Sterling",
"symbol": "\u00a3",
"html_code": null,
"id": 1,
"is_base": true
},
"id": 1,
"currency_code": "GBP",
"account_id": null
},
"company_id": 1,
"mapped_countries": [],
"is_hidden": false,
"id": "TEST"
},
"is_lms": false,
"venue": null,
"overall_attendance": null,
"account_venue": null,
"personnel_tutor_id": 1,
"tax_type_id": null,
"notes": null,
"currency_code": "GBP",
"time_zone": "Europe/Paris",
"start_tz": "2013-01-02T09:00:00+01:00",
"end_tz": "2013-02-03T12:00:00+01:00",
"classroom_start_tz": "2013-01-02T09:00:00+01:00",
"classroom_end_tz": "2013-02-03T12:00:00+01:00"
}
Updating Private Events
PUT (/api/v2/event/private_events/(int: id)
statuscode 200
no error
statuscode 404
does not exist
Using Curl:
curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events/6 -H "Content-Type: application/json" -k -u (login):(password) -X PUT -d '{"start_date": "2009-01-25 14:15:16", "end_date": "2010-01-25"}'
Using PHP:
<?php
$credentials = '(username):(password)';
$url = 'https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events/6';
$data = array("start_date" => u'2009-01-25 14:15:16', "end_date" => u'2010-01-25');
$options = array(
'http' => array(
'method' => 'PUT',
'content' => json_encode($data),
'header'=> "Content-Type: application/json\r\n" .
"Accept: application/json\r\n" .
"Authorization: Basic " . base64_encode($credentials)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo $result;
Using Python:
import json
import requests
data = {u'start_date': u'2009-01-25 14:15:16', u'end_date': u'2010-01-25'}
response = requests.put('http://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events/6',
data=json.dumps(data),
headers={'content-type': 'application/json'},
auth=('<username>', '<password>'))
print response.json
Example response:
{
"personnel_administrator": null,
"personnel_tutor": {
"membership_number": null,
"last_name": "Smith",
"tel": null,
"address_unit": null,
"contract_notes": null,
"created_on": "2017-02-21T14:45:23",
"inactive": false,
"salutation": null,
"address_postcode": null,
"address_street": null,
"id": 1,
"first_name": "John",
"middle_name": null,
"import_ref": null,
"address_region": null,
"organisation": null,
"company_id": 1,
"department": null,
"address_locality": null,
"email": null,
"job_title": null,
"dont_mail": false,
"fax": null,
"account_id": 1,
"marketing_activity_id": null,
"lms_bio": null,
"address_town": null,
"source2": null,
"source1": null,
"is_admin": 0,
"is_tutor": false,
"tutor_bio": null,
"dormant": null,
"is_deleted": false,
"address_country_id": null,
"mobile": null,
"notes": null,
"is_staff": false,
"no_third_party": null,
"created_by_id": null,
"external_id": null
},
"code": null,
"personnel_administrator_id": null,
"region_id": "TEST",
"price": null,
"course": {
"days_text": null,
"import_id": null,
"code": null,
"related_courses": null,
"topics": null,
"days": null,
"price": null,
"course_text_9": null,
"course_text_8": null,
"mapped_items": [],
"language_code": null,
"pricing_band": null,
"location_id": 0,
"lms_summary": null,
"uk_vat_rate": null,
"title": null,
"introduction": null,
"course_text_7": null,
"level_id": null,
"company_id": null,
"id": 1,
"top_seller": null,
"course_text_13": null,
"course_text_12": null,
"course_text_11": null,
"course_text_10": null,
"method": null,
"course_text_14": null,
"company": null,
"registration_deadline_offset": null,
"disposition": null,
"prices": [],
"pre_requisites": null,
"categories": [],
"allowable_tutors": [],
"benefits": null,
"_lms_links": null,
"level": null,
"short_code": null,
"sales_tax_rate": null,
"pricing_band_id": null,
"cpe": null,
"summary": null,
"default_start_time": null,
"level_on_pdf": 0,
"is_archived": false,
"default_end_time": null,
"tax_type": null
},
"tag": null,
"course_id": 1,
"id": 6,
"end_time": "12:00:00",
"delegates_max": 10,
"venue_id": null,
"title": null,
"personnel": [],
"tax_type": null,
"company_id": 1,
"delegates_reserved": 0.0,
"location": null,
"classroom_end": "2013-02-03T12:00:00",
"is_sold_out": false,
"notes2": null,
"event_template_id": null,
"type": "private",
"start_date": "2009-01-25T14:15:16",
"delegates_booked": 0.0,
"account_id": null,
"end_date": "2010-01-25",
"start_time": "09:00:00",
"registration_deadline": null,
"tag_id": null,
"classroom_start": "2013-01-02T09:00:00",
"disposition": "normal",
"is_online": false,
"is_cancelled": false,
"delegates_actual": null,
"account": null,
"is_provisional": false,
"non_working_days": [],
"region": {
"name": "Test Region",
"default_tax": null,
"countries": [],
"invoice_numbering": "company",
"default_tax_id": null,
"company": {
"registration_numbers": null,
"code": "ACM",
"name": "Acme Corporation",
"settings": {
"time_format": "H:i",
"date_format": "Y-m-d",
"locale": "en_GB",
"week_starts": null,
"non_working_days": null
},
"bank_details": null,
"currency": {
"code": "GBP",
"name": "British Pound Sterling",
"symbol": "\u00a3",
"html_code": null,
"id": 1,
"is_base": true
},
"id": 1,
"currency_code": "GBP",
"account_id": null
},
"company_id": 1,
"mapped_countries": [],
"is_hidden": false,
"id": "TEST"
},
"is_lms": false,
"venue": null,
"overall_attendance": null,
"account_venue": null,
"personnel_tutor_id": 1,
"tax_type_id": null,
"notes": null,
"currency_code": "GBP",
"time_zone": "Europe/Paris",
"start_tz": "2013-01-02T09:00:00+01:00",
"end_tz": "2013-02-03T12:00:00+01:00",
"classroom_start_tz": "2013-01-02T09:00:00+01:00",
"classroom_end_tz": "2013-02-03T12:00:00+01:00"
}
Deleting Private Events
DELETE (/api/v2/event/private_events/(int: id)
statuscode 200
deleted entity successfully
statuscode 404
entity not found
Using Curl:
curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events/1 -X DELETE -k -u (login):(password)
Using PHP:
<?php
$credentials = '(username):(password)';
$url = 'https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events/1';
$options = array(
'http' => array(
'method' => 'DELETE',
'header'=> "Accept: application/json\r\n" .
"Authorization: Basic " . base64_encode($credentials)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo $result;
Using Python:
import json
import requests
response = requests.delete('http://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/private_events/1',
auth=('<username>', '<password>'))
print response.json
Example response:
{
"personnel_administrator": null,
"personnel_tutor": {
"membership_number": null,
"last_name": "Smith",
"tel": null,
"address_unit": null,
"contract_notes": null,
"created_on": "2017-02-21T14:45:23",
"inactive": false,
"salutation": null,
"address_postcode": null,
"address_street": null,
"id": 1,
"first_name": "John",
"middle_name": null,
"import_ref": null,
"address_region": null,
"organisation": null,
"company_id": 1,
"department": null,
"address_locality": null,
"email": null,
"job_title": null,
"dont_mail": false,
"fax": null,
"account_id": 1,
"marketing_activity_id": null,
"lms_bio": null,
"address_town": null,
"source2": null,
"source1": null,
"is_admin": 0,
"is_tutor": false,
"tutor_bio": null,
"dormant": null,
"is_deleted": false,
"address_country_id": null,
"mobile": null,
"notes": null,
"is_staff": false,
"no_third_party": null,
"created_by_id": null,
"external_id": null
},
"code": null,
"personnel_administrator_id": null,
"region_id": "TEST",
"price": null,
"course": {
"days_text": null,
"import_id": null,
"code": null,
"related_courses": null,
"topics": null,
"days": null,
"price": null,
"course_text_9": null,
"course_text_8": null,
"mapped_items": [],
"language_code": null,
"pricing_band": null,
"location_id": 0,
"lms_summary": null,
"uk_vat_rate": null,
"title": null,
"introduction": null,
"course_text_7": null,
"level_id": null,
"company_id": null,
"id": 1,
"top_seller": null,
"course_text_13": null,
"course_text_12": null,
"course_text_11": null,
"course_text_10": null,
"method": null,
"course_text_14": null,
"company": null,
"registration_deadline_offset": null,
"disposition": null,
"prices": [],
"pre_requisites": null,
"categories": [],
"allowable_tutors": [],
"benefits": null,
"_lms_links": null,
"level": null,
"short_code": null,
"sales_tax_rate": null,
"pricing_band_id": null,
"cpe": null,
"summary": null,
"default_start_time": null,
"level_on_pdf": 0,
"is_archived": false,
"default_end_time": null,
"tax_type": null
},
"tag": null,
"course_id": 1,
"id": 1,
"end_time": "12:00:00",
"delegates_max": 10,
"venue_id": null,
"title": null,
"personnel": [],
"tax_type": null,
"company_id": 1,
"delegates_reserved": 0.0,
"location": null,
"classroom_end": "2013-02-03T12:00:00",
"is_sold_out": false,
"notes2": null,
"event_template_id": null,
"type": "private",
"start_date": "2013-01-02T00:00:00",
"delegates_booked": 0.0,
"account_id": null,
"end_date": "2013-02-03",
"start_time": "09:00:00",
"registration_deadline": null,
"tag_id": null,
"classroom_start": "2013-01-02T09:00:00",
"disposition": "normal",
"is_online": false,
"is_cancelled": false,
"delegates_actual": null,
"account": null,
"is_provisional": false,
"non_working_days": [],
"region": {
"name": "Test Region",
"default_tax": null,
"countries": [],
"invoice_numbering": "company",
"default_tax_id": null,
"company": {
"registration_numbers": null,
"code": "ACM",
"name": "Acme Corporation",
"settings": {
"time_format": "H:i",
"date_format": "Y-m-d",
"locale": "en_GB",
"week_starts": null,
"non_working_days": null
},
"bank_details": null,
"currency": {
"code": "GBP",
"name": "British Pound Sterling",
"symbol": "\u00a3",
"html_code": null,
"id": 1,
"is_base": true
},
"id": 1,
"currency_code": "GBP",
"account_id": null
},
"company_id": 1,
"mapped_countries": [],
"is_hidden": false,
"id": "TEST"
},
"is_lms": false,
"venue": null,
"overall_attendance": null,
"account_venue": null,
"personnel_tutor_id": 1,
"tax_type_id": null,
"notes": null,
"currency_code": "GBP",
"time_zone": "Europe/Paris",
"start_tz": "2013-01-02T09:00:00+01:00",
"end_tz": "2013-02-03T12:00:00+01:00",
"classroom_start_tz": "2013-01-02T09:00:00+01:00",
"classroom_end_tz": "2013-02-03T12:00:00+01:00"
}