Confirm a loyalty-points contribution
Confirms a loyalty-points contribution after you have successfully deducted the customer’s
points. Idempotency-Key is required.
Identities
partner_event_idis the contribution uniqueness and recovery key.partner_order_refis the stable non-PII order correlation. Only one confirmed contribution is allowed per partner, environment, and order.calculation_idis optional. A missing or invalid value must not fail an otherwise valid contribution.
Idempotency
- The same
partner_event_idorIdempotency-Keywith the same payload returns the original result. A conflicting payload returns a conflict. - After a timeout, retry the same request. Do not create a second contribution for the same order.
Points and statuses
pointsmust be a positive whole number (minimum1). Invalid shape returnsinvalid_point_amountand does not persist a contribution.- Statuses are
pending(exceptional, non-final),confirmed(terminal, non-refundable), andfailed(terminal).confirmedandfaileddo not interchange. - Restore points only after a terminal
failedresult. Do not restore points forpending, timeout, unknown result, orcontribution_not_found. - Recover by
partner_event_id. See Errors & Recovery.
Association failure is non-fatal: the contribution remains confirmed.
Authorizations
Canonical server-to-server API key header name: X-API-Key.
Partner customer applications must not use this credential.
Examples must never include raw API secrets.
Headers
Transport/request idempotency key required for delivery-emissions estimate creation,
contribution confirmation, and emissions-association creation.
Same key + same canonical payload returns the original result.
Same key + conflicting canonical payload returns idempotency_conflict.
Non-PII transport idempotency key.
8 - 128^[A-Za-z0-9._:-]+$"idem_01HZX5Z9Y8X7W6V5U4T3S2R1"
Optional request correlation header. If omitted, Akhdar generates one. Every success
and error response includes X-Correlation-ID. Error payloads include correlation_id.
Non-PII request correlation identifier.
8 - 128^[A-Za-z0-9._:-]+$"corr_7c2e9b1a4d6f8e0c"
Body
Stable contribution idempotency and recovery key supplied by the partner. Distinct from partner_order_ref.
8 - 128^[A-Za-z0-9._:-]+$"evt_contrib_01HZX5A1B2C3D4E5F6G7H8J9"
Stable non-PII partner order correlation reference. Enforces one confirmed contribution per partner order within partner and environment. Must not contain direct personal data.
1 - 128^[A-Za-z0-9._:-]+$"ord_9f3c2a71"
Whole-number loyalty points contributed. Minimum valid value is 1. Zero, negative,
fractional, and malformed values return invalid_point_amount and do not persist a
contribution. Verify the customer loyalty balance before deduction. Akhdar does not
read the loyalty balance. Selected points are not linked to displayed delivery emissions.
x >= 1500
Optional emissions estimate identifier. Missing or invalid values must not invalidate an otherwise valid contribution.
8 - 128^[A-Za-z0-9._:-]+$"calc_01HZX4K9M2Q8R7N6P5T4V3W2X1"
Optional opaque partner-internal customer reference. Must not contain email, phone, full name, national identifier, or other direct personal data.
1 - 128^[A-Za-z0-9._:-]+$"cust_ref_8a1b2c3d"

