post https://api.imiconnect.io/resources/v2/customerprofile
This API is used create a customer's profile.
Request
The Create Profile request is specified as follows:
Request Headers
The following table describes the request headers:
Request Header | Description |
---|---|
key | Client profile key |
content-type | application/json |
##Request Example
{
"Records": [
{
"customerId": "54321",
"Attributes": {
"email": "[email protected]",
"msisdn": "911278994640",
"name": "John"
}
},
{
"customerId": "54322",
"Attributes": {
"email": "[email protected]",
"msisdn": "911278994642",
"name": "Gary"
}
}
]
}
{
"Records": [
{
"customerId": "54321",
"Attributes": {
"email": "[email protected]",
"msisdn": "911278994640",
"name": "John"
}
}
]
}
Request Body
The following table describes the elements in the request body:
Parameter | Type | Mandatory | Description |
---|---|---|---|
customerId | String | Yes | A client specific ID (such as CRN) to uniquely identify a customer. |
attributes | JSONObject | Yes | The attributes that are selected while creating a client from IMIconnect admin. |
##Response Example
{
"response": {
"code": "1001",
"description": "Queued",
"transid": "5157ee77-53c8-42ac-8c23-ee6e062cae8a"
}
}
{
"response": {
"code": "1001",
"description": "Queued",
"transid": "5457ee77-53c8-42ac-8a58-ee6e062cae8a"
}
}
To know the status of the request
Use transid from the response and make a Get Profile status API call to get status of the request.
Status Codes
This API may return the following response codes:
Response Code | Message | Description |
---|---|---|
1000 | Queued | Returned when the request is queued. |
7000 | invalid JSON | Returned when an invalid JSON request is sent. |
7001 | Authentication failed | Returned when an invalid service key or profile key is provided in the request. |
7002 | Service Key Missing | Returned when the parameter key is missing in the message request. |
7003 | Mandatory parameters missing | Click here |
7006 | Internal error occurred | Returned when an internal error occurs in IMIconnect. |
7010 | Source IP is not white listed | Returned when a request is sent from an IP that is not whitelisted in IMIconnect. |
7011 | Invalid Attribute Value | Returned when an invalid value is provided for the customer or app profile Attributes object. |
7012 | Batch size limit(100) exceeded | Returned when an API request exceeds the limit to create or update or delete using profile API. |
7015 | customer already exists | Returned when a customer or app profile already exists. |