Here we will review how to assign a person to the customer group. Let us assign a private person, Trevor Tuum, to a business customer group.
A private person with personId: ID-3392
...persons/ID-3392/person-groups
A customer group for business customers
To assign a person to the customer group, make the following API call.
https://person-api.sandbox.tuumplatform.com/api/v2/persons/ID-3392/person-groups
Below is the example body request of the API call for assigning a person to the group.
{
"personGroupCode": "BUSINESS"
}
curl -L 'https://person-api.sandbox.tuumplatform.com/api/v2/persons/ID-3392/person-groups' \
-H 'x-channel-code: system' \
-H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDYtMjFUMjE6Mjk6NDgiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2ODczODI5ODh9.pPztGj-fAiRrRmZAOKYDuJSGrvZuUis59WKDAfcuE7A' \
-H 'Content-Type: application/json' \
-d '{
"personGroupCode": "BUSINESS"
}'
Here you find an example response body to the API call above.
The user ID-3392
is assigned to the BUSINESS customer group.
"personGroupCode": "BUSINESS"