Skip to main content

Send product

Method#

/send-product#

POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/send-product

Header#

KeyValue
Client-TokenACCOUNT SECURITY TOKEN

Concept#

In this method, you can send messages of your products. The product feature is only available for business WhatsApp accounts. It is also necessary for the account to have registered products. Operations related to products can be found in the Whatsapp Business section of our documentation.

image


Attributes#

Required#

AttributesTypeDescription
phonestringRecipient's phone number (or group ID for group messages) in the format DDI DDD NUMBER E.g., 551199999999. IMPORTANT Send only numbers, without formatting or mask
catalogPhonestringPhone number of the business account to which the product belongs.
productIdstringProduct ID. Can be obtained from the API of listing products or via webhook.

Request Body#

{
"phone": "5511999999999",
"catalogPhone": "5511999999999",
"productId": "7190654897637620"
}

Response#

200#

AtributosTipoDescrição
zaapIdstringid in z-api
messageIdstringid in WhatsApp
idstringAdded for compatibility with Zapier, it has the same value as messageId

Example

{
"zaapId": "3999984263738042930CD6ECDE9VDWSA",
"messageId": "D241XXXX732339502B68",
"id": "D241XXXX732339502B68"
}

405#

In this case, make sure you are correctly sending the method specification, i.e., check if you sent the POST or GET as specified at the beginning of this topic.

415#

If you receive a 415 error, make sure to add the "Content-Type" of the object you are sending to the headers of the request, mostly "application/json"


Webhook Response#

Link to the webhook response (upon receipt)

Webhook


Code#