Create staff group
/CreateStaffGroup
import requests
import json
url = “https://stageapi.cfsemoney.com/v1/CreateStaffGroup”
payload = json.dumps({
“userGroupName“: “abc-group”,
“userNameList“: [
“user1”,
“user2”,
“user3”
],
“entityId”: 9999,
“userType”: “pm_admin”
})
headers = {
‘x-api-key’: ‘Your-API-KEY‘,
‘Authorization’: ‘Bearer <<bearer-token>>’
}
response = requests.request(“POST”, url, headers=headers, data=payload)
print(response.text)
“properties”: {
“userGroupName“: {“type”: “string”,”minLength”: 2,”maxLength”:50,”pattern”: “^[a-zA-Z0-9._-]+$”},
“userNameList“: {“type”: “array”,”items”: { “type”: “string” } },
“entityId”: {“type”: “number”},
“userType”: {“type”: “string”},”enum”: [“pm_admin”]}
},”required”: [“userGroupName“, “userNameList“,”entityId”,”userType”] }
{
“statusCode”: 200,
“body”: “{\”message\”: \”Data inserted in staff groups4acct access\”, \”status\”: true}”
}
{
“statusCode”: 400,
“body”: “{\”message\”: \”xxx”}”
}