Skip to main content
Version: 1.1

What conditions need to be met to update a customer record?

In this first example we are going to send a POST request to the REST API to get a response about what conditions need to be met for someone in order to update a customer record.

As a user you can send the request in JSON format for the evaluation and can get 3 distinct response types for the aforementioned request.

Request

To generate an AST response or a JSON response, send the following request to the /authorization/constraints endpoint.

To generate a Human-readable TEXT response, send this request to the /authorization/simplified-constraints endpoint.

{
"providedAttributes": [
{
"attribute": "abcbank.documentType",
"values": [
"customer_record"
]
},
{
"attribute": "abcbank.action",
"values": [
"update"
]
}
],
"pdpDecisionSet": [
"PERMIT"
]
}

AST response

{
"response": {
"apply": {
"function": "or",
"returnType": "boolean",
"arguments": [
{
"apply": {
"function": "and",
"returnType": "boolean",
"arguments": [
{
"apply": {
"function": "not",
"returnType": "boolean",
"arguments": [
{
"apply": {
"function": "anyOf",
"returnType": "boolean",
"arguments": [
{
"functionElement": {
"name": "equal",
"returnType": "boolean"
}
},
{
"constant": {
"value": "employee",
"type": "string"
}
},
{
"attributeDesignator": {
"attributeName": "abcbank.role",
"type": "list",
"listOf": "string"
}
}
]
}
}
]
}
},
{
"apply": {
"function": "anyOf",
"returnType": "boolean",
"arguments": [
{
"functionElement": {
"name": "equal",
"returnType": "boolean"
}
},
{
"constant": {
"value": "investment_banker",
"type": "string"
}
},
{
"attributeDesignator": {
"attributeName": "abcbank.role",
"type": "list",
"listOf": "string"
}
}
]
}
},
{
"apply": {
"function": "anyOf",
"returnType": "boolean",
"arguments": [
{
"functionElement": {
"name": "equal",
"returnType": "boolean"
}
},
{
"constant": {
"value": "office",
"type": "string"
}
},
{
"attributeDesignator": {
"attributeName": "abcbank.location",
"type": "list",
"listOf": "string"
}
}
]
}
}
]
}
},
{
"apply": {
"function": "and",
"returnType": "boolean",
"arguments": [
{
"apply": {
"function": "anyOf",
"returnType": "boolean",
"arguments": [
{
"functionElement": {
"name": "equal",
"returnType": "boolean"
}
},
{
"constant": {
"value": "group_manager",
"type": "string"
}
},
{
"attributeDesignator": {
"attributeName": "abcbank.role",
"type": "list",
"listOf": "string"
}
}
]
}
},
{
"apply": {
"function": "not",
"returnType": "boolean",
"arguments": [
{
"apply": {
"function": "anyOf",
"returnType": "boolean",
"arguments": [
{
"functionElement": {
"name": "equal",
"returnType": "boolean"
}
},
{
"constant": {
"value": "employee",
"type": "string"
}
},
{
"attributeDesignator": {
"attributeName": "abcbank.role",
"type": "list",
"listOf": "string"
}
}
]
}
}
]
}
}
]
}
}
]
}
}
}