Versioning

How date-named YYYY-MM API versions work, the X-Identify-API-Version header, and how to migrate to a new version.

After this page you will know how API versions are named and selected, and how to move to a new version safely.

Prerequisites: the Production Nortly API host (https://id.nortly.app) and, for the examples, a customer token (Authentication). The snippets are TypeScript (Node.js 20 or later, or a browser); drop the types for plain JavaScript.

The version of the Identify API is part of the path:

/api/{version}/{resource}

For example POST /api/2026-07/identify, GET /api/2026-07/app and GET /api/2026-07/customer. These routes are versioned; the health check GET / is not.

Date-named versions

Versions are named YYYY-MM, after the release quarter month, in the style of Shopify's API versions. The version that is currently available is:

VersionResources
2026-07POST identify, GET app, GET customer (and the CORS preflights OPTIONS app, OPTIONS customer)

This documentation describes 2026-07.

Stability guarantees

  • An existing version never changes behaviour. Requests that work against 2026-07 today keep working against 2026-07.
  • A new version is cut only for a breaking change, such as removing or renaming a field, changing a type, or changing the meaning of a response. Only the resources that change get new behaviour; unchanged resources are available in the new version too.
  • Additive changes happen in place, without a new version. New optional request fields, new response fields and new endpoints can appear in an existing version. Write tolerant clients: ignore response fields you do not know, and do not fail on new properties.

Deprecated and removed

Endpoints and fields that are going away are announced here, before they are removed, with the date after which they stop working and what to use instead. An endpoint marked deprecated keeps working until its removal date.

EndpointDeprecated sinceRemoved onUse instead
None at the moment

The X-Identify-API-Version header

Responses from versioned routes carry the response header X-Identify-API-Version, whose value is the version that served the request:

const res = await fetch("https://id.nortly.app/api/2026-07/app", {
  headers: { Authorization: `Bearer ${customerToken}` },
});
console.log(res.status, res.headers.get("x-identify-api-version")); // 200 "2026-07"
  • The version is selected by the path, not by the header. Sending this header in a request has no effect.
  • It is present on successful responses and on errors produced by a handler (400, 401, 404 for a missing app or merchant, 503), and on OPTIONS preflights.
  • It is not present on router-level 404 answers, on 429 responses, or on GET /.
  • It is exposed to browser JavaScript through CORS on the read endpoints, so res.headers.get("x-identify-api-version") works in a fetch from the merchant's browser.

To check that your base URL and version segment are right without any credential, call a versioned route without a token. The 401 still shows which version served it:

const res = await fetch("https://id.nortly.app/api/2026-07/app");
console.log(res.status, res.headers.get("x-identify-api-version")); // 401 "2026-07"
console.log(await res.json()); // { error: "unauthorized" }

We recommend logging it next to your requests. It makes it obvious which version a failing call was served by.

unsupported_version

A path with a version that does not exist answers 404:

const res = await fetch("https://id.nortly.app/api/2025-01/app");
console.log(res.status); // 404
console.log(await res.json()); // { error: "unsupported_version", supportedVersions: ["2026-07"] }

supportedVersions lists every version you can use. The check happens before authentication, so the answer is the same with or without a token. This answer carries CORS headers but no X-Identify-API-Version. A known version with an unknown resource or method answers 404 not_found instead; see Errors.

When a new version is cut

A new YYYY-MM version is published only when a breaking change is unavoidable. It appears in supportedVersions and in this documentation. Both versions are served side by side, so you decide when to move.

How to migrate

  1. Read what changed. Compare the documentation and the API reference of the new version with the one you use. Only resources with breaking changes differ.
  2. Change the version segment in your base URL, for example from /api/2026-07/ to the new version, in your backend (POST /identify) and in your frontend (GET /app, GET /customer).
  3. Test on staging. Check the X-Identify-API-Version header of the responses to confirm which version served each call, and watch for 404 unsupported_version.
  4. Roll out the backend and the frontend with the same version. Customer tokens last 24 hours, so after the switch simply let your backend request a fresh token from the new version's POST /identify.
  5. Remove the old version from your configuration once all traffic is on the new one.

To keep a single place to change, put the version in one constant:

const IDENTIFY_VERSION = "2026-07";
const BASE = `https://id.nortly.app/api/${IDENTIFY_VERSION}`;

Next steps


Did this page help you?