Skip to content
B2B GroupPartner API

Changelog

Every change to the B2B Group Partner API, newest first. Additive changes within a version are listed under the date they were released. A change that is not additive gets a new dated version; see Versioning.

2026-10-20

Additive, within version 2026-10-01.

  • The price of the chosen gift. Every line in redemption.selection on the code object (GET /v1/codes/{code}, GET /v1/codes and the other routes that answer with the code object) and in data.selection of the webhook code.redeemed now carries unitPriceDkk (the price of one unit in DKK including VAT, as set up in your shop when the code was redeemed) and lineTotalDkk (unitPriceDkk multiplied by quantity). redemption.totalDkk on the code object and data.totalDkk in code.redeemed hold the sum over the order. The prices are frozen at redemption; a later price change in the shop does not change them. A gift without a price in your shop has no unitPriceDkk and lineTotalDkk, and an order where no gift has a price has no totalDkk. The sandbox answers the same fields, and the test event from the portal carries them too. See Codes and Webhooks.

2026-10-19

Additive, within version 2026-10-01.

  • Codes now have a tier. Every gift in your shop has a tier, and a member can use several codes together for one gift, as long as the tiers of the codes add up to at least the gift's tier. Your contact at B2B Group tells you which tier each gift has. See "Tiers" in Codes.
  • New optional field tier on POST /v1/codes/issue, top-level on POST /v1/codes/issue-batch (applies to every code in the call), and on each entry in POST /v1/codes/import. It is a whole number from 1 to 100 and defaults to 1. A value outside that range answers 400 validation_error.
  • New field tier on the code object (GET /v1/codes/{code}, GET /v1/codes, POST /v1/codes/{code}/deactivate and the sandbox routes), in the answers from POST /v1/codes/issue and POST /v1/codes/issue-batch, and in data for the webhooks code.redeemed, code.shipped and code.deactivated. GET /v1/codes/{code}/status is unchanged.
  • New error code 400 insufficient_tier: the codes used do not cover the tier of the selected gift. In the sandbox, POST /v1/sandbox/codes/{code}/redeem answers it where it used to answer validation_error. See Errors and Sandbox.
  • New optional fields email, phone and country in delivery on POST /v1/sandbox/codes/{code}/redeem. They come back in the code detail and in the code.redeemed webhook, as they will from the real shop. See Sandbox.

2026-10-18

Additive, within version 2026-10-01.

  • Client certificates (mTLS) as an optional lock per client. Register the SHA-256 fingerprints of your client certificates, and the certificate is then required on the token request and on every call; new errors 403 certificate_required and certificate_not_allowed. A token request refused by a reason without its own code answers 403 forbidden. See Client certificates (mTLS).
  • New fields failedAttempts and lastFailedAttemptAt on the code object (GET /v1/codes/{code}, GET /v1/codes and the other routes that answer with the code object): refused redemption attempts on the code, counted per code. See Codes.
  • New field fulfilledByPartner on every line in redemption.selection, in the code object and in the code.redeemed webhook: true when the item is delivered by you rather than shipped by us. See Webhooks.
  • New optional field expiresAt on POST /v1/codes/issue and, top-level, on POST /v1/codes/issue-batch (applies to every code in the call): set the expiry yourself, ISO 8601 UTC and in the future, otherwise 400 validation_error. Without it the expiry is still set from the validity agreed for the campaign or your account. The answers from both routes now also carry failedAttempts (0 on a new code). See Codes.
  • Postman collection (/docs/postman-collection.json): the token request now sends grant_type=client_credentials with client_id={{clientId}} and client_secret={{clientSecret}}, stores accessToken and accessTokenExpiresAt in the environment from the answer, every other request uses {{accessToken}}, and path variables such as {code} carry real example values. Re-import the collection to pick this up.

2026-10-08

Additive, within version 2026-10-01.

  • New field version on the code object (GET /v1/codes/{code}, GET /v1/codes, POST /v1/codes/{code}/deactivate and the sandbox routes), in the answers from POST /v1/codes/issue and POST /v1/codes/issue-batch, and in data for the webhooks code.redeemed, code.shipped and code.deactivated. It starts at 1 and increases by one every time the code changes. Ignore an event or response whose version is not higher than the one you have stored. See Codes and Webhooks.
  • A shipment now also counts as a change of the code, so a shipped code shows up in GET /v1/codes?updatedSince=.

2026-10-03

Additive, within version 2026-10-01.

  • GET /v1/codes accepts a new optional query parameter externalMemberRef: only codes registered on that reference, exact match, at most 100 characters (longer answers 400 validation_error). It combines with status, campaign, updatedSince, pageSize and cursor, and the answer has the same shape as before. Scope codes:read. See Codes.

2026-10-01

First version of the contract, X-B2B-Version: 2026-10-01.

  • Two environments with separate clients: production on https://api.b2bgroup.dk and the sandbox on https://api-sandbox.b2bgroup.dk.
  • POST /v1/oauth/token accepts the standard OAuth2 form (grant_type=client_credentials) as well as JSON. The token answer has scope as a space-separated list and environment.
  • Scopes codes:issue, codes:read, codes:manage and webhooks:manage.
  • Codes: POST /v1/codes/issue and POST /v1/codes/issue-batch answer with campaign, externalMemberRef and issuedAt. New routes GET /v1/codes/{code} (the full picture including redemption and shipment), GET /v1/codes (list with updatedSince and a cursor, for a daily pull), POST /v1/codes/import (existing codes, idempotent, 1000 per call) and POST /v1/codes/{code}/deactivate. GET /v1/codes/{code}/status is unchanged.
  • Webhooks code.redeemed, code.shipped and code.deactivated, signed with HMAC-SHA256, managed under /v1/webhook-endpoints, with secret rotation, test events, delivery attempts and retry.
  • Sandbox simulation: POST /v1/sandbox/codes/{code}/redeem and POST /v1/sandbox/orders/{orderId}/ship.
  • IP allowlist per client, checked when the token is issued and on every call (403 ip_not_allowed).
  • Rate limits: 600 requests per minute per client, 30 token requests per minute per IP address (429 rate_limited with Retry-After).
  • One error shape everywhere: { error, message, requestId }, and X-Request-Id on every response.