Dynamic Pricing API Documentation
Use the Dynamic Pricing APIs to estimate reach, create WhatsApp templates, send template messages, retrieve template details, and update bidding specifications.
Collection overview
| Property | Details |
|---|---|
| Collection Name | Dynamic Pricing |
| Base URLs | https://apis.rmlconnect.net | https://apis.rmlconnect.net | http://localhost:5003 |
| Total Endpoints | 6 |
| Authentication | JWT Bearer Token (Authorization header) |
| Content Type | application/json (POST/PATCH), URL-encoded (GET with body) |
| Schema Version | Postman Collection v2.1.0 |
Endpoints summary
GET /wba/template/reach-estimate
POST /v1/messages
POST /api/v1/template/create
POST /wba/v1/tsp/messages
GET /wba/template/1006179238761486
PATCH /wba/template/update
| # | Endpoint Name | Method | URL |
|---|---|---|---|
| 1 | Reach Estimate | GET | https://apis.rmlconnect.net/wba/template/reach-estimate |
| 2 | Send Dynamic Pricing Template - UAT | POST | http://0.0.0.0:5001/v1/messages |
| 3 | Create Dynamic Pricing Template | POST | http://localhost:5003/api/v1/template/create |
| 4 | Send Message via TSP | POST | https://apis.rmlconnect.net/wba/v1/tsp/messages |
| 5 | Get Template UAT | GET | https://apis.rmlconnect.net/wba/template/1006179238761486 |
| 6 | Update Template | PATCH | https://apis-nextgen.rmlconnect.net/wba/template/update |
Authentication
All endpoints in this collection require a JWT Bearer Token passed in the Authorization header. The token encodes user identity, customer ID, and expiry timestamp.
| Property | Details |
|---|---|
| Header Name | Authorization |
| Format | <JWT Token> (no Bearer prefix needed) |
| Algorithm | HS256 |
| Token Payload | user_id, username, exp, email, orig_iat, customer_id |
1. Reach Estimate
Retrieves estimated reach for a WhatsApp template campaign based on targeting specification and date interval.
Endpoint details
| Field | Value |
|---|---|
| Method | GET |
| URL | https://apis.rmlconnect.net/wba/template/reach-estimate |
Request headers
| Header Key | Value | Required |
|---|---|---|
| Authorization | Bearer JWT Token | Yes |
Query parameters
| Parameter | Example Value | Description |
|---|---|---|
| targeting_spec | {"geo_locations":{"countries":["IN"]}} | JSON object specifying geo-targeting, e.g. countries |
| date_interval | L7D | Date interval for reach estimation (e.g. L7D for last 7 days) |
2. Send Dynamic Pricing Template - UAT
Sends a Dynamic Pricing WhatsApp template message to a specified phone number with optional bid multiplier for UAT testing.
Endpoint details
| Field | Value |
|---|---|
| Method | POST |
| URL | http://0.0.0.0:5001/v1/messages |
Request headers
| Header Key | Value | Required |
|---|---|---|
| Authorization | Bearer JWT Token | Yes |
| Content-Type | application/json | Yes |
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
| phone | String | Yes | Recipient phone number in E.164 format |
| media.type | String | Yes | Must be media_template |
| media.template_name | String | Yes | Name of the template to send |
| media.lang_code | String | Yes | Language code, e.g. en_US |
| media.header[].image.link | String | No | URL of header image |
| media.header[].image.file_name | String | No | File name of header image |
| per_message_bid_multiplier | Number | Yes | Bid multiplier per message; 0 uses default bid |
Sample request body
{
"phone": "+917678088289",
"media": {
"type": "media_template",
"template_name": "testing_api_dyn_pricing_07",
"lang_code": "en_US",
"header": [
{
"image": {
"link": "<image_url>",
"file_name": "<file_name>"
}
}
]
},
"per_message_bid_multiplier": 0
}3. Create Dynamic Pricing Template
Creates a new Dynamic Pricing WhatsApp template with bidding specifications for MARKETING campaigns.
Endpoint details
| Field | Value |
|---|---|
| Method | POST |
| URL | http://localhost:5003/api/v1/template/create |
Request headers
| Header Key | Value | Required |
|---|---|---|
| Authorization | Bearer JWT Token | Yes |
| Content-Type | application/json | Yes |
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
| template_name | String | Yes | Unique name for the template |
| language | Array | Yes | List of language codes, e.g. ["en_US"] |
| template_type | String | Yes | Type of template, e.g. template |
| template_category | String | Yes | Category: MARKETING, UTILITY, etc. |
| template_sub_category | String | No | Sub-category for classification |
| components.header.type | String | No | Header type: image, text, etc. |
| components.header.example | String | No | Example image URL for header |
| components.body.text | String | Yes | Body text of the template |
| components.footer.text | String | No | Footer text of the template |
| bid_spec.bid_amount | String | Yes | Bid amount in smallest currency unit |
| bid_spec.bid_strategy | String | Yes | Bidding strategy, e.g. LOWEST_COST_WITH_BID_CAP |
Sample request body
{
"template_name": "testing_api_dyn_pricing_07",
"language": ["en_US"],
"template_type": "template",
"template_category": "MARKETING",
"template_sub_category": "sub_category",
"components": {
"header": {
"type": "image",
"example": "<image_url>"
},
"body": {
"text": "Enjoy images like this for free till 23rd May."
},
"footer": {
"text": "Reply 'STOP' to stop receiving these messages."
}
},
"bid_spec": {
"bid_amount": "50000",
"bid_strategy": "LOWEST_COST_WITH_BID_CAP"
}
}4. Send Message via TSP
Sends a WhatsApp template message through the TSP (Technology Service Provider) interface using a plain text template.
Endpoint details
| Field | Value |
|---|---|
| Method | POST |
| URL | https://apis.rmlconnect.net/wba/v1/tsp/messages |
Request headers
| Header Key | Value | Required |
|---|---|---|
| Authorization | {{rml_token}} (JWT Bearer) | Yes |
| Content-Type | application/json | Yes |
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
| messaging_product | String | Yes | Must be whatsapp |
| recipient_type | String | Yes | Must be individual |
| to | String | Yes | Recipient phone number in E.164 format |
| type | String | Yes | Message type, e.g. template |
| template.name | String | Yes | Name of the WhatsApp template |
| template.language.code | String | Yes | Language code, e.g. en |
| template.components | Array | No | Template component parameters |
Sample request body
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "+919930144763",
"type": "template",
"template": {
"name": "plain_text_template2",
"language": {
"code": "en"
},
"components": [
{
"type": "body",
"parameters": []
}
]
}
}5. Get Template UAT
Retrieves details of a specific WhatsApp template by its ID for UAT verification.
Endpoint details
| Field | Value |
|---|---|
| Method | GET |
| URL | https://apis.rmlconnect.net/wba/template/1006179238761486 |
Request headers
| Header Key | Value | Required |
|---|---|---|
| accept | application/json | Yes |
| authorization | Bearer JWT Token | Yes |
| accept-language | en-US,en;q=0.6 | No |
| origin | http://localhost:4200 | No |
| user-agent | Mozilla/5.0 (...) | No |
Query parameters
| Parameter | Example Value | Description |
|---|---|---|
| Template ID (path param) | 1006179238761486 | Unique ID of the template appended to the URL path |
6. Update Template
Updates an existing WhatsApp template including body, footer text, and bid specifications.
Endpoint details
| Field | Value |
|---|---|
| Method | PATCH |
| URL | https://apis.rmlconnect.net/wba/template/update |
Request headers
| Header Key | Value | Required |
|---|---|---|
| Authorization | Bearer JWT Token | Yes |
| Content-Type | application/json | Yes |
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
| template_name | String | Yes | Name of the template to update |
| template_sub_category | String | No | Updated sub-category |
| components.body.text | String | No | Updated body text |
| components.footer.text | String | No | Updated footer text |
| bid_spec.bid_amount | String | No | Updated bid amount |
| bid_spec.bid_strategy | String | No | Updated bid strategy |
Sample request body
{
"template_name": "testing_api",
"template_sub_category": "sub_category",
"components": {
"body": {
"text": "body text"
},
"footer": {
"text": "footer text"
}
},
"bid_spec": {
"bid_amount": "5000",
"bid_strategy": "LOWEST_COST_WITH_BID_CAP"
}
}Updated 12 days ago