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 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;

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

Example response:

{
    "account": {
        "shipping_address_locality": null,
        "import_id": null,
        "primary_contact_id": null,
        "tel": null,
        "address_unit": null,
        "default_approver": 0,
        "company_number": null,
        "no_publicity": null,
        "url": null,
        "shipping_address_street": null,
        "vat_number": null,
        "address_postcode": null,
        "billing_address_country_id": null,
        "address_country": null,
        "id": 1,
        "shipping_address_postcode": null,
        "industries": [],
        "address_street": null,
        "source": null,
        "address_region": null,
        "is_employee": false,
        "default_price_level_id": null,
        "is_individual": false,
        "is_supplier": false,
        "parent_id": null,
        "source_details": null,
        "notes": null,
        "billing_contact_person": null,
        "billing_address_locality": null,
        "is_partner": false,
        "email": null,
        "billing_address_region": 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
            },
            "bank_details": null,
            "currency": {
                "html_code": null,
                "symbol": "\u00a3",
                "code": "GBP",
                "name": "British Pound Sterling",
                "is_base": true
            },
            "id": 1,
            "currency_code": "GBP",
            "account_id": null
        },
        "billing_address_unit": null,
        "partner_type": null,
        "default_price_level": null,
        "address_town": null,
        "billing_address_postcode": null,
        "shipping_address_town": null,
        "billing_address_street": null,
        "shipping_address_region": null,
        "shipping_address_country_id": null,
        "is_deleted": false,
        "name": "Acme Corporation",
        "customer_since": null,
        "mobile": null,
        "shipping_contact_person": null,
        "created": "2016-11-29T13:36:18",
        "shipping_address_unit": null,
        "is_customer": false,
        "address_locality": null,
        "initial_contact_id": null,
        "external_id": null,
        "bank_details": null,
        "billing_address_town": null
    },
    "description": null,
    "account_id": 1,
    "longitude": null,
    "latitude": null,
    "id": 4,
    "name": "Techcube"
}

Getting more than one Venue

GET (/api/v2/event/account_venues()

  • statuscode 200

    no error

  • statuscode 404

    does not exist

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;

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

Example response:

[
    {
        "account": {
            "shipping_address_locality": null,
            "import_id": null,
            "primary_contact_id": null,
            "tel": null,
            "address_unit": null,
            "default_approver": 0,
            "company_number": null,
            "no_publicity": null,
            "url": null,
            "shipping_address_street": null,
            "vat_number": null,
            "address_postcode": null,
            "billing_address_country_id": null,
            "address_country": null,
            "id": 1,
            "shipping_address_postcode": null,
            "industries": [],
            "address_street": null,
            "source": null,
            "address_region": null,
            "is_employee": false,
            "default_price_level_id": null,
            "is_individual": false,
            "is_supplier": false,
            "parent_id": null,
            "source_details": null,
            "notes": null,
            "billing_contact_person": null,
            "billing_address_locality": null,
            "is_partner": false,
            "email": null,
            "billing_address_region": 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
                },
                "bank_details": null,
                "currency": {
                    "html_code": null,
                    "symbol": "\u00a3",
                    "code": "GBP",
                    "name": "British Pound Sterling",
                    "is_base": true
                },
                "id": 1,
                "currency_code": "GBP",
                "account_id": null
            },
            "billing_address_unit": null,
            "partner_type": null,
            "default_price_level": null,
            "address_town": null,
            "billing_address_postcode": null,
            "shipping_address_town": null,
            "billing_address_street": null,
            "shipping_address_region": null,
            "shipping_address_country_id": null,
            "is_deleted": false,
            "name": "Acme Corporation",
            "customer_since": null,
            "mobile": null,
            "shipping_contact_person": null,
            "created": "2016-11-29T13:36:18",
            "shipping_address_unit": null,
            "is_customer": false,
            "address_locality": null,
            "initial_contact_id": null,
            "external_id": null,
            "bank_details": null,
            "billing_address_town": null
        },
        "description": null,
        "account_id": 1,
        "longitude": null,
        "latitude": null,
        "id": 2,
        "name": "Techcube"
    },
    {
        "account": {
            "shipping_address_locality": null,
            "import_id": null,
            "primary_contact_id": null,
            "tel": null,
            "address_unit": null,
            "default_approver": 0,
            "company_number": null,
            "no_publicity": null,
            "url": null,
            "shipping_address_street": null,
            "vat_number": null,
            "address_postcode": null,
            "billing_address_country_id": null,
            "address_country": null,
            "id": 1,
            "shipping_address_postcode": null,
            "industries": [],
            "address_street": null,
            "source": null,
            "address_region": null,
            "is_employee": false,
            "default_price_level_id": null,
            "is_individual": false,
            "is_supplier": false,
            "parent_id": null,
            "source_details": null,
            "notes": null,
            "billing_contact_person": null,
            "billing_address_locality": null,
            "is_partner": false,
            "email": null,
            "billing_address_region": 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
                },
                "bank_details": null,
                "currency": {
                    "html_code": null,
                    "symbol": "\u00a3",
                    "code": "GBP",
                    "name": "British Pound Sterling",
                    "is_base": true
                },
                "id": 1,
                "currency_code": "GBP",
                "account_id": null
            },
            "billing_address_unit": null,
            "partner_type": null,
            "default_price_level": null,
            "address_town": null,
            "billing_address_postcode": null,
            "shipping_address_town": null,
            "billing_address_street": null,
            "shipping_address_region": null,
            "shipping_address_country_id": null,
            "is_deleted": false,
            "name": "Acme Corporation",
            "customer_since": null,
            "mobile": null,
            "shipping_contact_person": null,
            "created": "2016-11-29T13:36:18",
            "shipping_address_unit": null,
            "is_customer": false,
            "address_locality": null,
            "initial_contact_id": null,
            "external_id": null,
            "bank_details": null,
            "billing_address_town": null
        },
        "description": null,
        "account_id": 1,
        "longitude": null,
        "latitude": null,
        "id": 3,
        "name": "another_place"
    }
]

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 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;

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

Example response:

{
    "account": {
        "shipping_address_locality": null,
        "import_id": null,
        "primary_contact_id": null,
        "tel": null,
        "address_unit": null,
        "default_approver": 0,
        "company_number": null,
        "no_publicity": null,
        "url": null,
        "shipping_address_street": null,
        "vat_number": null,
        "address_postcode": null,
        "billing_address_country_id": null,
        "address_country": null,
        "id": 1,
        "shipping_address_postcode": null,
        "industries": [],
        "address_street": null,
        "source": null,
        "address_region": null,
        "is_employee": false,
        "default_price_level_id": null,
        "is_individual": false,
        "is_supplier": false,
        "parent_id": null,
        "source_details": null,
        "notes": null,
        "billing_contact_person": null,
        "billing_address_locality": null,
        "is_partner": false,
        "email": null,
        "billing_address_region": 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
            },
            "bank_details": null,
            "currency": {
                "html_code": null,
                "symbol": "\u00a3",
                "code": "GBP",
                "name": "British Pound Sterling",
                "is_base": true
            },
            "id": 1,
            "currency_code": "GBP",
            "account_id": null
        },
        "billing_address_unit": null,
        "partner_type": null,
        "default_price_level": null,
        "address_town": null,
        "billing_address_postcode": null,
        "shipping_address_town": null,
        "billing_address_street": null,
        "shipping_address_region": null,
        "shipping_address_country_id": null,
        "is_deleted": false,
        "name": "Acme Corporation",
        "customer_since": null,
        "mobile": null,
        "shipping_contact_person": null,
        "created": "2016-11-29T13:36:18",
        "shipping_address_unit": null,
        "is_customer": false,
        "address_locality": null,
        "initial_contact_id": null,
        "external_id": null,
        "bank_details": null,
        "billing_address_town": null
    },
    "description": null,
    "account_id": 1,
    "longitude": null,
    "latitude": null,
    "id": 4,
    "name": "Techcube"
}

Updating Venues

PUT (/api/v2/event/account_venues/(int: id)

  • statuscode 200

    no error

  • statuscode 404

    does not exist

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;

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

Example response:

{
    "account": {
        "shipping_address_locality": null,
        "import_id": null,
        "primary_contact_id": null,
        "tel": null,
        "address_unit": null,
        "default_approver": 0,
        "company_number": null,
        "no_publicity": null,
        "url": null,
        "shipping_address_street": null,
        "vat_number": null,
        "address_postcode": null,
        "billing_address_country_id": null,
        "address_country": null,
        "id": 1,
        "shipping_address_postcode": null,
        "industries": [],
        "address_street": null,
        "source": null,
        "address_region": null,
        "is_employee": false,
        "default_price_level_id": null,
        "is_individual": false,
        "is_supplier": false,
        "parent_id": null,
        "source_details": null,
        "notes": null,
        "billing_contact_person": null,
        "billing_address_locality": null,
        "is_partner": false,
        "email": null,
        "billing_address_region": 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
            },
            "bank_details": null,
            "currency": {
                "html_code": null,
                "symbol": "\u00a3",
                "code": "GBP",
                "name": "British Pound Sterling",
                "is_base": true
            },
            "id": 1,
            "currency_code": "GBP",
            "account_id": null
        },
        "billing_address_unit": null,
        "partner_type": null,
        "default_price_level": null,
        "address_town": null,
        "billing_address_postcode": null,
        "shipping_address_town": null,
        "billing_address_street": null,
        "shipping_address_region": null,
        "shipping_address_country_id": null,
        "is_deleted": false,
        "name": "Acme Corporation",
        "customer_since": null,
        "mobile": null,
        "shipping_contact_person": null,
        "created": "2016-11-29T13:36:18",
        "shipping_address_unit": null,
        "is_customer": false,
        "address_locality": null,
        "initial_contact_id": null,
        "external_id": null,
        "bank_details": null,
        "billing_address_town": null
    },
    "description": null,
    "account_id": 1,
    "longitude": null,
    "latitude": null,
    "id": 6,
    "name": "My new value for name"
}

Deleting Venues

DELETE (/api/v2/event/account_venues/(int: id)

  • statuscode 200

    deleted entity successfully

  • statuscode 404

    entity not found

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;

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

Example response:

{
    "account": {
        "shipping_address_locality": null,
        "import_id": null,
        "primary_contact_id": null,
        "tel": null,
        "address_unit": null,
        "default_approver": 0,
        "company_number": null,
        "no_publicity": null,
        "url": null,
        "shipping_address_street": null,
        "vat_number": null,
        "address_postcode": null,
        "billing_address_country_id": null,
        "address_country": null,
        "id": 1,
        "shipping_address_postcode": null,
        "industries": [],
        "address_street": null,
        "source": null,
        "address_region": null,
        "is_employee": false,
        "default_price_level_id": null,
        "is_individual": false,
        "is_supplier": false,
        "parent_id": null,
        "source_details": null,
        "notes": null,
        "billing_contact_person": null,
        "billing_address_locality": null,
        "is_partner": false,
        "email": null,
        "billing_address_region": 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
            },
            "bank_details": null,
            "currency": {
                "html_code": null,
                "symbol": "\u00a3",
                "code": "GBP",
                "name": "British Pound Sterling",
                "is_base": true
            },
            "id": 1,
            "currency_code": "GBP",
            "account_id": null
        },
        "billing_address_unit": null,
        "partner_type": null,
        "default_price_level": null,
        "address_town": null,
        "billing_address_postcode": null,
        "shipping_address_town": null,
        "billing_address_street": null,
        "shipping_address_region": null,
        "shipping_address_country_id": null,
        "is_deleted": false,
        "name": "Acme Corporation",
        "customer_since": null,
        "mobile": null,
        "shipping_contact_person": null,
        "created": "2016-11-29T13:36:18",
        "shipping_address_unit": null,
        "is_customer": false,
        "address_locality": null,
        "initial_contact_id": null,
        "external_id": null,
        "bank_details": null,
        "billing_address_town": null
    },
    "description": null,
    "account_id": 1,
    "longitude": null,
    "latitude": null,
    "id": 1,
    "name": "Techcube"
}