To retrieve data from ACTIVE Net, your system needs to:
Call the API using the HTTP GET method with the required request parameters.
Parse the JSON-formatted response.
This chapter includes the following sections:
Note that if you have enabled enhanced-security ACTIVENet System APIs, to make API requests using both the API key and a digital signature, refer here.
To prepare the request URL for an API call, refer to the following template.
The request URL consists of the following fields:
{https}://{host address}/{service name}/{organization id}/api/{API version}/{resource name}?{request parameter strings 1}&{request parameter strings 2}&api_key={your API key}
| Item | Description |
| https | HTTPS protocol |
| host address | The API server address:
api.amp.active.com |
| service name | The ACTIVE NET system APIs service name: You can determine your API service name from your AUI address, for example:
If your AUI address is:
https://anprod.active.com/orgtest/servlet/processPortalLogin.sdi
then your service name is anet-systemapi
If your AUI address is:
https://anprodca.active.com/orgtest/servlet/processPortalLogin.sdi
then your service name is anet-systemapi-ca
For POST or PUT APIs (except the PostForgotPassword and PostForgotLoginName APIs), the service name is wr |
| organization id | Your organization ID You can determine your organization ID from your AUI address, for example, if your AUI address is:
https://anprod.active.com/orgtest/servlet/adminlogin.sdi
then your organization ID is orgtest.
For the Trainer site, refer to the organization ID in your Trainer site URL. |
| API version | The current ACTIVE Net API version is v1. For more information, refer to Versioning. |
resource name |
Resource name, which may also include the path of the resource
and the path parameter.
For example:
/activitytypes
All activity types are returned.
/activities/1234/fees
Activity fee information for the specified activity (1234) is returned.
Refer to the List of System APIs page to view the resource name of each API. |
| request parameter strings | Request parameters can be specified to filter the response records. Refer to the List of System APIs page to view the supported parameters of each API. |
| your API key | Your organization’s API key, for example:
1234567890xn3xnteudxsavw
You must specify a valid API key in the API call request. For clarity, it is recommended that the API key is listed last in the parameter list. The ACTIVE Net Trainer site and Live site are different systems. To retrieve data from the Trainer site, contact the ACTIVE Net support team (activenetsupport@activenetwork.com) and request an API key for the Trainer site. To use a POST or PUT API (except the PostForgotPassword and PostForgotLoginName APIs), please apply for a separate write-access API key. |
Note:
§ Use / to separate the host address, organization ID, API version, resource path and name.
§ Use ? to separate the full API path and request parameters.
§ Use & to separate the optional request parameters. Note that optional request parameters do not have to be listed in a specific order.
§ Use = to separate parameter names and parameter values.
§ Use , to separate multiple parameter values for one parameter name (note that only specific parameters can accept more than one value).
For example:
§ Refer to the table above, if your service name is anet-systemapi.
§ Your Live site organization ID is orgtest and your Trainer site organization id orgtesttrainer.
§ You are using version 1 (v1) of the API
§ Refer to the List of System APIs to view specifications for the required API.
§ Your Live site API key is specified as api_key=1234567890xn3xnteudxsavw
§ Your Trainer site API key is specified as api_key=0987654321xn3xnteudxsavw
The request URL for the Live site is:
https://api.amp.active.com/anet-systemapi/orgtest/api/v1/activities?activity_status_id=1&site_ids=101,102&api_key=1234567890xn3xnteudxsavw
The request URL for the Trainer site is:
https://api.amp.active.com/anet-systemapi/orgtesttrainer/api/v1/activities?activity_status_id=1&site_ids=101,102&api_key=0987654321xn3xnteudxsavw
To see the available request parameters for an API, refer to the Request Parameters section for the individual API.
You can include several request parameters in the URL to filter the response results.
For example:
To call the GetActivities API, you can specify the following optional request parameters:
All closed activities: activity_status_id=1
Activities under Site IDs 101 and 102: site_ids=101,102
Example URL:
https://api.amp.active.com/anet-systemapi/orgtest/v1/activities?activity_status_id=1&site_ids=101,102&api_key=1234567890xn3xnteudxsavw
Note:
URL parameters may require special characters; for the corresponding escape string, refer to the table below:
| Character | Escape String | Character | Escape String |
| Space | %20 |
# | %23 |
| $ | %24 | % | %25 |
| & | %26 |
@ | %40 |
| ` | %60 | / | %2F |
| : | %3A | ; | %3B |
| < | %3C | = | %3D |
| > | %3E | ? | %3F |
| [ | %5B | \ | %5C |
| ] | %5D | ^ | %5E |
| { | %7B | | | %7C |
| } | %7D | ~ | %7E |
| “ | %22 | ‘ | %27 |
| + | %2B | , | %2C |
Once you make a request to the API with the required parameters, you will receive an API response. A successful request returns the HTTP 200 OK status code and a JSON-formatted response body.
{
"headers": {
"response_code": "0000",
"response_message": "Successful",
},
"body": [
{
"activity_name": "Swimming class 101",
"activity_number": "1207.006",
"activity_id": 344,
"activity_type": "Activity",
"parent_season": null,
"child_season": null,
"activity_status": "Closed",
"activity_department": null,
"category": null,
"sub_category": null,
"site_name": "Site A03",
"default_facilities": null,
"default_beginning_date": "2016-01-01",
"default_ending_date": "2016-01-31",
"default_pattern_dates": null,
"gender": "Coed",
"enroll_min": 0,
"enroll_max": null,
"age_min_year": 0,
"age_min_month": 0,
"age_min_week": 0,
"age_max_year": null,
"age_max_month": null,
"age_max_week": null
},
{
"activity_name": "Swimming class 202",
"activity_number": "23423433",
"activity_id": 355,
"activity_type": "Team Enrollment",
"parent_season": null,
"child_season": null,
"activity_status": "Closed",
"activity_department": null,
"category": null,
"sub_category": null,
"site_name": "Site A04",
"default_facilities": null,
"default_beginning_date": "2015-12-07",
"default_ending_date": "2015-12-28",
"default_pattern_dates": "Monday,07:00 AM,2h",
"gender": "Coed",
"enroll_min": 0,
"enroll_max": 3,
"age_min_year": 0,
"age_min_month": 0,
"age_min_week": 0,
"age_max_year": null,
"age_max_month": null,
"age_max_week": null
}
]
}
For more information on response fields, refer to the Response Body section for each individual API.
For more information about error handling, refer to Error handling.
Creating and updating data in ACTIVENet