Developers

Changelog

Every change to the Sales API and the ways of connecting to Trendly, newest first. Breaking changes are called out, and we contact you before making one.

Versioning

The path carries the major version. Anything that would break an existing integration ships as /v2, never as a change to /v1. Additive changes, new fields on a response and new optional parameters, land in place and are listed here.

11 November 2026

v1.5

Removed creators, resent orders and batch results

Answers to questions partners asked while integrating, now in the docs and enforced by the API.

Changed

Removing a creator disables every code they hold, including codes a campaign gave them, not only their personal code. Each stays in GET /v1/codes as disabled.

Changed

An order keeps the creator it was first credited to. A later report of the same order_id updates its status and amounts, never its creator, even if it carries another code.

Fixed

The batch example showed a shortened result. Each row's result is the same object POST /v1/orders returns, attribution and commission included.

Added

The docs say what each code status means, and that a code's text is never issued again in a program.

11 November 2026

v1.4

Codes you add to your own checkout

When a brand approves a creator, Trendly issues their code as pending. For a store Trendly cannot write codes into (your own site, a Cloudflare Worker, Impact.com), the code now waits for you: list it, create it in your discount engine, and confirm it. The creator is told their code only then, so nobody shares a code that fails at checkout.

Added

POST /v1/codes/{code}/confirm: say a pending code now exists at your checkout. It goes live, earlier orders on it are credited, and its creator is told. Needs codes:read.

Added

GET /v1/codes?status=pending lists the codes waiting for you. status also takes active, disabled and failed.

Changed

A real order reported with a pending code confirms it.

Fixed

The docs said a pending code was being set up and should not be offered. It is waiting for you to create it.

What to change

If you mirror codes, list ?status=pending as well as active, and confirm each code after creating it.

10 November 2026

v1.3

Cloudflare, Impact.com and AI assistants

Two new ways for sales to reach Trendly. Brands on Cloudflare can deploy a Worker that tracks creator links and reports each conversion to POST /v1/orders. Brands whose affiliate program runs on Impact.com can add Trendly as a partner, and Trendly reads the sales itself.

The MCP server at https://mcp.trendly.com.sa now has its own guide, with setup steps for Claude, ChatGPT, Codex, Claude Code, Cursor and VS Code.

We also went through the Sales API pages against the API as it runs today and fixed what had drifted.

Added

Cloudflare Worker guide, with worker.js and wrangler.toml to copy or download. The Worker sets a trendly_ref cookie from ?trendly=CODE links and relays conversions with retries.

Added

Impact.com as a sales source, connected by Trendly staff. Actions are matched on SubId1 (the creator's link), then PromoCode, every 15 minutes.

Added

Impact actions in USD convert into a SAR program at the riyal's fixed rate of 3.75, keeping the original dollar amounts on the order.

Added

A program can pay a different commission on a new customer's sale. It applies to orders sent with is_new_customer true, and to Impact actions whose CustomerStatus is New.

Added

MCP connector guide at /developers/mcp: OAuth sign-in, client setup, example prompts and troubleshooting.

Fixed

Docs no longer describe PUT /v1/affiliates/{id}/code, a provisioning URL or a codes:write scope. None of them exist. Keys have four scopes: orders:write, orders:read, codes:read, program:read.

Fixed

Responses identify a creator by attribution.membership_id, a UUID. The docs no longer mention affiliate ids.

Fixed

Documented how a call picks its program: a pinned key, then program_id, ?program= or X-Trendly-Program, then the account's only program.

Fixed

The error table now lists the real error codes, including program_required, no_program, missing_credentials, invalid_token, revoked_token, expired_token and currency_mismatch.

21 September 2026

v1.2

Codes from your own coupon engine

You can keep your own coupon engine. Create a creator's code there, then register it against the creator in the Trendly dashboard. Orders that already used the code are credited to them when you do.

A code that is replaced is disabled, not deleted. Orders stay attached to the code that brought them in, so replacing a code today does not change what last month earned.

Added

Register a code made in your own engine against a creator, from the dashboard.

Added

Reissue a creator's code from the dashboard. The old code is disabled and stays on record.

Changed

GET /v1/codes returns disabled codes as well as active ones, each with its status.

What to change

If you mirror GET /v1/codes into your engine, read each code's status and switch off the ones marked disabled.

18 September 2026

v1.1

Test orders are stored and visible

Orders reported with a test key used to be validated, priced, and discarded. They are now recorded and appear in Trendly marked as test, so you can send an order and go look at it.

Test data is excluded from the program’s figures and from every payout. A brand can clear it at any time from Developers.

Changed

POST /v1/orders with a test key now returns recorded: true. It previously returned false.

Added

Orders carry is_test. Live figures and payouts ignore anything marked test.

What to change

If you branch on `recorded` to decide whether a test call worked, switch to the HTTP status. `recorded` now means the same thing in both environments.

18 September 2026

v1.1

Replay a request from the dashboard

Any order report in the request log can be sent again from Trendly, using the key that made it. The replay is a new entry that points back at the original, so a failure and its fix both stay in the history.

Added

Replay for POST /v1/orders and POST /v1/orders/batch.

18 September 2026

v1.1

Programs publish their hold period and minimum payout

GET /public/affiliate/{slug} now returns hold_period_days and min_payout_amount. Both are part of the offer a creator accepts, and leaving them out meant nobody could explain why a small balance had not been paid.

Added

hold_period_days and min_payout_amount on the public program endpoint.

15 September 2026

v1.0

Partner API v1

Report affiliate orders to Trendly with one call. Read the codes attached to a program, validate one at checkout, and read your own request history.

Money is a decimal string. Writes are idempotent on your order id.

Added

POST /v1/orders, POST /v1/orders/batch, GET /v1/orders/{id}

Added

GET /v1/codes, GET /v1/codes/{code}, POST /v1/codes/validate

Added

GET /v1/ping, GET /v1/events, GET /v1/openapi.json

Watching for changes

The OpenAPI document is versioned alongside the API. Diff it in your own CI and you will see additive changes before you read about them here.

Open the spec