> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kintra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a redemption

> Returns one redemption by id with its `status`, `xp_spent`, `user_id` and `tenant_id`, plus the linked `reward`. Call it to confirm what a redemption you started with the redeem route resulted in, or while fulfilling one. Returns 404 when no redemption with that id belongs to your tenant.



## OpenAPI

````yaml /openapi/kintra-gateway.json get /gateway/redemptions/{redemption_id}
openapi: 3.0.0
info:
  description: >-
    Server-to-server API for the Kintra loyalty platform. Requests are
    authenticated with a tenant API key and a request signature; the tenant
    comes from the key.
  title: Kintra Gateway API
  version: 1.0.0
servers:
  - description: Production environment
    url: https://api.kintra.io/api/v1
security: []
paths:
  /gateway/redemptions/{redemption_id}:
    get:
      tags:
        - Redemptions
      summary: Get a redemption
      description: >-
        Returns one redemption by id with its `status`, `xp_spent`, `user_id`
        and `tenant_id`, plus the linked `reward`. Call it to confirm what a
        redemption you started with the redeem route resulted in, or while
        fulfilling one. Returns 404 when no redemption with that id belongs to
        your tenant.
      operationId: GetRedemptionById
      parameters:
        - in: path
          name: redemption_id
          required: true
          schema:
            type: string
        - description: >-
            Hex HMAC-SHA256 of the timestamp, the uppercase method, the url as
            sent and the request body, keyed by the signing secret.
          in: header
          name: X-Tenant-Signature
          required: true
          schema:
            type: string
        - description: Unix seconds. Checked before the signature.
          in: header
          name: X-Tenant-Timestamp
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_IRedemptionResponseDto_'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Internal server error
      security:
        - tenant_api_key: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: >
            # Export KINTRA_API for your environment first; the base URL is on
            the introduction page.

            KEY="YOUR_TENANT_KEY_ID"

            SECRET="YOUR_SIGNING_SECRET"


            # The signature covers the path and query exactly as sent, so both
            are split

            # off the base URL and reused for the request line below.

            API_PATH="/${KINTRA_API#*://*/}"

            API_HOST="${KINTRA_API%"$API_PATH"}"

            METHOD="GET"

            PATH_AND_QUERY="$API_PATH/gateway/redemptions/YOUR_REDEMPTION_ID"


            # No body on this method, so the signature covers an empty body
            string.

            BODY=''


            TIMESTAMP="$(date +%s)"

            SIGNATURE="$(printf '%s' "$TIMESTAMP$METHOD$PATH_AND_QUERY$BODY" \
              | openssl dgst -sha256 -hmac "$SECRET" | awk '{print $NF}')"

            curl -sS -w '\n%{http_code}' -X "$METHOD" "$API_HOST$PATH_AND_QUERY"
            \
              -H "X-Tenant-Key: $KEY" \
              -H "X-Tenant-Timestamp: $TIMESTAMP" \
              -H "X-Tenant-Signature: $SIGNATURE"
        - label: TypeScript
          lang: typescript
          source: >
            import { createHmac } from 'node:crypto'


            // Export KINTRA_API for your environment first; the base URL is on
            the introduction page.

            const { origin, pathname } = new URL(process.env.KINTRA_API ?? '')

            const key = 'YOUR_TENANT_KEY_ID'

            const secret = 'YOUR_SIGNING_SECRET'


            const method = 'GET'

            // The signature covers the path and query as sent, starting at the
            API prefix.

            const pathAndQuery =
            `${pathname}/gateway/redemptions/YOUR_REDEMPTION_ID`


            // No body on this method, so the signature covers an empty body
            string.

            const body = ''


            const timestamp = Math.floor(Date.now() / 1000).toString()

            const signature = createHmac('sha256',
            secret).update(`${timestamp}${method}${pathAndQuery}${body}`).digest('hex')


            const response = await fetch(`${origin}${pathAndQuery}`, {
              method,
              headers: {
                'X-Tenant-Key': key,
                'X-Tenant-Timestamp': timestamp,
                'X-Tenant-Signature': signature
              }
            })


            console.log(response.status, await response.json())
components:
  schemas:
    ApiResponse_IRedemptionResponseDto_:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/IRedemptionResponseDto'
        errors:
          items:
            properties:
              message:
                type: string
              path:
                type: string
            required:
              - path
              - message
            type: object
          type: array
        message:
          type: string
        success:
          type: boolean
      required:
        - success
      type: object
    ApiResponse_null_:
      additionalProperties: false
      properties:
        data:
          enum:
            - null
          nullable: true
          type: number
        errors:
          items:
            properties:
              message:
                type: string
              path:
                type: string
            required:
              - path
              - message
            type: object
          type: array
        message:
          type: string
        success:
          type: boolean
      required:
        - success
      type: object
    IRedemptionResponseDto:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          nullable: true
          type: string
        id:
          type: string
        reward:
          allOf:
            - $ref: '#/components/schemas/IRedemptionRewardBriefDto'
          description: >-
            Joined reward (id, title, description); null when the reward row is
            missing.
          nullable: true
        reward_id:
          type: string
        status:
          anyOf:
            - $ref: '#/components/schemas/RedemptionStatus'
            - type: string
        tenant:
          $ref: '#/components/schemas/ITenantBriefDto'
          description: >-
            Joined tenant (id, name, slug) — admin projections; optional
            elsewhere.
        tenant_id:
          type: string
        updated_at:
          format: date-time
          nullable: true
          type: string
        user:
          $ref: '#/components/schemas/IUserBriefDto'
          description: >-
            Joined when `include_user_brief` is requested (admin / tenant portal
            redemptions).
        user_id:
          type: string
        xp_spent:
          type: string
      required:
        - id
        - tenant_id
        - user_id
        - reward_id
        - status
      type: object
    IRedemptionRewardBriefDto:
      additionalProperties: false
      description: >-
        Joined reward summary so list/detail surfaces can show the reward name
        instead of a raw UUID.
      properties:
        description:
          nullable: true
          type: string
        id:
          type: string
        is_active:
          description: Whether the reward is currently active/redeemable.
          type: boolean
        onchain_asset:
          allOf:
            - $ref: '#/components/schemas/IRedemptionRewardOnchainAssetBriefDto'
          description: >-
            The on-chain asset the reward is denominated in (KXP, chain,
            contract).
          nullable: true
        status:
          anyOf:
            - $ref: '#/components/schemas/RewardStatus'
            - type: string
          description: >-
            Reward publish state at the time of read (`draft` / `published` /
            …).
        title:
          type: string
        xp_cost:
          description: >-
            Reward's listed XP cost as a string (signed bigint contract); the
            redemption's actual spend is `xp_spent`.
          type: string
      required:
        - id
        - title
      type: object
    RedemptionStatus:
      enum:
        - initialized
        - pending
        - succeeded
        - failed
        - canceled
      type: string
    ITenantBriefDto:
      additionalProperties: false
      description: Minimal tenant label for nested list/detail payloads (id, name, slug).
      properties:
        id:
          type: string
        name:
          type: string
        slug:
          type: string
      required:
        - id
        - name
        - slug
      type: object
    IUserBriefDto:
      additionalProperties: false
      description: Minimal user label for nested redemption-style payloads.
      properties:
        email:
          type: string
        id:
          type: string
        username:
          type: string
      required:
        - id
        - username
        - email
      type: object
    IRedemptionRewardOnchainAssetBriefDto:
      additionalProperties: false
      description: >-
        Joined on-chain asset the reward pays out in (e.g. KXP / Kintra XP).
        Matches the redemption reward join.
      properties:
        asset_address:
          type: string
        chain_id:
          format: double
          type: number
        decimals:
          format: double
          nullable: true
          type: number
        id:
          type: string
        name:
          nullable: true
          type: string
        symbol:
          nullable: true
          type: string
        type:
          type: string
      required:
        - id
      type: object
    RewardStatus:
      enum:
        - initialized
        - published
      type: string
  securitySchemes:
    tenant_api_key:
      description: Tenant API key
      in: header
      name: x-tenant-key
      type: apiKey

````