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

# Fetch referral code info

> Validate a referral code (UCC) and discover associated user/campaign.



## OpenAPI

````yaml GET /referral-codes/{code}
openapi: 3.1.0
info:
  title: Cello API
  description: API for Cello referral platform
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.cello.so
  - url: https://api.sandbox.cello.so
security:
  - bearerAuth: []
paths:
  /referral-codes/{code}:
    get:
      description: Validate a referral code (UCC) and discover associated user/campaign.
      parameters:
        - name: code
          in: path
          required: true
          description: Unique campaign code to validate
          schema:
            type: string
      responses:
        '200':
          description: Referral code validation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferralCodeValidation'
              examples:
                valid:
                  value:
                    code: UIPIWa2Hnnr
                    productUserId: '12345678'
                    valid: true
                    campaignId: campaign_partners_1
                invalid:
                  value:
                    code: BADCODE
                    productUserId: ''
                    valid: false
                    campaignId: ''
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    ReferralCodeValidation:
      type: object
      required:
        - code
        - valid
      properties:
        code:
          type: string
        productUserId:
          type: string
        valid:
          type: boolean
        campaignId:
          type: string
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````