BorrouPartner APISandboxDraft

Draft documentation for partners integrating against the sandbox. It can change before /v1 is published; the contract, openapi.yaml, is the reference.

Overview / Guides / Reference

Versioning and deprecation

v0.1 draftWhat changes inside /v1, what counts as breaking, and how a deprecation is announced.

The version in the path

Every operation is under /v1. A breaking change ships under a new path version (/v2), never inside /v1. Additive changes ship inside /v1 at any time.

The OpenAPI document carries its own version (info.version): its major number follows the path version, its minor number rises with each additive change, its patch number with corrections to the document alone.

Every webhook event and every event in the feed carries api_version (v1 today). A breaking change to an event's payload ships as a new api_version that a subscription chooses, never inside v1.

Additive changes: no notice needed

These can appear in /v1 at any time, and an integration must tolerate them:

  • a new endpoint, or a new optional query parameter;
  • a new optional field in a request body (bodies are strict: a field Borrou does not know is refused, so a new field is never one you were already sending);
  • a new field in a response or an event's data;
  • a new value of an enumeration Borrou returns: a status, a next_action code, a reason code, an error code, an event type;
  • a new scope, granted when the endpoint that needs it ships;
  • a new response header, and a second v1 entry in Borrou-Signature (verifiers accept any one that matches);
  • a higher rate limit, a longer token lifetime within its documented range (60 to 3,600 seconds), a longer retention.

So, in your integration:

  • ignore response fields and event fields you do not know;
  • handle an unknown enumeration value: an unknown error code by its HTTP status, an unknown event type by ignoring it (a webhook subscription receives only the types it lists, but GET /v1/events without types returns every type), an unknown status or next_action by logging it and waiting for the next change;
  • never depend on the order of fields in JSON, or on the exact wording of message.

Breaking changes

These never happen inside /v1 (or inside an event's api_version):

  • removing or renaming an endpoint, a field, an enumeration value, an error code, an event type or a scope;
  • changing a field's type, format, unit, precision or meaning (amounts stay decimal strings: USDT to 6 decimals, BTC to 8, rates and ratios in integer basis points);
  • making an optional request field required, or adding a required one;
  • refusing a request that /v1 accepts today, other than a bug or security fix (below);
  • answering an existing situation with another HTTP status or error code, or storing under the Idempotency-Key a refusal that is not stored today (or the reverse);
  • requiring a different scope for an existing endpoint;
  • changing how pagination, cursors, ordering, idempotency, authentication or signatures work, or a default (a page size, a tolerance);
  • lowering a rate limit or a retention below what is documented.

Deprecation

When a part of /v1 is to go away:

  1. Announcement. An entry in the changelog (Changelog) and an email to each partner's technical contact, naming what goes, what replaces it and the sunset date.
  2. Headers. From the announcement, every response of a deprecated operation carries:
    • Deprecation: @<unix seconds> (RFC 9745), the time it was deprecated;
    • Sunset: <HTTP date> (RFC 8594), the earliest time it stops working;
    • Link: <changelog entry>; rel="deprecation".

A deprecated field or event type is announced the same way; where no response can carry the headers, the changelog and the email do.

  1. Notice. At least six months between the announcement and the sunset date. A replacement (a new endpoint, or /v2) is available on the sandbox before the announcement and in live no later than it.
  2. Sunset. After the sunset date the operation answers 410 Gone with an error code added to the catalogue when the first sunset is scheduled. A /v1 that has been replaced by /v2 keeps working for at least six months after /v2 is available in live.

Not built yet: nothing is deprecated today, so no response carries these headers. The service adds them to an operation when its deprecation is announced.

Exceptions

  • Security. A change that closes a security hole can ship with less notice, or none, and is announced as soon as it ships.
  • Law and regulation. A change a regulator or the law requires ships when it must, announced as early as possible.
  • Bugs. Behaviour that contradicts the documentation is a bug, and fixing it is not a breaking change. Where partners may depend on it, the fix is announced in the changelog first.

The sandbox first

Every change reaches the sandbox before live: an additive change at least two weeks before, a new version for its whole deprecation window. The sandbox simulators (/v1/sandbox) are sandbox tools, not part of the live contract: they follow this policy, with at least 30 days' notice for a breaking change instead of six months.

The changelog

Changelog lists every change to the API, the events and the sandbox, newest first, each dated and marked additive, deprecation, breaking (a new version), security or fix, with what a partner has to do, if anything.