Here we will review how to create customer groups that are used to make different price decisions based on the group. We will create a new customer group using the following data:
The group name is business.
This is a group for the premium customers.
To create a new customer group, make the following API call.
https://person-api.sandbox.tuumplatform.com/api/v1/person-group-types
Below is an example request body of the API call for creating a new customer group.
{
"personGroupCode": "BUSINESS",
"description": "Premium customers"
}
curl -L 'https://person-api.sandbox.tuumplatform.com/api/v1/person-group-types' \
-H 'x-channel-code: system' \
-H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDYtMTlUMjA6NDQ6MTIiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2ODcyMDc0NTJ9.KsLN7WxZ10oCLe9pEHKaUP6mcqIjCXVazamMZpIEYQE' \
-H 'Content-Type: application/json' \
-d '{
"personGroupCode": "BUSINESS",
"description": "Premium customers"
}'
Here you find an example response body to the API call above.
A new BUSINESS customer group is created.
"personGroupCode": "BUSINESS"
"description": "Premium customers"