NAV
shell php

Introduction

Welcome to the Assetpool API.

You can use our API to access Assetpool API endpoints, which can get information on various Jobs, Assets, Sites, Zones and Users.

We have language bindings in PHP. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Authentication

Our API follows the OAuth2 specification. Below you'll find all you need to authenticate each request.

You can also view any of the code examples to see how the auth bearer token is passed to each request.

Retrieving bearer access token

curl --request POST \
  --url http://assetpool.test/oauth/token \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "grant_type": "password",
  "client_id": "123",
  "client_secret": "JREvCyVo2waRfpXFux8HZEddPubixLvgqO4VrLMK",
  "username": "john@example.com",
  "password": "Password123"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "http://assetpool.test/oauth/token",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"grant_type\": \"password\",\n  \"client_id\": \"123\",\n  \"client_secret\": \"JREvCyVo2waRfpXFux8HZEddPubixLvgqO4VrLMK\",\n  \"username\": \"john@example.com\",\n  \"password\": \"Password123\"\n}",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Save your access token:

{
  "token_type": "Bearer",
  "expires_in": 1296000,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxNCIsImp0aSI6ImIyMTA0MmVjM2M1YTFlOGI0N2MxMjRhMjU2MzRlZDAzMWViZmI1OWEzNzBlZWU2ZDZjMTI4M2E3ZTE0YjY3YWI1MTkzOTUyM2FmYmIxNWYxIiwiaWF0IjoxNjM4OTY0MTM0Ljc3OTMxLCJuYmYiOjE2Mzg5NjQxMzQuNzc5MzEzLCJleHAiOjE2NDAyNjAxMzQuNDI2ODY5LCJzdWIiOiI3MDEyIiwic2NvcGVzIjpbXX0.IOPqWRz5-5dobHx-m-bTFu2XSsR9aFSRXXy49FhZNpvZ_RBKBcpF_TA8gL2LJXOY0knLNA_rfaj-JoP46keEUSFcNWek-TQKSj7yd0EPwCp9rYXxkXgEUr5sSHfyzkEET75tsiT6BCTtqrjnMoKU9RGx5ZKDXIYLwtHrY2L2o__JM-5ICrrhiE7fHjyEvB94q5Xpb8fSggg6GQnYugOJD992tJpO0PlCUg56VGGyTgd19Mo8Q1RENeTKGjIpsqwTA8GcZnhl-Vn8-juzOXnFoGwb9cmWxzwqAI04dfTX4XTZvTiHKSGHLhFokyJJybIs35TbT2JduwpUUDCebveto5o5DSeace4O7dWaF3sRiht3Fr2UG4PxrDkFPnc3HaSAdFspx9-T7e4-U15GIxAHaw9xabmijVe3drEnvQdrsQjCKtIoEvEgnZhxmo0fuOkVde94BWe5wgNtHXNfzTLF5oWk_8YV1odM3fCeqrEnhW-L5SXxVWGKHn7G5yL2m7ESDo18c2egAm1M0Gzf6QoK2TAT7U7C3ftqwjvP5rLH9xIqk-pHkia7MxFxz80pOSJqysgXoF21Gc0ocpL-27JSmeG_me64BSkrv1zG8MvHdLvOEwbw9onU1FLFSFBPG1nRUakbykbQGkt2M39T-slMmLTM1WblqbMIAeRmghmdvmk",
  "refresh_token": "def502001aae4e150b728a8b1ac4d76e2af54c8154365e55450f62e672275c8e8a85a3b5da9a886beaf852604796c3b6c9f51e4044149204866d3b6937be291bb71a334a815d0afab3b8ced4cdd37d1596ad53058f24a5e88ae06386bf6de155a12984176a5edbc1c9f524710e8de95979709f0d235e4c2ea4afb46be37940dd0a716ebbb70b5e5d1ba22827e78ae4b508b51562344e2a198536e6993c8f3df5db611a5115895d8c9662f7c293eb8842fa6a2233a3e3b234a0b4a2b1e3044d9bce0c87792cc5790af2c2cebcc8eb1bf4a9ec75a5bfc37091b8e2a728296c7bc22cdb9bf420a2994140496f0fc09904582f4e2a8122af4ed42ab0c1443a813f040e63d81e8311786d86f81f5eb5774c59e31cbf41ff4a5e4a349003a15a837534f6bcad6777ca2ca61775812c9a6ef08ecc425343c3e601bf97287b6b134d540c5bf062a2afde35d7fcacb69ca80346b61c2177c3af8689f2baa0d4ccb24f2c4800fe2e51c1"
}

From us, you should have received a Client ID and a Client Secret.

Both of these should be passed to generate an auth token:

HTTP Request

POST https://dev-api.assetpool.co/oauth/token

Parameters

Parameter Description
grant_type Set to password
client_id The Client ID we've given you.
client_secret The Client Secret we've given you.
username Your Assetpool account's username.
password Your Assetpool account's password.

Returned Access Token

Use the returned token in each subsequent request as a header:

Set key Authorization with the value of Bearer: << TOKEN >>.

Base Urls

Jobs

Create Job

curl --request POST \
  --url https://dev-api.assetpool.co/api/job \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiYzNiMzRmMDg4YzE5MDM3ZTZhYTk2MDNjYTc5ZDgwY2I4NTkxNmYzZjNjZTU5MTcxNWNkOGI1NDEwNjQ4MWVmYTBhMzk0MTk2ODU4ZjRiYmMiLCJpYXQiOjE2Mzg4MjQyNTUuOTE5OTI0LCJuYmYiOjE2Mzg4MjQyNTUuOTE5OTMsImV4cCI6MTY3MDM2MDI1NS4yMzY2NzUsInN1YiI6IjIyMjYiLCJzY29wZXMiOltdfQ.byoLvYRy9srabqZS1XywG_xm2MHMjYCwG72iOCOoF5bVrHlNHFqc8nnNV2el6yAo1YjoXGZbIZarFtIjFYgj1fZ4b1KLMXBm5BW4plgrre2Z2RHWANr1tG4jFQn7hrsINJTVFDwHCuHpvbIwHr4qO9iABPxiLdIL5_GlSGrOzp6ZeoeJpS0-yF2TZApp0GcCxUYfDNlNHNMTYEuGdRkYTPQ0-ehhmjITMLDVEALWc1JfbwjUV_9gqpwmiY10faURmt6eOA5FEvsP6PTG_j8VVxsIKPAJKnFvwXkvvn2P-WlpOTQhgYH2UkTQP6tVs9qqxjOaDvhjVa8XoDd1MWSUCjsscclHI3zley7VqJXh93hahgzedYvEOfzAzaOI0Tg_uzTCNT9xdd904mhtVy2zp6AfJQaqw0PkciDrK2VPg5RQ-DImvqGEmoB_UVBsUNGoqrFqxbUo9wGqOl3Aguovi6QBffVnTTRIN79rJTB5S8HgXom_1KyEqqyGT4-ignVwMaZHC2iO_lFsp7JMvyqeSJAK465jT97IwRA0wovi8UErqv7q2HTbNqXOLKUAQF_tlVz8HxwczlW69Hg9Sp_Zab3bmKclPOFU8m0wE-3SrB3fJqi-lMCZOUsom9ea_3gZY0ek7IAQFhQF1_ApiTc7EYVu36xoWkK12eHcKqs2HUE' \
  --header 'Content-Type: application/json' \
  --data '{
    "site_id": 123,
    "job_type_id": 123,
    "technician_id": 123,
    "start_date": "2021-12-01",
    "end_date": "2021-12-02",
    "start_time": "08:00:00",
    "end_time": "17:00:00",
    "requires_signature": false
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://dev-api.assetpool.co/api/job",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"site_id\": 123,\n\t\"job_type_id\": 123,\n\t\"technician_id\": 123,\n\t\"start_date\": \"2021-12-01\",\n\t\"end_date\": \"2021-12-02\",\n\t\"start_time\": \"08:00:00\",\n\t\"end_time\": \"17:00:00\",\n\t\"requires_signature\": false\n}",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiYzNiMzRmMDg4YzE5MDM3ZTZhYTk2MDNjYTc5ZDgwY2I4NTkxNmYzZjNjZTU5MTcxNWNkOGI1NDEwNjQ4MWVmYTBhMzk0MTk2ODU4ZjRiYmMiLCJpYXQiOjE2Mzg4MjQyNTUuOTE5OTI0LCJuYmYiOjE2Mzg4MjQyNTUuOTE5OTMsImV4cCI6MTY3MDM2MDI1NS4yMzY2NzUsInN1YiI6IjIyMjYiLCJzY29wZXMiOltdfQ.byoLvYRy9srabqZS1XywG_xm2MHMjYCwG72iOCOoF5bVrHlNHFqc8nnNV2el6yAo1YjoXGZbIZarFtIjFYgj1fZ4b1KLMXBm5BW4plgrre2Z2RHWANr1tG4jFQn7hrsINJTVFDwHCuHpvbIwHr4qO9iABPxiLdIL5_GlSGrOzp6ZeoeJpS0-yF2TZApp0GcCxUYfDNlNHNMTYEuGdRkYTPQ0-ehhmjITMLDVEALWc1JfbwjUV_9gqpwmiY10faURmt6eOA5FEvsP6PTG_j8VVxsIKPAJKnFvwXkvvn2P-WlpOTQhgYH2UkTQP6tVs9qqxjOaDvhjVa8XoDd1MWSUCjsscclHI3zley7VqJXh93hahgzedYvEOfzAzaOI0Tg_uzTCNT9xdd904mhtVy2zp6AfJQaqw0PkciDrK2VPg5RQ-DImvqGEmoB_UVBsUNGoqrFqxbUo9wGqOl3Aguovi6QBffVnTTRIN79rJTB5S8HgXom_1KyEqqyGT4-ignVwMaZHC2iO_lFsp7JMvyqeSJAK465jT97IwRA0wovi8UErqv7q2HTbNqXOLKUAQF_tlVz8HxwczlW69Hg9Sp_Zab3bmKclPOFU8m0wE-3SrB3fJqi-lMCZOUsom9ea_3gZY0ek7IAQFhQF1_ApiTc7EYVu36xoWkK12eHcKqs2HUE",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Example Response:

{
  "site_id": "123",
  "user_id": 123,
  "technician_id": "123",
  "job_type_id": "123",
  "start_date": "2021-12-01 08:00:00",
  "end_date": "2021-12-02 17:00:00",
  "allow_early_closure": true,
  "company_id": 123,
  "number": 380,
  "special_instructions": null,
  "reference": null,
  "requires_signature": false,
  "updated_at": "2021-11-25 13:38:57",
  "created_at": "2021-11-25 13:38:57",
  "id": 123,
  "signature_url": null,
  "total_minutes": 0,
  "start_date_is_future": true,
  "company": {
    "id": 123,
    "primary_user_id": 123,
    "name": "Example Company",
    "logo": "companies\/had982hg.png",
    "registration_number": null,
    "vat_number": null,
    "created_at": "2019-08-12 17:12:08",
    "updated_at": "2021-10-14 11:39:33",
    "deleted_at": null,
    "job_number": 379,
    "industry_id": 12,
    "region_id": 3,
    "allow_external_barcodes": false,
    "barcode_format": null,
    "assetpool_branch_id": 1,
    "manual_inspection_closure": false,
    "sales_rep_id": 2063,
    "app_name": null,
    "from_email": null,
    "app_email_logo": null,
    "white_label_enabled": false,
    "from_email_name": null,
    "frontend_url": null,
    "logo_url": "https:\/\/example.com/logo.png",
    "email_logo_url": null,
    "stats": {
      "id": 64,
      "company_id": 76,
      "assets": 114,
      "jobs": 209,
      "checklists": 51,
      "checks": 409,
      "sites": 15,
      "clients": 11,
      "recurring_jobs": 1,
      "users": 24,
      "total_storage": 0,
      "created_at": "2020-05-21 14:14:04",
      "updated_at": "2021-11-25 13:38:57",
      "deleted_at": null
    }
  },
  "site": {
    "id": 123,
    "name": "Example Site",
    "legal_name": null,
    "registration_number": null,
    "vat_number": null,
    "client_id": 123,
    "user_id": 123,
    "created_at": "2019-10-22 13:21:56",
    "updated_at": "2021-06-22 17:50:32",
    "logo": "sites\/example_logo.png",
    "risk_id": 1,
    "deleted_at": null,
    "failure_threshold": 50,
    "is_failing": true,
    "company_id": 123,
    "logo_url": "https:\/\/example.com/logo.png",
    "zones": [
      {
        "id": 123,
        "source_uuid": "6197e1e1-50f6-46fc-895e-jad209j09da2",
        "name": "Example Zone",
        "site_id": 123,
        "user_id": 123,
        "created_at": "2019-10-22 13:27:44",
        "updated_at": "2019-10-22 13:28:26",
        "deleted_at": null,
        "size": 0,
        "type_id": 164
      }
    ],
    "client": {
      "id": 123,
      "legal_name": "Example Client",
      "trading_name": null,
      "registration_number": null,
      "vat_number": null,
      "user_id": 123,
      "created_at": "2019-10-22 13:18:12",
      "updated_at": "2019-10-22 13:40:20",
      "deleted_at": null,
      "logo": "clients\/logo.png",
      "company_id": 123,
      "logo_url": "https:\/\/example.com/logo.png"
    }
  },
  "type": {
    "id": 123,
    "description": "Example Job Type",
    "created_at": "2019-10-22 14:13:10",
    "updated_at": "2021-02-20 12:39:40",
    "deleted_at": null,
    "company_id": 123,
    "pass_percentage": 100,
    "active": true,
    "requires_signature": false,
    "single_inspection": false
  },
  "current_status": {
    "statusable_id": 123,
    "statusable_type": "Billow\\Models\\Job"
  },
  "zones": [],
  "technician": {
    "id": 123,
    "name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.co.za",
    "active": true,
    "created_at": "2020-05-25T14:57:59.000000Z",
    "updated_at": "2021-09-23T10:22:13.000000Z",
    "phone_number": null,
    "deleted_at": null,
    "app_needs_update": true,
    "timezone": "Africa\/Johannesburg",
    "full_name": "John Doe",
    "profile": {
      "id": 123,
      "user_id": 123,
      "mobile": "(123) 123-1234",
      "telephone": null,
      "picture": null,
      "created_at": "2020-05-25 16:57:59",
      "updated_at": "2020-05-25 16:57:59",
      "deleted_at": null,
      "position": null,
      "dialing_code": "ZA",
      "employee_number": null,
      "id_number": null,
      "picture_url": null,
      "formatted_mobile": "+27121231234"
    }
  },
  "user": {
    "id": 123,
    "name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.co.za",
    "active": true,
    "created_at": "2020-05-25T14:57:59.000000Z",
    "updated_at": "2021-09-23T10:22:13.000000Z",
    "phone_number": null,
    "deleted_at": null,
    "app_needs_update": true,
    "timezone": "Africa\/Johannesburg",
    "full_name": "John Doe",
    "profile": {
      "id": 123,
      "user_id": 123,
      "mobile": "(123) 123-1234",
      "telephone": null,
      "picture": null,
      "created_at": "2020-05-25 16:57:59",
      "updated_at": "2020-05-25 16:57:59",
      "deleted_at": null,
      "position": null,
      "dialing_code": "ZA",
      "employee_number": null,
      "id_number": null,
      "picture_url": null,
      "formatted_mobile": "+27121231234"
    }
  }
}

This endpoint creates a Job.

HTTP Request

POST https://dev-api.assetpool.co/api/job

Parameters

Parameter Required Description
site_id required The site's id to associate the new job with.
job_type_id required The job type's id.
technician_id required The assigned technician's id. The technician is a user with the technician role.
start_date required The date at which the job should start.
end_date required The date at which the job should end.
start_time required The time at which the job should start on start_date.
end_time required The time at which the job should end on end_date.
requires_signature required true or false. Whether a signature is required.
documents.* optional Array of uploaded files. Sum of filesize cannot exceed 5MB. Supported mimetypes: .pdf, .xlsx, .jpeg, .jpg, .png, .xls
reference optional Optional internal job identifier.
special_instructions optional Text field. Used for any special instructions to technicians.

List Job Types

curl --request GET \
  --url https://dev-api.assetpool.co/api/job-types/list \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiYWJjMmVjMTY3NjUwNTJlNzg0NjJlMzFkMWNmM2IwNGJhYzM4ODFkODliMzg5ZjMzMDVlZGU3MTc0M2Q4YmYzMzBkODMyOWE3ZTA2NWYxMzUiLCJpYXQiOjE2Mzc4Mzg4MDAuNDc5OTIsIm5iZiI6MTYzNzgzODgwMC40Nzk5MjUsImV4cCI6MTY2OTM3NDc5OS42NjY1NjUsInN1YiI6IjIyMjYiLCJzY29wZXMiOltdfQ.GsOErHJpSchLlKiobPmZUwNHYSDKmK4Jin5FHzoZLdCEPQWCsT3X9CDyLjQQk09yWq2KCuNs0MfGgdTDY27j8TfmeicYH4YszvoSEyd_DUkp4xDmnmoD9jKDyIL2fHqmhhytDZr0ni55S2JzztjQzRUExLwXU0X5sSzOJo-LpIo50KlOfsj5Sz3yWCYAWzLzMyC4mh58A3oF7RdzCV6emh2wEqO6sN8wHRJ-ej2V4JU-fLofuJZ32X4YHAUgR9YhfSoeDgcKIAYJ4PoEnxK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ViNzVlNzlhNzA4NjU4OGJmZGVmMjQ4MTM2ZDU2Mjc0IiwidGFnIjoiIn0%253D'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://dev-api.assetpool.co/api/job-types/list",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_COOKIE => "XSRF-TOKEN=eyJpdiI6Im9BendIRkl6OTdGMmZ0c1lIZk92cXc9PSIsInZhbHVlIjoiRmJEaEkxMDY1WDZycnZFVktOVjg1L0FSamV6Y1RPOUwwTlBjdDdpMStKNXI5YXFneUpBdFpCbUVSbDVnS1YxdmprSlordFFnNWZUVDBCUDV5TE5xS1habHV4Z0h5NnF4bjUvTnBPNUQzZmtBZkZrQkJiMU10bzMzOXcxRyt0TUciLCJtYWMiOiI5YmMyZDAzMDdmMTYyNzYzMTVhNWNhYmRhYTFhZGNjMzdjZmI3MTdhNzI5Yzc5NGRiYzY0MGMwNDYxZmYzZWQ4IiwidGFnIjoiIn0%253D; laravel_session=eyJpdiI6IjB5UW02Q1cvcUpWZkpKbjEwcXdxN3c9PSIsInZhbHVlIjoiV2VXWGNKWWt2TEVXWDExRGFZNHNBQjM5YmJaeDRpQzR5bHNiZ3lXdTFaNlVaQUFUWENIYU9Ba2JXaFpsdFBaQngwQkRHalE0c1dld2tPTURVTWhTQWpHQUlxNXdzOFFuZVliVXJWbXlacHdCcGpBalUwaVR0UDQ2OVRJRS9JRUEiLCJtYWMiOiJhYjdlNDE1MzUzN2ZkZDExNjA3OTdiZDUwNWFhN2FiZGViNzVlNzlhNzA4NjU4OGJmZGVmMjQ4MTM2ZDU2Mjc0IiwidGFnIjoiIn0%253D",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiYWJjMmVjMTY3NjUwNTJlNzg0NjJlMzFkMWNmM2IwNGJhYzM4ODFkODliMzg5ZjMzMDVlZGU3MTc0M2Q4YmYzMzBkODMyOWE3ZTA2NWYxMzUiLCJpYXQiOjE2Mzc4Mzg4MDAuNDc5OTIsIm5iZiI6MTYzNzgzODgwMC40Nzk5MjUsImV4cCI6MTY2OTM3NDc5OS42NjY1NjUsInN1YiI6IjIyMjYiLCJzY29wZXMiOltdfQ.GsOErHJpSchLlKiobPmZUwNHYSDKmK4Jin5FHzoZLdCEPQWCsT3X9CDyLjQQk09yWq2KCuNs0MfGgdTDY27j8TfmeicYH4YszvoSEyd_DUkp4xDmnmoD9jKDyIL2fHqmhhytDZr0ni55S2JzztjQzRUExLwXU0X5sSzOJo-LpIo50KlOfsj5Sz3yWCYAWzLzMyC4mh58A3oF7RdzCV6emh2wEqO6sN8wHRJ-ej2V4JU-fLofuJZ32X4YHAUgR9YhfSoeDgcKIAYJ4PoEnxKNjHRfSIk7D8J-Y_uFL7v53A1RjunnT2hpHh606EUNFysJJF9I4mS-EARuDLsYiELfmS-wnLsYT-jj2_UgoWzp-4CNfsMgQ7AqftLhV8fwVbemGBcqxI7UB9OyYerlbsmpsMvVD5RD5aaXVWG72PmnsAmuW1Mk1rKOpx5BggUo7Tv5Eeifx41myAbVoCwklgqUCM6t-1OBQCpVTQOVE1oNcO2tmqclDQ80ViSNTM2vZ8QkGjiekPaVABIAaTF44fZi53u8XNjLm5tJIjlSuXwGjwsqGYDZnTP38LkLS0azGJzQIVPrqGnt1HAiWxQBVu_HcTE5DiAG4Pe67l7ZXhUd2qfs3iyGT7UUDiqiPLLjAPN5nOn2IimjCMxKpqvt7sk5QBNTjo9f7kYbJJNMz-MsugQ"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Example response:

[
  {
    "id": 123,
    "description": "Example Job Type",
    "requires_signature": true
  }
]

This endpoint returns an array of your available job types.

HTTP Request

GET https://dev-api.assetpool.co/api/job-types/list

Assets

Onboarding Assets

curl --request POST \
  --url https://dev-api.assetpool.co/api/asset \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiYzNiMzRmMDg4YzE5MDM3ZTZhYTk2MDNjYTc5ZDgwY2I4NTkxNmYzZjNjZTU5MTcxNWNkOGI1NDEwNjQ4MWVmYTBhMzk0MTk2ODU4ZjRiYmMiLCJpYXQiOjE2Mzg4MjQyNTUuOTE5OTI0LCJuYmYiOjE2Mzg4MjQyNTUuOTE5OTMsImV4cCI6MTY3MDM2MDI1NS4yMzY2NzUsInN1YiI6IjIyMjYiLCJzY29wZXMiOltdfQ.byoLvYRy9srabqZS1XywG_xm2MHMjYCwG72iOCOoF5bVrHlNHFqc8nnNV2el6yAo1YjoXGZbIZarFtIjFYgj1fZ4b1KLMXBm5BW4plgrre2Z2RHWANr1tG4jFQn7hrsINJTVFDwHCuHpvbIwHr4qO9iABPxiLdIL5_GlSGrOzp6ZeoeJpS0-yF2TZApp0GcCxUYfDNlNHNMTYEuGdRkYTPQ0-ehhmjITMLDVEALWc1JfbwjUV_9gqpwmiY10faURmt6eOA5FEvsP6PTG_j8VVxsIKPAJKnFvwXkvvn2P-WlpOTQhgYH2UkTQP6tVs9qqxjOaDvhjVa8XoDd1MWSUCjsscclHI3zley7VqJXh93hahgzedYvEOfzAzaOI0Tg_uzTCNT9xdd904mhtVy2zp6AfJQaqw0PkciDrK2VPg5RQ-DImvqGEmoB_UVBsUNGoqrFqxbUo9wGqOl3Aguovi6QBffVnTTRIN79rJTB5S8HgXom_1KyEqqyGT4-ignVwMaZHC2iO_lFsp7JMvyqeSJAK465jT97IwRA0wovi8UErqv7q2HTbNqXOLKUAQF_tlVz8HxwczlW69Hg9Sp_Zab3bmKclPOFU8m0wE-3SrB3fJqi-lMCZOUsom9ea_3gZY0ek7IAQFhQF1_ApiTc7EYVu36xoWkK12eHcKqs2HUE' \
  --header 'Content-Type: application/json' \
  --data '{
    "zone_id": 123,
    "asset_type_id": 123,
    "code": "unique_code_to_company",
    "meta_data": {
        "reader": "test",
    "model": "test",
    "serial_number": "test"
    }
}
'
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://dev-api.assetpool.co/api/asset",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"zone_id\": 123,\n\t\"asset_type_id\": 123,\n\t\"code\": \"unique_code_to_company\",\n\t\"meta_data\": {\n\t\t\"reader\": \"test\",\n  \t\"model\": \"test\",\n  \t\"serial_number\": \"test\"\n\t}\n}\n",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiYzNiMzRmMDg4YzE5MDM3ZTZhYTk2MDNjYTc5ZDgwY2I4NTkxNmYzZjNjZTU5MTcxNWNkOGI1NDEwNjQ4MWVmYTBhMzk0MTk2ODU4ZjRiYmMiLCJpYXQiOjE2Mzg4MjQyNTUuOTE5OTI0LCJuYmYiOjE2Mzg4MjQyNTUuOTE5OTMsImV4cCI6MTY3MDM2MDI1NS4yMzY2NzUsInN1YiI6IjIyMjYiLCJzY29wZXMiOltdfQ.byoLvYRy9srabqZS1XywG_xm2MHMjYCwG72iOCOoF5bVrHlNHFqc8nnNV2el6yAo1YjoXGZbIZarFtIjFYgj1fZ4b1KLMXBm5BW4plgrre2Z2RHWANr1tG4jFQn7hrsINJTVFDwHCuHpvbIwHr4qO9iABPxiLdIL5_GlSGrOzp6ZeoeJpS0-yF2TZApp0GcCxUYfDNlNHNMTYEuGdRkYTPQ0-ehhmjITMLDVEALWc1JfbwjUV_9gqpwmiY10faURmt6eOA5FEvsP6PTG_j8VVxsIKPAJKnFvwXkvvn2P-WlpOTQhgYH2UkTQP6tVs9qqxjOaDvhjVa8XoDd1MWSUCjsscclHI3zley7VqJXh93hahgzedYvEOfzAzaOI0Tg_uzTCNT9xdd904mhtVy2zp6AfJQaqw0PkciDrK2VPg5RQ-DImvqGEmoB_UVBsUNGoqrFqxbUo9wGqOl3Aguovi6QBffVnTTRIN79rJTB5S8HgXom_1KyEqqyGT4-ignVwMaZHC2iO_lFsp7JMvyqeSJAK465jT97IwRA0wovi8UErqv7q2HTbNqXOLKUAQF_tlVz8HxwczlW69Hg9Sp_Zab3bmKclPOFU8m0wE-3SrB3fJqi-lMCZOUsom9ea_3gZY0ek7IAQFhQF1_ApiTc7EYVu36xoWkK12eHcKqs2HUE",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Example Response

{
  "code": "abcdefg",
  "zone_id": 123,
  "scanned_code": "abcdefg",
  "asset_type_id": 123,
  "risk_id": 3,
  "is_defective": false,
  "meta_data": {
    "reader": "test",
    "model": "test",
    "serial_number": "test"
  },
  "source_uuid": "01623d24-e4a3-41cc-a2da-0dfc7673aa75",
  "company_id": 123,
  "updated_at": "2021-12-02 11:08:01",
  "created_at": "2021-12-02 11:08:01",
  "id": 173824,
  "company": {
    "id": 76,
    "primary_user_id": 123,
    "name": "Example Company",
    "logo": "companies\/logo.png",
    "registration_number": null,
    "vat_number": null,
    "created_at": "2019-08-12 17:12:08",
    "updated_at": "2021-12-01 17:23:20",
    "deleted_at": null,
    "job_number": 123,
    "industry_id": 12,
    "region_id": 3,
    "allow_external_barcodes": false,
    "barcode_format": null,
    "assetpool_branch_id": 1,
    "manual_inspection_closure": false,
    "sales_rep_id": 123,
    "app_name": null,
    "from_email": null,
    "app_email_logo": null,
    "white_label_enabled": false,
    "from_email_name": null,
    "frontend_url": null,
    "logo_url": "https:\/\/a894da98498a.cloudfront.net\/companies\/logo.png?Expires=1638522482&Signature=pTmf5nTF1QRJqjMak3TuThE3FOBdzK-vu-TD8VLuaJ5~N~vgmtEeikTT30BlpOUmS6Fvqbz3ieyp~wU2prH9rmAYiOOnkQ6g~Tc2aVB0K4pZv1cui1rGJH7lGeDE4llVV1RqIO-XwaxUSLwtXKbryg36H0r9zj-md0mIQ7p3thSVtJ2kimyBw7WH1chifgw1Q~KJk3jNZv3dHYK1cCTDT4cdFUbyzKd~aW~2fj-Pe3tP86PGyiwnE5AgimGnGdmjntnenf7D~h4Ko1A3RySZgKPbaGINScY0SbHko1~O49kOYb7qjYSeKjEJ26W7A1OPvFpsjHQx6Vdg-YR2-dLbtw__&Key-Pair-Id=K3KI0KTS66RCT9",
    "email_logo_url": null,
    "stats": {
      "id": 123,
      "company_id": 123,
      "assets": 120,
      "jobs": 210,
      "checklists": 51,
      "checks": 409,
      "sites": 15,
      "clients": 11,
      "recurring_jobs": 1,
      "users": 24,
      "total_storage": 0,
      "created_at": "2020-05-21 14:14:04",
      "updated_at": "2021-12-02 11:08:01",
      "deleted_at": null
    }
  },
  "zone": {
    "id": 123,
    "source_uuid": "956bd18a-e185-4f9e-8eb0-561daf533ef2",
    "name": "Example Zone",
    "site_id": 123,
    "user_id": 123,
    "created_at": "2019-10-22 13:24:27",
    "updated_at": "2021-12-02 13:08:01",
    "deleted_at": null,
    "size": 0,
    "type_id": 123
  },
  "risk": {
    "id": 3,
    "level": "Medium",
    "created_at": "2019-01-16 17:27:19",
    "updated_at": "2019-01-16 17:27:19",
    "deleted_at": null,
    "value": 3
  },
  "current_status": {
    "statusable_id": 123,
    "statusable_type": "Billow\\Models\\Asset"
  },
  "type": {
    "id": 123,
    "name": "Example Asset Type",
    "created_at": "2020-11-19 13:39:29",
    "updated_at": "2021-01-25 15:55:27",
    "short_code": null,
    "checklist_id": null,
    "risk_id": 3,
    "company_id": 123,
    "deleted_at": null,
    "custom_fields": "[{\"label\":\"Make\",\"field_id\":\"reader\",\"is_required\":true},{\"label\":\"Model\",\"field_id\":\"model\",\"is_required\":true},{\"label\":\"Serial number\",\"field_id\":\"serial_number\",\"is_required\":true}]",
    "enforce_checklist_order": false,
    "custom_fields_object": [
      {
        "label": "Make",
        "field_id": "reader",
        "is_required": true
      },
      {
        "label": "Model",
        "field_id": "model",
        "is_required": true
      },
      {
        "label": "Serial number",
        "field_id": "serial_number",
        "is_required": true
      }
    ],
    "checklist": null
  },
  "barcode": {
    "id": 123,
    "source_uuid": "b61806b6-d0f9-4a9d-8fc1-362dce58e560",
    "data": "abcdefg",
    "prefix": null,
    "asset_id": 123,
    "public": false,
    "created_at": "2021-12-02 13:08:01",
    "updated_at": "2021-12-02 13:08:01",
    "deleted_at": null,
    "company_id": 123,
    "batch": 1,
    "batch_id": null
  }
}

HTTP Request

POST https://dev-api.assetpool.co/api/asset

Parameters

Parameter Type Description
zone_id int The Zone ID that the new asset should be associated with.
asset_type_id int The Asset Type ID that the new asset should be associated with.
code string Set a unique internal code to reference the asset by.
meta_data json Use this field to pass on any custom fields specified by the Asset Type. The key is specified as the custom field's field_id.

Paginated Assets

curl --request GET \
  --url https://dev-api.assetpool.co/api/assets \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiYWJjMmVjMTY3NjUwNTJlNzg0NjJlMzFkMWNmM2IwNGJhYzM4ODFkODliMzg5ZjMzMDVlZGU3MTc0M2Q4YmYzMzBkODMyOWE3ZTA2NWYxMzUiLCJpYXQiOjE2Mzc4Mzg4MDAuNDc5OTIsIm5iZiI6MTYzNzgzODgwMC40Nzk5MjUsImV4cCI6MTY2OTM3NDc5OS42NjY1NjUsInN1YiI6IjIyMjYiLCJzY29wZXMiOltdfQ.GsOErHJpSchLlKiobP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KbjEwcXdxN3c9PSIsInZhbHVlIjoiV2VXWGNKWWt2TEVXWDExRGFZNHNBQjM5YmJaeDRpQzR5bHNiZ3lXdTFaNlVaQUFUWENIYU9Ba2JXaFpsdFBaQngwQkRHalE0c1dld2tPTURVTWhTQWpHQUlxNXdzOFFuZVliVXJWbXlacHdCcGpBalUwaVR0UDQ2OVRJRS9JRUEiLCJtYWMiOiJhYjdlNDE1MzUzN2ZkZDExNjA3OTdiZDUwNWFhN2FiZGViNzVlNzlhNzA4NjU4OGJmZGVmMjQ4MTM2ZDU2Mjc0IiwidGFnIjoiIn0%253D'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://dev-api.assetpool.co/api/assets",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_COOKIE => "XSRF-TOKEN=eyJpdiI6Im9BendIRkl6OTdGMmZ0c1lIZk92cXc9PSIsInZhbHVlIjoiRmJEaEkxMDY1WDZycnZFVktOVjg1L0FSamV6Y1RPOUwwTlBjdDdpMStKNXI5YXFneUpBdFpCbUVSbDVnS1YxdmprSlordFFnNWZUVDBCUDV5TE5xS1habHV4Z0h5NnF4bjUvTnBPNUQzZmtBZkZrQkJiMU10bzMzOXcxRyt0TUciLCJtYWMiOiI5YmMyZDAzMDdmMTYyNzYzMTVhNWNhYmRhYTFhZGNjMzdjZmI3MTdhNzI5Yzc5NGRiYzY0MGMwNDYxZmYzZWQ4IiwidGFnIjoiIn0%253D; laravel_session=eyJpdiI6IjB5UW02Q1cvcUpWZkpKbjEwcXdxN3c9PSIsInZhbHVlIjoiV2VXWGNKWWt2TEVXWDExRGFZNHNBQjM5YmJaeDRpQzR5bHNiZ3lXdTFaNlVaQUFUWENIYU9Ba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kGjiekPaVABIAaTF44fZi53u8XNjLm5tJIjlSuXwGjwsqGYDZnTP38LkLS0azGJzQIVPrqGnt1HAiWxQBVu_HcTE5DiAG4Pe67l7ZXhUd2qfs3iyGT7UUDiqiPLLjAPN5nOn2IimjCMxKpqvt7sk5QBNTjo9f7kYbJJNMz-MsugQ"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Example Response

{
  "current_page": 1,
  "data": [
    {
      "id": 123,
      "code": "1234567",
      "zone_id": 123,
      "asset_type_id": 123,
      "risk_id": 2,
      "next_inspection": null,
      "documents_count": 0,
      "current_status": {
        "statusable_id": 123,
        "value": "ok"
      },
      "barcode": {
        "id": 123,
        "data": "0ssyvYnyGmMqUF",
        "asset_id": 123
      },
      "risk": {
        "id": 2,
        "level": "High",
        "value": 2
      },
      "type": {
        "id": 123,
        "name": "Example Asset Type",
        "custom_fields_object": null
      },
      "zone": {
        "id": 123,
        "site_id": 123,
        "name": "Example Zone",
        "site": {
          "id": 123,
          "name": "Example Site",
          "client_id": 123,
          "logo_url": null,
          "client": {
            "id": 123,
            "legal_name": "Example Client",
            "logo_url": null
          }
        }
      }
    }
  ],
  "first_page_url": "\/assets?page=1",
  "from": 1,
  "last_page": 1,
  "last_page_url": "\/assets?page=1",
  "links": [
    {
      "url": null,
      "label": "&laquo; Previous",
      "active": false
    },
    {
      "url": "\/assets?page=1",
      "label": "1",
      "active": true
    },
    {
      "url": null,
      "label": "Next &raquo;",
      "active": false
    }
  ],
  "next_page_url": null,
  "path": "\/assets",
  "per_page": 10,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}

This endpoint is used to retrieve assets. Because of the amount of assets returned, pagination will be used in the result set.

HTTP Request

GET https://dev-api.assetpool.co/api/assets

Query Parameters

Parameter Type Description
search string Search through assets for matching columns: code, meta_data or barcode.
asset_type_id int Filter assets by asset_type_id.
defective bool Filter assets by whether they are defective or not.
overdue bool Filter assets by whether they are overdue or not.
site int Filter assets by a site id.
risk int Filter assets by a risk id.
created_at string Filter assets by when it was created at. e.g. 2021-08-26 to 2021-08-30 or 2021-08-26
last_inspection string Filter assets by when it had its last inspection. e.g. 2021-08-26 to 2021-08-30 or 2021-08-26
checklist int Filter assets by a checklist id.

List Asset Types

curl --request GET \
  --url https://dev-api.assetpool.co/api/asset-types/list \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiYWJjMmVjMTY3NjUwNTJlNzg0NjJlMzFkMWNmM2IwNGJhYzM4ODFkODliMzg5ZjMzMDVlZGU3MTc0M2Q4YmYzMzBkODMyOWE3ZTA2NWYxMzUiLCJpYXQiOjE2Mzc4Mzg4MDAuNDc5OTIsIm5iZiI6MTYzNzgzODgwMC40Nzk5MjUsImV4cCI6MTY2OTM3NDc5OS42NjY1NjUsInN1YiI6IjIyMjYiLCJzY29wZXMiOltdfQ.GsOErHJpSchLlKiobPmZUwNHYSDKmK4Jin5FHzoZLdCEPQWCsT3X9CDyLjQQk09yWq2KCuNs0MfGgdTDY27j8TfmeicYH4YszvoSEyd_DUkp4xDmnmoD9jKDyIL2fHqmhhytDZr0ni55S2JzztjQzRUExLwXU0X5sSzOJo-LpIo50KlOfsj5Sz3yWCYAWzLzMyC4mh58A3oF7RdzCV6emh2wEqO6sN8wHRJ-ej2V4JU-fLofuJZ32X4YHAUgR9YhfSoeDgcKIAYJ4PoEnxKNjHRfSIk7D8J-Y_uFL7v53A1RjunnT2hpHh606EUNFysJJF9I4mS-EARuDLsYiELfmS-wnLsYT-jj2_UgoWzp-4CNfsMgQ7AqftLhV8fwVbemGBcqxI7UB9OyYerlbsmpsMvVD5RD5aaXVWG72PmnsAmuW1Mk1rKOpx5BggUo7Tv5Eeifx41myAbVoCwklgqUCM6t-1OBQCpVTQOVE1oNcO2tmqclDQ80ViSNTM2vZ8QkGjiekPaVABIAaTF44fZi53u8XNjLm5tJIjlSuXwGjwsqGYDZnTP38LkLS0azGJzQIVPrqGnt1HAiWxQBVu_HcTE5DiAG4Pe67l7ZXhUd2qfs3iyGT7UUDiqiPLLjAPN5nOn2IimjCMxKpqvt7sk5QBNTjo9f7kYbJJNMz-MsugQ' \
  --cookie 'XSRF-TOKEN=eyJpdiI6Im9BendIRkl6OTdGMmZ0c1lIZk92cXc9PSIsInZhbHVlIjoiRmJEaEkxMDY1WDZycnZFVktOVjg1L0FSamV6Y1RPOUwwTlBjdDdpMStKNXI5YXFneUpBdFpCbUVSbDVnS1YxdmprSlordFFnNWZUVDBCUDV5TE5xS1habHV4Z0h5NnF4bjUvTnBPNUQzZmtBZkZrQkJiMU10bzMzOXcxRyt0TUciLCJtYWMiOiI5YmMyZDAzMDdmMTYyNzYzMTVhNWNhYmRhYTFhZGNjMzdjZmI3MTdhNzI5Yzc5NGRiYzY0MGMwNDYxZmYzZWQ4IiwidGFnIjoiIn0%253D; laravel_session=eyJpdiI6IjB5UW02Q1cvcUpWZkpKbjEwcXdxN3c9PSIsInZhbHVlIjoiV2VXWGNKWWt2TEVXWDExRGFZNHNBQjM5YmJaeDRpQzR5bHNiZ3lXdTFaNlVaQUFUWENIYU9Ba2JXaFpsdFBaQngwQkRHalE0c1dld2tPTURVTWhTQWpHQUlxNXdzOFFuZVliVXJWbXlacHdCcGpBalUwaVR0UDQ2OVRJRS9JRUEiLCJtYWMiOiJhYjdlNDE1MzUzN2ZkZDExNjA3OTdiZDUwNWFhN2FiZGViNzVlNzlhNzA4NjU4OGJmZGVmMjQ4MTM2ZDU2Mjc0IiwidGFnIjoiIn0%253D'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://dev-api.assetpool.co/api/asset-types/list",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT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NjY1NjUsInN1YiI6IjIyMjYiLCJzY29wZXMiOltdfQ.GsOErHJpSchLlKiobPmZUwNHYSDKmK4Jin5FHzoZLdCEPQWCsT3X9CDyLjQQk09yWq2KCuNs0MfGgdTDY27j8TfmeicYH4YszvoSEyd_DUkp4xDmnmoD9jKDyIL2fHqmhhytDZr0ni55S2JzztjQzRUExLwXU0X5sSzOJo-LpIo50KlOfsj5Sz3yWCYAWzLzMyC4mh58A3oF7RdzCV6emh2wEqO6sN8wHRJ-ej2V4JU-fLofuJZ32X4YHAUgR9YhfSoeDgcKIAYJ4PoEnxKNjHRfSIk7D8J-Y_uFL7v53A1RjunnT2hpHh606EUNFysJJF9I4mS-EARuDLsYiELfmS-wnLsYT-jj2_UgoWzp-4CNfsMgQ7AqftLhV8fwVbemGBcqxI7UB9OyYerlbsmpsMvVD5RD5aaXVWG72PmnsAmuW1Mk1rKOpx5BggUo7Tv5Eeifx41myAbVoCwklgqUCM6t-1OBQCpVTQOVE1oNcO2tmqclDQ80ViSNTM2vZ8QkGjiekPaVABIAaTF44fZi53u8XNjLm5tJIjlSuXwGjwsqGYDZnTP38LkLS0azGJzQIVPrqGnt1HAiWxQBVu_HcTE5DiAG4Pe67l7ZXhUd2qfs3iyGT7UUDiqiPLLjAPN5nOn2IimjCMxKpqvt7sk5QBNTjo9f7kYbJJNMz-MsugQ"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Example Response:

[
  {
    "id": 123,
    "name": "Example Asset Type",
    "created_at": "2020-11-19 13:39:29",
    "updated_at": "2021-01-25 15:55:27",
    "short_code": null,
    "checklist_id": null,
    "risk_id": 3,
    "company_id": 123,
    "deleted_at": null,
    "custom_fields": "[{\"label\":\"Make\",\"field_id\":\"reader\",\"is_required\":true},{\"label\":\"Model\",\"field_id\":\"model\",\"is_required\":true},{\"label\":\"Serial number\",\"field_id\":\"serial_number\",\"is_required\":true}]",
    "enforce_checklist_order": false,
    "custom_fields_object": [
      {
        "label": "Make",
        "field_id": "reader",
        "is_required": true
      },
      {
        "label": "Model",
        "field_id": "model",
        "is_required": true
      },
      {
        "label": "Serial number",
        "field_id": "serial_number",
        "is_required": true
      }
    ],
    "risk": {
      "id": 3,
      "level": "Medium",
      "created_at": "2019-01-16 17:27:19",
      "updated_at": "2019-01-16 17:27:19",
      "deleted_at": null,
      "value": 3
    },
    "zone_types": []
  }
]

This endpoint is used to retrieve a list of available asset types.

HTTP Request

GET https://dev-api.assetpool.co/api/asset-types/list

List Asset Groups

curl --request GET \
  --url https://dev-api.assetpool.co/api/asset-groups \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiYWJjMmVjMTY3NjUwNTJlNzg0NjJlMzFkMWNmM2IwNGJhYzM4ODFkODliMzg5ZjMzMDVlZGU3MTc0M2Q4YmYzMzBkODMyOWE3ZTA2NWYxMzUiLCJpYXQiOjE2Mzc4Mzg4MDAuNDc5OTIsIm5iZiI6MTYzNzgzODgwMC40Nzk5MjUsImV4cCI6MTY2OTM3NDc5OS42NjY1NjUsInN1YiI6IjIyMjYiLCJzY29wZXMiOltdfQ.GsOErHJpSchLlKiobPmZUwNHYSDKmK4Jin5FHzoZLdCEPQWCsT3X9CDyLjQQk09yWq2KCuNs0MfGgdTDY27j8TfmeicYH4YszvoSEyd_DUkp4xDmnmoD9jKDyIL2fHqmhhytDZr0ni55S2JzztjQzRUExLwXU0X5sSzOJo-LpIo50KlOfsj5Sz3yWCYAWzLzMyC4mh58A3oF7RdzCV6emh2wEqO6sN8wHRJ-ej2V4JU-fLofuJZ32X4YHAUgR9YhfSoeDgcKIAYJ4PoEnxKNjHRfSIk7D8J-Y_uFL7v53A1RjunnT2hpHh606EUNFysJJF9I4mS-EARuDLsYiELfmS-wnLsYT-jj2_UgoWzp-4CNfsMgQ7AqftLhV8fwVbemGBcqxI7UB9OyYerlbsm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set-groups",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_COOKIE => "XSRF-TOKEN=eyJpdiI6Im9BendIRkl6OTdGMmZ0c1lIZk92cXc9PSIsInZhbHVlIjoiRmJEaEkxMDY1WDZycnZFVktOVjg1L0FSamV6Y1RPOUwwTlBjdDdpMStKNXI5YXFneUpBdFpCbUVSbDVnS1YxdmprSlordFFnNWZUVDBCUDV5TE5xS1habHV4Z0h5NnF4bjUvTnBPNUQzZmtBZkZrQkJiMU10bzMzOXcxRyt0TUciLCJtYWMiOiI5YmMyZDAzMDdmMTYyNzYzMTVhNWNhYmRhYTFhZGNjMzdjZmI3MTdhNzI5Yzc5NGRiYzY0MGMwNDYxZmYzZWQ4IiwidGFnIjoiIn0%253D; laravel_session=eyJpdiI6IjB5UW02Q1cvcUpWZkpKbjEwcXdxN3c9PSIsInZhbHVlIjoiV2VXWGNKWWt2TEVXWDExRGFZNHNBQjM5YmJaeDRpQzR5bHNiZ3lXdTFaNlVaQUFUWENIYU9Ba2JXaFpsdFBaQngwQkRHalE0c1dld2tPTURVTWhTQWpHQUlxNXdzOFFuZVliVXJWbXlacHdCcGpBalUwaVR0UDQ2OVRJRS9JRUEiLCJtYWMiOiJhYjdlNDE1MzUzN2ZkZDExNjA3OTdiZDUwNWFhN2FiZGViNzVlNzlhNzA4NjU4OGJmZGVmMjQ4MTM2ZDU2Mjc0IiwidGFnIjoiIn0%253D",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiYWJjMmVjMTY3NjUwNTJlNzg0NjJlMzFkMWNmM2IwNGJhYzM4ODFkODliMzg5ZjMzMDVlZGU3MTc0M2Q4YmYzMzBkODMyOWE3ZTA2NWYxMzUiLCJpYXQiOjE2Mzc4Mzg4MDAuNDc5OTIsIm5iZiI6MTYzNzgzODgwMC40Nzk5MjUsImV4cCI6MTY2OTM3NDc5OS42NjY1NjUsInN1YiI6IjIyMjYiLCJzY29wZXMiOltdfQ.GsOErHJpSchLlKiobPmZUwNHYSDKmK4Jin5FHzoZLdCEPQWCsT3X9CDyLjQQk09yWq2KCuNs0MfGgdTDY27j8TfmeicYH4YszvoSEyd_DUkp4xDmnmoD9jKDyIL2fHqmhhytDZr0ni55S2JzztjQzRUExLwXU0X5sSzOJo-LpIo50KlOfsj5Sz3yWCYAWzLzMyC4mh58A3oF7RdzCV6emh2wEqO6sN8wHRJ-ej2V4JU-fLofuJZ32X4YHAUgR9YhfSoeDgcKIAYJ4PoEnxKNjHRfSIk7D8J-Y_uFL7v53A1RjunnT2hpHh606EUNFysJJF9I4mS-EARuDLsYiELfmS-wnLsYT-jj2_UgoWzp-4CNfsMgQ7AqftLhV8fwVbemGBcqxI7UB9OyYerlbsmpsMvVD5RD5aaXVWG72PmnsAmuW1Mk1rKOpx5BggUo7Tv5Eeifx41myAbVoCwklgqUCM6t-1OBQCpVTQOVE1oNcO2tmqclDQ80ViSNTM2vZ8QkGjiekPaVABIAaTF44fZi53u8XNjLm5tJIjlSuXwGjwsqGYDZnTP38LkLS0azGJzQIVPrqGnt1HAiWxQBVu_HcTE5DiAG4Pe67l7ZXhUd2qfs3iyGT7UUDiqiPLLjAPN5nOn2IimjCMxKpqvt7sk5QBNTjo9f7kYbJJNMz-MsugQ"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Example Response:

{
  "current_page": 1,
  "data": [
    {
      "id": 123,
      "description": "Example Asset Group",
      "created_at": "2019-09-10 11:21:49",
      "updated_at": "2020-01-22 07:33:50",
      "risk_id": 2,
      "company_id": 123,
      "deleted_at": null,
      "zones_count": 4,
      "asset_types_count": 7,
      "risk": {
        "id": 2,
        "level": "High",
        "value": 2
      },
      "asset_types": [
        {
          "id": 123,
          "name": "Example Asset Type",
          "created_at": "2019-09-10 11:21:15",
          "updated_at": "2019-09-10 11:21:15",
          "short_code": null,
          "checklist_id": null,
          "risk_id": 2,
          "company_id": 123,
          "deleted_at": null,
          "custom_fields": "[]",
          "enforce_checklist_order": false,
          "custom_fields_object": [],
          "pivot": {
            "zone_type_id": 123,
            "asset_type_id": 123
          }
        }
      ]
    }
  ],
  "first_page_url": "\/asset-groups?page=1",
  "from": 1,
  "last_page": null,
  "last_page_url": null,
  "links": [
    {
      "url": null,
      "label": "&laquo; Previous",
      "active": false
    },
    {
      "url": "\/asset-groups?page=1",
      "label": "1",
      "active": true
    },
    {
      "url": null,
      "label": "Next &raquo;",
      "active": false
    }
  ],
  "next_page_url": null,
  "path": "\/asset-groups",
  "per_page": 20,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}

This endpoint is used to retrieve a list of available asset groups. The response is paginated.

HTTP Request

GET https://dev-api.assetpool.co/api/asset-groups

Query Parameters

Parameter Type Description
search string Search through asset groups for a matching description.

Sites

Paginated Sites

curl --request GET \
  --url https://dev-api.assetpool.co/api/sites \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiYWJjMmVjMTY3NjUwNTJlNzg0NjJlMzFkMWNmM2IwNGJhYzM4ODFkODliMzg5ZjMzMDVlZGU3MTc0M2Q4YmYzMzBkODMyOWE3ZTA2NWYxMzUiLCJpYXQiOjE2Mzc4Mzg4MDAuNDc5OTIsIm5iZiI6MTYzNzgzODgwMC40Nzk5MjUsImV4cCI6MTY2OTM3NDc5OS42NjY1NjUsInN1YiI6IjIyMjYiLCJzY29wZXMiOltdfQ.GsOErHJpSchLlKiobPmZUwNHYSDKmK4Jin5FHzoZLdCEPQWCsT3X9CDyLjQQk09yWq2KCuNs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NBQjM5YmJaeDRpQzR5bHNiZ3lXdTFaNlVaQUFUWENIYU9Ba2JXaFpsdFBaQngwQkRHalE0c1dld2tPTURVTWhTQWpHQUlxNXdzOFFuZVliVXJWbXlacHdCcGpBalUwaVR0UDQ2OVRJRS9JRUEiLCJtYWMiOiJhYjdlNDE1MzUzN2ZkZDExNjA3OTdiZDUwNWFhN2FiZGViNzVlNzlhNzA4NjU4OGJmZGVmMjQ4MTM2ZDU2Mjc0IiwidGFnIjoiIn0%253D'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://dev-api.assetpool.co/api/sites",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_COOKIE => "XSRF-TOKEN=eyJpdiI6Im9BendIRkl6OTdGMmZ0c1lIZk92cXc9PSIsInZhbHVlIjoiRmJEaEkxMDY1WDZycnZFVktOVjg1L0FSamV6Y1RPOUwwTlBjdDdpMStKNXI5YXFneUpBdFpCbUVSbDVnS1YxdmprSlordFFnNWZUVDBCUDV5TE5xS1habHV4Z0h5NnF4bjUvTnBPNUQzZmtBZkZrQkJiMU10bzMzOXcxRyt0TUciLCJtYWMiOiI5YmMyZDAzMDdmMTYyNzYzMTVhNWNhYmRhYTFhZGNjMzdjZmI3MTdhNzI5Yzc5NGRiYzY0MGMwNDYxZmYzZWQ4IiwidGFnIjoiIn0%253D; laravel_session=eyJpdiI6IjB5UW02Q1cvcUpWZkpKbjEwcXdxN3c9PSIsInZhbHVlIjoiV2VXWGNKWWt2TEVXWDExRGFZNHNBQjM5YmJaeDRpQzR5bHNiZ3lXdTFaNlVaQUFUWENIYU9Ba2JXaFpsdFBaQngwQkRHalE0c1dld2tPTURVTWhTQWpHQUlxNXdzOFFuZV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0azGJzQIVPrqGnt1HAiWxQBVu_HcTE5DiAG4Pe67l7ZXhUd2qfs3iyGT7UUDiqiPLLjAPN5nOn2IimjCMxKpqvt7sk5QBNTjo9f7kYbJJNMz-MsugQ"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Example response:

{
  "current_page": 1,
  "data": [
    {
      "id": 123,
      "name": "Example Site",
      "client_id": 123,
      "logo": "sites\/ah298da2.png",
      "risk_id": 1,
      "zones_count": 3,
      "assets_count": 5,
      "open_jobs_count": 0,
      "logo_url": "https://example.com/logo.png",
      "client": {
        "id": 123,
        "legal_name": "Example Client",
        "logo_url": null
      },
      "current_status": {
        "statusable_id": 123,
        "statusable_type": "Billow\\Models\\Site"
      },
      "risk": {
        "level": "Critical",
        "value": 1,
        "id": 1
      }
    }
  ],
  "first_page_url": "\/sites?page=1",
  "from": 1,
  "last_page": 1,
  "last_page_url": "\/sites?page=1",
  "links": [
    {
      "url": null,
      "label": "&laquo; Previous",
      "active": false
    },
    {
      "url": "\/sites?page=1",
      "label": "1",
      "active": true
    },
    {
      "url": null,
      "label": "Next &raquo;",
      "active": false
    }
  ],
  "next_page_url": null,
  "path": "\/sites",
  "per_page": 10,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}

This endpoint is used to retrieve a paginated list of sites.

HTTP Request

GET https://dev-api.assetpool.co/api/sites

Query Parameters

Parameter Type Description
search string Search through sites for a matching name.

Zones

Paginated Zones

curl --request GET \
  --url https://dev-api.assetpool.co/api/site/960/zones \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxMiIsImp0aSI6IjExMWE3NTI2MWQ5NTJiNmJhY2M2NGUyZTNiZjRiZTllODhkODgxMDg5NzZhNjc2MmI0M2U4YTJhMzI5MTU3ODk5Nzc3ZDkzN2I1MTRmMzU1IiwiaWF0IjoxNjM4MzA1ODg0LjExNjMzNywibmJmIjoxNjM4MzA1ODg0LjExNjM0MiwiZXhwIjoxNjY5ODQxODgzLjc0Nzk2Niwic3ViIjoiMjIyNiIsInNjb3BlcyI6W119.JnvVT4HAgeWL5d1DGF8G3J6wPcDVmiZg19uqK7CH-yfF86tphAxwxMPZfFvEj9qHGSFCiqxS381fepwTVcfi5G2hVJZZlrp1MiC0q7SceNI00KcVSLGAI4wIazWS6Ty3M3NZqlr7YgAnO_9N1DAcBswEv1Vn9hQ398ZZhGFyXiKTLywOBHtG00l6XZY0jdmCQ-Q_6hUWESK7KB4HwfTsPcCoPUUuNTYmncemK3RHhXYjk67sykTeJASREqjVginniZlScDiKlnMUClncwRo4Gi5pq0xyGbLNQA_tTvTJpssYxsDf-wI-Eu16qAEJkFr_oE5oz4IGdwyNIwAcmbuH3HK2WZNKVOOMD9R8OL42C8JouHYHk7ubdWxolBVDwK_F_J1ZmT2G7JfAn3GL5vtDH_a6ObSLsJqXr2xc_IO1emD4-axIoHcu4z33Jk9zZr6hRINsJSguMC5SnXynAjuB316U7et-2zi8O3AcpsAY9bRZOvaNHFCfeCavuNNoZnVkOEVveW7SMtAyfppb2DleZYJQoqKWJJULXzPq4D697q7BBCIQuY6v4gEaly0cq-HhqU0y0W5aja_qoyWfttMsxd1PvQgujDh76MCdsNaKWI1_GdsRi0VIHWiKzgk0s5qGJK63amWp1U5EGkIhOhexcqgulh3ZITQ63Zz7jzLootg'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://dev-api.assetpool.co/api/site/960/zones",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxMiIsImp0aSI6IjExMWE3NTI2MWQ5NTJiNmJhY2M2NGUyZTNiZjRiZTllODhkODgxMDg5NzZhNjc2MmI0M2U4YTJhMzI5MTU3ODk5Nzc3ZDkzN2I1MTRmMzU1IiwiaWF0IjoxNjM4MzA1ODg0LjExNjMzNywibmJmIjoxNjM4MzA1ODg0LjExNjM0MiwiZXhwIjoxNjY5ODQxODgzLjc0Nzk2Niwic3ViIjoiMjIyNiIsInNjb3BlcyI6W119.JnvVT4HAgeWL5d1DGF8G3J6wPcDVmiZg19uqK7CH-yfF86tphAxwxMPZfFvEj9qHGSFCiqxS381fepwTVcfi5G2hVJZZlrp1MiC0q7SceNI00KcVSLGAI4wIazWS6Ty3M3NZqlr7YgAnO_9N1DAcBswEv1Vn9hQ398ZZhGFyXiKTLywOBHtG00l6XZY0jdmCQ-Q_6hUWESK7KB4HwfTsPcCoPUUuNTYmncemK3RHhXYjk67sykTeJASREqjVginniZlScDiKlnMUClncwRo4Gi5pq0xyGbLNQA_tTvTJpssYxsDf-wI-Eu16qAEJkFr_oE5oz4IGdwyNIwAcmbuH3HK2WZNKVOOMD9R8OL42C8JouHYHk7ubdWxolBVDwK_F_J1ZmT2G7JfAn3GL5vtDH_a6ObSLsJqXr2xc_IO1emD4-axIoHcu4z33Jk9zZr6hRINsJSguMC5SnXynAjuB316U7et-2zi8O3AcpsAY9bRZOvaNHFCfeCavuNNoZnVkOEVveW7SMtAyfppb2DleZYJQoqKWJJULXzPq4D697q7BBCIQuY6v4gEaly0cq-HhqU0y0W5aja_qoyWfttMsxd1PvQgujDh76MCdsNaKWI1_GdsRi0VIHWiKzgk0s5qGJK63amWp1U5EGkIhOhexcqgulh3ZITQ63Zz7jzLootg"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Example Response

{
  "current_page": 1,
  "data": [
    {
      "id": 123,
      "source_uuid": "956bd18a-e185-4f9e-8eb0-561daf533ef2",
      "name": "Example Zone",
      "site_id": 123,
      "user_id": 123,
      "created_at": "2019-10-22 13:24:27",
      "updated_at": "2021-12-02 13:08:01",
      "deleted_at": null,
      "size": 0,
      "type_id": 123,
      "assets_count": 9,
      "type": {
        "id": 123,
        "description": "Example Zone Type",
        "created_at": "2019-09-10 11:21:49",
        "updated_at": "2020-01-22 07:33:50",
        "risk_id": 2,
        "company_id": 123,
        "deleted_at": null,
        "risk": {
          "id": 2,
          "level": "High",
          "created_at": "2019-01-16 17:27:19",
          "updated_at": "2019-01-16 17:27:19",
          "deleted_at": null,
          "value": 2
        }
      }
    }
  ],
  "first_page_url": "\/site\/123\/zones?page=1",
  "from": 1,
  "last_page": 1,
  "last_page_url": "\/site\/123\/zones?page=1",
  "links": [
    {
      "url": null,
      "label": "&laquo; Previous",
      "active": false
    },
    {
      "url": "\/site\/123\/zones?page=1",
      "label": "1",
      "active": true
    },
    {
      "url": null,
      "label": "Next &raquo;",
      "active": false
    }
  ],
  "next_page_url": null,
  "path": "\/site\/123\/zones",
  "per_page": 15,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}

HTTP Request

GET https://dev-api.assetpool.co/api/site/{site}/zones

Parameters

Parameter Type Description
site int Site ID of which to retrieve zones from.
search string Search for zones by name.

Users

List Users (filterable by tech/admin)

curl --request GET \
  --url https://dev-api.assetpool.co/api/users \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiYWJjMmVjMTY3NjUwNTJlNzg0NjJlMzFkMWNmM2IwNGJhYzM4ODFkODliMzg5ZjMzMDVlZGU3MTc0M2Q4YmYzMzBkODMyOWE3ZTA2NWYxMzUiLCJpYXQiOjE2Mzc4Mzg4MDAuNDc5OTIsIm5iZiI6MTYzNzgzODgwMC40Nzk5MjUsImV4cCI6MTY2OTM3NDc5OS42NjY1NjUsInN1YiI6IjIyMjYiLCJzY29wZXMiOltdf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jB5UW02Q1cvcUpWZkpKbjEwcXdxN3c9PSIsInZhbHVlIjoiV2VXWGNKWWt2TEVXWDExRGFZNHNBQjM5YmJaeDRpQzR5bHNiZ3lXdTFaNlVaQUFUWENIYU9Ba2JXaFpsdFBaQngwQkRHalE0c1dld2tPTURVTWhTQWpHQUlxNXdzOFFuZVliVXJWbXlacHdCcGpBalUwaVR0UDQ2OVRJRS9JRUEiLCJtYWMiOiJhYjdlNDE1MzUzN2ZkZDExNjA3OTdiZDUwNWFhN2FiZGViNzVlNzlhNzA4NjU4OGJmZGVmMjQ4MTM2ZDU2Mjc0IiwidGFnIjoiIn0%253D'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://dev-api.assetpool.co/api/users",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_COOKIE => "XSRF-TOKEN=eyJpdiI6IklHeGZIVStjSTVMaENMOVFJV29IVnc9PSIsInZhbHVlIjoiM1ZQaXN6L0FvbGhWeVlzOUJ0WDFYK2VFaUVyNjB4dHlSN2MxRzdtR0t2UUJIQjRYdCtVcGdOakREMU1CSlo0RnZoS1U5Vjg5ei9kSGFmbm81cW5nN2trb2d3elpzSStOMXI3S0ppNG1mNi84N1J2aGZjbFE2WEZYd1FNa01CM0giLCJtYWMiOiJlMzBmOGU0YTM5NDdlOTAzMDExNWM0ZmIzZDU2MmNiODJhNmY5NjgzNGY1YmFlMDcyNzY1Y2I0YjczMGJhNWFmIiwidGFnIjoiIn0%253D; laravel_session=eyJpdiI6Im1BTERGOUdINWhXWTFWejVHKzBYWVE9PSIsInZhbHVlIjoiZnJhbkRCMFJrZUVsbGd0bnkwb2phck1ZeGJnSVlxZGFHTWRtaks0OWE2SjF6N2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NTM2vZ8QkGjiekPaVABIAaTF44fZi53u8XNjLm5tJIjlSuXwGjwsqGYDZnTP38LkLS0azGJzQIVPrqGnt1HAiWxQBVu_HcTE5DiAG4Pe67l7ZXhUd2qfs3iyGT7UUDiqiPLLjAPN5nOn2IimjCMxKpqvt7sk5QBNTjo9f7kYbJJNMz-MsugQ"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Example response:

{
  "current_page": 1,
  "data": [
    {
      "id": 123,
      "name": "John",
      "last_name": "Doe",
      "sites_count": 2,
      "inspections_count": 0,
      "technical_jobs_count": 0,
      "email": "john.doe@example.com",
      "active": true,
      "created_at": "2012-10-24T06:45:15.000000Z",
      "updated_at": "2021-07-28T08:43:45.000000Z",
      "phone_number": null,
      "deleted_at": null,
      "app_needs_update": true,
      "timezone": "Africa\/Johannesburg",
      "full_name": "John Doe",
      "profile": {
        "id": 123,
        "user_id": 123,
        "mobile": "(123) 123-1234",
        "telephone": null,
        "picture": null,
        "created_at": "2019-10-24 08:45:15",
        "updated_at": "2019-10-24 08:45:15",
        "deleted_at": null,
        "position": null,
        "dialing_code": "ZA",
        "employee_number": null,
        "id_number": null,
        "picture_url": null,
        "formatted_mobile": "+27231231234"
      },
      "pivot": {
        "company_id": 123,
        "user_id": 123
      }
    }
  ],
  "first_page_url": "\/users?page=1",
  "from": 1,
  "last_page": 1,
  "last_page_url": "\/users?page=1",
  "links": [
    {
      "url": null,
      "label": "&laquo; Previous",
      "active": false
    },
    {
      "url": "\/users?page=1",
      "label": "1",
      "active": true
    },
    {
      "url": null,
      "label": "Next &raquo;",
      "active": false
    }
  ],
  "next_page_url": null,
  "path": "\/users",
  "per_page": 15,
  "prev_page_url": null,
  "to": 1,
  "total": 1
}

This endpoint is used to retrieve a paginated list of users.

HTTP Request

GET https://dev-api.assetpool.co/api/users

Parameters

Parameter Type Description
role string admin or technician.
search string Search users for matching columns: name, last_name or email.

Errors

The Assetpool API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The requested resource is hidden and not available to you.
404 Not Found -- The specified resource could not be found.
405 Method Not Allowed -- You tried to access an endpoint with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The resource requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're sending too many requests! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.