Base URL: https://secure#.aladtec.com/example/api/v3
We're excited to announce a brand new version of the Aladtec API which brings full support for the widely adopted OpenAPI industry standard. OpenAPI empowers developers to rapidly develop new integrations with a low-code approach.
Our new API version comes with other improvements:
limit
query parameters now use the same maximum and default values.The Aladtec API can be used to retrieve, create, or update information contained in an Aladtec system.
The API is implemented as a JSON web service that accepts authenticated HTTP requests then returns a response with an HTTP status code and a JSON payload. No separate installation is required to use the Aladtec API.
application/json
.application/json
.Date/Time (RFC 3339 format)
YYYY-MM-DDTHH:MM:SS±HH:MM
Date
YYYY-MM-DD
Time
HH:MM
The following table describes each of the date/time format specifiers that we use in the API.
Format | Description | Example |
---|---|---|
"YYYY" | year | 2019 |
"MM" | month | 01 |
"DD" | date | 22 |
"T" | separator character | N/A |
"HH" | hours expressed in 24 hour notation | 23 |
"MM" | minutes | 42 |
"SS" | seconds | 59 |
"±HH:MM" | UTC offset (hours and minutes from UTC time) | -06:00 |
Every Aladtec system is configured to one timezone.
The IANA, aka Olson, timezone (e.g. "America/Chicago") can be queried from the /configuration
resource.
The Aladtec API will attempt to return an appropriate HTTP status code for every request.
Code | Text | Description |
---|---|---|
200 | Ok | Request was successful |
201 | Created | Resource was created successfully |
204 | No Content | Request was successful and no response content was returned |
400 | Bad Request | Request was invalid, most likely due to missing or incorrect parameters |
401 | Unauthorized | Authorization credentials were invalid or missing |
403 | Forbidden | The API credentials used do not have access to the resource requested. |
404 | Not Found | The URL path was not found. |
405 | Method Not Allowed | An invalid HTTP method was specified for the resource. For example, a GET request was made to /oauth/token which only supports POST requests. |
429 | Too Many Requests | The rate limit for the Aladtec system was reached, and the request cannot be completed. |
500 | Internal Server Error | A problem has occurred on Aladtec servers. If the error continues, contact Aladtec Support for additional assistance. |
Each API response will contain a JSON object that matches one of two standard schemas.
Success Example
Returned for responses sent with a 200 level HTTP Status Code.
{
"data": [ ... ],
"meta": { ... }
}
Error Example
Returned for responses sent with a 400 or 500 level HTTP Status Code.
{
"errors": [
{
"error": "Time Off is not enabled in this system.",
"detail": ""
}
]
}
The Aladtec API supports the widely adopted OpenAPI standard and allows customers to rapidly develop integrations without having to fully understand the implementation of our API.
Our OpenAPI description will allow customers to:
Aladtec has implemented version 3 of the OpenAPI specification in YML format for all operations.
Directly link the OpenAPI YML into compatible software to automatically get all future updates to this API version.
https://developer.aladtec.com/downloads/json_api_v3_openapi_spec.yml
Download the OpenAPI YML to use with compatible SDK code generators and with software that requires the specification to be imported by file upload.
Download OpenAPIAn Aladtec subscription provides 50 requests per minute and 2500 requests per rolling 24 hour period. Once the rate limit has been reached, a status code of 429 (Too Many Requests), will be returned until the rate limit automatically resets.
If a higher rate limit is required, please contact Aladtec Support at 888.749.5550.
Aladtec can create multiple API profiles for your organization, each with access to different data. Not all data is available by default.
If you would like to configure API profiles, please contact Aladtec Support at 888.749.5550.
Aladtec follows OAuth 2.0 standards for authentication. All API endpoints require authentication using a valid, non-expired access token. To get API tokens for an Aladtec system, you must have received a client ID and a client secret for that system by contacting Aladtec Support. The client secret must remain confidential as it allows unrestricted access to an Aladtec system's data. All access tokens will expire one hour after they are created.
Aladtec has implemented Client Credentials authentication for obtaining access tokens. Tokens obtained using Client Credentials will give unrestricted access to a system's data.
Generates new API access tokens given valid credentials.
Description
Generates new API access tokens given valid credentials.
{} application/json
grant_type | string | required | Method for obtaining an access token, Possible values: [ client_credentials ] |
client_id | string | required | Client ID used to identify your software interacting with Aladtec |
client_secret | string | required | Confidential secret to authenticate your software |
Example:
{
"grant_type": "client_credentials",
"client_id": "sys-234F3SFSE",
"client_secret": "ERIOBNSLWVNUIEW3843H3B3B3B3N2MN2"
}
Successful response containing a new access token and the permissions granted to the token
{} application/json
access_token string
The new API token
token_type string
The token type (Bearer)
expires_in integer
The number of seconds until the token expires
scope string
All permissions granted to the API token
Example:
{
"access_token": "GdreEkwMnZUcU1tcmQ3aHJ1cXM1LmZDR05neUc4WklTcE44SHlyNHNwe",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "view_members edit_members"
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response containing one or more errors returned as a result of user unauthorized.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response when the request does not contain a valid content type
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Invalid Content-Type",
"detail": "The Content-Type header must be set to one of the following values: [application/json, application/x-www-form-urlencoded]"
}
]
}
<?php
/* Set your system URL, client ID, and client secret here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$client_id = 'sys-rBa946I1Zj64';
$client_secret = 'lJ1y7nrfDHHgdEqYB77pixxNHtasXK5lsNDWmFancgu3MIh4hGETWv2kaMD1iEOd';
$url = $base_url . '/oauth/token';
$ch = curl_init( $url );
/* Set options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'POST' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json'
) );
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( array(
'grant_type' => 'client_credentials',
'client_id' => $client_id,
'client_secret' => $client_secret
) ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL, client ID, and client secret here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var client_id = 'sys-rBa946I1Zj64';
var client_secret = 'lJ1y7nrfDHHgdEqYB77pixxNHtasXK5lsNDWmFancgu3MIh4hGETWv2kaMD1iEOd';
var xhr = new XMLHttpRequest();
/* Set options */
var url = base_url + '/oauth/token';
xhr.open( 'POST', url );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
/* Invoke the API and get response */
xhr.send( JSON.stringify( {
grant_type: 'client_credentials',
client_id: client_id,
client_secret: client_secret,
} ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns members and the members' associated Member Database attributes. Attributes must be...
Creates a new member in the Member Database.
Description
Returns members and the members' associated Member Database attributes. Attributes must be accessible through the API or the value will be null. Contact Aladtec Support (support@aladtec.com, 888.749.5550) to make attributes accessible through the API.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
member_ids | array | optional | List of member IDs to filter by |
include_inactive | boolean | optional | Members in Aladtec are either active or inactive. Default: 'false'. |
limit | integer | optional | Number of records to return in the result. The number of records returned is limited to 100. Default: '50'. |
offset | integer | optional | Paginate the records returned in the result. Default: '0'. |
attribute_ids | array | optional | Limits custom attribute values returned by IDs of Attributes |
Successful response with member data. Results sorted by last name ascending.
{} application/json
data array
member_id integer
ID assigned to a member by Aladtec
is_active boolean
Members are either active or inactive.
first_name string
Member given name
last_name string
Member family name
login string
Member login name
mobile_phone string
Mobile phone number
primary_email string
Primary email address
secondary_emails array
Email addresses not considered the primary_email
date_hired string
Date the member was hired
employee_type_id integer
ID of the employee type assigned to the member
work_group_id integer
ID of the work group assigned to the member
schedule_ids array
List of schedule IDs the member is qualified to work on
position_qualification_ids array
List of position qualification IDs a member is qualified for
custom_attributes array
Attributes in the Member Database, defined per Aladtec system.
attribute_id integer
The ID of this attribute in Aladtec.
value string or array or number
The value can be Text (string), Date (string), Number (int), Single Option (array of IDs), or Multi Option (array of IDs).
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"member_id": 3,
"is_active": true,
"first_name": "John",
"last_name": "Smith",
"login": "johnsmith",
"mobile_phone": "555-555-5555",
"primary_email": "jsmith@company.com",
"secondary_emails": [
"jsmith@example.com"
],
"employee_type_id": 7,
"work_group_id": 5,
"date_hired": "2019-01-01",
"schedule_ids": [
1,
2
],
"position_qualification_ids": [
1,
2,
3
],
"custom_attributes": [
{
"attribute_id": 11,
"value": ""
},
{
"attribute_id": 10,
"value": [
2,
3
]
}
]
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/members?limit=10';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/members?limit=10';
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Description
Creates a new member in the Member Database.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
{} application/json
is_active | boolean | optional | Members are either active or inactive. | |
first_name | string | required | Member given name | |
last_name | string | required | Member family name | |
login | string | required | Member login name | |
mobile_phone | string | optional | Mobile phone number | |
primary_email | string | required | Primary email address | |
secondary_emails | array | optional | Email addresses not considered the primary_email | |
date_hired | string | optional | Date the member was hired | |
employee_type_id | integer | optional | ID of the employee type assigned to the member | |
work_group_id | integer | optional | ID of the work group assigned to the member | |
schedule_ids | array | optional | List of schedule IDs the member is qualified to work on | |
position_qualification_ids | array | optional | List of position qualification IDs a member is qualified for | |
custom_attributes | array | optional | Attributes in the Member Database, defined per Aladtec system. | |
attribute_id integer required The ID of this attribute in Aladtec. value string or array or number required The value can be Text (string), Date (string), Number (int or float), Single Option (array of IDs), or Multi Option (array of IDs). |
Example:
{
"is_active": true,
"first_name": "John",
"last_name": "Smith",
"login": "johnsmith",
"mobile_phone": "555-555-5555",
"primary_email": "jsmith@company.com",
"secondary_emails": [
"jsmith@example.com",
"jsmith2@example.com"
],
"employee_type_id": 7,
"work_group_id": 5,
"date_hired": "2019-01-01",
"schedule_ids": [
1,
2
],
"position_qualification_ids": [
1,
2,
3
],
"custom_attributes": [
{
"attribute_id": 11,
"value": ""
},
{
"attribute_id": 10,
"value": [
2,
3
]
}
]
}
Successful response with new member
{} application/json
data object
member_id integer
ID assigned to a member by Aladtec
is_active boolean
Members are either active or inactive.
first_name string
Member given name
last_name string
Member family name
login string
Member login name
mobile_phone string
Mobile phone number
primary_email string
Primary email address
secondary_emails array
Email addresses not considered the primary_email
date_hired string
Date the member was hired
employee_type_id integer
ID of the employee type assigned to the member
work_group_id integer
ID of the work group assigned to the member
schedule_ids array
List of schedule IDs the member is qualified to work on
position_qualification_ids array
List of position qualification IDs a member is qualified for
custom_attributes array
Attributes in the Member Database, defined per Aladtec system.
attribute_id integer
The ID of this attribute in Aladtec.
value string or array or number
The value can be Text (string), Date (string), Number (int), Single Option (array of IDs), or Multi Option (array of IDs).
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": {
"member_id": 3,
"is_active": true,
"first_name": "John",
"last_name": "Smith",
"login": "johnsmith",
"mobile_phone": "555-555-5555",
"primary_email": "jsmith@company.com",
"secondary_emails": [
"jsmith@example.com",
"jsmith2@example.com"
],
"employee_type_id": 7,
"work_group_id": 5,
"date_hired": "2019-01-01",
"schedule_ids": [
1,
2
],
"position_qualification_ids": [
1,
2,
3
],
"custom_attributes": [
{
"attribute_id": 11,
"value": ""
},
{
"attribute_id": 10,
"value": [
2,
3
]
}
]
},
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when the route cannot be used due to a conflict with the system configuration. Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/members?';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'POST' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
));
$new_member = array(
'first_name' => 'John',
'last_name' => 'Doe',
'login' => 'johndoe',
'primary_email' => 'example@email.com'
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $new_member ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/members?';
xhr.open( 'POST', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var new_member = {
first_name: 'John',
last_name: 'Doe',
login: 'johndoe',
primary_email: 'email@example.com'
};
/* Invoke the API and get the response */
xhr.send( JSON.stringify( new_member ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Creates multiple new members in the Member Database.
Updates a subset of existing members given a list of IDs and new attribute values.
Description
Creates multiple new members in the Member Database.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
{} application/json
is_active | boolean | optional | Members are either active or inactive. | |
first_name | string | required | Member given name | |
last_name | string | required | Member family name | |
login | string | required | Member login name | |
mobile_phone | string | optional | Mobile phone number | |
primary_email | string | required | Primary email address | |
secondary_emails | array | optional | Email addresses not considered the primary_email | |
date_hired | string | optional | Date the member was hired | |
employee_type_id | integer | optional | ID of the employee type assigned to the member | |
work_group_id | integer | optional | ID of the work group assigned to the member | |
schedule_ids | array | optional | List of schedule IDs the member is qualified to work on | |
position_qualification_ids | array | optional | List of position qualification IDs a member is qualified for | |
custom_attributes | array | optional | Attributes in the Member Database, defined per Aladtec system. | |
attribute_id integer required The ID of this attribute in Aladtec. value string or array or number required The value can be Text (string), Date (string), Number (int or float), Single Option (array of IDs), or Multi Option (array of IDs). |
Example:
[
{
"is_active": true,
"first_name": "Bob",
"last_name": "Smith",
"login": "bsmith",
"mobile_phone": "555-555-5555",
"primary_email": "bsmith@company.com",
"secondary_emails": [
"bsmith@example.com",
"bsmith2@example.com"
],
"date_hired": "2019-01-01",
"employee_type_id": 7,
"work_group_id": 5,
"schedule_ids": [
1,
2
],
"position_qualification_ids": [
1,
2,
3
],
"custom_attributes": [
{
"attribute_id": 11,
"value": ""
},
{
"attribute_id": 10,
"value": [
2,
3
]
}
]
},
{
"first_name": "John",
"last_name": "Doe",
"login": "jdoe",
"primary_email": "jdoe@company.com"
}
]
Successful response with new members.
{} application/json
data array
member_id integer
ID assigned to a member by Aladtec
is_active boolean
Members are either active or inactive.
first_name string
Member given name
last_name string
Member family name
login string
Member login name
mobile_phone string
Mobile phone number
primary_email string
Primary email address
secondary_emails array
Email addresses not considered the primary_email
date_hired string
Date the member was hired
employee_type_id integer
ID of the employee type assigned to the member
work_group_id integer
ID of the work group assigned to the member
schedule_ids array
List of schedule IDs the member is qualified to work on
position_qualification_ids array
List of position qualification IDs a member is qualified for
custom_attributes array
Attributes in the Member Database, defined per Aladtec system.
attribute_id integer
The ID of this attribute in Aladtec.
value string or array or number
The value can be Text (string), Date (string), Number (int), Single Option (array of IDs), or Multi Option (array of IDs).
meta object
Additional properties describing the record set within data.
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated.
Example:
{
"data": [
{
"member_id": 1,
"is_active": true,
"first_name": "Bob",
"last_name": "Smith",
"login": "bsmith",
"mobile_phone": "555-555-5555",
"primary_email": "bsmith@company.com",
"secondary_emails": [
"bsmith@example.com",
"bsmith2@example.com"
],
"date_hired": "2019-01-01",
"employee_type_id": 7,
"work_group_id": 5,
"schedule_ids": [
1,
2
],
"position_qualification_ids": [
1,
2,
3
],
"custom_attributes": [
{
"attribute_id": 11,
"value": ""
},
{
"attribute_id": 10,
"value": [
2,
3
]
}
]
},
{
"member_id": 2,
"is_active": true,
"first_name": "John",
"last_name": "Doe",
"login": "jdoe",
"mobile_phone": "",
"primary_email": "jdoe@company.com",
"secondary_emails": [],
"date_hired": "",
"employee_type_id": 0,
"work_group_id": 1,
"schedule_ids": [],
"position_qualification_ids": [],
"custom_attributes": []
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when the route cannot be used due to a conflict with the system configuration. Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/members/batch?';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'POST' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
));
$members = array(
array(
'is_active' => true,
'first_name' => 'Bob',
'last_name' => 'Smith',
'login' => 'bsmith',
'primary_email' => 'bsmith@company.com',
'mobile_phone' => '555-555-5555',
'schedule_ids' => array(
1,
2,
),
),
array(
'first_name' => 'John',
'last_name' => 'Doe',
'login' => 'jdoe',
'primary_email' => 'jdoe@company.com',
),
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $members ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/members/batch?';
xhr.open( 'POST', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var members = [
{
is_active: true,
first_name: 'Bob',
last_name: 'Smith',
login: 'bsmith',
primary_email: 'bsmith@company.com',
mobile_phone: '555-555-5555',
schedule_ids: [
1,
2,
],
},
{
first_name: 'John',
last_name: 'Doe',
login: 'jdoe',
primary_email: 'jdoe@company.com',
},
];
/* Invoke the API and get the response */
xhr.send( JSON.stringify( members ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Description
Updates a subset of existing members given a list of IDs and new attribute values.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
{} application/json
member_id | integer | required | ID assigned to a member by Aladtec | |
is_active | boolean | optional | Members are either active or inactive. | |
first_name | string | optional | Member given name | |
last_name | string | optional | Member family name | |
login | string | optional | Member login name | |
mobile_phone | string | optional | Mobile phone number | |
primary_email | string | optional | Primary email address | |
secondary_emails | array | optional | Email addresses not considered the primary_email | |
date_hired | string | optional | Date the member was hired | |
employee_type_id | integer | optional | ID of the employee type assigned to the member | |
work_group_id | integer | optional | ID of the work group assigned to the member | |
schedule_ids | array | optional | List of schedule IDs the member is qualified to work on | |
position_qualification_ids | array | optional | List of position qualification IDs a member is qualified for | |
custom_attributes | array | optional | Attributes in the Member Database, defined per Aladtec system. | |
attribute_id integer required The ID of this attribute in Aladtec. value string or array or number required The value can be Text (string), Date (string), Number (int or float), Single Option (array of IDs), or Multi Option (array of IDs). |
Example:
[
{
"member_id": 1,
"is_active": true,
"first_name": "Bob",
"last_name": "Smith",
"login": "bobsmith",
"mobile_phone": "555-555-5555",
"primary_email": "bsmith@company.com",
"secondary_emails": [
"bsmith3@example.com"
],
"employee_type_id": 7,
"work_group_id": 5,
"date_hired": "2019-01-01",
"schedule_ids": [
1,
2
],
"position_qualification_ids": [
1,
2,
3
],
"custom_attributes": [
{
"attribute_id": 11,
"value": ""
},
{
"attribute_id": 10,
"value": [
2,
3
]
}
]
},
{
"member_id": 2,
"primary_email": "jdoe@example.com",
"mobile_phone": "555-555-5555",
"login": "jdoe",
"last_name": "Doe",
"position_qualification_ids": [
3,
5
]
}
]
Successful response with updated members.
{} application/json
data array
member_id integer
ID assigned to a member by Aladtec
is_active boolean
Members are either active or inactive.
first_name string
Member given name
last_name string
Member family name
login string
Member login name
mobile_phone string
Mobile phone number
primary_email string
Primary email address
secondary_emails array
Email addresses not considered the primary_email
date_hired string
Date the member was hired
employee_type_id integer
ID of the employee type assigned to the member
work_group_id integer
ID of the work group assigned to the member
schedule_ids array
List of schedule IDs the member is qualified to work on
position_qualification_ids array
List of position qualification IDs a member is qualified for
custom_attributes array
Attributes in the Member Database, defined per Aladtec system.
attribute_id integer
The ID of this attribute in Aladtec.
value string or array or number
The value can be Text (string), Date (string), Number (int), Single Option (array of IDs), or Multi Option (array of IDs).
meta object
Additional properties describing the record set within data.
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated.
Example:
{
"data": [
{
"member_id": 1,
"is_active": true,
"first_name": "Bob",
"last_name": "Smith",
"login": "bobsmith",
"mobile_phone": "555-555-5555",
"primary_email": "bsmith@company.com",
"secondary_emails": [
"bsmith3@example.com"
],
"employee_type_id": 7,
"work_group_id": 5,
"date_hired": "2019-01-01",
"schedule_ids": [
1,
2
],
"position_qualification_ids": [
1,
2,
3
],
"custom_attributes": [
{
"attribute_id": 11,
"value": ""
},
{
"attribute_id": 10,
"value": [
2,
3
]
}
]
},
{
"member_id": 2,
"is_active": true,
"first_name": "John",
"last_name": "Doe",
"login": "jdoe",
"mobile_phone": "555-555-5555",
"primary_email": "jdoe@example.com",
"secondary_emails": [
"jdoe2@example.com"
],
"employee_type_id": 7,
"work_group_id": 5,
"date_hired": "2019-01-01",
"schedule_ids": [
2
],
"position_qualification_ids": [
3,
5
],
"custom_attributes": [
{
"attribute_id": 11,
"value": ""
}
]
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when the route cannot be used due to a conflict with the system configuration. Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/members/batch?';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'PATCH' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
));
$members = array(
array(
'member_id' => 1,
'first_name' => 'John',
'last_name' => 'Doe',
'login' => 'johndoe',
'primary_email' => 'email@example.com',
),
array(
'member_id' => 2,
'schedule_ids' => array(
1,
2,
),
),
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $members ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/members/batch?';
xhr.open( 'PATCH', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var members = [
{
member_id: 1,
first_name: 'John',
last_name: 'Doe',
login: 'johndoe',
primary_email: 'email@example.com',
},
{
member_id: 2,
schedule_ids: [
1,
2,
],
},
];
/* Invoke the API and get the response */
xhr.send( JSON.stringify( members ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Updates an existing member using a subset of attributes or the entire member.
Description
Updates an existing member using a subset of attributes or the entire member.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
member_id | integer | required | ID assigned to a member by Aladtec |
{} application/json
is_active | boolean | optional | Members are either active or inactive. | |
first_name | string | optional | Member given name | |
last_name | string | optional | Member family name | |
login | string | optional | Member login name | |
mobile_phone | string | optional | Mobile phone number | |
primary_email | string | optional | Primary email address | |
secondary_emails | array | optional | Email addresses not considered the primary_email | |
date_hired | string | optional | Date the member was hired | |
employee_type_id | integer | optional | ID of the employee type assigned to the member | |
work_group_id | integer | optional | ID of the work group assigned to the member | |
schedule_ids | array | optional | List of schedule IDs the member is qualified to work on | |
position_qualification_ids | array | optional | List of position qualification IDs a member is qualified for | |
custom_attributes | array | optional | Attributes in the Member Database, defined per Aladtec system. | |
attribute_id integer required The ID of this attribute in Aladtec. value string or array or number required The value can be Text (string), Date (string), Number (int or float), Single Option (array of IDs), or Multi Option (array of IDs). |
Example:
{
"is_active": true,
"first_name": "John",
"last_name": "Smith",
"login": "johnsmith",
"mobile_phone": "555-555-5555",
"primary_email": "jsmith@company.com",
"secondary_emails": [
"jsmith@example.com",
"jsmith2@example.com"
],
"employee_type_id": 7,
"work_group_id": 5,
"date_hired": "2019-01-01",
"schedule_ids": [
1,
2
],
"position_qualification_ids": [
1,
2,
3
],
"custom_attributes": [
{
"attribute_id": 11,
"value": ""
},
{
"attribute_id": 10,
"value": [
2,
3
]
}
]
}
Successful response with updated member
{} application/json
data object
The Members properties
member_id integer
ID assigned to a member by Aladtec
is_active boolean
Members are either active or inactive.
first_name string
Member given name
last_name string
Member family name
login string
Member login name
mobile_phone string
Mobile phone number
primary_email string
Primary email address
secondary_emails array
Email addresses not considered the primary_email
date_hired string
Date the member was hired
employee_type_id integer
ID of the employee type assigned to the member
work_group_id integer
ID of the work group assigned to the member
schedule_ids array
List of schedule IDs the member is qualified to work on
position_qualification_ids array
List of position qualification IDs a member is qualified for
custom_attributes array
Attributes in the Member Database, defined per Aladtec system.
attribute_id integer
The ID of this attribute in Aladtec.
value string or array or number
The value can be Text (string), Date (string), Number (int), Single Option (array of IDs), or Multi Option (array of IDs).
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": {
"member_id": 3,
"is_active": true,
"first_name": "John",
"last_name": "Smith",
"login": "johnsmith",
"mobile_phone": "555-555-5555",
"primary_email": "jsmith@company.com",
"secondary_emails": [
"jsmith@example.com",
"jsmith2@example.com"
],
"employee_type_id": 7,
"work_group_id": 5,
"date_hired": "2019-01-01",
"schedule_ids": [
1,
2
],
"position_qualification_ids": [
1,
2,
3
],
"custom_attributes": [
{
"attribute_id": 11,
"value": ""
},
{
"attribute_id": 10,
"value": [
2,
3
]
}
]
},
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Successful response when no changes were saved
No response content.
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when a resource is not found
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response when the route cannot be used due to a conflict with the system configuration. Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
<?php
/* Set your system URL, API token, and Member ID here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$member_id = 2;
$url = $base_url . '/members/' . $member_id;
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'PATCH' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
));
$update_fields = array(
'date_hired' => '2019-02-03'
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $update_fields ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL, API token, and Member ID here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var member_id = 2;
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/members/' + member_id;
xhr.open( 'PATCH', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var update_fields = {
date_hired: '2019-02-03'
};
/* Invoke the API and get the response */
xhr.send( JSON.stringify( update_fields ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns all employee types. These can be customized per Aladtec system. Examples: part...
Description
Returns all employee types. These can be customized per Aladtec system. Examples: part time, full time, volunteer.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
Successful response with Employee Type objects
{} application/json
data array
An array of employee type records
employee_type_id integer
ID of the employee type
name string
Name assigned to the employee type
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"employee_type_id": 1,
"name": "Full Time"
},
{
"employee_type_id": 2,
"name": "Part Time"
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/members/employee-types';
$ch = curl_init( $url );
/* Set options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set options */
var url = base_url + '/members/employee-types';
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns all customer created Member Database attribute definitions.
Description
Returns all customer created Member Database attribute definitions.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
Successful response containing all customer created attribute definitions
{} application/json
data array
An array of custom attribute records
attribute_group_id integer
ID for a group of Member Database attributes
name string
Name assigned to a group, attribute, or option
attributes array
Array of Attributes
attribute_id integer
ID assigned to an attribute in the Member Database
type string
The custom attribute type
Possible values: [ text, singleoption, multioption, number, date, expirationdate ]
name string
The attribute name
required boolean
Whether the attribute is required to have a value
options array
Possible values for attributes defined as a 'singleoption' or 'multioption' type
option_id integer
ID of the attribute option
name string
The name of the attribute option
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"attribute_group_id": 2,
"name": "Certifications",
"attributes": [
{
"attribute_id": 18,
"type": "date",
"name": "EMT-B Course: Completed",
"required": true,
"options": []
},
{
"attribute_id": 19,
"type": "multioption",
"name": "Preferred Shift Times",
"required": false,
"options": [
{
"option_id": 34,
"name": "Morning"
},
{
"option_id": 35,
"name": "Evening"
}
]
}
]
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/members/custom-attributes?';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/members/custom-attributes?';
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns Member Availability for the requested date/time range.
Description
Returns Member Availability for the requested date/time range.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
range_start_datetime | string | required | Start date and time of the query range. Datetime format is RFC 3339. |
range_stop_datetime | string | required | Stop date and time of the query range. Datetime format is RFC 3339. |
Successful response with Member Availability objects
{} application/json
data array
An array of member availability records
member_id integer
ID assigned to a member by Aladtec
type string
The type of availability
Possible values: [ Available, Prefer, Unavailable ]
start_datetime string
The date/time that the availability record starts
stop_datetime string
The date/time that the availability record stops
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"member_id": 2,
"type": "Available",
"start_datetime": "2022-02-05T12:00:00-06:00",
"stop_datetime": "2022-02-05T20:00:00-06:00"
},
{
"member_id": 4,
"type": "Prefer",
"start_datetime": "2022-03-19T03:00:00-06:00",
"stop_datetime": "2022-03-19T21:00:00-06:00"
}
],
"meta": {
"generated_at_datetime": "2022-08-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/availability?' . http_build_query( array(
'range_start_datetime' => '2022-02-01T11:00:00-06:00',
'range_stop_datetime' => '2022-03-31T11:00:00-05:00'
) );
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/availability?' + new URLSearchParams( {
range_start_datetime: '2022-02-01T11:00:00-06:00',
range_stop_datetime: '2022-03-31T11:00:00-05:00'
} ).toString();
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Approved and pending Time Off ranges for the requested date/time range. Note: By default,...
Description
Approved and pending Time Off ranges for the requested date/time range. Note: By default, only approved Time Off ranges are included in the response.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
range_start_datetime | string | required | Start date and time of the query range. Datetime format is RFC 3339. |
range_stop_datetime | string | required | Stop date and time of the query range. Datetime format is RFC 3339. |
statuses | array | optional | Time Off request statuses to filter by. Possible values: [ approved, pending ]. Default: 'approved'. |
daily_split_time | string | optional | Time at which scheduled shifts will be split, e.g. if the daily_split_time is 07:00, a single scheduled shift from 3/27 06:00 to 3/28 06:00 will be split into two: 3/27 06:00 - 3/27 07:00 and 3/27 07:00 - 3/28 06:00. Time must be expressed in an increment matching the Aladtec system, i.e. hour, half-hour, or quarter-hour increment. Default is the Aladtec system split time of day. |
include_notes | boolean | optional | Whether to include notes for the records in the result. Default: 'false'. |
Time off records that have been cut by the daily_split_time
query parameter
{} application/json
data array
daily_split_date string
A date which is used to group time_records
together. The daily_split_time
query parameter affects how records are grouped.
time_records array
List of time off records
time_off_id integer
ID assigned to a Time Off request in Aladtec
member_id integer
ID assigned to a member by Aladtec
schedule_ids array
IDs of the schedules associated with the Time Off request
time_off_type string
Name of the assigned Time Off type
status string
Possible values: [ Approved, Pending ]
start_datetime string
Date and time the record starts at, format is RFC 3339
stop_datetime string
Date and time the record stops at, format is RFC 3339
extends_before boolean
Whether additional time for this "shift" exists before the requested query range
extends_after boolean
Whether additional time for this "shift" exists after the requested query range
pto_hours number
Hours of paid Time Off time
notes array
List of notes associated with this record, if any. This property is always empty when include_notes is set to false
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"daily_split_date": "2022-01-15",
"time_records": [
{
"time_off_id": 387,
"member_id": 18,
"schedule_ids": [
12,
25
],
"time_off_type": "Sick Leave",
"status": "Approved",
"start_datetime": "2022-01-15T12:00:00-05:00",
"stop_datetime": "2022-01-16T07:00:00-05:00",
"extends_before": true,
"extends_after": false,
"pto_hours": 0,
"notes": [
{
"member_id": 18,
"datetime": "2022-01-08T08:15:00-05:00",
"content": "Example member note about the record."
},
{
"member_id": 12,
"datetime": "2022-01-08T09:00:00-05:00",
"content": "Example admin note about the record."
}
]
},
{
"time_off_id": 379,
"member_id": 24,
"schedule_ids": [],
"time_off_type": "Vacation",
"status": "Approved",
"start_datetime": "2022-01-15T12:00:00-05:00",
"stop_datetime": "2022-01-16T09:00:00-05:00",
"extends_before": false,
"extends_after": false,
"pto_hours": 0,
"notes": [
{
"member_id": 24,
"datetime": "2022-01-13T12:00:00-05:00",
"content": "Example member note about the record."
}
]
}
]
},
{
"daily_split_date": "2022-01-16",
"time_records": [
{
"time_off_id": 378,
"member_id": 24,
"schedule_ids": [
14
],
"time_off_type": "Sick Leave",
"status": "Approved",
"start_datetime": "2022-01-16T09:00:00-05:00",
"stop_datetime": "2022-01-17T09:00:00-05:00",
"extends_before": false,
"extends_after": true,
"pto_hours": 8.5,
"notes": []
}
]
}
],
"meta": {
"generated_at_datetime": "2024-08-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Time Off is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Off is not enabled in this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/time-off?' . http_build_query( array(
'range_start_datetime' => '2022-01-01T00:00:00-06:00',
'range_stop_datetime' => '2022-02-01T00:00:00-06:00'
) );
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/time-off?' + new URLSearchParams( {
range_start_datetime: '2022-01-01T00:00:00-06:00',
range_stop_datetime: '2022-02-01T00:00:00-06:00'
} ).toString();
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns all active Time Off Types.
Creates new Time Off Types given a list of names.
Updates a subset of existing Time Off Types given a list of IDs and corresponding new...
Deletes a subset of Time Off Types given a list of IDs.
Description
Returns all active Time Off Types.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
limit | integer | optional | Number of records to return in the result. The number of records returned is limited to 100. Default: '50'. |
offset | integer | optional | Paginate the records returned in the result. Default: '0'. |
Successful response with Time Off Type definitions
{} application/json
data array
time_off_type_id integer
ID assigned to the Time Off Type
name string
Name of the Time Off Type
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"time_off_type_id": 1,
"name": "Sick Leave"
},
{
"time_off_type_id": 2,
"name": "Paid Time Off"
},
{
"time_off_type_id": 3,
"name": "Short Term Leave of Absence"
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Time Off is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Off is not enabled in this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/time-off/types?limit=50';
$ch = curl_init( $url );
/* Set options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
) );
/* Invoke the API and get response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set options */
var url = base_url + '/time-off/types?limit=50';
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
} );
Description
Creates new Time Off Types given a list of names.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
{} application/json
name | string | required | Name to be assigned to the Time Off Type |
Example:
[
{
"name": "Sick Leave"
},
{
"name": "Paid Time Off"
},
{
"name": "Short Term Leave of Absence"
}
]
Successful response with the new Time Off Types
{} application/json
data array
time_off_type_id integer
ID assigned to the Time Off Type
name string
Name of the Time Off Type
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"time_off_type_id": 1,
"name": "Sick Leave"
},
{
"time_off_type_id": 2,
"name": "Paid Time Off"
},
{
"time_off_type_id": 3,
"name": "Short Term Leave of Absence"
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Time Off is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Off is not enabled in this system."
}
]
}
Error response when the route cannot be used due to a conflict with the system configuration. Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/time-off/types?';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'POST' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
) );
$time_off_types = array(
array(
'name' => 'Sick Leave'
),
array(
'name' => 'Paid Time Off'
),
array(
'name' => 'Short Term Leave of Absence'
)
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $time_off_types ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/time-off/types?';
xhr.open( 'POST', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var time_off_types_json = [
{
name: 'Sick Leave'
},
{
name: 'Paid Time Off'
},
{
name: 'Short Term Leave of Absence'
}
];
/* Invoke the API and get the response */
xhr.send( JSON.stringify( time_off_types_json ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
} );
Description
Updates a subset of existing Time Off Types given a list of IDs and corresponding new names.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
{} application/json
time_off_type_id | integer | required | ID assigned to a Time Off Type in Aladtec |
name | string | required | Name to be assigned to the Time Off Type |
Example:
[
{
"time_off_type_id": 1,
"name": "Sick Leave"
},
{
"time_off_type_id": 2,
"name": "Paid Time Off"
},
{
"time_off_type_id": 3,
"name": "Short Term Leave of Absence"
}
]
Successful response with the updated Time Off Types
{} application/json
data array
time_off_type_id integer
ID assigned to the Time Off Type
name string
Name of the Time Off Type
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"time_off_type_id": 1,
"name": "Sick Leave"
},
{
"time_off_type_id": 2,
"name": "Paid Time Off"
},
{
"time_off_type_id": 3,
"name": "Short Term Leave of Absence"
}
],
"meta": {
"generated_at_datetime": "2024-06-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Time Off is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Off is not enabled in this system."
}
]
}
Error response when the route cannot be used due to a conflict with the system configuration. Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/time-off/types?';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'PATCH' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
) );
$time_off_types = array(
array(
'time_off_type_id' => 1,
'name' => 'Sick Leave'
),
array(
'time_off_type_id' => 2,
'name' => 'Paid Time Off'
),
array(
'time_off_type_id' => 3,
'name' => 'Short Term Leave of Absence'
)
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $time_off_types ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/time-off/types?';
xhr.open( 'PATCH', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var time_off_types_json = [
{
time_off_type_id: 1,
name: 'Sick Leave'
},
{
time_off_type_id: 2,
name: 'Paid Time Off'
},
{
time_off_type_id: 3,
name: 'Short Term Leave of Absence'
}
];
/* Invoke the API and get the response */
xhr.send( JSON.stringify( time_off_types_json ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
} );
Description
Deletes a subset of Time Off Types given a list of IDs.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
{} application/json
time_off_type_id | integer | required | ID assigned to a Time Off Type in Aladtec |
Example:
[
{
"time_off_type_id": 1
},
{
"time_off_type_id": 2
},
{
"time_off_type_id": 3
},
{
"time_off_type_id": 4
}
]
Successful response when deletion is successful.
No response content.
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Time Off is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Off is not enabled in this system."
}
]
}
Error response when the route cannot be used due to a conflict with the system configuration. Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/time-off/types?';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'DELETE' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
) );
$time_off_types = array(
array(
'time_off_type_id' => 1
),
array(
'time_off_type_id' => 2
),
array(
'time_off_type_id' => 3
)
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $time_off_types ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/time-off/types?';
xhr.open( 'DELETE', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var time_off_types_json = [
{
time_off_type_id: 1
},
{
time_off_type_id: 2
},
{
time_off_type_id: 3
}
];
/* Invoke the API and get the response */
xhr.send( JSON.stringify( time_off_types_json ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
} );
Schedule configuration defined in an Aladtec system. Data is sorted by the order defined...
Description
Schedule configuration defined in an Aladtec system. Data is sorted by the order defined on the Setup -> Schedules page.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
include_archived | boolean | optional | Whether to include archived schedules in result. Default: 'false'. |
Successful response with schedule definitions
{} application/json
data array
schedule_id integer
ID assigned to a schedule in Aladtec
name string
Name of the schedule
is_archived boolean
Schedules are either active or archived
order integer
Sort order as defined on the Setup -> Schedules page
start_time integer
Schedule start time in minutes
positions array
position_id integer
ID assigned to a schedule position in Aladtec. Example: Firefighter #1, Firefighter #2, etc.
position_qualification_id integer
ID assigned to a position qualification in Aladtec. Example: Firefighter, EMT, Officer, etc.
label string
Name of the position
order integer
Sort order as defined on the Setup -> Schedules page
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"schedule_id": 1,
"name": "Ambulance 1",
"is_archived": false,
"order": 1,
"start_time": 420,
"positions": [
{
"position_id": 1,
"position_qualification_id": 1,
"label": "Driver",
"order": 1
},
{
"position_id": 2,
"position_qualification_id": 3,
"label": "EMT",
"order": 2
}
]
},
{
"schedule_id": 2,
"name": "Fire Crew 1",
"is_archived": true,
"order": 2,
"start_time": 540,
"positions": [
{
"position_id": 3,
"position_qualification_id": 2,
"label": "Firefighter",
"order": 1
},
{
"position_id": 4,
"position_qualification_id": 2,
"label": "Firefighter",
"order": 2
}
]
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/schedules';
$ch = curl_init( $url );
/* Set options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke API and get response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set options */
var url = base_url + '/schedules';
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns a list of unique position qualifications.
Creates new position qualifications given a list of names.
Updates a subset of existing position qualifications given a list of IDs and corresponding...
Deletes a subset of position qualifications given a list of IDs.
Description
Returns a list of unique position qualifications.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
limit | integer | optional | Number of records to return in the result. The number of records returned is limited to 100. Default: '50'. |
offset | integer | optional | Paginate the records returned in the result. Default: '0'. |
Successful response with position qualification definitions
{} application/json
data array
position_qualification_id integer
ID assigned to a position qualification in Aladtec
name string
Name assigned to the qualification
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"position_qualification_id": 1,
"name": "Driver"
},
{
"position_qualification_id": 2,
"name": "Firefighter"
},
{
"position_qualification_id": 3,
"name": "EMT"
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$resource_url = '/schedules/position-qualifications';
$limit = 50;
$offset = 0;
$data = [];
do {
$paginated_url = $base_url . $resource_url . '?' . http_build_query( array(
'limit' => $limit,
'offset' => $offset
) );
$ch = curl_init( $paginated_url );
/* Set options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
) );
/* Invoke the API and get response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
$get_next_dataset = false;
if ( $error ) {
echo 'Error: ' . $error . PHP_EOL;
} elseif ( $response_body != '[]' ) {
print( $response_body );
$offset += $limit;
$get_next_dataset = true;
}
curl_close( $ch );
$response_array = json_decode( $response_body, true );
if ( empty( $response_array['data'] ) ) {
/* No more data, we're done */
break;
}
} while ( true );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
loadPaginatedData( '/schedules/position-qualifications', 50, function( data ) {
} );
function loadPaginatedData( resourceUrl, limit, successCallback, offset = 0, data = [] ) {
var paginated_url = base_url + resourceUrl + '?' + new URLSearchParams( {
limit: limit,
offset: offset
} );
var xhr = new XMLHttpRequest();
xhr.open( 'GET', paginated_url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get response */
xhr.send();
xhr.addEventListener( 'load', function() {
if ( xhr.status >= 400 ) {
// Error encountered
console.log( 'Error making api request.' );
console.log( xhr.responseText );
} else {
// Add the returned data to the result array
data = JSON.parse( xhr.responseText );
console.log( data['data'] );
if ( data['data'].length !== 0 ) {
// Fetch the next set of records
loadPaginatedData( resourceUrl, limit, successCallback, offset + limit, data );
} else {
// Successfully fetched all records from the paginated endpoint
successCallback( data );
}
}
} );
}
Description
Creates new position qualifications given a list of names.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
{} application/json
name | string | required | Name to be assigned to the position qualification |
Example:
[
{
"name": "Driver"
},
{
"name": "Firefighter"
},
{
"name": "EMT"
}
]
Successful response with the new position qualifications
{} application/json
data array
position_qualification_id integer
ID assigned to a position qualification in Aladtec
name string
Name assigned to the qualification
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"position_qualification_id": 1,
"name": "Driver"
},
{
"position_qualification_id": 2,
"name": "Firefighter"
},
{
"position_qualification_id": 3,
"name": "EMT"
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when the route cannot be used due to a conflict with the system configuration. Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/schedules/position-qualifications?';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'POST' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
) );
$position_qualifications = array(
array(
'name' => 'Driver'
),
array(
'name' => 'Firefighter'
),
array(
'name' => 'EMT'
)
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $position_qualifications ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/schedules/position-qualifications?';
xhr.open( 'POST', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var position_qualifications_json = [
{
name: 'Driver'
},
{
name: 'Firefighter'
},
{
name: 'EMT'
}
];
/* Invoke the API and get the response */
xhr.send( JSON.stringify( position_qualifications_json ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
} );
Description
Updates a subset of existing position qualifications given a list of IDs and corresponding new names.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
{} application/json
position_qualification_id | integer | required | ID assigned to a position qualification in Aladtec |
name | string | required | Name to be assigned to the position qualification |
Example:
[
{
"position_qualification_id": 1,
"name": "position1"
},
{
"position_qualification_id": 2,
"name": "position2"
},
{
"position_qualification_id": 3,
"name": "position3"
}
]
Successful response with the new position qualifications
{} application/json
data array
position_qualification_id integer
ID assigned to a position qualification in Aladtec
name string
Name assigned to the qualification
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"position_qualification_id": 1,
"name": "position1"
},
{
"position_qualification_id": 2,
"name": "position2"
},
{
"position_qualification_id": 3,
"name": "position3"
}
],
"meta": {
"generated_at_datetime": "2024-02-29T11:42:48-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when the route cannot be used due to a conflict with the system configuration. Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/schedules/position-qualifications?';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'PATCH' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
) );
$position_qualifications = array(
array(
'position_qualification_id' => 1,
'name' => 'Driver'
),
array(
'position_qualification_id' => 2,
'name' => 'Firefighter'
),
array(
'position_qualification_id' => 3,
'name' => 'EMT'
)
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $position_qualifications ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/schedules/position-qualifications?';
xhr.open( 'PATCH', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var position_qualifications_json = [
{
position_qualification_id: 1,
name: 'Driver'
},
{
position_qualification_id: 2,
name: 'Firefighter'
},
{
position_qualification_id: 3,
name: 'EMT'
}
];
/* Invoke the API and get the response */
xhr.send( JSON.stringify( position_qualifications_json ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
} );
Description
Deletes a subset of position qualifications given a list of IDs.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
{} application/json
position_qualification_id | integer | required | ID assigned to a position qualification in Aladtec |
Example:
[
{
"position_qualification_id": 1
},
{
"position_qualification_id": 2
},
{
"position_qualification_id": 3
}
]
Successful response when deletion is successful.
No response content.
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when the route cannot be used due to a conflict with the system configuration. Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/schedules/position-qualifications?';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'DELETE' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
) );
$position_qualifications = array(
array(
'position_qualification_id' => 1
),
array(
'position_qualification_id' => 2
),
array(
'position_qualification_id' => 3
)
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $position_qualifications ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/schedules/position-qualifications?';
xhr.open( 'DELETE', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var position_qualifications_json = [
{
position_qualification_id: 1
},
{
position_qualification_id: 2
},
{
position_qualification_id: 3
}
];
/* Invoke the API and get the response */
xhr.send( JSON.stringify( position_qualifications_json ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
} );
Returns scheduled time ranges for a specified period of time
Description
Returns scheduled time ranges for a specified period of time
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
range_start_datetime | string | required | Start date and time of the query range. Datetime format is RFC 3339. |
range_stop_datetime | string | required | Stop date and time of the query range. Datetime format is RFC 3339. |
schedule_ids | array | optional | List of schedule IDs to filter by |
member_ids | array | optional | List of member IDs to filter by |
position_ids | array | optional | List of position IDs to filter by |
time_type_ids | array | optional | List of time type IDs to filter by |
daily_split_time | string | optional | Time at which scheduled shifts will be split, e.g. if the daily_split_time is 07:00, a single scheduled shift from 3/27 06:00 to 3/28 06:00 will be split into two: 3/27 06:00 - 3/27 07:00 and 3/27 07:00 - 3/28 06:00. Time must be expressed in an increment matching the Aladtec system, i.e. hour, half-hour, or quarter-hour increment. Default is the Aladtec system split time of day. |
Scheduled time records that have been cut by the daily_split_time
query parameter
{} application/json
data array
daily_split_date string
A date which is used to group time_records
together. The daily_split_time
query parameter affects how records are grouped.
time_records array
List of scheduled time records
member_id integer
ID assigned to a member by Aladtec
schedule_id integer
ID assigned to a schedule in Aladtec
position_id integer
ID assigned to a schedule position in Aladtec
position_qualification_id integer
ID assigned to a position qualification in Aladtec
time_type_id integer
ID assigned to a time type in Aladtec
time_type string
Name of the assigned time type
start_datetime string
Date and time the record starts at, format is RFC 3339
stop_datetime string
Date and time the record stops at, format is RFC 3339
extends_before boolean
Whether additional time for this "shift" exists before the requested query range
extends_after boolean
Whether additional time for this "shift" exists after the requested query range
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"daily_split_date": "2022-02-18",
"time_records": [
{
"member_id": 3,
"schedule_id": 16,
"position_id": 50,
"position_qualification_id": 1,
"time_type_id": 1,
"time_type": "Regular",
"start_datetime": "2022-02-18T07:00:00-05:00",
"stop_datetime": "2022-02-19T07:00:00-05:00",
"extends_before": true,
"extends_after": false
},
{
"member_id": 53,
"schedule_id": 16,
"position_id": 51,
"position_qualification_id": 1,
"time_type_id": 1,
"time_type": "Regular",
"start_datetime": "2022-02-18T07:00:00-05:00",
"stop_datetime": "2022-02-19T07:00:00-05:00",
"extends_before": false,
"extends_after": false
}
]
},
{
"daily_split_date": "2022-02-19",
"time_records": [
{
"member_id": 52,
"schedule_id": 16,
"position_id": 50,
"position_qualification_id": 1,
"time_type_id": 1,
"time_type": "Regular",
"start_datetime": "2022-02-19T09:00:00-05:00",
"stop_datetime": "2022-02-19T17:00:00-05:00",
"extends_before": false,
"extends_after": true
},
{
"member_id": 96,
"schedule_id": 16,
"position_id": 53,
"position_qualification_id": 1,
"time_type_id": 1,
"time_type": "Regular",
"start_datetime": "2022-02-19T09:00:00-05:00",
"stop_datetime": "2022-02-19T17:00:00-05:00",
"extends_before": false,
"extends_after": false
}
]
}
],
"meta": {
"generated_at_datetime": "2023-08-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/scheduled-time?' . http_build_query( array(
'range_start_datetime' => '2022-02-01T11:00:00-06:00',
'range_stop_datetime' => '2022-03-01T11:00:00-06:00'
) );
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/scheduled-time?' + new URLSearchParams( {
range_start_datetime: '2022-02-01T11:00:00-06:00',
range_stop_datetime: '2022-03-01T11:00:00-06:00'
} ).toString();
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns time ranges where no member is scheduled. Typically used for finding shifts...
Description
Returns time ranges where no member is scheduled. Typically used for finding shifts needing coverage. Up to one month can be retrieved in a single request.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
range_start_datetime | string | required | Start date and time of the query range. Datetime format is RFC 3339. |
range_stop_datetime | string | required | Stop date and time of the query range. Datetime format is RFC 3339. |
schedule_ids | array | optional | List of schedule IDs to filter by |
position_ids | array | optional | List of position IDs to filter by |
include_only_shift_time | boolean | optional | Whether to only include time ranges that exist within the boundaries of schedule shifts. For example, if a schedule has one shift (7am - 3pm), Open Time ranges from 3pm - 7am (next day) would be excluded. Shift boundaries are defined on the Setup -> Schedules page. Default: 'true'. |
daily_split_time | string | optional | Time at which scheduled shifts will be split, e.g. if the daily_split_time is 07:00, a single scheduled shift from 3/27 06:00 to 3/28 06:00 will be split into two: 3/27 06:00 - 3/27 07:00 and 3/27 07:00 - 3/28 06:00. Time must be expressed in an increment matching the Aladtec system, i.e. hour, half-hour, or quarter-hour increment. Default is the Aladtec system split time of day. |
Open time records that have been cut by the daily_split_time
query parameter
{} application/json
data array
daily_split_date string
A date which is used to group time_records
together. The daily_split_time
query parameter affects how records are grouped.
time_records array
List of open time records
schedule_id integer
ID assigned to a schedule in Aladtec
position_id integer
ID assigned to a schedule position in Aladtec
position_qualification_id integer
ID assigned to a position qualification in Aladtec
start_datetime string
Date and time the record starts at, format is RFC 3339
stop_datetime string
Date and time the record stops at, format is RFC 3339
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"daily_split_date": "2022-04-18",
"time_records": [
{
"schedule_id": 2,
"position_id": 1,
"position_qualification_id": 1,
"start_datetime": "2022-04-18T07:00:00-05:00",
"stop_datetime": "2022-04-19T07:00:00-05:00"
},
{
"schedule_id": 16,
"position_id": 51,
"position_qualification_id": 2,
"start_datetime": "2022-04-18T07:00:00-05:00",
"stop_datetime": "2022-04-19T07:00:00-05:00"
}
]
},
{
"daily_split_date": "2022-05-19",
"time_records": [
{
"schedule_id": 16,
"position_id": 50,
"position_qualification_id": 1,
"start_datetime": "2022-05-19T09:00:00-05:00",
"stop_datetime": "2022-05-19T17:00:00-05:00"
}
]
}
],
"meta": {
"generated_at_datetime": "2022-08-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/scheduled-time/open-time?' . http_build_query( array(
'range_start_datetime' => '2022-04-01T11:00:00-05:00',
'range_stop_datetime' => '2022-05-01T11:00:00-05:00'
) );
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/scheduled-time/open-time?' + new URLSearchParams( {
range_start_datetime: '2022-04-01T11:00:00-05:00',
range_stop_datetime: '2022-05-01T11:00:00-05:00'
} ).toString();
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Schedule and position for each member scheduled at the time of the request.
Description
Schedule and position for each member scheduled at the time of the request.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
schedule_ids | array | optional | List of schedule IDs to filter by |
Position assignments organized by schedule
{} application/json
data array
schedule_id integer
ID assigned to a schedule in Aladtec
positions array
position_id integer
ID assigned to a position in Aladtec
member_id integer
ID assigned to a member by Aladtec
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"schedule_id": 1,
"positions": [
{
"position_id": 1,
"member_id": 42
}
]
},
{
"schedule_id": 2,
"positions": [
{
"position_id": 3,
"member_id": 27
},
{
"position_id": 4,
"member_id": 22
}
]
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/scheduled-time/members-scheduled-now?';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/scheduled-time/members-scheduled-now?';
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns Schedule Notes grouped by calendar date. Up to one year can be retrieved in a...
Description
Returns Schedule Notes grouped by calendar date. Up to one year can be retrieved in a single request.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
range_start_date | string | required | Start date of the query range. Date format is YYYY-MM-DD. |
range_stop_date | string | required | Stop date of the query range. Date format is YYYY-MM-DD. |
schedule_ids | array | optional | List of schedule IDs to filter by |
Schedule notes grouped by calendar date. Results sorted by ascending dates, then by ascending schedule IDs.
{} application/json
data array
calendar_date string
Date used to group schedule notes on the same calendar date together
notes array
List of schedule note objects
schedule_id integer
ID assigned to a schedule in Aladtec
date string
YYYY-MM-DD date the note is for
member_id integer
ID of the member who last updated the note
content string
Text content of the note. Line breaks are specified by the "\n" escape string.
modified_datetime string
Date and time when the note was last updated, format is RFC 3999
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"calendar_date": "2022-01-01",
"notes": [
{
"schedule_id": 1,
"date": "2022-01-01",
"member_id": 2,
"content": "Chris and Steve are running the drills",
"modified_datetime": "2022-08-22T15:43:00-05:00"
},
{
"schedule_id": 2,
"date": "2022-01-01",
"member_id": 1,
"content": "Tire pressure checks on K1 and K2 needed today",
"modified_datetime": "2022-08-22T15:43:00-05:00"
}
]
},
{
"calendar_date": "2022-01-02",
"notes": [
{
"schedule_id": 2,
"date": "2022-01-02",
"member_id": 1,
"content": "Weather is predicted to be especially hot and dry. Prepare for an influx of calls today.\nJoe is on standby if needed.",
"modified_datetime": "2022-08-22T15:36:00-05:00"
}
]
}
],
"meta": {
"generated_at_datetime": "2023-08-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/scheduled-time/notes?' . http_build_query( array(
'range_start_date' => '2022-01-01',
'range_stop_date' => '2022-08-01'
) );
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/scheduled-time/notes?' + new URLSearchParams( {
range_start_date: '2022-01-01',
range_stop_date: '2022-08-01'
} ).toString();
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns scheduled time ranges that end within a specified period of time. Adjacent blocks...
Description
Returns scheduled time ranges that end within a specified period of time. Adjacent blocks of scheduled time are merged if they meet all of the following criteria:
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
range_start_datetime | string | required | Start date and time of the query range. Datetime format is RFC 3339. |
range_stop_datetime | string | required | Stop date and time of the query range. Datetime format is RFC 3339. |
schedule_ids | array | optional | List of schedule IDs to filter by |
member_ids | array | optional | List of member IDs to filter by |
position_ids | array | optional | List of position IDs to filter by |
time_type_ids | array | optional | List of time type IDs to filter by |
Scheduled time records ending in the range specified by the range_start_datetime
and range_stop_datetime
.
{} application/json
data array
time_records array
List of scheduled time records
member_id integer
ID assigned to a member by Aladtec
schedule_id integer
ID assigned to a schedule in Aladtec
position_id integer
ID assigned to a schedule position in Aladtec
position_qualification_id integer
ID assigned to a position qualification in Aladtec
time_type_id integer
ID assigned to a time type in Aladtec
time_type string
Name of the assigned time type
start_datetime string
Date and time the record starts at, format is RFC 3339
stop_datetime string
Date and time the record stops at, format is RFC 3339
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"time_records": [
{
"member_id": 3,
"schedule_id": 16,
"position_id": 50,
"position_qualification_id": 1,
"time_type_id": 1,
"time_type": "Regular",
"start_datetime": "2022-02-01T07:00:00-05:00",
"stop_datetime": "2022-02-01T17:00:00-05:00"
},
{
"member_id": 53,
"schedule_id": 16,
"position_id": 51,
"position_qualification_id": 1,
"time_type_id": 1,
"time_type": "Regular",
"start_datetime": "2022-02-25T07:00:00-05:00",
"stop_datetime": "2022-02-27T07:00:00-05:00"
}
]
}
],
"meta": {
"generated_at_datetime": "2024-08-13T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/scheduled-time/ends-in-range?' . http_build_query( array(
'range_start_datetime' => '2022-02-01T11:00:00-06:00',
'range_stop_datetime' => '2022-03-01T11:00:00-06:00',
'schedule_ids' => '1,3,10' /* Optional request parameter */
) );
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/scheduled-time/ends-in-range?' + new URLSearchParams( {
range_start_datetime: '2022-02-01T11:00:00-06:00',
range_stop_datetime: '2022-03-01T11:00:00-06:00',
schedule_ids: '1,3,10' /* Optional request parameter */
} ).toString();
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns extra hours ranges for a specified period of time in the past.
Description
Returns extra hours ranges for a specified period of time in the past.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
range_start_datetime | string | required | Start date and time of the query range. Datetime format is RFC 3339. |
range_stop_datetime | string | required | Stop date and time of the query range. Datetime format is RFC 3339. |
schedule_ids | array | optional | List of schedule IDs to filter by |
member_ids | array | optional | List of member IDs to filter by |
position_qualification_ids | array | optional | List of position qualification IDs to filter by |
time_type_ids | array | optional | List of time type IDs to filter by |
statuses | array | optional | Extra Hours request statuses to filter by. Possible values: [ approved, pending ]. Default: 'approved'. |
daily_split_time | string | optional | Time at which scheduled shifts will be split, e.g. if the daily_split_time is 07:00, a single scheduled shift from 3/27 06:00 to 3/28 06:00 will be split into two: 3/27 06:00 - 3/27 07:00 and 3/27 07:00 - 3/28 06:00. Time must be expressed in an increment matching the Aladtec system, i.e. hour, half-hour, or quarter-hour increment. Default is the Aladtec system split time of day. |
include_notes | boolean | optional | Whether to include notes for the records in the result. Default: 'false'. |
Extra hours records that have been cut by the daily_split_time
query parameter
{} application/json
data array
daily_split_date string
A date which is used to group extra_hours_records
together. The daily_split_time
query parameter affects how records are grouped.
extra_hours_records array
List of extra hours records
member_id integer
ID assigned to a member by Aladtec
schedule_id integer
ID assigned to a schedule in Aladtec
position_qualification_id integer
ID assigned to a position qualification in Aladtec
time_type_id integer
ID assigned to a time type in Aladtec
time_type string
Name of the assigned time type
start_datetime string
Date and time the record starts at, format is RFC 3339
stop_datetime string
Date and time the record stops at, format is RFC 3339
status string
Possible values: [ Approved, Pending ]
extends_before boolean
Whether additional time for this record exists before the requested query range
extends_after boolean
Whether additional time for this record exists after the requested query range
notes array
List of notes associated with this record, if any. This property is always empty when include_notes is set to false
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"daily_split_date": "2022-02-01",
"extra_hours_records": [
{
"member_id": 3,
"schedule_id": 16,
"position_qualification_id": 1,
"time_type_id": 1,
"time_type": "Regular",
"start_datetime": "2022-02-01T07:00:00-05:00",
"stop_datetime": "2022-02-02T07:00:00-05:00",
"status": "Pending",
"extends_before": true,
"extends_after": false,
"notes": [
{
"member_id": 3,
"datetime": "2022-01-31T08:15:00-05:00",
"content": "Example member note about the record."
}
]
},
{
"member_id": 53,
"schedule_id": 16,
"position_qualification_id": 1,
"time_type_id": 1,
"time_type": "Regular",
"start_datetime": "2022-02-01T07:00:00-05:00",
"stop_datetime": "2022-02-02T07:00:00-05:00",
"status": "Approved",
"extends_before": false,
"extends_after": false,
"notes": [
{
"member_id": 53,
"datetime": "2022-02-15T08:15:00-05:00",
"content": "Example member note about the record."
},
{
"member_id": 12,
"datetime": "2022-02-16T09:00:00-05:00",
"content": "Example admin note about the record."
}
]
}
]
},
{
"daily_split_date": "2022-03-18",
"extra_hours_records": [
{
"member_id": 52,
"schedule_id": 16,
"position_qualification_id": 1,
"time_type_id": 1,
"time_type": "Regular",
"start_datetime": "2022-03-18T09:00:00-05:00",
"stop_datetime": "2022-03-19T17:00:00-05:00",
"status": "Pending",
"extends_before": false,
"extends_after": false,
"notes": []
},
{
"member_id": 96,
"schedule_id": 16,
"position_qualification_id": 53,
"time_type_id": 1,
"time_type": "Regular",
"start_datetime": "2022-03-18T09:00:00-05:00",
"stop_datetime": "2022-03-19T17:00:00-05:00",
"status": "Approved",
"extends_before": false,
"extends_after": true,
"notes": []
}
]
}
],
"meta": {
"generated_at_datetime": "2024-08-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/extra-hours?' . http_build_query( array(
'range_start_datetime' => '2022-02-01T11:00:00-06:00',
'range_stop_datetime' => '2022-03-31T11:00:00-05:00'
) );
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/extra-hours?' + new URLSearchParams( {
range_start_datetime: '2022-02-01T11:00:00-06:00',
range_stop_datetime: '2022-03-31T11:00:00-05:00'
} ).toString();
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns a list of unique, active Paycodes which can be applied to time clock time.
Description
Returns a list of unique, active Paycodes which can be applied to time clock time.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
Successful response with Paycode objects
{} application/json
data array
paycode_id integer
ID of the Aladtec paycode
name string
A name associated with the paycode
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"paycode_id": 24,
"name": "Regular"
},
{
"paycode_id": 46,
"name": "Training"
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Time Clock or Time Clock Paycodes are not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Clock is not enabled for this system."
},
{
"error": "Paycodes are not enabled for this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/time-clock/paycodes?';
$ch = curl_init( $url );
/* Set options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set options */
var url = base_url + '/time-clock/paycodes';
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get response */
xhr.send();
xhr.addEventListener( "load", function () {
console.log( xhr.responseText );
});
Returns a list of unique, active Kiosks used to clock in and out.
Description
Returns a list of unique, active Kiosks used to clock in and out.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
Successful response with kiosk objects
{} application/json
data array
kiosk_id integer
ID of the Aladtec time clock kiosk
name string
A name associated with the time clock kiosk
is_enabled boolean
True if the time clock kiosk is enabled in the system
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"kiosk_id": 1,
"name": "Station",
"is_enabled": true
},
{
"kiosk_id": 2,
"name": "Break Room",
"is_enabled": true
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Time Clock is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Clock is not enabled for this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/time-clock/kiosks?';
$ch = curl_init( $url );
/* Set options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set options */
var url = base_url + '/time-clock/kiosks';
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get response */
xhr.send();
xhr.addEventListener( "load", function () {
console.log( xhr.responseText );
});
Time Clock records for the requested date/time range. If a member is clocked in at the...
Description
Time Clock records for the requested date/time range. If a member is clocked in at the time of the request, the time clock record will be excluded.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
range_start_datetime | string | required | Start date and time of the query range. Datetime format is RFC 3339. |
range_stop_datetime | string | required | Stop date and time of the query range. Datetime format is RFC 3339. |
Successful response with time clock records found
{} application/json
data array
member_id integer
ID assigned to a member by Aladtec
paycode_label string
Name of paycode associated to the Time Clock record
start_datetime string
Date and time the member clocked in, format is RFC 3339.
stop_datetime string
Date and time the member clocked out, format is RFC 3339.
clocked_in boolean
Indicates if the member is currently clocked in
in_note string
Note associated to Clock-In
out_note string
Note associated to Clock-Out
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"member_id": 24,
"paycode_label": "Regular",
"start_datetime": "2022-02-02T09:02:00-06:00",
"stop_datetime": "2022-02-03T09:02:00-06:00",
"clocked_in": false,
"in_note": "",
"out_note": ""
},
{
"member_id": 46,
"paycode_label": "Regular",
"start_datetime": "2022-02-15T08:02:00-06:00",
"stop_datetime": "2022-02-16T08:02:00-06:00",
"clocked_in": false,
"in_note": "",
"out_note": ""
}
],
"meta": {
"generated_at_datetime": "2023-08-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Time Clock is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Clock is not enabled for this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/time-clock-time?' . http_build_query( array(
'range_start_datetime' => '2022-02-01T11:00:00-06:00',
'range_stop_datetime' => '2022-03-01T11:00:00-06:00'
) );
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/time-clock-time?' + new URLSearchParams( {
range_start_datetime: '2022-02-01T11:00:00-06:00',
range_stop_datetime: '2022-03-01T11:00:00-06:00'
} ).toString();
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Members clocked in at the time of the request.
Description
Members clocked in at the time of the request.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
Successful response with all clocked in members
{} application/json
data array
member_id integer
ID assigned to a member by Aladtec
paycode_label string
Name of paycode associated to the Time Clock record
in_note string
Note associated to Clock-In
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"member_id": 24,
"paycode_label": "Regular",
"in_note": ""
},
{
"member_id": 46,
"paycode_label": "Training",
"in_note": "I arrived 10 minutes late due to a personal emergency."
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Time Clock is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Clock is not enabled for this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/time-clock-time/clocked-in-members';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/time-clock-time/clocked-in-members';
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Clocks a member in given a valid member ID.
Description
Clocks a member in given a valid member ID.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
{} application/json
member_id | integer | required | ID assigned to a member by Aladtec |
kiosk_id | integer | required | ID of an authenticated time clock kiosk |
clock_in_datetime | string | required | Date and time the member is clocking in, format is RFC 3339. The date and time is limited to up to 5 minutes in the future. |
paycode_id | integer | optional | ID of an associated paycode, required if paycodes are enabled in the system |
Example:
{
"member_id": 50,
"kiosk_id": 18,
"clock_in_datetime": "2022-08-16T09:02:00-06:00",
"paycode_id": 1
}
Successful clock in response
{} application/json
data object
member_id integer
ID assigned to a member by Aladtec
kiosk_id integer
ID of an authenticated time clock kiosk
clock_in_datetime string
Date and time the member clocked in, format is RFC 3339
paycode_id integer
ID of an associated paycode, null
if paycodes are turned off in the system.
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": {
"member_id": 50,
"kiosk_id": 18,
"clock_in_datetime": "2022-08-16T09:02:00-06:00",
"paycode_id": 1
},
"meta": {
"generated_at_datetime": "2023-08-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Time Clock is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Clock is not enabled for this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/time-clock-time/clock-in?';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'POST' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
));
$clock_in = array(
'member_id' => 50,
'kiosk_id' => 18,
'clock_in_datetime' => '2022-08-16T15:00:00-05:00',
'paycode_id' => 1
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $clock_in ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/time-clock-time/clock-in?';
xhr.open( 'POST', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var clock_in_json = {
member_id: 50,
kiosk_id: 18,
clock_in_datetime: '2022-08-16T15:00:00-05:00',
paycode_id: 1
};
/* Invoke the API and get the response */
xhr.send( JSON.stringify( clock_in_json ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Clocks a member out given a valid member ID.
Description
Clocks a member out given a valid member ID.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
{} application/json
member_id | integer | required | ID assigned to a member by Aladtec |
kiosk_id | integer | required | ID of an authenticated time clock kiosk |
clock_out_datetime | string | required | Date and time the member is clocking out, format is RFC 3339. The date and time is limited to up to 5 minutes in the future. |
Example:
{
"member_id": 50,
"kiosk_id": 18,
"clock_out_datetime": "2022-08-16T09:02:00-06:00"
}
Successful clock out response
{} application/json
data object
member_id integer
ID assigned to a member by Aladtec
kiosk_id integer
ID of an authenticated time clock kiosk
clock_out_datetime string
Date and time the member clocked out, format is RFC 3339.
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": {
"member_id": 50,
"kiosk_id": 18,
"clock_out_datetime": "2022-08-16T09:02:00-06:00"
},
"meta": {
"generated_at_datetime": "2023-08-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Time Clock is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Clock is not enabled for this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/time-clock-time/clock-out?';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'POST' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
));
$clock_out = array(
'member_id' => 50,
'kiosk_id' => 18,
'clock_out_datetime' => '2022-08-16T15:00:00-05:00'
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $clock_out ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/time-clock-time/clock-out?';
xhr.open( 'POST', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var clock_out_json = {
member_id: 50,
kiosk_id: 18,
clock_out_datetime: '2022-08-16T15:00:00-05:00'
};
/* Invoke the API and get the response */
xhr.send( JSON.stringify( clock_out_json ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Events for requested date/time range.
Description
Events for requested date/time range.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
range_start_datetime | string | required | Start date and time of the query range. Datetime format is RFC 3339. |
range_stop_datetime | string | required | Stop date and time of the query range. Datetime format is RFC 3339. |
daily_split_time | string | optional | Time at which scheduled shifts will be split, e.g. if the daily_split_time is 07:00, a single scheduled shift from 3/27 06:00 to 3/28 06:00 will be split into two: 3/27 06:00 - 3/27 07:00 and 3/27 07:00 - 3/28 06:00. Time must be expressed in an increment matching the Aladtec system, i.e. hour, half-hour, or quarter-hour increment. Default is the Aladtec system split time of day. |
Events that have been cut by the daily_split_time
query parameter
{} application/json
data array
daily_split_date string
A date which is used to group event_records
together. The daily_split_time
query parameter affects how records are grouped.
event_records array
List of event records
event_id integer
ID assigned to an event in Aladtec
title string
Event title
description string
Event description
location string
Event location
start_datetime string
Date and time the record starts at, format is RFC 3339
stop_datetime string
Date and time the record stops at, format is RFC 3339
extends_before boolean
Whether additional time for this record exists before the requested query range
extends_after boolean
Whether additional time for this record exists after the requested query range
schedules array
Event is viewable by the included schedules
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"daily_split_date": "2018-01-16",
"event_records": [
{
"event_id": 22,
"title": "EMS Monthly Meeting",
"description": "Open to the community",
"location": "EMS Station",
"start_datetime": "2018-01-16T09:00:00-05:00",
"stop_datetime": "2018-01-16T11:00:00-05:00",
"extends_before": true,
"extends_after": false,
"schedules": [
1,
2
]
},
{
"event_id": 43,
"title": "Game Night",
"description": "Bring some games and have some fun!",
"location": "Event Hall",
"start_datetime": "2018-01-16T22:00:00-05:00",
"stop_datetime": "2018-01-16T00:00:00-05:00",
"extends_before": false,
"extends_after": false,
"schedules": [
2
]
}
]
},
{
"daily_split_date": "2018-01-17",
"event_records": [
{
"event_id": 43,
"title": "EMS Coverage for Football Game",
"description": "High School Football Game",
"location": "Ramer Field",
"start_datetime": "2018-01-17T18:00:00-05:00",
"stop_datetime": "2018-01-17T04:00:00-05:00",
"extends_before": false,
"extends_after": true,
"schedules": [
2
]
}
]
}
],
"meta": {
"generated_at_datetime": "2019-08-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/events?' . http_build_query( array(
'range_start_datetime' => '2018-01-01T09:00:00-05:00',
'range_stop_datetime' => '2018-01-31T09:00:00-05:00'
) );
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/events?' + new URLSearchParams( {
range_start_datetime: '2018-01-01T09:00:00-05:00',
range_stop_datetime: '2018-01-31T09:00:00-05:00'
} ).toString();
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Shift Labels for requested date range.
Description
Shift Labels for requested date range.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
range_start_date | string | required | Start date of the query range. Date format is YYYY-MM-DD. |
range_stop_date | string | required | Stop date of the query range. Date format is YYYY-MM-DD. |
Successful response with shift labels
{} application/json
data array
shift_date string
Calendar date the shift label is for. Date format is YYYY-MM-DD.
label string
Name of the shift label
color string
Color of the shift label
Possible values: [ Black, Blue, Brown, Gold, Green, Orange, Purple, Red ]
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"shift_date": "2019-01-01",
"label": "Shift 1",
"color": "Blue"
},
{
"shift_date": "2019-01-02",
"label": "Shift 2",
"color": "Red"
},
{
"shift_date": "2019-01-03",
"label": "Shift 1",
"color": "Blue"
},
{
"shift_date": "2019-01-04",
"label": "Shift 2",
"color": "Red"
}
],
"meta": {
"generated_at_datetime": "2020-08-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Shift Labels are not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Shift Labels are not enabled in this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/shift-labels?' . http_build_query( array(
'range_start_date' => '2019-01-01',
'range_stop_date' => '2019-01-07'
) );
$ch = curl_init( $url );
/* Set options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set options */
var url = base_url + '/shift-labels?' + new URLSearchParams( {
range_start_date: '2019-01-01',
range_stop_date: '2019-01-07'
} ).toString();
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns all work groups. Work groups are used for putting members into groups if they...
Description
Returns all work groups. Work groups are used for putting members into groups if they follow the same schedule and work limit rules. Work groups can be customized per Aladtec system.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
Successful response with work group definitions
{} application/json
data array
work_group_id integer
ID of the work group
name string
Name assigned to the work group
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"work_group_id": 1,
"name": "Default"
},
{
"work_group_id": 2,
"name": "Duty Crew"
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/work-groups';
$ch = curl_init( $url );
/* Set options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set options */
var url = base_url + '/work-groups';
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns a list of unique Time Types which can be applied to scheduled time.
Description
Returns a list of unique Time Types which can be applied to scheduled time.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
limit | integer | optional | Number of records to return in the result. The number of records returned is limited to 100. Default: '50'. |
offset | integer | optional | Paginate the records returned in the result. Default: '0'. |
Successful response with time type objects
{} application/json
data array
time_type_id integer
ID assigned to a time type in Aladtec
name string
Name assigned to a time type in Aladtec
is_default boolean
Whether or not the time type is applied by default to new time records; For systems using Time Types, one time type must be set as the default.
is_active boolean
A time type is either active or inactive
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"time_type_id": 0,
"name": "Regular",
"is_default": true,
"is_active": true
},
{
"time_type_id": 2,
"name": "Training",
"is_default": false,
"is_active": true
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Time Types are not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Types are not enabled in this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/time-types?limit=50';
$ch = curl_init( $url );
/* Set options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set options */
var url = base_url + '/time-types?limit=50';
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns a list of all accrual banks.
Description
Returns a list of all accrual banks.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
Successful response with accrual bank definitions
{} application/json
data array
accrual_bank_id integer
ID assigned to an accrual bank in Aladtec
name string
Name assigned to an accrual bank in Aladtec
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"accrual_bank_id": 1,
"name": "Personal Time"
},
{
"accrual_bank_id": 2,
"name": "Vacation Time"
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Accrual or Time Off is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Off is not enabled in this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/accrual-banks';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/accrual-banks';
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns the number of hours in each specified accrual bank for a list of provided members.
Sets accrual bank balances given a list of hours for members' accrual banks.
Description
Returns the number of hours in each specified accrual bank for a list of provided members.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
member_ids | array | required | List of member IDs to filter by |
accrual_bank_ids | array | required | IDs assigned to accrual banks in Aladtec |
Successful response with accrual banks balances data
{} application/json
data array
member_id integer
ID assigned to a member by Aladtec
accrual_bank_id integer
ID assigned to an accrual bank in Aladtec
hours number
The number of hours in the bank for the specified member in Aladtec
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"member_id": 1,
"accrual_bank_id": 1,
"hours": 24.5
},
{
"member_id": 1,
"accrual_bank_id": 2,
"hours": 36.1234
},
{
"member_id": 3,
"accrual_bank_id": 1,
"hours": 0
},
{
"member_id": 3,
"accrual_bank_id": 2,
"hours": -12
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Accrual or Time Off is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Off is not enabled in this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/accrual-banks/balances?' . http_build_query( array(
'member_ids' => '1,2,3',
'accrual_bank_ids' => '1,2'
) );
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/accrual-banks/balances?' + new URLSearchParams( {
member_ids: '1,2,3',
accrual_bank_ids: '1,2'
} ).toString();
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Description
Sets accrual bank balances given a list of hours for members' accrual banks.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
{} application/json
member_id | integer | required | ID assigned to a member by Aladtec |
accrual_bank_id | integer | required | ID assigned to an accrual bank in Aladtec |
hours | number | required | The absolute number of hours to set the accrual bank balance. Both positive and negative values are allowed to be specified. The number can have, at most, four decimal places of precision (e.g. 10.1234). |
note | string | optional | An optional note to log details about the set |
Example:
[
{
"member_id": 1,
"accrual_bank_id": 1,
"hours": 0
},
{
"member_id": 1,
"accrual_bank_id": 2,
"hours": 36.1234,
"note": "Example note about setting the accrual balance."
},
{
"member_id": 3,
"accrual_bank_id": 2,
"hours": -12
}
]
Successful response containing the updated accrual bank balances
{} application/json
data array
member_id integer
ID assigned to a member by Aladtec
accrual_bank_id integer
ID assigned to an accrual bank in Aladtec
hours number
The number of hours in the bank for the specified member in Aladtec
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"member_id": 1,
"accrual_bank_id": 1,
"hours": 0
},
{
"member_id": 1,
"accrual_bank_id": 2,
"hours": 36.1234
},
{
"member_id": 3,
"accrual_bank_id": 2,
"hours": -12
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Accrual or Time Off is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Off is not enabled in this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/accrual-banks/balances';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'PUT' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
));
$accrual_sets = array(
array(
'member_id' => 1,
'accrual_bank_id' => 1,
'hours' => 0
),
array(
'member_id' => 1,
'accrual_bank_id' => 2,
'hours' => 36.1234,
'note' => 'Example note for setting the accrual balance.'
),
array(
'member_id' => 3,
'accrual_bank_id' => 2,
'hours' => -12
)
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $accrual_sets ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/accrual-banks/balances';
xhr.open( 'PUT', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var accrual_sets = [
{
member_id: 1,
accrual_bank_id: 1,
hours: 0
},
{
member_id: 1,
accrual_bank_id: 2,
hours: 36.1234,
note: 'Example note about setting the balance.'
},
{
member_id: 3,
accrual_bank_id: 2,
hours: -12
}
];
/* Invoke the API and get the response */
xhr.send( JSON.stringify( accrual_sets ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Updates accrual bank balances given a list of adjustment hours for members' accrual banks.
Description
Updates accrual bank balances given a list of adjustment hours for members' accrual banks.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
{} application/json
member_id | integer | required | ID assigned to a member by Aladtec |
accrual_bank_id | integer | required | ID assigned to an accrual bank in Aladtec |
adjustment_hours | number | required | The relative number of hours to adjust the accrual bank balance. A positive number will increase the balance, and a negative number will decrease the balance. The number can have, at most, four decimal places of precision (e.g. 10.1234). |
note | string | optional | An optional note to log details about the adjustment |
Example:
[
{
"member_id": 1,
"accrual_bank_id": 1,
"adjustment_hours": 24
},
{
"member_id": 1,
"accrual_bank_id": 2,
"adjustment_hours": -40,
"note": "Example note about the adjustment."
},
{
"member_id": 3,
"accrual_bank_id": 2,
"adjustment_hours": 12.5001
}
]
Successful response containing the updated accrual bank balances
{} application/json
data array
member_id integer
ID assigned to a member by Aladtec
accrual_bank_id integer
ID assigned to an accrual bank in Aladtec
hours number
The number of hours in the bank for the specified member in Aladtec
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"member_id": 1,
"accrual_bank_id": 1,
"hours": 48
},
{
"member_id": 1,
"accrual_bank_id": 2,
"hours": -4
},
{
"member_id": 3,
"accrual_bank_id": 2,
"hours": 0.5001
}
],
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Accrual or Time Off is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Time Off is not enabled in this system."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/accrual-banks/balances/adjustments';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'POST' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token,
'Content-Type: application/json'
));
$accrual_adjustments = array(
array(
'member_id' => 1,
'accrual_bank_id' => 1,
'adjustment_hours' => 24.000
),
array(
'member_id' => 1,
'accrual_bank_id' => 2,
'adjustment_hours' => -40.000,
'note' => 'Example note about the adjustment.'
),
array(
'member_id' => 3,
'accrual_bank_id' => 2,
'adjustment_hours' => 12.5001
)
);
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $accrual_adjustments ) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/accrual-banks/balances/adjustments';
xhr.open( 'POST', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
xhr.setRequestHeader( 'Content-Type', 'application/json' );
var accrual_adjustments = [
{
member_id: 1,
accrual_bank_id: 1,
adjustment_hours: 24
},
{
member_id: 1,
accrual_bank_id: 2,
adjustment_hours: -40,
note: 'Example note about the adjustment.'
},
{
member_id: 3,
accrual_bank_id: 2,
adjustment_hours: 12.5001
}
];
/* Invoke the API and get the response */
xhr.send( JSON.stringify( accrual_adjustments ) );
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Returns a list of configuration settings.
Description
Returns a list of configuration settings.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
Successful response with configuration data
{} application/json
data object
The Configuration properties
timezone string
The timezone used by the system in tz database format, also known as IANA or Olson
organization_name string
The name of the organization using this Aladtec system
system_admin_member_id integer
The member_id of the system admin. This can be used in conjunction with the /members resource to get information about this member.
historical_edits_limit integer
The number of days a record remains editable after it occurs. If no limit is imposed, this will return a value of null
.
meta object
Additional properties describing the record set within data
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": {
"timezone": "America/Chicago",
"organization_name": "Example Department",
"system_admin_member_id": 3,
"historical_edits_limit": 7
},
"meta": {
"generated_at_datetime": "2022-01-01T07:42:33-06:00"
}
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
$url = $base_url . '/configuration';
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
));
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
print( $response_body );
curl_close( $ch );
/* Set your system URL and API token here. */
var base_url = 'https://secure#.aladtec.com/example/api/v3';
var api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
var xhr = new XMLHttpRequest();
/* Set the options */
var url = base_url + '/configuration';
xhr.open( 'GET', url );
xhr.setRequestHeader( 'Authorization', 'Bearer ' + api_token );
/* Invoke the API and get the response */
xhr.send();
xhr.addEventListener( 'load', function () {
console.log( xhr.responseText );
});
Runs the Payroll Report export. Pagination is required to export all...
Description
Runs the Payroll Report export.
Pagination is required to export all records within the requested range.
Authorization | string | required | API access token to authenticate the request. The token value must be prefaced with the word "Bearer" and a single space. |
range_start_datetime | string | required | Start date and time of the query range. Datetime format is RFC 3339. |
range_stop_datetime | string | required | Stop date and time of the query range. Datetime format is RFC 3339. |
member_ids | array | optional | List of member IDs to filter by |
time_categories | array | optional | One or more payroll categories to filter by. Possible values: [ time_worked, time_off, overtime, holiday ] |
next_token | string | optional | Pagination token used to request the next set of records |
Successful response containing a partial set of Payroll Report records
{} application/json
data array
member object
Member information
member_id integer
ID assigned to a member by Aladtec
first_name string
Member given name
last_name string
Member family name
report_entries array
Array of Payroll Report time records
start_datetime string
Datetime format is RFC 3339.
stop_datetime string
Datetime format is RFC 3339.
schedule object
This property has a value when pay_type.record_type
equals "time_type". Otherwise, it will have a value of null.
schedule_id integer
ID assigned to a schedule in Aladtec
name string
The name of the schedule
position_qualification object
This property has a value when pay_type.record_type
equals "time_type". Otherwise, it will have a value of null.
position_qualification_id integer
ID assigned to a position qualification in Aladtec
name string
Name assigned to the qualification
pay_type object
The entry's Aladtec time record type
id integer
ID of the type
name string
Name of the type
record_type string
The time record type in Aladtec.
Possible values: [ time_type, paycode, time_off_type ]
time_category string
The payroll category in Aladtec.
Possible values: [ time_worked, time_off, overtime, holiday ]
shift_differential string
The shift differential value if this record is mapped to one
payroll_hours number
Total number of hours for this entry
meta object
Additional properties describing the record set within data
next_token string
Pagination token used to request the next set of records. When this value is an empty "", all records in the requested range have been returned.
generated_at_datetime string
RFC 3339 formatted datetime at which data was generated
Example:
{
"data": [
{
"member": {
"member_id": 4,
"first_name": "John",
"last_name": "Doe"
},
"report_entries": [
{
"start_datetime": "2018-12-02T09:00:00-06:00",
"stop_datetime": "2018-12-02T17:00:00-06:00",
"schedule": {
"schedule_id": 1,
"name": "Ambulance 1"
},
"position_qualification": {
"position_qualification_id": 10,
"name": "EMT"
},
"pay_type": {
"record_type": "time_type",
"id": 1,
"name": "Regular"
},
"time_category": "time_worked",
"shift_differential": "",
"payroll_hours": 8
},
{
"start_datetime": "2019-01-01T00:00:00-06:00",
"stop_datetime": "2019-01-03T00:00:00-06:00",
"schedule": null,
"position_qualification": null,
"pay_type": {
"record_type": "paycode",
"id": 1,
"name": "Hourly"
},
"time_category": "overtime",
"shift_differential": "",
"payroll_hours": 48
}
]
}
],
"meta": {
"generated_at_datetime": "2020-08-01T07:42:33-06:00",
"next_token": "eyJyYW5nZV9zdGFydCI6IjIwMTktMDEtMDFUMDA6MDAiLCJyYW5nZV9zdG9wIjoiMjAxOS0wMS0wM1QwMDowMCIsIm1lbWJlcl9pZHMiOiJbODEsODIsODMsODQsODUsODYsODcsODgsODksOTAsOTEsOTIsOTMsOTUsOTYsOTgsOTksMTAxLDEwMiwxMDgsMTgsNDMsMTAwLDE1LDEwNiwxMDQsMTA1LDk0LDEwMywxMDddIn0="
}
}
Error response containing one or more errors returned as a result of invalid request data.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "An example error message 1.",
"detail": "More details about the specific error 1."
},
{
"error": "An example error message 2.",
"detail": "More details about the specific error 2."
}
]
}
Error response returned when the API token does not have permission to perform this action.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Your API token does not have permission to perform this action.",
"detail": "If you believe this is in error, please talk to your system contact."
}
]
}
Error response when Payroll is not enabled in the system.
Please contact Aladtec Support (support@aladtec.com, 888.749.5550) for help if this error is received.
{} application/json
errors array
error string
The specific error returned
detail string
More details about the error that occurred
Example:
{
"errors": [
{
"error": "Payroll is not enabled in this system.",
"detail": ""
}
]
}
<?php
/* Set your system URL and API token here. */
$base_url = 'https://secure#.aladtec.com/example/api/v3';
$api_token = 'zYyMDk5MTAtbnU1blZVY3NPTHdFWEczWE1MT0RLRkNTYmI3WE1ELjBwYTZaaTNjS';
/* For this example, we are getting the first set of payroll report members */
$url = $base_url . '/reports/payroll?' . http_build_query( array(
'range_start_datetime' => '2018-12-01T11:00:00-06:00',
'range_stop_datetime' => '2019-01-31T11:00:00-05:00'
) );
$ch = curl_init( $url );
/* Set curl options */
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $api_token
) );
/* Invoke the API and get the response */
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
return;
}
echo( 'Response: ' . "\n" . $response_body . "\n" );
/* For this example, we are using the next_token to get the next set of members */
$response_array = json_decode( $response_body, true );
$next_token = $response_array['meta']['next_token'];
while ( !empty( $next_token ) ) {
$url = $base_url . '/reports/payroll?' . http_build_query( array(
'next_token' => $next_token
) );
curl_setopt( $ch, CURLOPT_URL, $url );
$response_body = curl_exec( $ch );
$error = curl_error( $ch );
if ( $error ) {
echo 'Error: ' . $error;
}
echo( "\n" . 'Response: ' . "\n" . $response_body . "\n" );
$response_array = json_decode( $response_body, true );
$next_token = $response_array['meta']['next_token'];
}
curl_close( $ch );
/* Set your system URL and API token here. */
const base_url = 'https://secure#.aladtec.com/example/api/v3';
const api_token = 'YOUR API TOKEN';
(async () => {
let url = `${base_url}/reports/payroll?`;
let params = {
range_start_datetime: '2018-12-01T11:00:00-06:00',
range_stop_datetime: '2019-01-31T11:00:00-05:00'
};
let headers = {
'Authorization': 'Bearer ' + api_token
};
let report_data = [];
do {
const res = await fetch( url + new URLSearchParams( params ).toString(), {
headers: headers
} );
const json = await res.json();
report_data = report_data.concat( json.data );
params.next_token = json.meta.next_token;
} while ( params.next_token !== '' );
console.log( report_data );
})();
© Aladtec Inc. All rights reserved.