Guides
Customer Profile
Customer Profile for an Individual
Customer Profile represents a Customer in the scope of a single Facilitator, containing personal information and other data that belong to that Facilitator.
The Customer Profile contains the following required and optional fields:
Field Name | Length/Format | Validation | Required: yes/no |
---|---|---|---|
customer_type_id | Predefined in the dictionary: GET /dictionaries/customer-types | Digits | Yes |
customer_key | 5-50 characters | Digits, letters, and special characters: !@.-_# | Yes |
first_name | 1-50 characters | Any symbols | Yes |
middle_name | 1-50 characters | Any symbols | No |
last_name | 1-50 characters | Any symbols | Yes |
email | 1-256 characters | Regex validation | Yes |
date_of_birth | MM/DD/YYYY | We will predefine the max and min age based on Facilitator's requirements. | Yes |
ssn | xxxxxxxxx or xxxx | Digits | No |
mobile_phone | +{1-9}/{from 1 to 15 digits} | Digits | Yes |
home_phone | +{1-9}/{from 1 to 15 digits} | Digits | No |
office_phone | +{1-9}/{from 1 to 15 digits} | Digits | No |
customer_profile_tags.key | 3-50 characters | Digits, letters, and special characters: !@.-_# | No |
customer_profile_tags.key.value | 3-50 characters | Digits, letters, and special characters: !@.-_# | No |
Create a Customer Profile for Individual
1. Get a customer_type_id
for an Individual.
GET /dictionaries/customer_types
//Sample Response
{
"paging": {
"page_size": 50,
"page_number": 1,
"total_count": 4,
"last_evaluated_key": null
},
"data": [
{
"customer_type_id": 1,
"customer_type_name": "Individual",
"customer_type_display_name": "Individual",
"customer_type_description": "Represents a single qualified person."
},
{
"customer_type_id": 2,
"customer_type_name": "Organization",
"customer_type_display_name": "Organization",
"customer_type_description": "This Customer Type represents a company."
},
{
"customer_type_id": 3,
"customer_type_name": "Facilitator",
"customer_type_display_name": "Facilitator",
"customer_type_description": "This is a special type of Customer. A Facilitator may create one or more facilitator type Customers to enable certain functionality."
},
{
"customer_type_id": 4,
"customer_type_name": "CustomersOfProgram",
"customer_type_display_name": "Customers of Program",
"customer_type_description": "Represents a special customer within a facilitator that can accumulate funds that belongs to customers of a specific program."
}
],
"errors": null
}
As you see, the
customer_type_id
for an Individual is 1.
2. Create a Customer Profile for an Individual.
To create a Customer Profile, you need to create your
customer_key
. It should be unique, and can’t be updated.The
customer_key
length should be 5-50, including digits, letters, and special characters:!@.-_#;
POST /customer-profiles
//Sample Request
{
"customer_type_id": 1,
"customer_key": "wIvTPrerKd",
"customer_profile_tags": [
{
"key": "Priority",
"value": "High"
}
],
"customer_profile_individual": {
"first_name": "Jane",
"middle_name": "",
"last_name": "Doe",
"email": "janedoe@example.com",
"mobile_phone": "+128015012",
"home_phone": "+123987564",
"office_phone": "+123123264",
"date_of_birth": "1990-01-01",
"ssn": "147863258"
}
}
//Sample Response
{
"paging": null,
"data": [
{
"id": "csp_y27dbg5lvsVcxCyx"
}
],
"errors": null
}
As a result, you get
customer_profile_id
, which can be used for further reference, for ex., to review or update a particular Customer Profile.
Update a Customer Profile for an Individual
The following fields can’t be updated:
customer_key
,ssn
, andcustomer_profile_tags
.
To update a Customer Profile, you need to know a
customer_profile_id.
1. If you don't know a customer_profile_id
, get all Customer Profiles, and filter out the one you need using parameters, for ex., First name, Last name, Email, etc.:
GET /customer-profiles
2. Copy customer_profile_id.
3. Update the needed fields and post the updates:
PUT /customer-profiles/{customer_profile_id}
4. Verify your changes:
GET /customer-profiles/{customer_profile_id}