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

# Encode IDs

Encode numeric Everflow IDs into their encoded string representation. This is useful when constructing tracking links or any context where encoded IDs are required instead of raw numeric values. The `type` field determines the encoding context.


## OpenAPI

````yaml openapi/affiliate-encoding.yaml post /affiliates/encode
openapi: 3.0.3
info:
  title: Everflow Affiliate API - Encoding
  description: >
    ID encoding and decoding endpoints for the Everflow Affiliate API. These
    endpoints allow affiliates to convert between numeric IDs and their encoded
    string representations used in tracking links and URLs.
  version: 1.0.0
servers:
  - description: Production Server
    url: https://api.eflow.team/v1
security: []
tags:
  - name: Affiliate Encoding
    description: Endpoints for encoding and decoding Everflow IDs.
paths:
  /affiliates/encode:
    post:
      tags:
        - Affiliate Encoding
      summary: Encode IDs
      requestBody:
        required: true
        content:
          application/json:
            example:
              type: tracking_link_affiliate
              ids:
                - 1
                - 2
                - 3
            schema:
              type: object
              required:
                - type
                - ids
              properties:
                type:
                  type: string
                  description: >
                    The encoding context type. Determines how the IDs are
                    encoded.
                  enum:
                    - tracking_link_affiliate
                    - tracking_link_offer
                    - smart_link_affiliate
                    - smart_link_smart_link
                    - signup_affiliate_employee
                    - signup_advertiser_employee
                    - signup_affiliate_affiliate
                ids:
                  type: array
                  description: Array of numeric IDs to encode.
                  items:
                    type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              example:
                values:
                  - decoded: 1
                    encoded: 28KL6
                  - decoded: 2
                    encoded: 3J67C
                  - decoded: 3
                    encoded: 4RQSJ
              schema:
                type: object
                properties:
                  values:
                    type: array
                    description: Array of encoded values corresponding to the input IDs.
                    items:
                      type: object
                      properties:
                        decoded:
                          type: integer
                          description: The original numeric ID.
                        encoded:
                          type: string
                          description: The encoded string representation.
      security:
        - API Key: []
components:
  securitySchemes:
    API Key:
      description: >
        The affiliate's API key generated from the Affiliate Portal. Uses the
        X-Eflow-Api-Key header.
      in: header
      name: X-Eflow-Api-Key
      type: apiKey

````