Developer API · Prompt library · 07 of 10
A branded web page per client with the numbers they ask about, behind a link you control.
For: Agencies that want a lightweight alternative to logins and PDFs.
Paste this into Claude, ChatGPT or Cursor
Read https://www.sellermate.ai/api-docs first. It documents the SellerMate Public API: REST over HTTPS, X-API-Key auth, and every tool with its parameters is on that page. Every tool is POST https://api.sellermate.ai/public/v1/tools/{name} with a JSON body.
Build me a client dashboard as a small Next.js app.
- One route per client, /c/[token], where the token maps to an Amazon account id in a server-side config file
- The page shows the last 30 days: spend, sales, ACoS, orders and TACoS at the top, a daily spend and sales chart, a table of the top 10 campaigns by spend, and the top 10 advertised products
- Data comes from get_marketplace_summary, get_campaign_performance and get_advertised_product_performance, fetched on the server, cached for 1 hour
- Put the agency name and logo in the header, nothing SellerMate-branded
- Tokens never appear in client-side code; the API key never leaves the server
Use get_user_context once to list the accounts so I can fill the config file.
Rules:
- My key is in the SELLERMATE_API_KEY environment variable. Send it as the X-API-Key header. Never hard-code it or log it.
- Call get_user_context first and use the accounts it returns. Don't invent account ids.
- Report tools are paginated (page, page_size up to 500, pagination.hasMore). Walk every page.
- On a 429, wait for the Retry-After header and retry. On a 401 or 403, stop and tell me.
- Show me the plan and the code before running anything that writes.
Stack: Next.js App Router, TypeScript, Tailwind, deployable to Vercel. Charts with a lightweight library.Fill in anything in [brackets] before you paste, or leave it and the assistant will ask. The first line sends it to the docs, where every tool is listed.
Once it works, ask the assistant for one of these.