Send Multi Product Message

curl --location --request POST 'https://api.gupshup.io/wa/api/v1/msg' \
--header 'apikey: {{api_key}}' \
--header 'content-type: application/x-www-form-urlencoded' \
--data-urlencode 'channel=whatsapp' \
--data-urlencode 'source={{source_number}}' \
--data-urlencode 'destination={{destination_number}}' \
--data-urlencode 'message= {
      "type": "product_details",
      "subType": "product_list",
      "catalogId": "{{catalog_id}}",
      "header": {
        "text":"body content!"
      },      
      "body": {
        "text":"body content!"
      },
      "footer": {
        "text":"footer content!"
      },
      "sections": [
        {
          "title" : "{{section title}}",
          "productList" : [
            {
              "productId" : "{{product_retailer_id}}"
            }
          ]
        }
      ]
}' \
--data-urlencode 'src.name=LiveAccessApp' \

Meta Payloads Example

{
 "messaging_product": "whatsapp",
   "recipient_type": "individual",
   "to": "PHONE_NUMBER",
   "type": "interactive",
   "interactive": {
     "type": "product_list",
     "header":{
       "type": "text",
       "text": "header-content"
     },
     "body": {
       "text": "body-content"
     },
     "footer": {
       "text": "footer-content"
     },
     "action": {
       "catalog_id": "CATALOG_ID",
       "sections": [
         {
           "title": "section-title",
           "product_items": [
             { "product_retailer_id": "product-SKU-in-catalog" },
             { "product_retailer_id": "product-SKU-in-catalog" },
             ...
           ]
         },
         {
           "title": "section-title",
           "product_items": [
             { "product_retailer_id": "product-SKU-in-catalog" },
             { "product_retailer_id": "product-SKU-in-catalog" },
             ...
           ]
         }
       ]
     }
   }
 }
{ 
  "recipient_type": "individual",
  "to" : "whatsapp-id",
  "type": "interactive",
  "interactive": 
    {
    "type": "product_list",
    "Header":{
       "type": "text",
        "text": "text-header-content"
     },
     "body":{
        "text": "text-body-content"
      },
     "footer":{
        "text":"text-footer-content"
     },
     "action":{
        "catalog_id":"catalog-id",
        "sections": [
             {
             "title": "section-title",             
             "product_items": [
                  { "product_retailer_id": "product-SKU-in-catalog" },
                  { "product_retailer_id": "product-SKU-in-catalog" },
                            ...
              ]},
              {
              "title": "the-section-title",
              "product_items": [
                 { "product_retailer_id": "product-SKU-in-catalog" }
                           ...
              ]},
               ...
       ]
     },  
    }
}

Request Parameters

KeyDescriptionConstraints
apikeyApikey of the account where the app is to be createdShould be a valid gupshup.io apikey
sourceSource Phone Number
src.nameSource App Name
destinationDestination phone number
messageCatalog message payload
channelChannel to send messages to- Must be WhatsApp

Message Payload

KeyDescriptionConstraints
typeMessage typeShould be product_detailsfor product messages
sub_typeMessage Sub TypeShould be product_detailsfor product messages
HeaderMessage header content
bodyMessage Body Content
footerMessage Footer contentOptional
sectionSections of product to use in multiproduct catalogShould contain valid product IDs from the catalog connected to Waba