Skip to main content
PATCH
/
v0
/
approvals
/
{id}
Update an approval (approve, reject, or cancel)
curl --request PATCH \
  --url https://api.paygentic.io/v0/approvals/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "note": "<string>",
  "actorId": "<string>"
}
'
{
  "id": "<string>",
  "object": "approval",
  "merchantId": "<string>",
  "resourceId": "<string>",
  "requester": "<string>",
  "dataSnapshotHash": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "reviewer": "<string>",
  "note": "<string>",
  "decidedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required

Body

application/json
decision
enum<string>
required

approved/rejected: reviewer decision (maker-checker enforced). cancelled: recall a pending approval or reopen an approved one.

Available options:
approved,
rejected,
cancelled
note
string | null
Maximum string length: 2000
actorId
string

Optional. The real user id performing the action. Used when the request is made via a platform-level key on behalf of a human user. Ignored when the caller is a non-platform API key.

Maximum string length: 128

Response

Approval updated

id
string
required
object
enum<string>
required
Available options:
approval
merchantId
string
required
resourceType
enum<string>
required
Available options:
order,
invoice
resourceId
string
required
kind
enum<string>
required
Available options:
data_review,
financial_review,
push
decision
enum<string>
required
Available options:
pending,
approved,
rejected,
cancelled
requester
string
required
dataSnapshotHash
string
required
createdAt
string<date-time>
required
reviewer
string | null
note
string | null
decidedAt
string<date-time> | null