All pages
Powered by GitBook
1 of 1

Loading...

Create customer group

Use case

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:

Use case data
API parameters with values

The group name is business.

This is a group for the premium customers.

Sample API call

To create a new customer group, make the following API call.

Sample request

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"
}'

Sample response

Here you find an example response body to the API call above.

Response
{
    "errors": null,
    "validationErrors": null,
    "data": null
}

Result

A new BUSINESS customer group is created.

https://person-api.sandbox.tuumplatform.com/api/v1/person-group-types

See more information about the endpoint in the Tuum developer portal.

"personGroupCode": "BUSINESS"
"description": "Premium customers"
create customer group