Wow! Build your WhatsApp integration. Start free. Register Now
Marketplace deals · WhatsApp API use case

Publish affiliate marketplace deals as WhatsApp link previews

Followers of your deals Channel or group see each qualified SKU with price and your tracking link in a rich preview card. When your backend ingests a new Amazon or AliExpress deal that passes your rules, it can rewrite the URL with your affiliate tag, resolve destination ids once, and post the preview through Whapi.Cloud. This use case shows integrators how to implement that flow through the WhatsApp API.

Triggered when your backend qualifies a marketplace deal Link preview to a stored Channel or group JID
Dashboard showing Amazon and AliExpress deal rows beside a phone with a WhatsApp Channel link-preview post for a discounted product.
Decorartive bubble
Use case

When to use this flow

Your backend already ingests marketplace deal signals

Use this flow when your own backend detects or ingests cheap-deal and discount signals from Amazon, AliExpress, or similar sources and applies price, discount, and dedupe rules before anything reaches WhatsApp.

You monetize with affiliate links and optional short domains

Use this flow when every product URL must pass through your affiliate tag and optional link shortener on your backend before subscribers see it in WhatsApp.

The destination is a WhatsApp Channel, a deal group, or both

Use this flow when followers should see the offer in a WhatsApp Channel and/or a deals group as a link-preview post, not as a cold DM blast to individual numbers.

WhatsApp Channel or group chat on a phone showing a link-preview deal post with product title, price, and an affiliate product link.
Customer experience

Followers see the deal preview in chat

Before automation, a hot marketplace price shows up in your ingest pipeline while subscribers wait for someone to rewrite the affiliate link and paste a formatted post by hand.

After the flow runs, Channel subscribers and group members see a link-preview post with the product title, price, and your tracking URL they can tap to buy. Integrators build this result with the WhatsApp API.

Workflow

From a marketplace deal to a link preview

1

Qualified marketplace deal

Your backend ingests or detects a deal from Amazon, AliExpress, or a similar source, injects your affiliate tag and optional short link, and prepares title, price, and preview media. Whapi.Cloud does not scrape marketplaces or rewrite affiliate ids.

2

Resolve the Channel id once

GET /newsletters

getNewsletters lists your Channels so you can pick the deals Channel JID, store it on your backend, and skip this call on every later deal unless the Channel changes.

3

Resolve the deal group id when needed

GET /groups

getGroups lists your groups so you can store the deal group JID when group fan-out is enabled—call once or when the target group changes, not on every SKU.

4

Post the deal link preview

POST /messages/link_preview

sendMessageLinkPreview sends the rewritten product URL in the body with title and optional media to each configured destination JID; repeat the call when both Channel and group should receive the same deal.

Need delivery tracking? A successful send response is not proof followers already see the deal post. Track later acks on delivery webhooks. Learn about delivery status →

Prerequisites

Before you run the flow

Connect the WhatsApp number that administers your deals Channel or group and authenticate every request with that number's API token. Marketplace ingest, affiliate rewrite, and short-link logic stay on your backend.

Optional — go deeper for this flow

API implementation

The calls that publish the deal

Your backend already qualified the deal and holds the rewritten affiliate URL. These calls resolve destination JIDs when you need them, then deliver the SKU as a link-preview post to your Channel and/or deal group.

Get your API token for free after you register on whapi.cloud, and use that token in the code instead of Your_Token from the examples.

Resolve the Channel id once

List your Channels so you can store the deals Channel JID once before deal posts start.

Resolve the deal group id when needed

List your groups so you can store the deal group JID when group fan-out is part of your setup.

Post the deal link preview

Send the product title, price, and rewritten URL to each stored destination JID as a link-preview announcement for each qualified deal.

Delivery status

When the deal post leaves pending

A successful send response does not mean followers already have the deal post. The first status visible before a webhook is pending. Later status changes arrive only on statuses.post and statuses.put. If the status stays pending and does not move to sent, delivered, or a later ack, the message was not delivered—check the payload and the account's permission to send that type.

  • Treat a stuck pending as not delivered, not as a clock or a queue waiting on a webhook.

  • Subscribe to statuses.post and statuses.put when you need sent or delivered confirmation for Channel or group posts.

  • Do not mark the marketplace deal as fully published while the WhatsApp status stays pending.

What to read on delivery and webhooks

Contact our support if something went wrong
When things break

Handle failures at each step

If the deal passed ingest but affiliate rewrite failed, getNewsletters or getGroups cannot match a destination, the wrong JID was stored, sendMessageLinkPreview is rejected on one surface while another succeeded, or the post never leaves pending, retry or alert and do not mark the deal as fully published.

The deal was ready, but WhatsApp stayed quiet?

Keep marketplace deal state separate from WhatsApp delivery. Confirm affiliate and short-link output on your backend, verify stored Channel and group JIDs, retry sendMessageLinkPreview for the failed destination, or alert ops—do not mark the SKU published while followers still have no post. If the deal post still fails after a retry, contact Whapi support with the destination id and the failed request id.

Contact our support if something went wrong

Troubleshoot by API step

FAQ

Marketplace deals and WhatsApp publishing

Supported WhatsApp Features

Everything you need to build WhatsApp automation

Whapi.Cloud gives you access to a complete set of WhatsApp features — messaging, media, groups, channels, webhooks and more. Build bots, automations and integrations without feature limitations.

Chosen by developers

Trusted by 3,300+ developers and SaaS teams

Developers worldwide rely on Whapi.Cloud to build automations, bots, CRM integrations, bulk messaging tools and advanced WhatsApp workflows. Our infrastructure processes millions of API requests with high stability — and grows every month.

Icon of feature

5,5K+

active API channels

Icon of feature

21M+

API requests processed monthly

“Everything is simple, intuitive and easy to navigate. The docs are clear, and all the info I need is right on the screen. Great job.”

roberto k. / Web Developer

“We connected WhatsApp to our workflows using n8n in just a few minutes. No code, no complications- everything worked on the first try.”

Martin p. / Developer

“Whapi.Cloud became a key part of our customer communication. We automated product updates, order notifications and support messages without needing Meta templates or approvals”

Oscar T. / CTO

Decorative bubble