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

PropertyDetails
Collection NameDynamic Pricing
Base URLshttps://apis.rmlconnect.net | https://apis.rmlconnect.net | http://localhost:5003
Total Endpoints6
AuthenticationJWT Bearer Token (Authorization header)
Content Typeapplication/json (POST/PATCH), URL-encoded (GET with body)
Schema VersionPostman Collection v2.1.0

Endpoints summary

Reach Estimate

GET /wba/template/reach-estimate

Send Dynamic Pricing Template - UAT

POST /v1/messages

Create Dynamic Pricing Template

POST /api/v1/template/create

Send Message via TSP

POST /wba/v1/tsp/messages

Get Template UAT

GET /wba/template/1006179238761486

Update Template

PATCH /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.

PropertyDetails
Header NameAuthorization
Format<JWT Token> (no Bearer prefix needed)
AlgorithmHS256
Token Payloaduser_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

Request headers

Header KeyValueRequired
AuthorizationBearer JWT TokenYes

Query parameters

ParameterExample ValueDescription
targeting_spec{"geo_locations":{"countries":["IN"]}}JSON object specifying geo-targeting, e.g. countries
date_intervalL7DDate 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

FieldValue
MethodPOST
URLhttp://0.0.0.0:5001/v1/messages

Request headers

Header KeyValueRequired
AuthorizationBearer JWT TokenYes
Content-Typeapplication/jsonYes

Request body parameters

FieldTypeRequiredDescription
phoneStringYesRecipient phone number in E.164 format
media.typeStringYesMust be media_template
media.template_nameStringYesName of the template to send
media.lang_codeStringYesLanguage code, e.g. en_US
media.header[].image.linkStringNoURL of header image
media.header[].image.file_nameStringNoFile name of header image
per_message_bid_multiplierNumberYesBid 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

Request headers

Header KeyValueRequired
AuthorizationBearer JWT TokenYes
Content-Typeapplication/jsonYes

Request body parameters

FieldTypeRequiredDescription
template_nameStringYesUnique name for the template
languageArrayYesList of language codes, e.g. ["en_US"]
template_typeStringYesType of template, e.g. template
template_categoryStringYesCategory: MARKETING, UTILITY, etc.
template_sub_categoryStringNoSub-category for classification
components.header.typeStringNoHeader type: image, text, etc.
components.header.exampleStringNoExample image URL for header
components.body.textStringYesBody text of the template
components.footer.textStringNoFooter text of the template
bid_spec.bid_amountStringYesBid amount in smallest currency unit
bid_spec.bid_strategyStringYesBidding 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

Request headers

Header KeyValueRequired
Authorization{{rml_token}} (JWT Bearer)Yes
Content-Typeapplication/jsonYes

Request body parameters

FieldTypeRequiredDescription
messaging_productStringYesMust be whatsapp
recipient_typeStringYesMust be individual
toStringYesRecipient phone number in E.164 format
typeStringYesMessage type, e.g. template
template.nameStringYesName of the WhatsApp template
template.language.codeStringYesLanguage code, e.g. en
template.componentsArrayNoTemplate 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

Request headers

Header KeyValueRequired
acceptapplication/jsonYes
authorizationBearer JWT TokenYes
accept-languageen-US,en;q=0.6No
originhttp://localhost:4200No
user-agentMozilla/5.0 (...)No

Query parameters

ParameterExample ValueDescription
Template ID (path param)1006179238761486Unique 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

Request headers

Header KeyValueRequired
AuthorizationBearer JWT TokenYes
Content-Typeapplication/jsonYes

Request body parameters

FieldTypeRequiredDescription
template_nameStringYesName of the template to update
template_sub_categoryStringNoUpdated sub-category
components.body.textStringNoUpdated body text
components.footer.textStringNoUpdated footer text
bid_spec.bid_amountStringNoUpdated bid amount
bid_spec.bid_strategyStringNoUpdated 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"
  }
}


Did this page help you?