openapi: 3.0.3
info:
  title: Everflow Affiliate API - Session & User Info
  description: >
    Session, account, and user management endpoints for the Everflow Affiliate API.
    These endpoints allow affiliates to retrieve session information, account details,
    network info, user management, and billing configuration.
  version: 1.0.0
servers:
  - description: Production Server
    url: https://api.eflow.team/v1
tags:
  - name: Affiliate Session
    description: Session, account, and user endpoints for affiliate users.
paths:
  /affiliates/network:
    get:
      summary: Get Network Info
      tags:
        - Affiliate Session
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  network_id:
                    type: integer
                    description: Unique identifier for the network.
                  displayed_name:
                    type: string
                    description: Network display name.
                  logo_image_url:
                    type: string
                    description: URL of the network's logo image.
                  favicon_image_url:
                    type: string
                    description: URL of the network's favicon image.
                  language_id:
                    type: integer
                    description: Language preference ID.
                  timezone_id:
                    type: integer
                    description: Timezone preference ID.
                  currency_id:
                    type: string
                    description: Currency preference.
                  is_hide_total_click:
                    type: boolean
                    description: Whether total clicks are hidden from affiliates.
                  has_set_terms_and_conditions:
                    type: boolean
                    description: Whether the network has configured terms and conditions.
                  force_timezone_id:
                    type: integer
                    description: Forced timezone ID for affiliates.
                  approaching_threshold:
                    type: number
                    description: Threshold percentage for approaching cap notifications.
                  support_email:
                    type: string
                    description: Network support email address.
                  is_expose_adv_variables:
                    type: boolean
                    description: Whether advertiser variables are exposed to affiliates.
                  allow_billing_update:
                    type: boolean
                    description: Whether affiliates can update billing information.
                  is_offer_impression_links_visible:
                    type: boolean
                    description: Whether offer impression links are visible to affiliates.
                  is_offer_tracking_links_visible:
                    type: boolean
                    description: Whether offer tracking links are visible to affiliates.
                  is_smartlink_tracking_links_visible:
                    type: boolean
                    description: Whether SmartLink tracking links are visible to affiliates.
                  allow_pixel_update:
                    type: boolean
                    description: Whether affiliates can update tracking pixels.
                  relationship:
                    type: object
                    description: Related objects.
                    properties:
                      integrations:
                        type: object
                        description: Network integration settings.
                      custom_pages:
                        type: array
                        items:
                          type: object
                        description: Array of custom page configurations.
                      affiliate_portal_setting:
                        type: object
                        description: Affiliate portal settings.
      security:
        - API Key: []

  /affiliates/users:
    get:
      summary: List Affiliate Users
      tags:
        - Affiliate Session
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  users:
                    type: array
                    description: Array of affiliate users.
                    items:
                      type: object
                      properties:
                        network_affiliate_user_id:
                          type: integer
                          description: Unique identifier for the affiliate user.
                        network_id:
                          type: integer
                          description: Network ID.
                        network_affiliate_id:
                          type: integer
                          description: Affiliate account ID.
                        first_name:
                          type: string
                          description: User's first name.
                        last_name:
                          type: string
                          description: User's last name.
                        email:
                          type: string
                          description: User's email address.
                        title:
                          type: string
                          description: User's job title.
                        work_phone:
                          type: string
                          description: Work phone number.
                        cell_phone:
                          type: string
                          description: Cell phone number.
                        language_id:
                          type: integer
                          description: Language preference ID.
                        timezone_id:
                          type: integer
                          description: Timezone preference ID.
                        currency_id:
                          type: string
                          description: Currency preference.
                        account_status:
                          type: string
                          description: User account status (e.g. active, disabled).
                        time_created:
                          type: integer
                          example: 1734455015
                          description: Unix timestamp when the user was created.
                        time_saved:
                          type: integer
                          example: 1734455015
                          description: Unix timestamp when the user was last updated.
                        instant_messaging_id:
                          type: integer
                          description: Instant messaging service ID.
                        instant_messaging_identifier:
                          type: string
                          description: Instant messaging handle or identifier.
                        relationship:
                          type: object
                          description: Related objects.
                          properties:
                            affiliate_account_status:
                              type: string
                              description: Affiliate account status.
      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
