Skip to content

Single Send Message


Otantikasyon

Bu başlığı her istekte gönderiniz.

json
{
  "Authorization": "Bearer ${token}"
}

Tek bir müşteriye Mesaj Şablonu göndermek için kullanılmaktadır. Tekil mesajı şablonu ve kaydırmalı (carousel) mesaj şablonu göndermek için kullanılabilir.

Tekil Mesaj Şablonu Gönderme

POST

https://backend.helorobo.com/agent-app/message-template/single-message

Body

json
{
  "channel_id": "<channel_id>",
  "phone_number": "<to_phone_number>",
  "message_template_id": "<message_template_id>",
  "full_name": "<isim>",
  "url_button_param": "<url_button_param>",
  "url_button_param2": "<url_button_param2>",
  "text_header_param": "<text_header_param>",
  "copy_code_param": "<copy_code_param>",
  "params" : ["<body_param_1>", "body_param_2", "body_param_3","body_param_4"]
}

Parametre Açıklaması

İsimTipZorunluAçıklama
channel_idstringEvetChannel ID'si. Buradan temin edebilirsiniz Kanal Listesi
phone_numberstringEvetMüşteri Telefon Numarası. Örneğin: 905449991122
message_template_idstringEvetMesaj Şablonu ID'si. Buradan temin edebilirsiniz Mesaj Şablonu Listeleme
full_namestringEvetMüşteri Adı
url_button_paramstringHayır1. web sitesi butonunun(URL) için parametresidir.
url_button_param2stringHayır2. web sitesi butonunun(URL) parametresidir.
text_header_paramstringHayırBaşlık(HEADER) parametresidir.
copy_code_paramstringHayırKupon Kodu(COPY_CODE) butonunun parametresidir.
paramsArray<string>HayırMetin(BODY) parametreleridir. Maksimum 4 tane olabilir.

Response

json
{
  "success": true,
  "data": {
    "message_id": "<message_id>"
  }
}

POST

https://backend.helorobo.com/agent-app/message-template/single-messagev2

Body

json
{
  "channel_id": "<channel_id>",
  "phone_number": "<to_phone_number>",
  "message_template_id": "<message_template_id>",
  "full_name": "<isim>",
  "message_template": [
    {
      "type": "BODY",
      "text": "Sizin için tanımlamış olduğumuz indirim kodunu kullanabilirsiniz.\n\nİndirim Kodu: {{1}} \n\nBu indirim kodunu Helorobo sayfasında {{2}} kullanabilirsiniz.\n\nLütfen dikkate almayınız.",
      "example": {
        "body_text": [
          [
            "<body_param_1>",
            "<body_param_2>"
          ]
        ]
      }
    },
    {
      "type": "CAROUSEL",
      "cards": [
        {
          "components": [
            {
              "type": "HEADER",
              "format": "IMAGE",
              "example": {
                "header_handle": [
                  "https://scontent.whatsapp.net/v/t61.29466-34/593614972_1942722253266719_2998156480333260778_n.jpg?ccb=1-7&_nc_sid=a80384&_nc_ohc=RNoq8uKW7gEQ7kNvwHCsucx&_nc_oc=Adn5vw5kMhKaUcfVw1DmVAUlwQOaTdoPVvFrQuiIn8rWFxLNcpHOXT-jf825SAoCw70&_nc_zt=3&_nc_ht=scontent.whatsapp.net&edm=ANHSQoYEAAAA&_nc_gid=wW_CX3YoI7J_rr7schOViQ&oh=01_Q5Aa3gErukWnwXziyMQrs5bHR8Ozj9ORNgfZ1EyH0N9C_JDa2w&oe=698E94AF"
                ]
              }
            },
            {
              "type": "BODY",
              "text": "Yeni İndirim Kodu : {{1}}  Lütfen indirim kodunu kimseyle paylaşmayınız . {{2}} bu linkten indirim kodunu kullanabilir",
              "example": {
                "body_text": [
                  [
                    "<body_param_1>",
                    "<body_param_2>"
                  ]
                ]
              }
            },
            {
              "type": "BUTTONS",
              "buttons": [
                {
                  "type": "URL",
                  "text": "Google",
                  "url": "https://www.google.com/%20{{1}}",
                  "example": [
                    "<url_param_1>"
                  ]
                },
                {
                  "type": "URL",
                  "text": "Helorobo",
                  "url": "https://www.helorobo.com/%20{{1}}",
                  "example": [
                    "<url_param_2>"
                  ]
                }
              ]
            }
          ]
        },
        {
          "components": [
            {
              "type": "HEADER",
              "format": "IMAGE",
              "example": {
                "header_handle": [
                  "https://scontent.whatsapp.net/v/t61.29466-34/539633550_1036750145323923_7896179369653880429_n.jpg?ccb=1-7&_nc_sid=a80384&_nc_ohc=WhZIOgMwqEwQ7kNvwGf5z3a&_nc_oc=AdleGMDFk4gpG904r7hhlxsi0LwSEE7yogikLgdqQI6NqqgI52hBhrjMDf-Lx4kKsjE&_nc_zt=3&_nc_ht=scontent.whatsapp.net&edm=ANHSQoYEAAAA&_nc_gid=wW_CX3YoI7J_rr7schOViQ&oh=01_Q5Aa3gH5lZfrB63q3mGufDOdGlIlBYIzVwdDdW4MvhHz480ayg&oe=698EB0BF"
                ]
              }
            },
            {
              "type": "BODY",
              "text": "Yeni İndirim Kodu : {{1}}  Lütfen indirim kodunu kimseyle paylaşmayınız . {{2}} bu linkten indirim kodunu kullanabilir",
              "example": {
                "body_text": [
                  [
                    "<body_param_1>",
                    "<body_param_2>"
                  ]
                ]
              }
            },
            {
              "type": "BUTTONS",
              "buttons": [
                {
                  "type": "URL",
                  "text": "Google",
                  "url": "https://www.google.com/%20{{1}}",
                  "example": [
                    "<url_param_1>"
                  ]
                },
                {
                  "type": "URL",
                  "text": "Helorobo",
                  "url": "https://www.helorobo.com/%20{{1}}",
                  "example": [
                    "<url_param_2>"
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Parametre Açıklaması

İsimTipZorunluAçıklama
message_template_idstringEvetMesaj Şablonu ID'si. Buradan temin edebilirsiniz Mesaj Şablonu Listeleme
full_namestringfalseMüşteri Adı
phone_numberstringEvetMüşteri Telefon Numarası. Örneğin: 905449991122
channel_idstringEvetChannel ID'si. Buradan temin edebilirsiniz Kanal Listesi

ÖNEMLİ UYARI

Carousel Mesaj Şablonu oluşturulurken ve gönderilirken aşağıdaki kurallara dikkat edilmelidir:

Carousel Mesaj Şablonu iki ana bölümden oluşur: BODY ve CARDS.

BODY bölümü için geçerli kurallar:

  • BODY bölümünde en fazla 4 adet parametre bulunabilir.

Cards bölümünde ise;

  • Maksimum 10 tane card bulunabilir.
  • Her card içerisinde body bölümünde maksimum 4 tane parametre bulunabilir.
  • Her card içerisinde minimum 1 tane buton bulunmalıdır.
  • Her card içerisinde maksimum 2 tane buton bulunabilir.
  • Buton tipleri URL, PHONE_NUMBER ve QUICK_REPLY olabilir.
  • URL butonlarında her buton için ayrı parametre eklenebilir.

Response

json
{
  "success": true,
  "data": {
    "message_id": "<message_id>"
  }
}