Send a Product
Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be [email protected], bsuid@lid, [email protected], or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.
First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases.
You can not send products to Business WhatsApp clients.
JWT tokentoken<token>- body
action*Object containing info about product or catalog. Can contain the following fields:
catalog_id - id of catalog
product_retailer_id - id of product. Only for sending single product.
sections - used for sending multiply products. It`s array containing objects with catalog info. See example below.
Example: {"catalog_id":"{{catalog_id}}","sections":[{"title":"the-section-title","product_items":[{"product_retailer_id":"{{SKU-1}}"},{"product_retailer_id":"{{SKU-2}}"}]},{"title":"the-section-title2","product_items":[{"product_retailer_id":"{{SKU-1}}"}]}]}
body?stringText of message. Example: Some text.
footer?stringLocated under the message text. Example: Footer.
header?stringHeader of catalog. Example: Header.
Required when sending the catalog.
chatId?stringRequired if phone and bsuid are not set
Chat ID from the message list. Examples: [email protected], RU.1504711984690866@lid, username@username, or [email protected] (group). Used instead of the phone parameter.
phone?stringRequired if chatId and bsuid are not set
Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.
Use chatId for full chat IDs: [email protected], bsuid@lid, username@username, or [email protected].
bsuid?stringOptional alternative to phone/chatId
Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.
Server response example
application/json- response
sent?booleanid?stringunique message id
message?stringPosting status message
description?stringResult description
curl -X POST 'https://api.1msg.io/123/sendProduct' \ -H 'Content-Type: application/json' \ -d '{ "body": "Have a look at this", "action": { "catalog_id": "407921857496983", "product_retailer_id": "product-1" }, "phone": "12020721369"}'{ "sent": true, "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8", "message": "Sent to [email protected]", "description": "Message has been sent to the provider"}