Administrate

Venues

Venues represent event venues.

A venue is part of the events module and provides the following information:

  • account
  • description
  • account_id
  • longitude
  • latitude
  • id
  • name

Getting Venues

GET /api/v2/event/account_venues/:id
statuscode 200:no error
statuscode 404:does not exist
Using Python:
import json
import requests

response = requests.get('http://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues/4',
                         auth=('<username>', '<password>'))

print response.json
Using Curl:
curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues/4     -k -u (login):(password)
Using PHP:
<?php
$credentials = '(username):(password)';
$url = 'https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues/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;
Example response:
{
    "account": {
        "shipping_address_locality": null,
        "import_id": null,
        "primary_contact_id": null,
        "tel": null,
        "address_unit": null,
        "shipping_address_town": null,
        "default_approver": 0,
        "shipping_address_unit": null,
        "no_publicity": null,
        "shipping_address_street": null,
        "vat_number": null,
        "address_postcode": null,
        "billing_address_country_id": null,
        "address_street": null,
        "id": 1,
        "shipping_address_postcode": null,
        "industries": [],
        "address_country": null,
        "parent_id": null,
        "address_region": null,
        "is_employee": false,
        "default_price_level_id": null,
        "is_individual": false,
        "source": null,
        "source_details": null,
        "is_customer": false,
        "billing_contact_person": null,
        "billing_address_locality": null,
        "is_partner": false,
        "email": null,
        "initial_contact_id": null,
        "shipping_contact_person": null,
        "fax": null,
        "account_type": null,
        "description": null,
        "tags": 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
            },
            "id": 1,
            "currency": {
                "html_code": null,
                "symbol": "\u00a3",
                "code": "GBP",
                "name": "British Pound Sterling",
                "is_base": true
            },
            "bank_details": null,
            "currency_code": "GBP",
            "account_id": null
        },
        "billing_address_unit": null,
        "partner_type": null,
        "address_town": null,
        "billing_address_postcode": null,
        "default_price_level": null,
        "billing_address_street": null,
        "shipping_address_region": null,
        "shipping_address_country_id": null,
        "is_deleted": false,
        "name": "Acme Corporation",
        "customer_since": null,
        "url": null,
        "notes": null,
        "created": "2016-11-29T13:36:18",
        "company_number": null,
        "bank_details": null,
        "mobile": null,
        "address_locality": null,
        "billing_address_region": null,
        "external_id": null,
        "is_supplier": false,
        "billing_address_town": null
    },
    "description": null,
    "longitude": null,
    "name": "Techcube",
    "latitude": null,
    "id": 4,
    "account_id": 1
}

Getting more than one Venue

GET /api/v2/event/account_venues
statuscode 200:no error
statuscode 404:does not exist
Using Python:
import json
import requests

response = requests.get('http://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues',
                         auth=('<username>', '<password>'))

print response.json
Using Curl:
curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues     -k -u (login):(password)
Using PHP:
<?php
$credentials = '(username):(password)';
$url = 'https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues';
$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;
Example response:
[
    {
        "account": {
            "shipping_address_locality": null,
            "import_id": null,
            "primary_contact_id": null,
            "tel": null,
            "address_unit": null,
            "shipping_address_town": null,
            "default_approver": 0,
            "shipping_address_unit": null,
            "no_publicity": null,
            "shipping_address_street": null,
            "vat_number": null,
            "address_postcode": null,
            "billing_address_country_id": null,
            "address_street": null,
            "id": 1,
            "shipping_address_postcode": null,
            "industries": [],
            "address_country": null,
            "parent_id": null,
            "address_region": null,
            "is_employee": false,
            "default_price_level_id": null,
            "is_individual": false,
            "source": null,
            "source_details": null,
            "is_customer": false,
            "billing_contact_person": null,
            "billing_address_locality": null,
            "is_partner": false,
            "email": null,
            "initial_contact_id": null,
            "shipping_contact_person": null,
            "fax": null,
            "account_type": null,
            "description": null,
            "tags": 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
                },
                "id": 1,
                "currency": {
                    "html_code": null,
                    "symbol": "\u00a3",
                    "code": "GBP",
                    "name": "British Pound Sterling",
                    "is_base": true
                },
                "bank_details": null,
                "currency_code": "GBP",
                "account_id": null
            },
            "billing_address_unit": null,
            "partner_type": null,
            "address_town": null,
            "billing_address_postcode": null,
            "default_price_level": null,
            "billing_address_street": null,
            "shipping_address_region": null,
            "shipping_address_country_id": null,
            "is_deleted": false,
            "name": "Acme Corporation",
            "customer_since": null,
            "url": null,
            "notes": null,
            "created": "2016-11-29T13:36:18",
            "company_number": null,
            "bank_details": null,
            "mobile": null,
            "address_locality": null,
            "billing_address_region": null,
            "external_id": null,
            "is_supplier": false,
            "billing_address_town": null
        },
        "description": null,
        "longitude": null,
        "name": "Techcube",
        "latitude": null,
        "id": 2,
        "account_id": 1
    },
    {
        "account": {
            "shipping_address_locality": null,
            "import_id": null,
            "primary_contact_id": null,
            "tel": null,
            "address_unit": null,
            "shipping_address_town": null,
            "default_approver": 0,
            "shipping_address_unit": null,
            "no_publicity": null,
            "shipping_address_street": null,
            "vat_number": null,
            "address_postcode": null,
            "billing_address_country_id": null,
            "address_street": null,
            "id": 1,
            "shipping_address_postcode": null,
            "industries": [],
            "address_country": null,
            "parent_id": null,
            "address_region": null,
            "is_employee": false,
            "default_price_level_id": null,
            "is_individual": false,
            "source": null,
            "source_details": null,
            "is_customer": false,
            "billing_contact_person": null,
            "billing_address_locality": null,
            "is_partner": false,
            "email": null,
            "initial_contact_id": null,
            "shipping_contact_person": null,
            "fax": null,
            "account_type": null,
            "description": null,
            "tags": 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
                },
                "id": 1,
                "currency": {
                    "html_code": null,
                    "symbol": "\u00a3",
                    "code": "GBP",
                    "name": "British Pound Sterling",
                    "is_base": true
                },
                "bank_details": null,
                "currency_code": "GBP",
                "account_id": null
            },
            "billing_address_unit": null,
            "partner_type": null,
            "address_town": null,
            "billing_address_postcode": null,
            "default_price_level": null,
            "billing_address_street": null,
            "shipping_address_region": null,
            "shipping_address_country_id": null,
            "is_deleted": false,
            "name": "Acme Corporation",
            "customer_since": null,
            "url": null,
            "notes": null,
            "created": "2016-11-29T13:36:18",
            "company_number": null,
            "bank_details": null,
            "mobile": null,
            "address_locality": null,
            "billing_address_region": null,
            "external_id": null,
            "is_supplier": false,
            "billing_address_town": null
        },
        "description": null,
        "longitude": null,
        "name": "another_place",
        "latitude": null,
        "id": 3,
        "account_id": 1
    }
]

Filtering

The results for a list of venues can be filtered. See Filtering

Creating Venues

POST /api/v2/event/account_venues
Required fields:
  • name
  • account_id
statuscode 200:no error
statuscode 404:could not create
Using Python:
import json
import requests

data = {u'name': u'Techcube', u'account_id': 1}

response = requests.post('http://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues',
                        data=json.dumps(data),
                        headers={'content-type': 'application/json'},
                        auth=('<username>', '<password>'))

print response.json
Using Curl:
curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues     -H "Content-Type: application/json"     -k -u (login):(password)     -X POST     -d '{"name": "Techcube", "account_id": 1}'
Using PHP:
<?php
$credentials = '(username):(password)';
$url = 'https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues';
$data = array("name" => u'Techcube', "account_id" => 1);
$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;
Example response:
{
    "account": {
        "shipping_address_locality": null,
        "import_id": null,
        "primary_contact_id": null,
        "tel": null,
        "address_unit": null,
        "shipping_address_town": null,
        "default_approver": 0,
        "shipping_address_unit": null,
        "no_publicity": null,
        "shipping_address_street": null,
        "vat_number": null,
        "address_postcode": null,
        "billing_address_country_id": null,
        "address_street": null,
        "id": 1,
        "shipping_address_postcode": null,
        "industries": [],
        "address_country": null,
        "parent_id": null,
        "address_region": null,
        "is_employee": false,
        "default_price_level_id": null,
        "is_individual": false,
        "source": null,
        "source_details": null,
        "is_customer": false,
        "billing_contact_person": null,
        "billing_address_locality": null,
        "is_partner": false,
        "email": null,
        "initial_contact_id": null,
        "shipping_contact_person": null,
        "fax": null,
        "account_type": null,
        "description": null,
        "tags": 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
            },
            "id": 1,
            "currency": {
                "html_code": null,
                "symbol": "\u00a3",
                "code": "GBP",
                "name": "British Pound Sterling",
                "is_base": true
            },
            "bank_details": null,
            "currency_code": "GBP",
            "account_id": null
        },
        "billing_address_unit": null,
        "partner_type": null,
        "address_town": null,
        "billing_address_postcode": null,
        "default_price_level": null,
        "billing_address_street": null,
        "shipping_address_region": null,
        "shipping_address_country_id": null,
        "is_deleted": false,
        "name": "Acme Corporation",
        "customer_since": null,
        "url": null,
        "notes": null,
        "created": "2016-11-29T13:36:18",
        "company_number": null,
        "bank_details": null,
        "mobile": null,
        "address_locality": null,
        "billing_address_region": null,
        "external_id": null,
        "is_supplier": false,
        "billing_address_town": null
    },
    "description": null,
    "longitude": null,
    "name": "Techcube",
    "latitude": null,
    "id": 4,
    "account_id": 1
}

Updating Venues

PUT /api/v2/event/account_venues/(int: id)
statuscode 200:no error
statuscode 404:does not exist
Using Python:
import json
import requests

data = {u'name': u'My new value for name'}

response = requests.put('http://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues/6',
                        data=json.dumps(data),
                        headers={'content-type': 'application/json'},
                        auth=('<username>', '<password>'))

print response.json
Using Curl:
curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues/6     -H "Content-Type: application/json"     -k -u (login):(password)     -X PUT     -d '{"name": "My new value for name"}'
Using PHP:
<?php
$credentials = '(username):(password)';
$url = 'https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues/6';
$data = array("name" => u'My new value for name');
$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;
Example response:
{
    "account": {
        "shipping_address_locality": null,
        "import_id": null,
        "primary_contact_id": null,
        "tel": null,
        "address_unit": null,
        "shipping_address_town": null,
        "default_approver": 0,
        "shipping_address_unit": null,
        "no_publicity": null,
        "shipping_address_street": null,
        "vat_number": null,
        "address_postcode": null,
        "billing_address_country_id": null,
        "address_street": null,
        "id": 1,
        "shipping_address_postcode": null,
        "industries": [],
        "address_country": null,
        "parent_id": null,
        "address_region": null,
        "is_employee": false,
        "default_price_level_id": null,
        "is_individual": false,
        "source": null,
        "source_details": null,
        "is_customer": false,
        "billing_contact_person": null,
        "billing_address_locality": null,
        "is_partner": false,
        "email": null,
        "initial_contact_id": null,
        "shipping_contact_person": null,
        "fax": null,
        "account_type": null,
        "description": null,
        "tags": 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
            },
            "id": 1,
            "currency": {
                "html_code": null,
                "symbol": "\u00a3",
                "code": "GBP",
                "name": "British Pound Sterling",
                "is_base": true
            },
            "bank_details": null,
            "currency_code": "GBP",
            "account_id": null
        },
        "billing_address_unit": null,
        "partner_type": null,
        "address_town": null,
        "billing_address_postcode": null,
        "default_price_level": null,
        "billing_address_street": null,
        "shipping_address_region": null,
        "shipping_address_country_id": null,
        "is_deleted": false,
        "name": "Acme Corporation",
        "customer_since": null,
        "url": null,
        "notes": null,
        "created": "2016-11-29T13:36:18",
        "company_number": null,
        "bank_details": null,
        "mobile": null,
        "address_locality": null,
        "billing_address_region": null,
        "external_id": null,
        "is_supplier": false,
        "billing_address_town": null
    },
    "description": null,
    "longitude": null,
    "name": "My new value for name",
    "latitude": null,
    "id": 6,
    "account_id": 1
}

Deleting Venues

DELETE /api/v2/event/account_venues/(int: id)
statuscode 200:deleted entity successfully
statuscode 404:entity not found
Using Python:
import json
import requests

response = requests.delete('http://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues/1',
                         auth=('<username>', '<password>'))

print response.json
Using Curl:
curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues/1     -X DELETE -k -u (login):(password)
Using PHP:
<?php
$credentials = '(username):(password)';
$url = 'https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/account_venues/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;
Example response:
{
    "account": {
        "shipping_address_locality": null,
        "import_id": null,
        "primary_contact_id": null,
        "tel": null,
        "address_unit": null,
        "shipping_address_town": null,
        "default_approver": 0,
        "shipping_address_unit": null,
        "no_publicity": null,
        "shipping_address_street": null,
        "vat_number": null,
        "address_postcode": null,
        "billing_address_country_id": null,
        "address_street": null,
        "id": 1,
        "shipping_address_postcode": null,
        "industries": [],
        "address_country": null,
        "parent_id": null,
        "address_region": null,
        "is_employee": false,
        "default_price_level_id": null,
        "is_individual": false,
        "source": null,
        "source_details": null,
        "is_customer": false,
        "billing_contact_person": null,
        "billing_address_locality": null,
        "is_partner": false,
        "email": null,
        "initial_contact_id": null,
        "shipping_contact_person": null,
        "fax": null,
        "account_type": null,
        "description": null,
        "tags": 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
            },
            "id": 1,
            "currency": {
                "html_code": null,
                "symbol": "\u00a3",
                "code": "GBP",
                "name": "British Pound Sterling",
                "is_base": true
            },
            "bank_details": null,
            "currency_code": "GBP",
            "account_id": null
        },
        "billing_address_unit": null,
        "partner_type": null,
        "address_town": null,
        "billing_address_postcode": null,
        "default_price_level": null,
        "billing_address_street": null,
        "shipping_address_region": null,
        "shipping_address_country_id": null,
        "is_deleted": false,
        "name": "Acme Corporation",
        "customer_since": null,
        "url": null,
        "notes": null,
        "created": "2016-11-29T13:36:18",
        "company_number": null,
        "bank_details": null,
        "mobile": null,
        "address_locality": null,
        "billing_address_region": null,
        "external_id": null,
        "is_supplier": false,
        "billing_address_town": null
    },
    "description": null,
    "longitude": null,
    "name": "Techcube",
    "latitude": null,
    "id": 1,
    "account_id": 1
}