Impact Referral Code API

Endpoints for working with referral codes: look up a code and its associated reward, or apply a code to a referred account. For background on what referral codes are, see the Referral Code Overview.

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /{tenant_alias}/code/{code} Look up a referral code (deprecated) · Lookup a referral code #
Ask an LLM
“Is the older referral code lookup still supported?”
“What does the deprecated code lookup return about the referrer?”
Tell an agent
Use the deprecated lookup for referral code {code} in tenant {tenant}.
Look up code {code} with the legacy authenticated endpoint.
GET /{tenant_alias}/open/code/{referral_code} Validate a referral code from the client · Lookup a referral code (Open Endpoint) #
Ask an LLM
“How do I check a referral code from my mobile or web app?”
“Can I show who referred someone and what reward the code gives?”
Tell an agent
Validate referral code {code} for tenant {tenant} via the open endpoint.
Show the referrer name and reward for code {code} client-side.
POST /{tenant_alias}/open/code/{code}/account/{accountId}/user/{userId} Apply a referral code to a user · Apply a referral code #
Ask an LLM
“How do I mark a new user as referred by someone's code?”
“Does applying a referral code need a write token?”
Tell an agent
Apply code {code} to user {user} on account {account} in tenant {tenant}.
Credit referral code {code} for new user {user} of account {account}.

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/impact:impact-referral-code-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

impact-referral-code-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: impact.com Referral Code API
  description: API for looking up and applying referral codes.
  version: 1.0.0
servers:
- url: https://app.referralsaasquatch.com/api/v1
security:
- APIKey: []
- UserJWT: []
tags:
- name: Referral Code
  description: 'Endpoints for working with referral codes: look up a code and its associated reward, or apply a code to a referred account. For background on what referral codes are, see the Referral Code Overview.'
paths:
  /{tenant_alias}/code/{code}:
    get:
      summary: Lookup a referral code
      description: '**Deprecated.** Use the Open Endpoint *Lookup a referral code* instead.


        Returns a referral code along with the referrer''s name and the reward the code unlocks.'
      operationId: getCode
      deprecated: true
      tags:
      - Referral Code
      parameters:
      - $ref: '#/components/parameters/TenantAlias'
      - name: code
        in: path
        description: The referral code to look up, for example `BOBTESTERSON`. Can be a user's primary or non-primary referral code.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Referral code found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Code'
        '404':
          description: Referral code NOT found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          $ref: '#/components/responses/GeneralError'
  /{tenant_alias}/open/code/{referral_code}:
    get:
      summary: Lookup a referral code (Open Endpoint)
      description: 'Returns a referral code along with the referrer''s name and the reward the code unlocks. Use this from client-side contexts such as the Mobile and Web SDKs.


        This is an Open Endpoint and is disabled by default. Contact support to enable open endpoints.'
      operationId: openValidateCode
      tags:
      - Referral Code
      parameters:
      - $ref: '#/components/parameters/TenantAlias'
      - name: referral_code
        in: path
        description: The code to be validated, for example `BOBTESTERSON`. Can be a user's primary or non-primary referral code.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Referral code found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeClassicReward'
        '403':
          description: Endpoint disabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /{tenant_alias}/open/code/{code}/account/{accountId}/user/{userId}:
    post:
      summary: Apply a referral code
      description: 'Applies a referral code to the specified account and user, marking them as referred by the code''s owner.


        Requires a write token or an API key. This is an Open Endpoint and is disabled by default. Contact support to enable open endpoints.'
      operationId: openApplyCode
      tags:
      - Referral Code
      parameters:
      - $ref: '#/components/parameters/TenantAlias'
      - name: code
        in: path
        description: The referral code to apply to the user's account.
        required: true
        schema:
          type: string
      - name: accountId
        in: path
        description: The account to apply the referral code to. This account will be marked as referred by the owner of the code.
        required: true
        schema:
          type: string
      - name: userId
        in: path
        description: The user to apply the referral code to. This user will be marked as referred by the owner of the code.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Referral code applied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Code'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Endpoint disabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CodeClassicReward:
      description: A referral code, the referrer it belongs to, and details of the reward it unlocks (Classic reward format).
      type: object
      properties:
        code:
          type: string
          description: The unique identifier for the code. For example `BOBTESTERSON`.
          example: CFMVQHNUEU2AWWDO
        dateCreated:
          type: integer
          format: int64
          description: Unix timestamp (milliseconds) when the code was created.
          example: 1774386824953
        programId:
          type: string
          nullable: true
          description: The ID of the program that the code belongs to. Null if not associated with a specific program.
          example: null
        referrerName:
          type: string
          description: The display name of the owner of this code. For example `Bob Testerson`.
          example: Bob T
        reward:
          $ref: '#/components/schemas/ClassicRewardTemplate'
    Error:
      properties:
        statusCode:
          description: The HTTP status code of the error.
          type: integer
          format: int32
        message:
          description: The human-readable description of what went wrong. Use this to help you debug.
          type: string
        apiErrorCode:
          description: A machine-readable error code.
          type: string
        rsCode:
          description: A secondary machine-readable error code.
          type: string
          example: RS042
    Code:
      description: A referral code, the referrer it belongs to, and details of the reward it unlocks.
      type: object
      properties:
        code:
          type: string
          description: The unique identifier for the code. For example `BOBTESTERSON`.
          example: CFMVQHNUEU2AWWDO
        dateCreated:
          type: integer
          format: int64
          description: Unix timestamp (milliseconds) when the code was created.
          example: 1774386824953
        programId:
          type: string
          nullable: true
          description: The ID of the program that the code belongs to. Null if not associated with a specific program.
          example: null
        referrerName:
          type: string
          description: The display name of the owner of this code. For example `Bob Testerson`.
          example: Bob T
        reward:
          $ref: '#/components/schemas/RewardTemplate'
    ClassicRewardTemplate:
      description: <span class="label">Classic Only</span> Details of the reward that could be earned, but is not yet earned.
      allOf:
      - $ref: '#/components/schemas/RewardTemplate'
    RewardTemplate:
      description: Details of the reward that could be earned, but is not yet earned.
      type: object
      properties:
        type:
          type: string
          description: The type of reward.
          enum:
          - PCT_DISCOUNT
          - FUELTANK
          - CREDIT
          - INTEGRATION
          example: CREDIT
        unit:
          type: string
          description: An identifier for the unit of the reward. For example `CENTS`, `freemb`, `freemonth`. Only present for `CREDIT` rewards.
          example: CENTS
        credit:
          type: integer
          description: The amount of credit this referral code is valid for. For example, for $20 this would be `credit=2000`, `unit="CENTS"`. Only works with `CREDIT`.
          example: 100
        discountPercent:
          type: integer
          description: The percent discount the referral code is valid for. For example, `10` for `10%`. Only works with `PCT_DISCOUNT`.
          example: 10
        monthsDiscountIsValid:
          type: integer
          description: The number of months the discount is valid for. Only works with `PCT_DISCOUNT`.
          example: 3
        valueInCents:
          type: integer
          description: The value of the reward in cents. Works with `INTEGRATION`.
          example: 2000
        rewardDetails:
          type: string
          description: JSON object containing details about the reward. Works with `INTEGRATION`.
          example: '{}'
  responses:
    GeneralError:
      description: Unexpected Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    TenantAlias:
      name: tenant_alias
      in: path
      description: Tenant being referenced. E.g. `"aboih12h16t"` or `"test_abo912126tastastt"`
      required: true
      schema:
        type: string
  securitySchemes:
    APIKey:
      type: http
      scheme: basic
      description: Authorize your requests using a tenant's API Key. Use this method only in server-to-server interactions.
    UserJWT:
      type: apiKey
      in: header
      name: X-SaaSquatch-User-Token
      description: A JWT for a given user. Used by the Mobile and Web SDKs and other client-side contexts via Open Endpoints.
x-default-client: cURL