Asset Available (All Types) API
Returns all Bin (Asset) availability regardless of vehicle pool or by department. This endpoint is specifically used to retrieve a comprehensive list of available Bins along with their real-time proximity to a specified location.
Terminology Mapping
In the context of waste management, the generic system entities are mapped to the following domain-specific terms:
| System Term | Domain Mapping |
|---|---|
Site |
Sector |
Asset |
Bin |
Base URL
All requests to the Asset Available All Types API should be made to the following endpoint:
Authentication
This API supports two methods of authentication via the Authorization header:
| Header | Value | Description |
|---|---|---|
Authorization |
BEARER {access token} |
For client using login authentication, each request must include the Authorization BEARER header with the access token value. |
Authorization |
{api key} |
For client using API key, each request must include the Authorization header with the API key value without the BEARER keyword. |
Authorization: BEARER <YOUR_ACCESS_TOKEN>
Authorization: <YOUR_API_KEY>
Security & CSP
The V3Nity PAAS API enforces a strict Content Security Policy (CSP) to protect against cross-site scripting (XSS) and other code injection attacks.
Enforced Policy
default-src 'self'; object-src 'none'; img-src 'self' data:;
This policy restricts the browser to only load resources from the same origin as the API, disables plugins (object-src), and allows images from the same origin or base64 data URIs.
Query Parameters
The following parameters must be passed in the query string of the GET request.
| Parameter | Type | Status | Description |
|---|---|---|---|
longitude |
Double | Mandatory | The longitude of the reference point for distance calculation (WGS84). |
latitude |
Double | Mandatory | The latitude of the reference point for distance calculation (WGS84). |
cURL Example
curl -X GET "https://paas-uat.v3nity.com/resource/track/data/assetavailablealltypes?longitude=103.851959&latitude=1.290270" \
-H "Authorization: <YOUR_API_KEY_OR_BEARER_TOKEN>"
Response Schema
The API returns a JSON array of Bin (Asset) objects containing real-time telematics and availability data.
| Field | Type | Description |
|---|---|---|
asset_id |
Integer | Unique identifier for the Bin in the WAM360 system. |
asset_name |
String | The display label or plate number of the Bin. |
distance_meters |
Double | Calculated distance in meters from the provided coordinates, rounded to 2 decimal places. |
longitude |
Double | Real-time longitude obtained from FMS telematics. |
latitude |
Double | Real-time latitude obtained from FMS telematics. |
available |
Boolean | Current availability status of the Bin. |
booking_user |
String | The username of the person who has currently booked the Bin. |
vehicle_pool_type_name |
String | The classification of the vehicle pool. |
site_name |
String | The name of the Sector (Site) where the Bin is registered. |
Response Example
[
{
"asset_id": 101,
"asset_name": "BIN-1234",
"distance_meters": 450.25,
"longitude": 103.851959,
"latitude": 1.290270,
"available": true,
"booking_user": null,
"vehicle_pool_type_name": "Standard Bin",
"site_name": "North Sector"
}
]
Status Codes
| Code | Description |
|---|---|
| 200 OK | Request processed successfully. |
| 400 Bad Request | Invalid parameters or Bin not found in FMS telematics data. |
| 401 Unauthorized | Missing or invalid authentication credentials. |
| 500 Internal Server Error | An unexpected error occurred on the server (e.g., JSON generation failure). |