# Canonical source of truth for the Access Loyalty Points API. # Other copies (burn-specifications, client-documentation) must point here and # must not diverge from this file. # # program-key is documented on balance and holds. Access does not send it until # PD-7890 and PD-7891 are shipped. Servers must not require it until then. # # V1 authentication is HMAC-SHA256 request signing (Stripe-style, per program). # Canonical algorithm, headers, 401 behavior, and rotation live in # `burn-specifications/hmac-sha256-request-signing.md`, mirrored at the skill's # `references/hmac-signing-spec.md`. This file is the contract-level source of # truth for schemas, headers, and error codes. openapi: 3.0.0 info: title: Access Loyalty Points API version: 1.1.0 description: | This OpenAPI specification defines the RESTful API endpoints that clients must expose on their servers to enable loyalty points redemption integration with the Access Travel Platform. The API allows Access to perform operations such as retrieving member points balances, creating holds on points, redeeming points for transactions, refunding points, and canceling holds. All endpoints are authenticated via HMAC-SHA256 request signing over TLS 1.2 or 1.3. The application that receives a request must verify the HMAC-SHA256 signature before any business logic runs. See `references/hmac-signing-spec.md` for the canonical algorithm, headers, replay window, 401 behavior, and rotation procedure. Key principles: - **Authentication**: Every request from Access carries `X-Access-Key-Id` (the per-program key identifier) and `X-Access-Signature` (a timestamp-prefixed HMAC-SHA256 v1 signature). The signature is computed over the canonical string `{t}.{METHOD}.{path_and_query}.{sha256_hex(raw_body)}`. - **TLS**: HTTPS only. TLS 1.2 minimum, TLS 1.3 preferred. Access will negotiate either. - **Idempotency**: Mutating operations (POST) require an `Idempotency-Key` header chosen by Access per logical operation and reused unchanged across any retries of that same operation. Clients must store keys and return the cached response for any retry that matches a previously processed key. This follows the [Stripe idempotency convention](https://docs.stripe.com/api/idempotent_requests). Do not persist `Idempotency-Key` for a 401 - a later correctly-signed retry must execute. - **Replay protection**: The verifier must reject requests whose `t=` timestamp is more than 300 seconds away from the verifier's UTC clock. The 300-second window matches the 5-minute hold window. - **Headers**: All requests include `X-Request-Timestamp` in ISO 8601 format (e.g., 2026-08-21T12:00:00Z) in UTC, for tracking request time and detecting latency - **not** the HMAC clock. The HMAC clock is the integer `t` inside `X-Access-Signature`. An optional `X-Request-ID` may be included for end-to-end correlation/audit. Responses include `X-Response-Timestamp` in ISO 8601 format, generated by the server. - **Error Handling**: Use standard HTTP status codes. Each operation defines its own set of declared responses (see [Error response schema](#error-response-schema) below for the per-operation status table). 401 `AUTHENTICATION_FAILED` applies to all operations for missing/invalid HMAC signatures. Error responses should include a JSON body with `error_code` and `message`. - **Versioning**: All endpoints are prefixed with `/v1` for versioning. Future versions (e.g., /v2) can be supported alongside for migration. Minor patches address vulnerabilities; major versions add features. - **Currency**: All monetary values are in USD. - **Points Valuation**: Clients provide the points-to-USD conversion rate in balance responses. - **Member Identification**: Uses `member_key` from the Access Travel SDK. - **Data Precision**: Points are integers (no fractions). USD values use strings for precision (e.g., "0.01") to avoid floating-point issues, following best practices for financial APIs. - **Program Key**: A planned optional `program-key` header on the balance and holds endpoints will identify which loyalty program to operate on when a single API server handles multiple program instances with Access. It is not planned for the redemption, refund, or cancel endpoints because those reference existing holds or transactions that already encode the program context. It is documented here so multi-program clients can design for it, and would become relevant when a client maintains multiple programs with Access, which typically happens when: - A client has multiple subscription tiers with different product access (e.g., one program for hotels-only, another for hotels + theme parks) - A client operates multiple brands or divisions that are billed independently by Access - A single API server handles loyalty points for multiple Access programs **Access does not currently send this header.** Shipping it is tracked by PD-7890 and PD-7891. Until those are in production, your server MUST NOT require it and MUST NOT reject a request that omits it. Read it if present; otherwise fall back to your single configured program. Confirm with your Access Implementation Manager before building any behavior that depends on it. This specification is designed to be used for generating server stubs in various languages or for manual implementation. The Access Loyalty Points SDK abstracts much of this, but clients can opt to build directly from this spec. servers: - url: https://{client-domain}/api description: Client's API base URL (replace {client-domain} with your actual domain) paths: /v1/loyalty/balance: get: summary: Retrieve Member's Loyalty Points Balance description: | Fetches the current available points balance for a member, including the points-to-USD valuation and any maximum redemption limits. This is called at session start, during browsing, and before transactions to ensure real-time accuracy. - Authentication: Verify the HMAC-SHA256 signature in `X-Access-Signature` against the per-program secret identified by `X-Access-Key-Id` before processing this request. See the spec for the algorithm and reproduction tests. - Correlation: An optional `X-Request-ID` may be passed for end-to-end audit/correlation; this is a read operation and not mutating, so no idempotency key is required. - Caching: Clients may cache balances internally but should always query the latest from their loyalty system. parameters: - name: member_key in: query required: true schema: type: string description: Globally unique member identifier from the Access Travel SDK. - name: program-key in: header required: false schema: type: string description: | Planned header identifying which loyalty program to operate on, for clients that maintain multiple program instances with Access (e.g., different subscription tiers or brands billed independently). Not needed for single-program clients. NOT CURRENTLY SENT BY ACCESS (tracked by PD-7890 and PD-7891). Do not require it and do not reject requests that omit it. Read it if present; otherwise fall back to your single configured program. - name: X-Request-ID in: header required: false schema: type: string description: Optional correlation/audit identifier, propagated through the call chain. - name: X-Request-Timestamp in: header required: true schema: type: string format: date-time description: ISO 8601 timestamp of the request in UTC (e.g., 2026-08-21T12:00:00Z), provided by Access. Used for logging and latency; not the HMAC clock. - name: X-Access-Key-Id in: header required: true schema: type: string description: | Opaque per-program key identifier (e.g., `hmac_key_1`). Selects which HMAC secret the verifier must use to validate `X-Access-Signature`. Public value, sent in clear. During rotation the verifier may hold two secrets; try only the secret named here. - name: X-Access-Signature in: header required: true schema: type: string pattern: '^t=\d+,v1=[0-9a-f]{64}(?:,.*)?$' description: | HMAC-SHA256 signature header, format `t=,v1=<64-hex-chars>`. `t` is Unix epoch seconds (integer, no millis). `v1` is the lowercase hex of `HMAC-SHA256(utf8(secret), utf8(canonical_string))`. The canonical string is `{t}.{METHOD}.{path_and_query}.{sha256_hex(raw_body)}` with the path-and-query as it appeared on the wire (RFC 3986 encoded). For GET, the body is empty and `sha256_hex("") = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`. Unknown additional elements in this header may be ignored for forward compatibility. security: - AccessHmac: [] responses: "200": description: Successful response with balance details. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/BalanceResponse" examples: example: value: member_key: "abc123" available_points: 250000 loyalty_point_to_usd_exchange_rate: "0.01" max_redemption_usd: "2500.00" timestamp: "2026-08-21T12:00:00Z" "400": description: Bad request (e.g., invalid member_key). headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "401": description: HMAC signature verification failed (missing/malformed headers, stale timestamp, unknown key id, signature mismatch). headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" examples: unauthenticated: value: error_code: "AUTHENTICATION_FAILED" message: "Invalid or missing request signature" "404": description: Member not found. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "500": description: Internal server error. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /v1/loyalty/holds: post: summary: Create a Point Hold description: | Reserves a specified number of points for a member to prevent double-spending during checkout. The hold has a duration after which it auto-expires if not redeemed or canceled. - Authentication: Verify the HMAC-SHA256 signature in `X-Access-Signature` before processing. Reject with 401 `AUTHENTICATION_FAILED` (do not persist the `Idempotency-Key`) if verification fails. - Idempotency: Check the `Idempotency-Key` against storage to avoid duplicates. Process only if unique. - Atomicity: Implement as an atomic operation in your loyalty system (e.g., using database transactions) to check balance and reserve points. - Auto-Expiration: Clients should handle hold expirations internally (e.g., via timers or scheduled jobs) to release points. parameters: - name: Idempotency-Key in: header required: true schema: type: string description: Idempotency key provided by Access; stable across retries of the same logical operation. - name: program-key in: header required: false schema: type: string description: | Planned header identifying which loyalty program to operate on, for clients that maintain multiple program instances with Access (e.g., different subscription tiers or brands billed independently). Not needed for single-program clients. NOT CURRENTLY SENT BY ACCESS (tracked by PD-7890 and PD-7891). Do not require it and do not reject requests that omit it. Read it if present; otherwise fall back to your single configured program. - name: X-Request-ID in: header required: false schema: type: string description: Optional correlation/audit identifier, propagated through the call chain. - name: X-Request-Timestamp in: header required: true schema: type: string format: date-time description: ISO 8601 timestamp of the request in UTC (e.g., 2026-08-21T12:00:00Z), provided by Access. Used for logging and latency; not the HMAC clock. - name: X-Access-Key-Id in: header required: true schema: type: string description: Opaque per-program HMAC key identifier. - name: X-Access-Signature in: header required: true schema: type: string pattern: '^t=\d+,v1=[0-9a-f]{64}(?:,.*)?$' description: HMAC-SHA256 signature header, format `t=,v1=<64-hex-chars>`. Hashes the canonical signing string `{t}.{METHOD}.{path_and_query}.{sha256_hex(raw_body)}`. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateHoldRequest" examples: example: value: member_key: "abc123" points_requested: 10000 hold_duration_minutes: 5 transaction_description: "Hotel booking hold" security: - AccessHmac: [] responses: "201": description: Hold created successfully. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/CreateHoldResponse" examples: example: value: hold_id: "hold-12345" idempotency_key: "ref-abc" points_held: 10000 expires_at: "2026-08-21T12:05:00Z" status: "ACTIVE" timestamp: "2026-08-21T12:00:00Z" "400": description: Bad request (e.g., invalid points_requested). headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "401": description: HMAC signature verification failed (missing/malformed headers, stale timestamp, unknown key id, signature mismatch). headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" examples: unauthenticated: value: error_code: "AUTHENTICATION_FAILED" message: "Invalid or missing request signature" "409": description: Conflict (e.g., insufficient points). headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "500": description: Internal server error. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /v1/loyalty/redemptions: post: summary: Redeem Points description: | Deducts held points for a completed transaction (e.g., hotel booking). Typically follows a successful hold. - Authentication: Verify the HMAC-SHA256 signature in `X-Access-Signature` before processing. - Idempotency: Use `Idempotency-Key` to ensure single processing. - Atomicity: Deduct points atomically, update ledger. - Validation: Verify the hold_id is active and matches the points_to_redeem. parameters: - name: Idempotency-Key in: header required: true schema: type: string description: Idempotency key provided by Access; stable across retries of the same logical operation. - name: X-Request-ID in: header required: false schema: type: string description: Optional correlation/audit identifier, propagated through the call chain. - name: X-Request-Timestamp in: header required: true schema: type: string format: date-time description: ISO 8601 timestamp of the request in UTC (e.g., 2026-08-21T12:00:00Z), provided by Access. Used for logging and latency; not the HMAC clock. - name: X-Access-Key-Id in: header required: true schema: type: string description: Opaque per-program HMAC key identifier. - name: X-Access-Signature in: header required: true schema: type: string pattern: '^t=\d+,v1=[0-9a-f]{64}(?:,.*)?$' description: HMAC-SHA256 signature header, format `t=,v1=<64-hex-chars>`. Hashes the canonical signing string `{t}.{METHOD}.{path_and_query}.{sha256_hex(raw_body)}`. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RedeemRequest" examples: example: value: hold_id: "hold-12345" member_key: "abc123" points_to_redeem: 10000 transaction_details: transaction_id: "txn-98765" type: "HOTEL_BOOKING" description: "Booking for Example Hotel" supplier_confirmation: "CONF-123" usd_value: "100.00" security: - AccessHmac: [] responses: "200": description: Points redeemed successfully. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/RedeemResponse" examples: example: value: status: "SUCCESS" transaction_id: "txn-98765" hold_id: "hold-12345" points_redeemed: 10000 new_balance: 240000 timestamp: "2026-08-21T12:00:00Z" idempotency_key: "ref-abc" "400": description: Bad request. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "401": description: HMAC signature verification failed. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" examples: unauthenticated: value: error_code: "AUTHENTICATION_FAILED" message: "Invalid or missing request signature" "409": description: Conflict (e.g., hold expired or insufficient points). headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "500": description: Internal server error. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /v1/loyalty/refunds: post: summary: Refund Points description: | Credits points back to a member for a canceled or refunded transaction. - Authentication: Verify the HMAC-SHA256 signature in `X-Access-Signature` before processing. - Idempotency: Use `Idempotency-Key`. - Validation: Check original_transaction_id exists and refund is valid. parameters: - name: Idempotency-Key in: header required: true schema: type: string description: Idempotency key provided by Access; stable across retries of the same logical operation. - name: X-Request-ID in: header required: false schema: type: string description: Optional correlation/audit identifier, propagated through the call chain. - name: X-Request-Timestamp in: header required: true schema: type: string format: date-time description: ISO 8601 timestamp of the request in UTC (e.g., 2026-08-21T12:00:00Z), provided by Access. Used for logging and latency; not the HMAC clock. - name: X-Access-Key-Id in: header required: true schema: type: string description: Opaque per-program HMAC key identifier. - name: X-Access-Signature in: header required: true schema: type: string pattern: '^t=\d+,v1=[0-9a-f]{64}(?:,.*)?$' description: HMAC-SHA256 signature header, format `t=,v1=<64-hex-chars>`. Hashes the canonical signing string `{t}.{METHOD}.{path_and_query}.{sha256_hex(raw_body)}`. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RefundRequest" examples: example: value: original_transaction_id: "txn-98765" refund_points: 10000 reason: "Booking canceled" security: - AccessHmac: [] responses: "200": description: Points refunded successfully. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/RefundResponse" examples: example: value: status: "REFUNDED" refund_id: "REF-2026-11223" original_transaction_id: "txn-98765" points_refunded: 10000 new_balance: 250000 timestamp: "2026-08-21T12:00:00Z" idempotency_key: "ref-abc" "400": description: Bad request. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "401": description: HMAC signature verification failed. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" examples: unauthenticated: value: error_code: "AUTHENTICATION_FAILED" message: "Invalid or missing request signature" "409": description: Conflict (e.g., already refunded). headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "500": description: Internal server error. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /v1/loyalty/holds/{hold_id}/cancel: post: summary: Cancel a Point Hold description: | Releases a held points reservation if not yet redeemed. - Authentication: Verify the HMAC-SHA256 signature in `X-Access-Signature` before processing. - Idempotency: Use `Idempotency-Key`. - Validation: Check hold_id is active. parameters: - name: hold_id in: path required: true schema: type: string description: Unique identifier for the hold to cancel. - name: Idempotency-Key in: header required: true schema: type: string description: Idempotency key provided by Access; stable across retries of the same logical operation. - name: X-Request-ID in: header required: false schema: type: string description: Optional correlation/audit identifier, propagated through the call chain. - name: X-Request-Timestamp in: header required: true schema: type: string format: date-time description: ISO 8601 timestamp of the request in UTC (e.g., 2026-08-21T12:00:00Z), provided by Access. Used for logging and latency; not the HMAC clock. - name: X-Access-Key-Id in: header required: true schema: type: string description: Opaque per-program HMAC key identifier. - name: X-Access-Signature in: header required: true schema: type: string pattern: '^t=\d+,v1=[0-9a-f]{64}(?:,.*)?$' description: HMAC-SHA256 signature header, format `t=,v1=<64-hex-chars>`. Hashes the canonical signing string `{t}.{METHOD}.{path_and_query}.{sha256_hex(raw_body)}`. requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/CancelHoldRequest" examples: example: value: reason: "User abandoned checkout" security: - AccessHmac: [] responses: "200": description: Hold canceled successfully. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/CancelHoldResponse" examples: example: value: status: "CANCELLED" timestamp: "2026-08-21T12:00:00Z" idempotency_key: "ref-abc" "400": description: Bad request. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "401": description: HMAC signature verification failed. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" examples: unauthenticated: value: error_code: "AUTHENTICATION_FAILED" message: "Invalid or missing request signature" "404": description: Hold not found. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "409": description: Conflict (e.g., hold already expired or redeemed). headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "500": description: Internal server error. headers: X-Response-Timestamp: schema: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" components: securitySchemes: AccessHmac: type: apiKey in: header name: X-Access-Signature description: | HMAC-SHA256 request signing. The request must carry both `X-Access-Key-Id` (the per-program key identifier) and `X-Access-Signature` (the timestamp-prefixed HMAC-SHA256 v1 signature). Servers must verify the signature before any business logic runs. The signature is `v1 = lowercase_hex(HMAC-SHA256(utf8(secret), utf8(canonical_string)))` where `canonical_string = "{t}.{METHOD}.{path_and_query}.{sha256_hex(raw_body)}"`, `t` is the Unix epoch seconds inside `X-Access-Signature`, `path_and_query` is the exact origin-form request target OkHttp sent (RFC 3986 encoded), and `raw_body` is the exact bytes transmitted (empty for GET). Replay protection: reject requests whose `t` is more than 300 seconds from the server's UTC clock. Comparison must be constant-time. Return 401 with `error_code = AUTHENTICATION_FAILED` on any verification failure; do not persist `Idempotency-Key` for 401 responses; do not distinguish failure modes in the body. See `references/hmac-signing-spec.md` (a copy of the canonical spec at `burn-specifications/hmac-sha256-request-signing.md`) for the algorithm, the fixture secret, and reproducible test vectors. schemas: BalanceResponse: type: object required: - member_key - available_points - loyalty_point_to_usd_exchange_rate - timestamp properties: member_key: type: string description: Globally unique member identifier from the Access Travel SDK. available_points: type: integer description: Available points balance for the member at the time of the request. loyalty_point_to_usd_exchange_rate: type: string pattern: '^\d+\.\d{2}$' description: Value of one point in USD (e.g., "0.01"). Exchange rate used to convert loyalty points to USD. max_redemption_usd: type: string pattern: '^\d+\.\d{2}$' description: Optional maximum USD amount redeemable in a single transaction. timestamp: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. CreateHoldRequest: type: object required: - member_key - points_requested - hold_duration_minutes - transaction_description properties: member_key: type: string description: Globally unique member identifier from the Access Travel SDK. points_requested: type: integer minimum: 1 maximum: 1000000 description: Number of points to reserve. hold_duration_minutes: type: integer description: Duration in minutes before the client should auto-cancel an unredeemed hold. Access standard is 5 minutes. transaction_description: type: string maxLength: 255 description: Description of the intended transaction. CreateHoldResponse: type: object required: - hold_id - points_held - expires_at - status - timestamp - idempotency_key properties: hold_id: type: string description: Unique identifier for the hold. idempotency_key: type: string description: Echo of the `Idempotency-Key` request header. points_held: type: integer description: Number of points reserved in this hold. expires_at: type: string format: date-time description: ISO 8601 timestamp when the hold expires. status: type: string enum: [ACTIVE, EXPIRED, CANCELLED, REDEEMED] description: ACTIVE = hold is in place and points are reserved. EXPIRED = auto-released after duration. CANCELLED = explicitly cancelled. REDEEMED = converted to a redemption transaction. timestamp: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. RedeemRequest: type: object required: - hold_id - member_key - points_to_redeem - transaction_details properties: hold_id: type: string description: The hold_id returned by the Create Hold endpoint. member_key: type: string description: Globally unique member identifier from the Access Travel SDK. points_to_redeem: type: integer minimum: 1 maximum: 1000000 description: Number of points to deduct from the hold. transaction_details: type: object description: Contextual metadata about the transaction. required: - transaction_id - type - description - usd_value properties: transaction_id: type: string description: Access-generated transaction correlation ID. type: type: string enum: [HOTEL_BOOKING, THEME_PARK_BOOKING, ATTRACTION_BOOKING, ACTIVITY_BOOKING, CAR_BOOKING, GIFT_CARD_BOOKING, OTHER_BOOKING] description: | Type of transaction. OTHER_BOOKING is the fallback for a missing or unrecognized product family — servers must accept it and must not reject the redemption because of it. description: type: string maxLength: 255 description: Human-readable transaction description. supplier_confirmation: type: string description: Supplier booking confirmation or order ID (e.g., hotel confirmation number). Optional but recommended for refund reconciliation. usd_value: type: string pattern: '^\d+\.\d{2}$' description: USD value of the points redeemed. RedeemResponse: type: object required: - status - transaction_id - hold_id - points_redeemed - timestamp - idempotency_key properties: status: type: string enum: [SUCCESS, FAILED] description: SUCCESS = points deducted and transaction recorded. FAILED = redemption could not be completed. transaction_id: type: string description: Echo of the transaction_id from RedeemRequest.transaction_details. hold_id: type: string description: Echo of the hold_id from the request. points_redeemed: type: integer description: Actual points deducted. new_balance: type: integer description: Member's available points after redemption. timestamp: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. idempotency_key: type: string description: Echo of the `Idempotency-Key` request header. RefundRequest: type: object required: - original_transaction_id - refund_points - reason properties: original_transaction_id: type: string description: The transaction_id returned by the Redeem endpoint for the original redemption. refund_points: type: integer minimum: 1 maximum: 1000000 description: Number of points to credit back to the member. reason: type: string maxLength: 255 description: Human-readable reason for the refund (e.g., 'Booking cancelled'). RefundResponse: type: object required: - status - original_transaction_id - points_refunded - timestamp - idempotency_key properties: status: type: string enum: [REFUNDED, FAILED] description: REFUNDED = points credited successfully. FAILED = refund could not be processed. refund_id: type: string description: Unique ID for the refund. original_transaction_id: type: string description: Echo of the `original_transaction_id` from the request body; aids log/audit correlation. points_refunded: type: integer description: Actual points credited back. new_balance: type: integer description: Member's available points after refund. timestamp: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. idempotency_key: type: string description: Echo of the `Idempotency-Key` request header. CancelHoldRequest: type: object properties: reason: type: string maxLength: 255 description: Optional reason for cancellation. CancelHoldResponse: type: object required: - status - timestamp - idempotency_key properties: status: type: string enum: [CANCELLED, FAILED] description: CANCELLED = hold released successfully. FAILED = hold could not be cancelled (e.g., already redeemed). timestamp: type: string format: date-time description: ISO 8601 timestamp of the response generation in UTC. idempotency_key: type: string description: Echo of the `Idempotency-Key` request header. ErrorResponse: type: object required: - error_code - message properties: error_code: type: string enum: - INSUFFICIENT_POINTS - HOLD_NOT_FOUND - ERROR - INVALID_REQUEST - ALREADY_PROCESSED - MEMBER_NOT_FOUND - AUTHENTICATION_FAILED description: Machine-readable error code. `AUTHENTICATION_FAILED` is returned for any HMAC signature verification failure (missing/malformed headers, stale timestamp, unknown key id, signature mismatch) with the same body in all cases. message: type: string description: Human-readable error message. details: type: object additionalProperties: true description: Optional additional details.