Returns the security licenses on file for a single employee, including expiry, status, and any attachment links. Requires KeyType=developer.
curl --request GET \
--url https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses \
--header 'Authorization: Bearer <token>' \
--header 'external-gh-apim-sub-key: <api-key>'import requests
url = "https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses"
headers = {
"Authorization": "Bearer <token>",
"external-gh-apim-sub-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'external-gh-apim-sub-key': '<api-key>'}
};
fetch('https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"external-gh-apim-sub-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("external-gh-apim-sub-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses")
.header("Authorization", "Bearer <token>")
.header("external-gh-apim-sub-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["external-gh-apim-sub-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": {
"code": 123,
"errorMessage": "<string>"
},
"data": [
{
"securityLicenseId": 123,
"employeeId": 123,
"firstName": "<string>",
"lastName": "<string>",
"state": "<string>",
"licenseNumber": "<string>",
"status": "<string>",
"expiryDate": "2023-11-07T05:31:56Z",
"reminder": 123,
"critical": true,
"attachmentLink": "<string>",
"licenceSector": "<string>",
"isInvalidLicense": true,
"employeeSecurityLicenseInfo": {
"employeeSecurityLicenseId": 123,
"currentStatus": "<string>",
"expiryDate": "2023-11-07T05:31:56Z",
"licenceSector": "<string>"
}
}
],
"count": 123,
"message": "<string>",
"errors": [
{
"code": 100,
"message": "<string>"
}
],
"nextPageParameter": "<string>",
"prevPageParameter": "<string>"
}{
"status": {
"code": 123,
"errorMessage": "<string>"
},
"data": "<unknown>",
"count": 123,
"message": "<string>",
"errors": [
{
"code": 100,
"message": "<string>"
}
]
}{
"status": {
"code": 123,
"errorMessage": "<string>"
},
"data": "<unknown>",
"count": 123,
"message": "<string>",
"errors": [
{
"code": 100,
"message": "<string>"
}
]
}Authorizations
JWT issued by POST /api/external/token/request. Send as Authorization: Bearer <token>.
Guardhouse API Management subscription key. Required on every request. The same value is used by all API consumers within a region — contact Guardhouse Support for the subscription key.
Path Parameters
Employee ID.
Query Parameters
Optional filter to a specific license number.
Response
Paginated list of security licenses
Envelope for the newer cursor-paginated endpoints (timesheets, staff, customers, sites). The cursor is encoded as a string in nextPageParameter / prevPageParameter and is intended to be POSTed back as the next request body — or appended to the query string verbatim.
curl --request GET \
--url https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses \
--header 'Authorization: Bearer <token>' \
--header 'external-gh-apim-sub-key: <api-key>'import requests
url = "https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses"
headers = {
"Authorization": "Bearer <token>",
"external-gh-apim-sub-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'external-gh-apim-sub-key': '<api-key>'}
};
fetch('https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"external-gh-apim-sub-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("external-gh-apim-sub-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses")
.header("Authorization", "Bearer <token>")
.header("external-gh-apim-sub-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway-api.guardhousehq.com/api/external/staffs/{id}/licenses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["external-gh-apim-sub-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": {
"code": 123,
"errorMessage": "<string>"
},
"data": [
{
"securityLicenseId": 123,
"employeeId": 123,
"firstName": "<string>",
"lastName": "<string>",
"state": "<string>",
"licenseNumber": "<string>",
"status": "<string>",
"expiryDate": "2023-11-07T05:31:56Z",
"reminder": 123,
"critical": true,
"attachmentLink": "<string>",
"licenceSector": "<string>",
"isInvalidLicense": true,
"employeeSecurityLicenseInfo": {
"employeeSecurityLicenseId": 123,
"currentStatus": "<string>",
"expiryDate": "2023-11-07T05:31:56Z",
"licenceSector": "<string>"
}
}
],
"count": 123,
"message": "<string>",
"errors": [
{
"code": 100,
"message": "<string>"
}
],
"nextPageParameter": "<string>",
"prevPageParameter": "<string>"
}{
"status": {
"code": 123,
"errorMessage": "<string>"
},
"data": "<unknown>",
"count": 123,
"message": "<string>",
"errors": [
{
"code": 100,
"message": "<string>"
}
]
}{
"status": {
"code": 123,
"errorMessage": "<string>"
},
"data": "<unknown>",
"count": 123,
"message": "<string>",
"errors": [
{
"code": 100,
"message": "<string>"
}
]
}