Contractor organization insurance policies can have documents attached to them. Use the API to retrieve a list of all documents attached to a policy, add new documents, and update or delete existing documents.
Learn more about insurances in the OnLocation Help Center.
Retrieve all documents attached to a contractor insurance policy.
List of contractor insurance documents
Access denied to resource
Resource not found
Internal server error
curl -i -X GET \ https://api.whosonlocation.com/v1/sp/insurance/:id/document
[- {
- "id": 70,
- "modified": "2021-11-29T08:12:24+13:00",
- "name": "file-example",
- "type": "pdf",
- "size": 469513,
}
]
Add a new document to a contractor insurance policy.
Resource created
Access denied to this resource
Internal server error
curl -i -X POST \ https://api.whosonlocation.com/v1/sp/insurance/:id/document \ -H 'Content-Type: multipart/form-data' \ -F file=string
Retrieves a single contractor insurance policy document, filtering with the provided ID.
Access denied to resource
Resource not found
Internal server error
curl -i -X GET \ https://api.whosonlocation.com/v1/sp/insurance/:id/document/:did
{- "id": 70,
- "modified": "2021-11-29T08:12:24+13:00",
- "name": "file-example",
- "type": "pdf",
- "size": 469513,
}
Deletes the specified contractor insurance document
Document deleted
Access denied to resource
Resource not found
Internal server error
curl -i -X DELETE \ https://api.whosonlocation.com/v1/sp/insurance/:id/document/:did