Approval policy
2 operations under approval-policy. Examples read $API and $KEY from your shell.
GET /v1/approval-policy
Responses
200 Default Response
object
versioninteger requiredrulesarray requiredEach item:
actionstring requiredcurrencystring requiredmin_amountdecimal string requiredapprovers_requirednumber required
created_atstring required (nullable)
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/approval-policy" \
-H "authorization: Bearer $KEY"SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/approval-policy");PUT /v1/approval-policy
Request body
application/json, required
object
expected_versioninteger requiredrulesarray requiredEach item:
actionstring requiredcurrencystring requiredmin_amountdecimal string requiredapprovers_requirednumber required
Responses
200 Default Response
object
versioninteger requiredrulesarray requiredEach item:
actionstring requiredcurrencystring requiredmin_amountdecimal string requiredapprovers_requirednumber required
created_atstring required (nullable)
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X PUT \
"$API/v1/approval-policy" \
-H "authorization: Bearer $KEY" \
-H "content-type: application/json" \
-d '{"expected_version":1,"rules":[{"action":"<action>","currency":"<currency>","min_amount":"10.00","approvers_required":1}]}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.PUT("/v1/approval-policy", {
body: {
"expected_version": 1,
"rules": [
{
"action": "<action>",
"currency": "<currency>",
"min_amount": "10.00",
"approvers_required": 1
}
]
},
});