Get Master List
GET Method
The Get Master List API allow you to display specific master list from the master (reference) data of the RCS system. The following are the supported list of query parameter can be used to fetch specific master list:
agenttype- To get the list of agent types (BOT, HUMAN, and many more).billing- To get the list of billing categories.hostingregion- To get the list of hosting regions.endpoint- To get the list of endpoint configurations.interaction- To get the list of interaction types.agentusecase- To get the list of agent use cases.providerid- To get the list of RCS provider IDs.color- To get the list of color options.
Note:
If no query parameter is used in the request, then the response fetches all RCS masters.
Prerequisites
- After you sign up, your account will be on the trial version. You must complete the KYC to access all the features in kaleyra.io.
- Before you get started, Create an API Key. To view the API Key and the SID, see View API Key and SID.
- Before sending the RCS, you must configure the RCS channel in the Kaleyra platform. To configure the RCS channel in your account, please contact your local Kaleyra representative.
Base URL
| URL | Region |
|---|---|
https://rcs-api.<pod>.kaleyra.io | For North America (NA). |
https://rcs-api.<pod>.kaleyra.io | For the rest of the world. |
API Domain and Value
| api_domain | Value |
|---|---|
| IN pod | https://rcs-api.in.kaleyra.io |
| NA pod | https://rcs-api.na.kaleyra.io |
API Request to get Master List
To get all the master list, use the https://rcs-api.<pod>.kaleyra.io/v1/<sid>/rcs/masters?listname=<listname> endpoint with the following request method:
The following is the request format to get the master list:
curl --location --request GET 'https://<api_domain>/v1/<sid>/rcs/masters?listname=<listname>'\
--header 'api-key: <api-key>' \
--header 'Content-Type: <content-type>'The following is the sample request format to get all the masters:
curl --location --request GET 'https://rcs.api.na.kaleyra.io/v1/xxxxx6913850xxxx/rcs/masters?listname=hostingregion'\
--header 'api-key: xxxxx3b8497f58a94e84b671aca43xxxx' \
--header 'Content-Type: application/json'URL Parameters and Headers
The following is the list of parameters and headers to send the outgoing message request:
| Parameter/Headers | Data Type | Description | Example | Mandatory? |
|---|---|---|---|---|
sid | String | Account SID (Security Identifier). | XXXXX6913850XXXX | Yes |
Content-Type | String | Indicates the format of the content the API will be processing. | The only allowed value is application/JSON | Yes |
api-key | String | API key generated from kaleyra.io account. | XXXXX3b8497f58a94e84b671aca43XXXX | Yes |
The following is the query parameter can be used to fetch specific master list:
| Parameter | Data Type | Description | Example | Mandatory? |
|---|---|---|---|---|
listname | String | Specific master list name to fetch. | hostingregion | Optional |
Sample Success Response
The following is a sample success response:
HostingRegion
{
"code": "RCS902",
"message": "Master values fetched successfully - RCS MasterList (HostingRegion)",
"data": [
{
"id": 4,
"enum_list": "HostingRegion",
"enum_key": "NORTH_AMERICA",
"enum_value": "2",
"key_description": "North America."
},
{
"id": 5,
"enum_list": "HostingRegion",
"enum_key": "EUROPE",
"enum_value": "3",
"key_description": "Europe"
}
],
"error": {}
}AgentUseCase
[
{
"id": 7,
"enum_list": "AgentUseCase",
"enum_key": "TRANSACTIONAL",
"enum_value": "2",
"key_description": "Agents that send only essential, necessary and time-sensitive messages."
},
{
"id": 8,
"enum_list": "AgentUseCase",
"enum_key": "PROMOTIONAL",
"enum_value": "3",
"key_description": "Agents that send sales, marketing and promotional messages. Default type."
},
{
"id": 9,
"enum_list": "AgentUseCase",
"enum_key": "OTP",
"enum_value": "4",
"key_description": "Agents that only send one time passwords."
},
{
"id": 10,
"enum_list": "AgentUseCase",
"enum_key": "MULTI_USE",
"enum_value": "5",
"key_description": "Agents that have multiple use cases."
},
{
"id": 16,
"enum_list": "AgentUseCase",
"enum_key": "AGENT_USE_CASE_UNSPECIFIED",
"enum_value": "1",
"key_description": "Use case not specified."
}
]
Sample Failure Response
The following are the sample failure responses:
Master List Not Found
{
"code": "RCS904",
"message": "Unable to fetch Master values data - RCS MasterList (agenttype)",
"data": [],
"error": {
"error_code": "PROV_ERROR",
"error_message": "{\"status\":\"FAILED\",\"message\":\"Master list not found\"}"
}
}RCS Not Enabled
{
"code": "RCS601",
"message": "RCS Channel is not enabled for this User",
"data": [],
"error": {
"error_code": "RCS_CHANNEL_DISABLED",
"error_message": "RCS Channel is not enabled for this User"
}
}Method Not Allowed
{
"code": "RCS405",
"message": "Method not allowed",
"data": [],
"error": {
"error_code": "METHOD_NOT_ALLOWED",
"error_message": "Method not allowed"
}
}Gateway Error
{
"code": "RCS502",
"message": "Internal Gateway Error",
"data": [],
"error": {
"error_code": "RCS_CHANNEL_INTERNAL_ERROR",
"error_message": "Internal Gateway Error"
}
}Updated about 9 hours ago
