Skip to main content
An integrator does not always create documents. Often it acts on the approver’s side: a system of yours decides whether to approve an order or send it back for changes, and it has to do that through the API. Everything below needs the documents:write scope, and reading the document needs documents:read.
A document you can reach only through route participation does not appear in GET /documents: the registry lists by initiator and by permission. Events are therefore the only reliable entry point for this scenario. See Listing documents.
1

Subscribe to approval events

The event carries {"document_id": "…"}, which is all you need to read the document with your own key.
2

Read the document with its route

3

Find your slot

You need the participant whose employee_id matches the key owner’s employee record and whose status is PARTICIPANT_STATUS_ACTIVE. That participant’s id is what an action takes.
The Developer API has no “who am I” endpoint. Store the key owner’s employee_id in your integration’s configuration; it stays the same while the owner works in the same organization.
4

Perform the action

Step completion rules

rule decides when a step closes:
  • STEP_RULE_ALL — every participant of the step must act;
  • STEP_RULE_ANY_ONE — one is enough, and the remaining slots become PARTICIPANT_STATUS_SKIPPED.
So do not assume your approval closes the step. Re-read the document afterwards, or wait for document.signing_started or document.completed.

Errors worth handling

Repeating _approve on a slot that already acted is safe: it returns a state error instead of recording a second approval.

Next

Document events

The full event list and what to do for each.

Signing

When your slot signs rather than approves.