Set submitted form status
API units: 5. Each successful status request uses 5 units.
Open or close a submission in a service. Enable Set submitted form status in the API key's permitted endpoint access. The key can update submissions only in its library.
Endpoint and parameters
PUT /api/submitted-data/{libraryId}/{serviceId}/{submissionId}/status
| Parameter | Description |
|---|---|
libraryId | ID of the library that owns the service. |
serviceId | ID of the service containing the submission. |
submissionId | ID of the submission to change. |
Request
Send Authorization: GovformsApiKey {keyId}:{keySecret} and Content-Type: application/json. To close a submission:
{"status":"closed"}
To reopen a submission with an optional comment:
{"status":"open","message":"Please correct the address."}
status must be open or closed. message is available only when reopening. It is trimmed and can be up to 2,000 characters. An empty or omitted message clears any previous re-open comment.
Successful response
{"submissionId":"1234-ABCD-ABCD","status":"open"}
Closing marks the submission and its workflow complete. Reopening marks both incomplete so the user can continue. Repeating an identical request returns the same result without changing the submission again.
Errors
| Status | Reason |
|---|---|
| 400 | Invalid status or message. |
| 403 | The key is invalid, lacks permission for this endpoint, or the request IP is not allowed. |
| 404 | The service or submission was not found. |
| 409 | The submission changed during the update. |
