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

# Get affiliate

> Returns one affiliate of your white-label program, with the same fields as the list. Requires a brand key with scope `whitelabel:affiliates:read`.

Returns one affiliate of your white-label program, with the same fields as the list. Requires scope `whitelabel:affiliates:read`.


## OpenAPI

````yaml api-reference/brand/openapi.json GET /brand/whitelabel/affiliates/{affiliateId}
openapi: 3.1.0
info:
  title: Lomadee Brand API
  version: 1.0.0
  description: >-
    Read-only REST API for brands. Network and white-label programs have
    separate paths and separate keys.
servers:
  - url: https://api.lomadee.com.br
    description: Production
security:
  - x-api-key: []
tags:
  - name: Network
    description: >-
      Your affiliate program on the Lomadee network. Affiliates are never
      identified; only their channels are.
  - name: White label
    description: Your own white-label affiliate program.
paths:
  /brand/whitelabel/affiliates/{affiliateId}:
    get:
      tags:
        - White label
      summary: Get affiliate
      description: >-
        Returns one affiliate of your white-label program, with the same fields
        as the list. Requires a brand key with scope
        `whitelabel:affiliates:read`.
      parameters:
        - name: affiliateId
          in: path
          required: true
          description: Affiliate id in your program.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Affiliate
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Affiliate'
                required:
                  - data
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  headers:
    X-RateLimit-Limit:
      description: Requests allowed in the window.
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: Requests left in the window.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Unix timestamp when the window resets.
      schema:
        type: integer
  schemas:
    Affiliate:
      type: object
      properties:
        id:
          type: string
          description: Affiliate id in your program.
          format: uuid
        name:
          type: string
          description: Affiliate name.
        email:
          type: string
          description: Affiliate e-mail.
          format: email
        document:
          type:
            - string
            - 'null'
          description: CPF or CNPJ, without punctuation. A CNPJ can contain letters.
          example: '12345678909'
        documentType:
          type:
            - string
            - 'null'
          description: Type of `document`.
          enum:
            - CPF
            - CNPJ
        phone:
          type:
            - string
            - 'null'
          description: Phone, digits only, with country and area code.
          example: '5511999998888'
        birthDate:
          type:
            - string
            - 'null'
          description: Birth date.
          format: date
        legalName:
          type:
            - string
            - 'null'
          description: Legal name, for affiliates registered as a company.
        tradeName:
          type:
            - string
            - 'null'
          description: Trade name, for affiliates registered as a company.
        status:
          type: string
          description: Status in your program.
          enum:
            - pending
            - active
            - inactive
        utm:
          type: string
          description: >-
            Value that identifies the affiliate in your program in
            `utm_campaign`: `{affiliateId}_{organizationId}`. On a tracked link,
            `utm_campaign` starts with this value, followed by `_` and the link
            code.
          example: >-
            66981f67-7026-403b-95cd-165a9352dfb5_0b9d6a3e-5a0f-4a52-9c3e-2f1f7c8d4e10
        address:
          type:
            - object
            - 'null'
          properties:
            postalCode:
              type:
                - string
                - 'null'
              description: Postal code, digits only.
            street:
              type:
                - string
                - 'null'
              description: Street.
            number:
              type:
                - string
                - 'null'
              description: Number.
            complement:
              type:
                - string
                - 'null'
              description: Complement.
            neighborhood:
              type:
                - string
                - 'null'
              description: Neighborhood.
            city:
              type:
                - string
                - 'null'
              description: City.
            state:
              type:
                - string
                - 'null'
              description: State.
            country:
              type:
                - string
                - 'null'
              description: Country.
        clusters:
          type: array
          description: Groups the affiliate belongs to in your program.
          items:
            type: object
            properties:
              id:
                type: string
                description: Group id.
                format: uuid
              name:
                type: string
                description: Group name.
        additionalFields:
          type: array
          description: >-
            Values of the additional fields your program asks for at sign-up.
            Fields the affiliate has not filled in come with `value: null`.
          items:
            type: object
            properties:
              key:
                type: string
                description: Field key, set by your brand. Stable.
                example: store_code
              name:
                type: string
                description: Field label.
                example: Store code
              type:
                type: string
                description: Field type.
                example: text
              value:
                type:
                  - string
                  - 'null'
                description: >-
                  Value filled in. Fields with more than one value are joined by
                  commas.
        joinedAt:
          type: string
          description: When the affiliate joined the program.
          format: date-time
        updatedAt:
          type: string
          description: Last change to the affiliate data.
          format: date-time
    Error:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        message:
          type: string
          description: Human-readable description.
        code:
          type: string
          description: Error code.
          example: FORBIDDEN
      required:
        - success
        - message
        - code
  responses:
    Unauthorized:
      description: >-
        Missing, invalid, expired or revoked key, or a key that is not a brand
        key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: Invalid API key
            code: UNAUTHORIZED
    Forbidden:
      description: The key belongs to the other vertical or lacks the scope of the route.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: Insufficient scope
            code: FORBIDDEN
    NotFound:
      description: The resource does not exist in your program.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: Resource not found
            code: NOT_FOUND
    TooManyRequests:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: Too many requests
            code: TOO_MANY_REQUESTS
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: Brand key created in the dashboard.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.