Create Account group
/CreateAccountGroup
import requests
import json
url = “https://stageapi.cfsemoney.com/v1/CreateAccountGroup”
payload = json.dumps({
“accountGroupName”: “Acct-group-12”,
“ibanList“: [
“GB31CLRB04271515583125”,
“GB31CLRB04271515583684”
]
})
headers = {
‘x-api-key’: ‘Your-API-KEY‘,
‘Authorization’: ‘Bearer <<bearer-token>>’
}
response = requests.request(“POST”, url, headers=headers, data=payload)
print(response.text)
{
“type”: “object”,
“properties”: {
“ibanList”: {
“type”: “array”,
“items”: {
“type”: “string”,
“pattern”: “^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$”
},
“minItems”: 1
},
“accountGroupName”: {
“type”: “string”,
“minLength”: 2,
“maxLength”: 50
}
},
“required”: [“accountGroupName”,“ibanList”]
}
{
“statusCode”: 200,
“body”: “{\”message\”: \”Data inserted in account groups\”, \”status\”: true}”
}
{
“statusCode”: 400,
“body”: “{\”message\”: \”xxx”}”
}