Profile API enable clients to manage their customer profiles.
A customer profile consists of a Master Profile and an Application Profile. The Master Profile consists of core attributes (such as the unique Customer ID, customer name, email address, and msisdn). Application Profile consists of channel specific information.
Prerequisites
To send and receive profile information via IMIconnect platform, following prerequisites should be met:
- A client must be created on IMIconnect.
- A Client Profile Key must be passed with every API request.
For more information on profile key information, contact IMImobile.
The Profile API provides four functional groups that are prefixed with add, update, manage, and delete. The following table describes these groups.
HTTP Method | CRUD | Name | Description |
---|---|---|---|
GET | Read | /getProfile | Get profile specified by the customerid. |
GET | Read | /getAppProfile | Retrieve customer application profile. |
POST | Create | /createProfile | Create customer's master profile. |
POST | Create | /createAppProfile | Create customer's application profile. |
PUT | Update | /updateProfile | Update customer's master profile. |
PUT | Update | /updateAppProfile | Update customer's application profile. |
DELETE | Delete | /deleteProfile | Delete customer profile. |
DELETE | Delete | /deleteAppProfile | Delete application profile. |
DELETE | Delete | /deleteDeviceAppProfile | Delete device application profile. |
API Parameters
Parameter | Use | Description |
---|---|---|
key | This parameter is passed in the header for all calls. | The Client Profile Key authenticates Profile API requests and must be passed with every request. |
customerid | This parameter is passed as part of the URL in the following: This parameter is passed as part of the REQUEST in the following: This parameter is passed as part of the URL and REQUEST in the following: | The customerid is a Service Provider specific ID (such as CRN) to uniquely identify a customer. A customer can add or remove communication services (e.g. Facebook, Twitter etc.) which are associated with their customerid. This allows the IMIconnect platform to match the relevant customer communication ID based on the chosen communication service with the customerid. |
showinwardlinks | This parameter is passed as part of the URL and REQUEST in the following: | Extended information within the customer profile in the InwardLinks section can be retrieved as part of the request. The InwardLinks section contains channel specific attributes that are linked to the customer profile (e.g. Facebook, Twitter etc.). 0 - Retrieve Master Profile only |
attributes | This parameter is passed as part of the REQUEST in the following: | An array of strings that define a customer profile. This includes the following keys:
Service Providers may include their own keys. |
appid | This parameter is passed as part of the URL in the following: This parameter is passed as part of the REQUEST in the following: This parameter is passed as part of the URL and REQUEST in the following: | Application ID that is associated with an application (e.g. Facebook, Twitter etc.). |
appprofilekey | This parameter is passed as part of the URL in the following: This parameter is passed as part of the REQUEST in the following: This parameter is passed as part of the URL and REQUEST in the following: | Application Profile key. This will vary depending on the application (e.g. Facebook, Twitter, etc.,). |
Response / Error Codes
Code | Message | Description |
---|---|---|
1000 | Success | Returned when the request is completed successfully. |
1002 | Partial success | Returned when not all profiles were created or updated in a single request. |
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 | Returns when profile key is missing in header |
7003 | Mandatory parameters missing | Click here. |
7004 | Invalid parameters | Click here |
7006 | Internal error occurred | Returned when an internal error occurs. |
7010 | Source ip is not white listed | Returned when an API call is made from other than white listed IPs. |
7012 | Batch size limit(100) exceeded | Returned when the size of the batch exceeds the 100 requests. |
7013 | Master profile store not found | Returned when the master profile table is not found in the database. |
7014 | Customer not found | Returned when the customer profile does not exist. |
7015 | Customer already exists | Returned when a customer profile is being created for which the profile already exists. |
7016 | Unknwon error | Returned when an unknown error occurred while trying to access profile APIs |
7017 | Profile attribute doesn't exist | Returned when there is an error in retrieving profile attributes or when the profile attributes do not exist in the database. |
7018 | invalid app profile or app profile is not linked to this client | Returned when trying to retrieve invalid profile in the app. |
7020 | You have reached maximum transaction limit | Returned when a user reaches maximum transaction limit for accessing API. |
7203 | Customer/App not found | Returned when a customer or application does not exists to update or delete the profile. |
7205 | Invalid attribute value | Returned when an invalid value is provided for the customer or app profile Attributes object. |
7206 | Master profile store not found | Returned when a master profile store does not exists. |
7207 | Batch size limit (100) exceeded | Returned when an API request exceeds the limit to create or update or delete using profile API. |
7209 | Customer/App profile already exists | Returned when a customer or application profile is being created for which the profile already exists. |
7211 | Profile attribute does not exist | Returned when an attribute is sent for which the attribute is not defined in client master profile. |
7212 | Invalid app profile or app profile not linked to this client. | Returned when an application master profile does not exists. |