> ## 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 code

> The pre-checkout preview: what a buyer's code unlocks — the ticket (hidden ones included), the perks the admission carries, and the discounted price. Misspelt, disabled, expired, spent and pointing-at-a-closed-type are all the **same** 404 — the caller can never learn which. A valid code still grants access, never a place: capacity applies at order time.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/events/{eventId}/redemption-codes/lookup
openapi: 3.1.0
info:
  title: Orriven Developer API
  version: '2026-08-22'
  description: >-
    Workspace-scoped access to events, ticket types, registrations, redemption
    codes, add-ons, bundles, orders (read-only) and check-ins. Authenticate
    every request with `Authorization: Bearer <secret>`; the key's business unit
    is the entire scope, and a resource outside it answers 404, never 403.


    **Versioning** — the API uses date versions (this spec documents
    `2026-08-22`, the current one). A key is pinned to the version current at
    its creation and keeps that behaviour forever; send an `Orriven-Version:
    YYYY-MM-DD` header to serve a single request in another version (unknown
    dates answer 400). Every response echoes the effective version in the
    `Orriven-Version` response header.
servers:
  - url: https://openapi.orriven.com
    description: Production
  - url: http://localhost:3002
    description: Local development
security:
  - bearerAuth: []
paths:
  /v1/events/{eventId}/redemption-codes/lookup:
    get:
      tags:
        - Redemption codes
      summary: Validate a code
      description: >-
        The pre-checkout preview: what a buyer's code unlocks — the ticket
        (hidden ones included), the perks the admission carries, and the
        discounted price. Misspelt, disabled, expired, spent and
        pointing-at-a-closed-type are all the **same** 404 — the caller can
        never learn which. A valid code still grants access, never a place:
        capacity applies at order time.
      parameters:
        - schema:
            type: string
          required: true
          name: eventId
          in: path
        - schema:
            type: string
            minLength: 1
            maxLength: 64
            example: VIP2026
          required: true
          name: code
          in: query
      responses:
        '200':
          description: The code is valid; what it unlocks.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedemptionCodeLookup'
        '400':
          description: Invalid request body or parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RpcStatus'
        '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:
    RedemptionCodeLookup:
      type: object
      properties:
        code:
          type: string
        ticketType:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            description:
              type:
                - string
                - 'null'
            priceAmount:
              type: integer
            requiresApproval:
              type: boolean
            soldOut:
              type: boolean
            allowWaitlist:
              type: boolean
          required:
            - id
            - name
            - description
            - priceAmount
            - requiresApproval
            - soldOut
            - allowWaitlist
        perks:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              description:
                type:
                  - string
                  - 'null'
            required:
              - id
              - name
              - description
        discount:
          type:
            - object
            - 'null'
          properties:
            type:
              type: string
              enum:
                - percent
                - amount
            value:
              type: integer
            effectiveAmount:
              type: integer
          required:
            - type
            - value
            - effectiveAmount
      required:
        - code
        - ticketType
        - perks
        - discount
    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:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        The API key's secret (`osk_…`), shown once when the key is created in
        the console.

````