Skip to content

reviews

Approve a draft or plan version, as the key's owner, with the approval scope for its kind. An assistant's proposal is never decided by key.

Approve a draft or plan version

Request

Approve the version of a draft or plan you read, as the key's owner: a draft needs drafts:approve and a plan needs actions:approve. The approval covers that version's text only and its history reads "via API key". Send revisionNo as the version you read; a newer one is 409 revision_conflict carrying it. It never decides a change the assistant proposed: that address answers 403 person_required, whatever the key's scopes.

Security
bearerKey
Path
artifactIdstringrequired

The draft's or plan's id.

Headers
Idempotency-Keystring, [ 1 .. 128 ] characters

1 to 128 characters. A retry with the same key and body returns the first result; the same key with another body is 409.

Bodyapplication/jsonrequired
revisionNointeger, >= 1required
curl -i -X POST \
  'https://docs.societyhealth.co/_mock/docs/openapi/api/v1/reviews/{artifactId}/approve' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "revisionNo": 3
  }'

Responses

Approved.

Bodyapplication/json
okanyrequired
Value:true
dataobject(PublicApproval)required
Response
{ "ok": true, "data": { "id": "Drf8pQ2rT4vW6xY9zA1b", "kind": "draft", "url": "https://hrcledger.com/drafts/items/Drf8pQ2rT4vW6xY9zA1b", "revisionNo": 3 } }