Download OpenAPI specification:Download
Explore OnLocation's API reference documentation. References include:
Manage your organization’s assets with OnLocation. Use the API to retrieve a list of assets, add or update, or delete an asset, or issue or return an asset. Your account owner must first enable the add-on in OnLocation.
Learn more about assets in the OnLocation Help Center.
Returns a list of assets.
List of assets
Invalid Input
Access denied to this resource
curl -i -X GET \ 'https://api.whosonlocation.com/v1/asset?q=string&limit=0'
[- {
- "id": 1,
- "type_id": 1,
- "name": "Laptop 001",
- "tag": "TAG001",
- "reference": "REF001",
- "department_id": 1,
- "notes": "Notes about the asset",
- "geo_lat": "12.34",
- "geo_lon": "56.78",
- "owner_type": "org",
- "owner_staff_id": 1,
- "owner_sp_id": 1,
- "location_id": 1,
- "status": "in"
}
]
Creates a new asset with the provided details.
Information used to create a new asset record
Created resource
Invalid input
Access denied to this resource
Internal server error
{- "type_id": 1,
- "name": "Laptop 001",
- "tag": "TAG001",
- "reference": "REF001",
- "department_id": 1,
- "notes": "Notes about the asset",
- "geo_lat": "12.34",
- "geo_lon": "56.78",
- "owner_type": "org",
- "owner_staff_id": 1583,
- "owner_sp_id": 2700,
- "location_id": 1
}
{- "id": 1,
- "type_id": 1,
- "name": "Laptop 001",
- "tag": "TAG001",
- "reference": "REF001",
- "department_id": 1,
- "notes": "Notes about the asset",
- "geo_lat": "12.34",
- "geo_lon": "56.78",
- "owner_type": "org",
- "owner_staff_id": 1,
- "owner_sp_id": 1,
- "location_id": 1,
- "status": "in"
}
Retrieves an asset by its ID.
Asset found
Access denied to this resource
Asset not found
Internal server error
curl -i -X GET \ https://api.whosonlocation.com/v1/asset/:id
{- "id": 1,
- "type_id": 1,
- "name": "Laptop 001",
- "tag": "TAG001",
- "reference": "REF001",
- "department_id": 1,
- "notes": "Notes about the asset",
- "geo_lat": "12.34",
- "geo_lon": "56.78",
- "owner_type": "org",
- "owner_staff_id": 1,
- "owner_sp_id": 1,
- "location_id": 1,
- "status": "in"
}
Updates the details of an asset.
Information used to update the asset record
Updated resource
Invalid Input
Access denied to this resource
Resource not found
Internal server error
{- "type_id": 1,
- "name": "Laptop 001",
- "tag": "TAG001",
- "reference": "REF001",
- "department_id": 1,
- "notes": "Notes about the asset",
- "geo_lat": "12.34",
- "geo_lon": "56.78",
- "owner_type": "org",
- "owner_staff_id": 1583,
- "owner_sp_id": 2700,
- "location_id": 1
}
{- "id": 1,
- "type_id": 1,
- "name": "Laptop 001",
- "tag": "TAG001",
- "reference": "REF001",
- "department_id": 1,
- "notes": "Notes about the asset",
- "geo_lat": "12.34",
- "geo_lon": "56.78",
- "owner_type": "org",
- "owner_staff_id": 1,
- "owner_sp_id": 1,
- "location_id": 1,
- "status": "in"
}
Issue an asset with the provided details, this will create a new asset movement.
Information used to issue an asset
Issued successfully
Invalid input
Access denied to this resource
Internal server error
{- "assigned_type": "staff",
- "assigned_staff_id": 1,
- "assigned_spm_id": 1,
- "assigned_visitor_id": 1,
- "dueback": "2023-05-01 13:10:00"
}
{- "asset_id": 1,
- "assigned_type": "staff",
- "assigned_staff_id": 1,
- "assigned_spm_id": 1,
- "assigned_visitor_id": 1,
- "signed_out": "2023-04-18 13:15:00",
- "signed_in": "2023-04-18 13:15:00",
- "dueback": "2023-05-01 13:15:07",
- "notes": "Notes about the asset movement",
- "issued_out": "10008",
- "issued_in": "20008"
}
Return an asset with the provided details.
Returned successfully
Invalid input
Access denied to this resource
Internal server error
curl -i -X PUT \ https://api.whosonlocation.com/v1/asset/:id/return
{- "asset_id": 1,
- "assigned_type": "staff",
- "assigned_staff_id": 1,
- "assigned_spm_id": 1,
- "assigned_visitor_id": 1,
- "signed_out": "2023-04-18 13:15:00",
- "signed_in": "2023-04-18 13:15:00",
- "dueback": "2023-05-01 13:15:07",
- "notes": "Notes about the asset movement",
- "issued_out": "10008",
- "issued_in": "20008"
}