ThinkLP
ThinkLP API

Assignment

Create audits, assign them to auditors, and move section ownership between people.


Create an audit

POST
/v1/audits/

Create an audit › Headers

Idempotency-Key
​string · uuid

A UUID that makes the request safe to retry: a repeat with the same key replays the first response.

Create an audit › Request Body

template_id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required
location_hierarchy_node_id
​string | null · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required
auditor_user_id
​string | null · uuid · pattern: ^([0-9a-fA-F]{8}-[0-…
​
​
due_date
​string | null · date · pattern: ^(?:(?:\d\d[2468][04…
notes
​string | null

Create an audit › Responses

Successful response


List assignable users

GET
/v1/audits/assignable-users

Requires permission: audits.write.

List assignable users › query Parameters

search
​string · maxLength: 200
location
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-…
limit
​integer · max: 50
Default: 20

List assignable users › Responses

Successful response

​object[] · required

Update an audit

PATCH
/v1/audits/{id}

Update an audit › path Parameters

id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Update an audit › Headers

Idempotency-Key
​string · uuid

A UUID that makes the request safe to retry: a repeat with the same key replays the first response.

Update an audit › Request Body

notes
​string | null
auditor_user_id
​string | null · uuid · pattern: ^([0-9a-fA-F]{8}-[0-…
​object

Update an audit › Responses

Successful response


Change the lead auditor

PATCH
/v1/audits/{id}/lead

Change the lead auditor › path Parameters

id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Change the lead auditor › Headers

Idempotency-Key
​string · uuid

A UUID that makes the request safe to retry: a repeat with the same key replays the first response.

Change the lead auditor › Request Body

user_id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Change the lead auditor › Responses

Successful response


Complete my sections

POST
/v1/audits/{id}/section-assignments/complete

Complete my sections › path Parameters

id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Complete my sections › Headers

Idempotency-Key
​string · uuid

A UUID that makes the request safe to retry: a repeat with the same key replays the first response.

Complete my sections › Request Body

​object[] · required
​object[]

Complete my sections › Responses

Successful response


Reassign a section

POST
/v1/audits/{id}/section-assignments/{section_id}/reassign

Reassign a section › path Parameters

id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required
section_id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Reassign a section › Headers

Idempotency-Key
​string · uuid

A UUID that makes the request safe to retry: a repeat with the same key replays the first response.

Reassign a section › Request Body

user_id
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

Reassign a section › Responses

Successful response