WhatsApp Management APIs
This article acquaints you with the WhatsApp Management APIs that are available via the Unifonic WhatsApp Service.
Unifonic Conversations API
Before we begin, this is the API end point: https://apis.unifonic.com/v1
You will also require a publicId and secret key to be used as Headers.
API Suite | Method | Remarks |
---|---|---|
Catalog Management API | GET/whatsapp/catalog-product-details | Allows you to get your business catalog details from Meta |
Template Management API | GET/whatsapp/message_templates | Allows you to get your templates and its components from Meta |
Catalog Management
Business Catalogues can be created on Meta in order to be used for all Meta related services. For more information, refer to this Meta Guide.
Unifonic provides an API to retrieve the Catalog information. This information can be useful for sending multi-product list messages.
Here is a sample of the response:
[
{
"catalogId": "1148409582413138",
"products": [
{
"productId": "3939088139548247",
"name": "Black Faux Leather Oversized Pocket Front...44",
"category": "Clothing & Accessories > Clothing",
"retailerId": "cat587",
"currency": "SAR",
"price": "ر.س.320.00",
"imageUrl": "https://static.daraz.en/p/dc6ccd03ef616220ea9db032abe204.jpg"
},
{
"productId": "3953744441416320",
"name": "Burgundy Vinyl Contrast Faux Fur Midi Coat40",
"category": "Clothing & Accessories > Clothing",
"retailerId": "cat591",
"currency": "SAR",
"price": "ر.س.320.00",
"imageUrl": "https://static.daraz.en/p/dc6ccd03ef61652ea9db032ab2324.jpg"
},
{
"productId": "4202508779873711",
"name": "Black Faux Leather Oversized Pocket Front...21",
"category": "Clothing & Accessories > Clothing",
"retailerId": "cat281",
"currency": "SAR",
"price": "ر.س.30.00",
"imageUrl": "https://static.daraz.us/p/1aa80778fec3d4273fcd7aa5bc59.jpg"
}
]
}
]
Template Management
Templates can be created on Unifonic Console in order to be used for Business-initiated conversations. For more information, refer to this Guide.
Unifonic provides an API to retrieve the Templates and its component. This information is required for sending template messages.
Here is a sample of the response:
[
{
"name": "az_course_certificate_and_rating",
"components": [
{
"type": "HEADER",
"format": "IMAGE",
"example": {
"header_handle": [
"https://scontent.whatsapp.net/v/t61.29466-34/328638412_1446092959562160_8383462663994149792_n.png?ccb=1-7&_nc_sid=57045b&_nc_ohc=cbSC6QiGP0wAX-aLWtT&_nc_ht=scontent.whatsapp.net&edm=AH51TzQEAAAA&oh=01_AdQzbZd_J3TGVMJ8NU9HIL18nIW24K8W-bkbBFaWmewCHQ&oe=64AA78B9"
]
}
},
{
"type": "BODY",
"text": "عزيزي الطالب: *{{1}}*\n\nنشكر حضوركم للدورة التدريبية بعنوان \" *التواصل الفعال*\" بتاريخ _6/6/2023_ مع الدكتور/ محمد.\n\nمرفق شهادة الحضور ونسعد بتقييمكم للدورة.",
"example": {
"body_text": [
[
"عبدالعزيز هاشم"
]
]
}
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "راضي عن الدورة"
},
{
"type": "QUICK_REPLY",
"text": "غير راضي عن الدورة"
},
{
"type": "QUICK_REPLY",
"text": "محايد"
}
]
}
],
"language": "ar",
"status": "APPROVED",
"category": "MARKETING",
"id": "1446092956228827"
}
]
Updated 8 months ago