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

# Validate a redemption code

> What a valid code redeems: the ticket type it unlocks (the one road to a hidden type), the perks of that admission, the discounted price. Misspelt, disabled, expired, spent and pointing-at-a-closed-type are all the same 404.



## OpenAPI

````yaml /api-reference/storefront-openapi.json get /v1/events/{publicId}/redemption-codes/lookup
openapi: 3.1.0
info:
  title: Orriven Storefront API
  version: '2026-08-22'
  description: >-
    The headless backend for your own event frontend — no backend of yours
    required. Authenticate every request with `Authorization: Bearer <opk_…>` (a
    publishable key, safe in browser code; it fronts exactly one portal).
    Attendee sign-in is email OTP — the platform sends the code — and the
    resulting session token travels in the `Orriven-Attendee-Token` header. The
    catalog never exposes counts, drafts or hidden ticket types; anything
    outside the portal answers 404.


    **Versioning** — date versions, the developer API's exact model: the key
    pins the version current at its creation, `Orriven-Version: YYYY-MM-DD`
    overrides per request, and every response echoes the effective version.
servers:
  - url: https://openapi.orriven.com/storefront
    description: Production
  - url: http://localhost:3002/storefront
    description: Local development
security:
  - publishableKey: []
paths:
  /v1/events/{publicId}/redemption-codes/lookup:
    get:
      tags:
        - Catalog
      summary: Validate a redemption code
      description: >-
        What a valid code redeems: the ticket type it unlocks (the one road to a
        hidden type), the perks of that admission, the discounted price.
        Misspelt, disabled, expired, spent and pointing-at-a-closed-type are all
        the same 404.
      parameters:
        - schema:
            type: string
          required: true
          name: publicId
          in: path
        - schema:
            type: string
            minLength: 1
            maxLength: 64
          required: true
          name: code
          in: query
      responses:
        '200':
          description: What the code redeems.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  ticketType:
                    $ref: '#/components/schemas/StorefrontTicketType'
                  form:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: string
                      questions: {}
                    required:
                      - id
                  discount:
                    type:
                      - object
                      - 'null'
                    properties:
                      effectiveAmount:
                        type: integer
                    required:
                      - effectiveAmount
                required:
                  - code
                  - ticketType
                  - form
                  - discount
        '401':
          description: >-
            Missing, unknown, revoked or expired API key — all indistinguishable
            on purpose.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RpcStatus'
        '404':
          description: >-
            The resource does not exist in this key's business unit. A foreign
            id answers the same way.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RpcStatus'
        '429':
          description: Rate limit exceeded for this API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RpcStatus'
components:
  schemas:
    StorefrontTicketType:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        soldOut:
          type: boolean
        waitlistOpen:
          type: boolean
        opensAt:
          type:
            - string
            - 'null'
        closesAt:
          type:
            - string
            - 'null'
        priceAmount:
          type: integer
        perks:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              description:
                type:
                  - string
                  - 'null'
            required:
              - name
              - description
        formId:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - description
        - soldOut
        - waitlistOpen
        - opensAt
        - closesAt
        - priceAmount
        - perks
        - formId
    RpcStatus:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              example: 404
            status:
              type: string
              example: NOT_FOUND
            message:
              type: string
              example: Event not found.
            details:
              type: array
              items: {}
          required:
            - code
            - status
            - message
      required:
        - error
  securitySchemes:
    publishableKey:
      type: http
      scheme: bearer
      description: >-
        The publishable key (`opk_…`) — safe to embed in your frontend. Created
        per portal in the console, with the origins allowed to use it from a
        browser.

````