Approval Rule
The approval rule resource.
Basehttps://rest.carbon.ms/approvalRule
GET
/approvalRuleList approval rules
Retrieve a paginated list of approval rules. Filter, order, and select columns with PostgREST query parameters.
Query parameters
selectstringComma-separated columns to return. Defaults to all.
orderstringColumn to sort by, e.g. `createdAt.desc`.
limitintegerMaximum rows to return.
offsetintegerRows to skip, for pagination.
GEThttps://rest.carbon.ms/approvalRule
curl --request GET \
--url 'https://rest.carbon.ms/approvalRule?select=*&limit=10' \
--header 'Authorization: Bearer <api-key>'Response
[
{
"id": "abc123def456",
"companyId": "xyz789",
"documentType": "string",
"enabled": true,
"lowerBoundAmount": 0,
"createdBy": "string",
"createdAt": "2026-01-01T00:00:00Z",
"approverGroupIds": []
}
]GET
/approvalRuleRetrieve a approval rule
Fetch a single approval rule by filtering on `id`.
Query parameters
idstringMatch on the approval rule's `id`, e.g. `eq.{id}`.
GEThttps://rest.carbon.ms/approvalRule
curl --request GET \
--url 'https://rest.carbon.ms/approvalRule?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'Response
{
"id": "abc123def456",
"companyId": "xyz789",
"documentType": "string",
"enabled": true,
"lowerBoundAmount": 0,
"createdBy": "string",
"createdAt": "2026-01-01T00:00:00Z",
"approverGroupIds": []
}POST
/approvalRuleCreate a approval rule
Create a new approval rule.
Body parameters
documentTypeapprovalDocumentTyperequiredenabledbooleanrequiredapproverGroupIdsarraydefaultApproverIdstringReferences user.id
lowerBoundAmountnumberrequiredescalationDaysnumberPOSThttps://rest.carbon.ms/approvalRule
curl --request POST \
--url https://rest.carbon.ms/approvalRule \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"documentType":"string","enabled":true,"lowerBoundAmount":0}'Response
{
"id": "abc123def456",
"companyId": "xyz789",
"documentType": "string",
"enabled": true,
"lowerBoundAmount": 0,
"createdBy": "string",
"createdAt": "2026-01-01T00:00:00Z",
"approverGroupIds": []
}PATCH
/approvalRuleUpdate a approval rule
Update an existing approval rule, matched on `id`.
Body parameters
documentTypeapprovalDocumentTyperequiredenabledbooleanrequiredapproverGroupIdsarraydefaultApproverIdstringReferences user.id
lowerBoundAmountnumberrequiredescalationDaysnumberPATCHhttps://rest.carbon.ms/approvalRule
curl --request PATCH \
--url 'https://rest.carbon.ms/approvalRule?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"documentType":"string"}'Response
{
"id": "abc123def456",
"companyId": "xyz789",
"documentType": "string",
"enabled": true,
"lowerBoundAmount": 0,
"createdBy": "string",
"createdAt": "2026-01-01T00:00:00Z",
"approverGroupIds": []
}DELETE
/approvalRuleDelete a approval rule
Delete a approval rule, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `id` of the approval rule to delete, e.g. `eq.{id}`.
DELETEhttps://rest.carbon.ms/approvalRule
curl --request DELETE \
--url 'https://rest.carbon.ms/approvalRule?id=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'204 No Content