Insurance management in OnLocation is used to manage contractor organizations' insurance policies. Use the API to retrieve a list of all insurance policies, add new ones, and update or delete existing policies.
Learn more about insurances in the OnLocation Help Center.
Returns a list of all contractor insurance policy records.
A comma separated list of tag:value search parameters, a colon separator performs an exact match and a percent separator performs a starts-with search.
List of contractor insurance records
Access denied to this resource
Resource not found
Internal server error
curl -i -X GET \ 'https://api.whosonlocation.com/v1/sp/insurance?q=string&order=string&limit=0' \ -H 'If-Modified-Since: string'
[- {
- "id": 140,
- "created": "2021-11-29T08:10:09+13:00",
- "modified": "2022-11-29T08:10:09+13:00",
- "org_id": 4587,
- "org_name": "Example Organisation Name",
- "type": "other",
- "name": "Policy Underwriter",
- "reference": "Ref002",
- "value": "6000",
- "start": "2021-11-30",
- "expires": "2022-11-29",
- "status": "Active",
- "tags": [
- [
- "asset",
- "insurance",
- "other"
]
], - "documents": [
- {
- "id": 70,
- "modified": "2021-11-29T08:12:24+13:00",
- "name": "file-example",
- "type": "pdf",
- "size": 469513,
}
]
}
]
Add a new contractor insurance policy.
Resource created
Access denied to this resource
Internal server error
{- "org_id": 4587,
- "type": "other",
- "name": "Policy Underwriter",
- "reference": "Ref002",
- "value": "6000",
- "start": "2021-11-30",
- "expires": "2022-11-29"
}
{- "id": 140,
- "created": "2021-11-29T08:10:09+13:00",
- "modified": "2022-11-29T08:10:09+13:00",
- "org_id": 4587,
- "org_name": "Example Organisation Name",
- "type": "other",
- "name": "Policy Underwriter",
- "reference": "Ref002",
- "value": "6000",
- "start": "2021-11-30",
- "expires": "2022-11-29",
- "status": "Active",
- "tags": [
- [
- "asset",
- "insurance",
- "other"
]
], - "documents": [
- {
- "id": 70,
- "modified": "2021-11-29T08:12:24+13:00",
- "name": "file-example",
- "type": "pdf",
- "size": 469513,
}
]
}
Retrieves a single contractor insurance record, filtering with the provided ID.
Policy returned
Access denied to resource.
Resource not found
Internal server error
curl -i -X GET \ https://api.whosonlocation.com/v1/sp/insurance/:id
{- "id": 140,
- "created": "2021-11-29T08:10:09+13:00",
- "modified": "2022-11-29T08:10:09+13:00",
- "org_id": 4587,
- "org_name": "Example Organisation Name",
- "type": "other",
- "name": "Policy Underwriter",
- "reference": "Ref002",
- "value": "6000",
- "start": "2021-11-30",
- "expires": "2022-11-29",
- "status": "Active",
- "tags": [
- [
- "asset",
- "insurance",
- "other"
]
], - "documents": [
- {
- "id": 70,
- "modified": "2021-11-29T08:12:24+13:00",
- "name": "file-example",
- "type": "pdf",
- "size": 469513,
}
]
}
Updates a contractor insurance policy using the provided ID.
Information used to create the insurance policy record:
Updated policy
Access denied to this resource
Internal server error
{- "org_id": 4587,
- "type": "other",
- "name": "Policy Underwriter",
- "reference": "Ref002",
- "value": "6000",
- "start": "2021-11-30",
- "expires": "2022-11-29"
}
{- "id": 140,
- "created": "2021-11-29T08:10:09+13:00",
- "modified": "2022-11-29T08:10:09+13:00",
- "org_id": 4587,
- "org_name": "Example Organisation Name",
- "type": "other",
- "name": "Policy Underwriter",
- "reference": "Ref002",
- "value": "6000",
- "start": "2021-11-30",
- "expires": "2022-11-29",
- "status": "Active",
- "tags": [
- [
- "asset",
- "insurance",
- "other"
]
], - "documents": [
- {
- "id": 70,
- "modified": "2021-11-29T08:12:24+13:00",
- "name": "file-example",
- "type": "pdf",
- "size": 469513,
}
]
}
Deletes a contractor insurance policy based on the provided ID.
Policy deleted
Access denied to resource
Resource not found
Internal server error
curl -i -X DELETE \ https://api.whosonlocation.com/v1/sp/insurance/:id