For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
LoginSandbox
Platform GuidesAPI DocsSDKMCP ServerChangelog
Platform GuidesAPI DocsSDKMCP ServerChangelog
  • Solvimon API
    • Base URL
    • Authentication
    • HTTP status codes
    • Resources
    • Standardisation
  • Configuration API
      • GETGet all the approval policies.
      • POSTCreate a new Approval Policy
      • GETGet approval policy.
      • DELDelete an approval policy by resource ID
      • PATCHUpdate an approval policy
      • POSTActivate approval policy
      • POSTDeprecate approval policy
      • POSTArchive approval policy
  • Identity API
  • Transaction API
  • Event API
LoginSandbox
Configuration APIApproval Policy

Create a new Approval Policy

POST
/v:version/approval-policies
POST
/v:version/approval-policies
$curl -X POST https://test.api.solvimon.com/v1/approval-policies \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "source_type": "QUOTE_VERSION",
> "reference": "approval-policy",
> "name": "Discounts over 10%",
> "approval_type": "GROUP",
> "approvers": {
> "type": "ALL_LEVELS_MUST_APPROVE",
> "approval_groups": [
> {
> "level": 1,
> "approvers": [
> {
> "type": "USER",
> "user": {
> "id": "user_ZwDeeN0tlgPrVJATeG2A"
> }
> }
> ]
> },
> {
> "level": 2,
> "approvers": [
> {
> "type": "USER",
> "user": {
> "id": "user_UwDeeN0tlgPrXKAIe91y"
> }
> }
> ]
> }
> ]
> },
> "rule_groups": [
> {
> "rules": [
> {
> "type": "DISCOUNT",
> "comparator": "GREATER_THAN",
> "discount": {
> "percentage": "10"
> }
> }
> ]
> }
> ]
>}'
1{
2 "object_type": "string",
3 "id": "string",
4 "source_type": "QUOTE_VERSION",
5 "reference": "string",
6 "name": "string",
7 "status": "DRAFT",
8 "approval_type": "GROUP",
9 "created_at": "string",
10 "update_at": "string",
11 "approvers": {
12 "type": "ALL_LEVELS_MUST_APPROVE",
13 "approval_groups": [
14 {
15 "level": 1,
16 "approvers": [
17 {
18 "type": "USER",
19 "user": {
20 "id": "string"
21 }
22 }
23 ]
24 }
25 ]
26 },
27 "rule_groups": [
28 {
29 "rules": [
30 {
31 "type": "ALWAYS_APPROVE",
32 "comparator": "LESS_THAN",
33 "discount": {
34 "percentage": "string",
35 "amount": {
36 "quantity": "string",
37 "currency": "AED"
38 }
39 },
40 "commitment": {
41 "amount": {
42 "quantity": "string",
43 "currency": "AED"
44 }
45 },
46 "pricing": {
47 "has_override": true
48 },
49 "custom_field": {
50 "id": "string",
51 "value": "string"
52 },
53 "billing_entity": {
54 "is_custom": true
55 },
56 "billing_period": {
57 "is_custom": true
58 },
59 "due_date": {
60 "is_custom": true
61 },
62 "payment_acceptor": {
63 "is_custom": true
64 }
65 }
66 ]
67 }
68 ]
69}

Requires the APPROVAL_POLICY.CREATE permission.

Was this page helpful?
Previous

Get approval policy.

Next
Built with

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

versionstringRequiredDefaults to 1
version

Headers

x-platform-idstringOptional
Platform ID.

Request

This endpoint expects an object.
source_typeenumRequired
The object type of this approval policy.
Allowed values:
referencestringRequiredformat: "^\S+$"0-256 characters

The human-readable reference to this approval policy.

namestringRequired
The name of this approval policy.
approval_typeenumRequired
The type of approval process which needs to be followed if this approval policy is invoked.
Allowed values:
approversobjectRequired

The type of approve level and users who are allowed to approve/decline the approval review.

rule_groupslist of objectsRequired
The groups of rules that are applicable for this approval policy. These will be chained using OR.
statusenum or nullOptional
The current status of the approval policy.
Allowed values:

Response

Created
object_typestring or nullRead-only
idstring or nullRead-only
source_typeenum
The object type of this approval policy.
Allowed values:
referencestringformat: "^\S+$"0-256 characters

The human-readable reference to this approval policy.

namestring
The name of this approval policy.
statusenum or null
The current status of the approval policy.
Allowed values:
approval_typeenum
The type of approval process which needs to be followed if this approval policy is invoked.
Allowed values:
created_atstring or nullRead-only
When the approval policy was created.
update_atstring or nullRead-only
When the approval policy was updated last.
approversobject

The type of approve level and users who are allowed to approve/decline the approval review.

rule_groupslist of objects
The groups of rules that are applicable for this approval policy. These will be chained using OR.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error