Skip to main content
POST
Calculate loyalty basket

Authorizations

OnlinePOS-Signature
string
header
required

HMAC-SHA256 request signature: t=<unix seconds>,v1=<hex> where v1 = HMAC_SHA256(secret, "<t>.<raw body>"). Timestamp window ±300 s. One secret per environment. No scheduled rotation; when a secret is swapped, old and new stay active with an overlap so nothing is interrupted. See Configuration and security.

Headers

Idempotency-Key
string<uuid>
required

The calculationId. Same key with the same body replays the stored response; same key with a different body is rejected with 409.

X-Request-Id
string<uuid>

Fresh UUID per HTTP attempt, echoed in the response for log correlation.

Body

application/json
calculationId
string<uuid>
required

GUID generated by POS/mPOS for this calculation. Also sent as Idempotency-Key and stored on the transaction.

Example:

"6f1d2c3e-8a4b-4c5d-9e0f-1a2b3c4d5e6f"

loyaltyId
string
required

Opaque REKOM member identifier as returned by Nexi Engage (getasset / Softpay). Contains no PII. Exact format pending Nexi confirmation; treat as an opaque string.

Required string length: 1 - 64
Example:

"rk_8f2a1c9d4b7e"

currency
string
required

ISO 4217 currency code.

Pattern: ^[A-Z]{3}$
Examples:

"DKK"

"NOK"

"SEK"

"EUR"

requestedAt
string<date-time>
required

POS time of the request, RFC 3339 with offset.

Example:

"2026-10-08T21:14:03+02:00"

context
object
required

Where the basket is being sold. Field meanings mirror the OnlinePOS REST transaction API so reconciliation is a join. baxId and cashRegisterId are required so REKOM can attribute every order to a venue and a till (agreed after 7 Oct 2026).

lines
object[]
required
Required array length: 1 - 200 elements
orderDiscounts
object[]
required

Order-level discounts already applied by staff. Empty when none.

totals
object
required

Basket totals in minor units. Identities: total = Σ orderLinePrice, loyaltyDiscountTotal = Σ lineDiscountAmount, total ≥ 0.

supersedesCalculationId
string<uuid>

Set when the basket changed after an earlier calculation; REKOM releases anything reserved for that GUID.

Example:

"6f1d2c3e-8a4b-4c5d-9e0f-1a2b3c4d5e6f"

Response

Calculation result. The status field says whether the basket changed.

Result of a calculation. status decides which fields are present:

  • applied: lines (kept lines echoed, untouched ones with lineDiscountType: none; removed lines omitted; split and added lines marked), orderDiscounts (staff ones echoed, loyalty ones added) and totals. The basket differs from the request in at least one way.
  • unchanged: reason; no lines, no totals.
  • member_not_found: nothing else.
calculationId
string<uuid>
required

Lower-case UUID with hyphens (36 characters).

Example:

"6f1d2c3e-8a4b-4c5d-9e0f-1a2b3c4d5e6f"

status
enum<string>
required
Available options:
applied,
unchanged,
member_not_found
reason
enum<string>

Present when status is unchanged. Informational; never shown to the guest. New values may be added.

Available options:
no_applicable_benefits,
all_lines_excluded,
member_inactive,
basket_too_small
memberLabel
string

Optional label OnlinePOS may print on the receipt if it has a place for it.

Maximum string length: 40
Example:

"REKOM Member"

Optional free text for the bottom of the receipt describing order-level benefits. Informational; not in reporting.

Maximum string length: 200
Example:

"Member benefits today: -26,00 kr."

lines
object[]

Present only when status is applied. The full basket after loyalty, including added and split lines and without removed ones.

orderDiscounts
object[]

Present only when status is applied. Existing order discounts as kept or changed by REKOM, plus any REKOM added.

totals
object

Basket totals in minor units. Identities: total = Σ orderLinePrice, loyaltyDiscountTotal = Σ lineDiscountAmount, total ≥ 0.