Insights Data Facility APIs

The following APIs are available:  

Facility Reservation API

The Facility Reservation API returns facility reservation information for the specified parameters.

 

 

Path:  `/facilityReservations`

Verb:  `GET`

 

The following table describes the query parameters used for the GET method.

 

Note: The maximum date range that can be retrieved in a single API call is 31 days.

Parameter Type Required Description
page int   Index page
default: 1 (the first page)
pageSize int   Number of records per page
default: 100
startDate

string

 

The permit start date must be a valid date formatted `yyyy-mm-dd`

No default value

Note: The maximum date range that can be retrieved in a single API call is 31 days.

endDate

string

 

The permit end date must be a valid date formatted `yyyy-mm-dd`

No default value

Note: The maximum date range that can be retrieved in a single API call is 31 days.

permitNumber

string

 

Permit number of the facility reservation.

event_type_ids

string

 

Comma-delimited list of event type IDs.

reservation_transaction_type string   Reservation transaction type. Users can specify Reservation, Refund Permit Charges, Permit or Permit Charges Modification as the reservation_transaction_type to run the request.
permit_modified_date_from

string

 

Permits modified during after the specified date (format: yyyy-mm-dd) are returned.

permit_modified_date_to

string

 

Permits modified during before the specified date (format: yyyy-mm-dd) are returned.

reservation_date_from

string

 

Reservations created after the specified date (format: yyyy-mm-dd) is returned.

reservation_date_to

string

 

Reservations created before the specified date (format: yyyy-mm-dd) is returned.

The response body of the GET method is formatted in JSON:

Key Type Description
page int Requested page number
pageSize int Maximum number of records per page
pageRowCount int Number of records in the current page
filteredRowCount int Number of records filtered by query parameters
totalRowCount int

Total available number of records

data array

List of facility reservations

The following table describes the data returned by the API:

Key Description
facility_id Facility ID
facility_name Facility name
facility_type Description of the facility's type
center_id The ID of the center where the facility locates
center_name The Name of the center where the facility locates
site_id The facility's site ID
site_name The facility's site name
permit_number The number of the permit
permit_date The date and time when the permit was created
event_type Event type of the reservation
event_start_date Event start date
event_start_time Event start time
event_end_date Event end date
event_end_time Event end time
day_of_week Reserved days in a week
attendance Number of attendees in the reservation
permit_status The current status of the permit (Approved, Denied, Tentative, Stage Denied, Issued, Cancelled, Waiting Decision, Completed, On Hold)
hours_reserved The total number of hours for which the facility is reserved
minutes_reserved The total number of minutes for which the facility is reserved
schedule_type The schedule type of the reservation
expiration_date The expiration date of the reservation
transaction_site Name of the transaction site where the reservation was made
system_user Name of the system user who made the reservation
customer_id Customer ID number
customer_first_name First name of the customer
customer_last_name Last name of the customer
residency Customer's resident status (Yes, No)
company_id Company ID number of the company that owns the permit (this field is included only for permits)
company_name Name of the company that owns the permit (this field is included only for permits)
latitude Latitude of the facility
longitude Longitude of the facility
event_type_id Event type ID (this field is included only for permits)
event_description Description of the event (this field is included only for permits)
company_phone Telephone number of the company that owns the permit (this field is included only for permits)
contact_name Customer's contact name (this field is included only for permits)
contact_email Customer's contact email address (this field is included only for permits)
contact_phone_home Customer's home telephone number (this field is included only for permits)
contact_phone_mobile Customer's mobile telephone number (this field is included only for permits)
contact_phone_work Customer's work telephone number (this field is included only for permits)
RESERVATION_CREATE_DATE The date and time when the reservation was created
PERMIT_MODIFY_DATE The date and time when the permit was modified
TRANSACTION_TYPE Reservation transaction type

Responses

This API will retrieve multiple records per API call depending on the specified request parameters.

One record will contain all information of a matching facility reservation.

Example request

**GET**

https://api.amp.active.com/ANETGateway/rest/anet-insightsapi/facilityReservations?api_key=xxxxxx

Example response

{

      "facility_id": 356,

      "facility_name": "Facility-3831-001",

      "center_id": 15,

      "center_name": "Test Site2_Center1",

      "site_id": 14,

      "site_name": "Test Site 45678999",

      "permit_number": "522",

      "permit_date": "2021-11-10 21:46:50.0",

      "event_type": "3184 Event Type",

      "event_start_date": "2021-11-10",

      "event_start_time": "08:30:00.0000000",

      "event_end_date": "2021-11-10",

      "event_end_time": "09:30:00.0000000",

      "day_of_week": "Wed",

      "attendance": 1,

      "permit_status": "Approved",

      "hours_reserved": "1.0000",

      "minutes_reserved": "60",

      "schedule_type": "Schedule Type test",

      "transaction_site": "Site A01",

      "system_user": "ActiveNet Admin",

      "customer_id": "7811",

      "customer_first_name": "TB4",

      "customer_last_name": "Zhao",

      "residency": "No",

      "company_id": "44",

      "company_name": "Test Org",

      "latitude": 0,

      "longitude": 0,

      "event_type_id": 38,

      "event_description": "Org Release Test",

      "company_phone": "+1US5558574584",

      "contact_name": "TB4 Zhao",

      "contact_email": "aaas@zzz.com",

      "contact_phone_home": "5551234567",

      "contact_phone_mobile": "5555555555",

      "contact_phone_work": "7777654321"

      "RESERVATION_CREATE_DATE": "2021-11-10 21:46:50.0"

      "PERMIT_MODIFY_DATE": "2021-11-10 21:46:50.0"

      "TRANSACTION_TYPE": "transaction type 123"

}

 

 

Facilities API

The Facilities API returns a list of facilities.  

Note that pagination is not supported.

 

Path:  `/facilities`

Verb:  `GET`

 

This API does not require query parameters.

 

The following table describes the data returned by the API:

Key Description
facility_id Facility ID.
facility_name Facility name.
facility_number Facility number.
facility_type Facility type.
maximum_capacity The maximum attendance allowed for rentals in this facility.
minimum_capacity The minimum attendance required before this facility can be rented.
center_id ID of the center to which this facility belongs.
center_name Name of the center to which this facility belongs.
address1 Street address 1 of the facility.
address2 Street address 2 of the facility.
city City address of the facility.
state State or province of the customer's address.
zip_code Zip code of the facility’s address.
country Country of the facility.
retired The Retired flag of the facility.
modified_date The date on which the facility was last modified.

Responses

This API will retrieve multiple records per API call. Each record will contain all information of a single facility. All facilties are returned in a single API response.

Example request

**GET**

https://api.amp.active.com/ANETGateway/rest/anet-insightsapi/facilities?api_key=xxx

Example response

[

    {

        "facility_id": 81,

        "facility_name": "Activity room A1",

        "maximum_capacity": 20,

        "minimum_capacity": 10,

        "center_id": 13,

        "center_name": "Center A",

        "address1": "Test 1",

        "address2": "Test 2",

        "city": "San Diego",

        "state": "CA",

        "zip_code": "12345",

        "country": "US",

        "retired": false,

        "modified_date": "2020-05-07 05:21:24.0"

    },

    {

        "facility_id": 52,

        "facility_name": "Activity Room A2",

        "maximum_capacity": 20,

        "minimum_capacity": 10,

        "center_id": 0,

        "retired": false,

        "modified_date": "2020-06-05 06:46:29.0"

    }

]

 

Related topics

Getting Started Guide

Authentication

Retrieving data from ACTIVE Net Insights

Common parameters

Error handling