Retrieve chain of custody by APK ID
curl --request GET \
--url https://api-external.ezyid.io/api/assets/{apkId}/chain-of-custodyimport requests
url = "https://api-external.ezyid.io/api/assets/{apkId}/chain-of-custody"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-external.ezyid.io/api/assets/{apkId}/chain-of-custody', 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://api-external.ezyid.io/api/assets/{apkId}/chain-of-custody",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api-external.ezyid.io/api/assets/{apkId}/chain-of-custody"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-external.ezyid.io/api/assets/{apkId}/chain-of-custody")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-external.ezyid.io/api/assets/{apkId}/chain-of-custody")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"date": "2023-11-07T05:31:56Z",
"siteId": 123,
"siteName": "<string>",
"inventoryRegisterId": 123,
"itemName": "<string>",
"category": "<string>",
"assetId": "<string>",
"partNumber": "<string>",
"serialNumber": "<string>",
"customId": "<string>",
"movementType": "<string>",
"eventTypeId": 123,
"eventCode": "<string>",
"jobCardCode": "<string>",
"direction": "<string>",
"stockIn": 123,
"stockOut": 123,
"balanceAfter": 123,
"contractorEmail": "<string>",
"activityCreatedBy": "<string>",
"checkoutToDisplay": "<string>",
"performedBy": "<string>",
"details": "<string>",
"trackingType": "<string>",
"referenceId": 123,
"adjustmentMode": 123
}
],
"totalCount": 123,
"page": 1,
"pageSize": 10000
}{
"error": "<string>"
}{
"error": "<string>"
}{
"title": "The chain of custody report is unavailable.",
"status": 502
}Assets
Chain of Custody by APK ID
Retrieve custody history for an asset using its internal APK ID.
GET
/
api
/
assets
/
{apkId}
/
chain-of-custody
Retrieve chain of custody by APK ID
curl --request GET \
--url https://api-external.ezyid.io/api/assets/{apkId}/chain-of-custodyimport requests
url = "https://api-external.ezyid.io/api/assets/{apkId}/chain-of-custody"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-external.ezyid.io/api/assets/{apkId}/chain-of-custody', 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://api-external.ezyid.io/api/assets/{apkId}/chain-of-custody",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api-external.ezyid.io/api/assets/{apkId}/chain-of-custody"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-external.ezyid.io/api/assets/{apkId}/chain-of-custody")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-external.ezyid.io/api/assets/{apkId}/chain-of-custody")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"date": "2023-11-07T05:31:56Z",
"siteId": 123,
"siteName": "<string>",
"inventoryRegisterId": 123,
"itemName": "<string>",
"category": "<string>",
"assetId": "<string>",
"partNumber": "<string>",
"serialNumber": "<string>",
"customId": "<string>",
"movementType": "<string>",
"eventTypeId": 123,
"eventCode": "<string>",
"jobCardCode": "<string>",
"direction": "<string>",
"stockIn": 123,
"stockOut": 123,
"balanceAfter": 123,
"contractorEmail": "<string>",
"activityCreatedBy": "<string>",
"checkoutToDisplay": "<string>",
"performedBy": "<string>",
"details": "<string>",
"trackingType": "<string>",
"referenceId": 123,
"adjustmentMode": 123
}
],
"totalCount": 123,
"page": 1,
"pageSize": 10000
}{
"error": "<string>"
}{
"error": "<string>"
}{
"title": "The chain of custody report is unavailable.",
"status": 502
}The
This route supports the same date, search, performed-by, movement type, and sorting parameters as Chain of Custody by Identifier. Both return the same report envelope and have the same 10,000-row limit. Retrieving the report does not perform a transfer or update inventory.
apkId path parameter is the internal asset APK ID used by Retrieve Asset. It differs from the asset detail row’s id.
Authenticate using the API key generated in Admin → My Preferences → API Key Configuration. The asset must belong to the subscriber associated with that key. Do not supply subscriberId or combine the APK ID with another asset selector.
curl --get 'https://api-external.ezyid.io/api/assets/123/chain-of-custody' \
--data-urlencode 'apiKey=YOUR_API_KEY' \
--data-urlencode 'sortColumn=date' \
--data-urlencode 'sortDesc=true'
Path Parameters
Query Parameters
Response
Chain of custody report. Returns at most 10,000 rows with page 1 and pageSize 10000; these endpoints do not expose paging parameters.
