GET /api/v1/approvals
List approval requests filtered by status.Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
status | string | "pending" | Filter by status: "pending", "approved", "rejected" |
Response
POST /api/v1/approvals
Create a new approval request.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
entityType | string | Yes | Entity type (e.g., "qualificationRule", "contactPolicy", "decisionFlow", "offer") |
entityId | string | Yes | ID of the entity to modify |
entityName | string | Yes | Display name of the entity |
action | string | Yes | "create", "update", or "delete" |
payload | object | No | The proposed changes to apply on approval |
Example
201 Created
GET /api/v1/approvals/
Get a single approval request.POST /api/v1/approvals/
Resolve an approval request (approve or reject). Admin only. When approved, the stored payload is automatically applied to the target entity. Supported entity types for auto-application:algorithmModel, qualificationRule, contactPolicy, decisionFlow, offer, creative, channel, arbitrationProfile.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
action | string | Yes | "approve" or "reject" |
comments | string | No | Reviewer comments |
Response (approved)
Response (rejected)
Roles
| Endpoint | Allowed Roles |
|---|---|
GET /approvals | any authenticated |
POST /approvals | any authenticated |
GET /approvals/{id} | any authenticated |
POST /approvals/{id} (resolve) | admin |