Contractor insurance documents

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.

List all documents for a policy

Retrieve all documents attached to a contractor insurance policy.

Request
path Parameters
id
required
integer <int32>

ID of the contractor insurance record

Example: id=140
Responses
200

List of contractor insurance documents

403

Access denied to resource

404

Resource not found

500

Internal server error

get/sp/insurance/{id}/document
Request samples
curl -i -X GET \
  https://api.whosonlocation.com/v1/sp/insurance/:id/document
Response samples
[]

Update a policy document

Add a new document to a contractor insurance policy.

Request
path Parameters
id
required
integer <int32>

ID of the contractor insurance

Example: id=140
Request Body schema: multipart/form-data
file
required
string <file>

Insurance policy document to add

Responses
200

Resource created

403

Access denied to this resource

500

Internal server error

post/sp/insurance/{id}/document
Request samples
curl -i -X POST \
  https://api.whosonlocation.com/v1/sp/insurance/:id/document \
  -H 'Content-Type: multipart/form-data' \
  -F file=string

Retrieve a policy document

Retrieves a single contractor insurance policy document, filtering with the provided ID.

Request
path Parameters
id
required
integer <int32>

ID of the contractor insurance record

Example: id=140
did
required
integer <int32>

ID of the contractor insurance document

Example: did=70
Responses
200
403

Access denied to resource

404

Resource not found

500

Internal server error

get/sp/insurance/{id}/document/{did}
Request samples
curl -i -X GET \
  https://api.whosonlocation.com/v1/sp/insurance/:id/document/:did
Response samples
{}

Delete a policy document

Deletes the specified contractor insurance document

Request
path Parameters
id
required
integer <int32>

ID of the contractor insurance

Example: id=140
did
required
integer <int32>

ID of the contractor insurance document to delete

Example: did=70
Responses
204

Document deleted

403

Access denied to resource

404

Resource not found

500

Internal server error

delete/sp/insurance/{id}/document/{did}
Request samples
curl -i -X DELETE \
  https://api.whosonlocation.com/v1/sp/insurance/:id/document/:did