Approve a submission or request changes

posthttps://api.expiryedge.com/v1/reviewCollectionSubmission
editor or admin60/minJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/reviewCollectionSubmission' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "submissionId": "sub_Qm3r",
  "decision": "request_changes",
  "expectedRevision": 1,
  "fieldReviews": [
    {
      "fieldId": "fld_company_name",
      "status": "approved"
    },
    {
      "fieldId": "fld_insurance",
      "status": "rejected",
      "comment": "This certificate expired in June. Please upload the current one."
    }
  ]
}'
Antwort
{
  "message": "Changes requested - recipient notified",
  "email_sent": true
}

approve records the review. request_changes needs at least one rejected field; it reopens the request with a new link, re-seeds reminders and emails the recipient the comments. Entries for unknown fields are ignored. The handler does not check the HTTP method.

Body-Parameter

application/json
  • submissionIdstringerforderlich
  • decisionstringerforderlich
    Erlaubtapproverequest_changes
  • fieldReviewsarray of objectserforderlich
  • expectedRevisioninteger
    Optimistic concurrency: the submission revision you reviewed. 409 if it changed.

Rückgabe

200
Review saved.
  • messagestringerforderlich
  • email_sentboolean
    Only for request_changes.

Fehler

400
The request is missing required fields or contains invalid values.
401
Missing, expired or invalid bearer token.
403
Your role does not allow this, or the record belongs to another organization ({"error": "Access denied"}).
404
The record does not exist or is not in your organization.
409
The submission was changed since expectedRevision.
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.