> ## 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.

# Affiliate Bulk Edit Preview

Preview the result of a bulk edit before applying it. Returns the proposed changes for each affiliate, including current and new values, along with any validation errors. This endpoint works exactly the same way as the Bulk Edit endpoint, with the important difference that it does not actually change anything.


## OpenAPI

````yaml openapi/affiliates-extras.yaml post /networks/patch/affiliates/submit
openapi: 3.0.3
info:
  title: Everflow Network API - Affiliates (Additional Endpoints)
  description: Additional affiliate management endpoints for the Everflow network.
  version: 1.0.0
servers:
  - description: Production Server
    url: https://api.eflow.team/v1
security: []
tags:
  - name: Affiliates
    description: Additional affiliate management endpoints.
paths:
  /networks/patch/affiliates/submit:
    post:
      tags:
        - Affiliates
      summary: Affiliate Bulk Edit Preview
      requestBody:
        required: true
        content:
          application/json:
            example:
              network_affiliate_ids:
                - 7
              fields:
                - field_type: account_status
                  field_value: inactive
                  operator: overwrite
            schema:
              $ref: '#/components/schemas/AffiliatePatchInput'
      responses:
        '200':
          description: ''
          content:
            application/json:
              example:
                changes:
                  - network_affiliate:
                      network_affiliate_id: 7
                      network_id: 1
                      name: Frances Holder Inc.
                      account_status: active
                    change_status: ok
                    current_field:
                      field_type: account_status
                      field_value: active
                      operator: overwrite
                    changed_field:
                      field_type: account_status
                      field_value: inactive
                      operator: overwrite
                    error_message: ''
                    related_changes: ''
                resource_errors: []
              schema:
                $ref: '#/components/schemas/AffiliatePatchResponse'
      security:
        - API Key: []
components:
  schemas:
    AffiliatePatchInput:
      description: Input for bulk editing affiliates.
      type: object
      required:
        - network_affiliate_ids
        - fields
      properties:
        network_affiliate_ids:
          type: array
          description: IDs of the affiliates to be patched.
          items:
            type: integer
            description: An affiliate ID to patch.
        fields:
          type: array
          description: List of fields to patch.
          items:
            type: object
            description: A field patch operation.
            required:
              - field_type
              - field_value
              - operator
            properties:
              field_type:
                type: string
                description: >
                  Type of the field to patch. See Patchable Fields below for the
                  full list of supported field types.
                enum:
                  - network_employee_id
                  - account_executive_id
                  - referrer_id
                  - labels
                  - affiliate_name
                  - account_status
                  - default_currency_id
                  - has_notifications
                  - enable_media_cost_tracking_links
                  - network_traffic_source_id
                  - internal_notes
                  - billing_payment_method
                  - billing_billing_frequency
                  - billing_weekly
                  - billing_bimonthly
                  - billing_monthly
                  - billing_two_months
                  - billing_quarterly
                  - billing_is_invoice_creation_auto
                  - billing_invoice_amount_threshold
                  - billing_auto_invoice_start_date
                  - billing_invoice_generation_days_delay
                  - billing_default_payment_terms
                  - billing_default_invoice_is_hidden
                  - referral_is_enabled
                  - referral_method
                  - referral_value
                  - referral_commission_basis
                  - referral_minimum_threshold
                  - referral_duration
              field_value:
                description: >
                  Value of the field to patch. The type depends on the
                  `field_type`:

                  - **network_employee_id** (int) — The employee ID of the
                  affiliate's account manager.

                  - **account_executive_id** (int) — The employee ID of the
                  affiliate's account executive.

                  - **referrer_id** (int) — The affiliate ID of the account that
                  referred the target affiliate(s).

                  - **labels** (string array) — The list of labels associated
                  with the affiliate.

                  - **affiliate_name** (string) — The name of the affiliate.

                  - **account_status** (string) — Status of the affiliate.
                  Values: `active`, `inactive`, `suspended`.

                  - **default_currency_id** (string) — The affiliate's default
                  currency from the metadata API. Can be overwritten at the
                  affiliate user level.

                  - **has_notifications** (boolean) — Whether the affiliate can
                  receive notifications.

                  - **enable_media_cost_tracking_links** (boolean) — Whether the
                  cost parameter will be processed or ignored on clicks.

                  - **network_traffic_source_id** (int) — An optional tracking
                  source ID for the affiliate.

                  - **internal_notes** (string) — Internal notes not visible to
                  the affiliate.

                  - **billing_payment_method** (string) — Only `pay` is
                  supported (requires Everflow Pay integration).

                  - **billing_billing_frequency** (string) — Values: `weekly`,
                  `bimonthly`, `monthly`, `two_months`, `quarterly`, `manual`,
                  `other`. When setting this, you must also set the
                  corresponding frequency details (e.g. `billing_weekly`).

                  - **billing_weekly** (string) — Day of week. Values: `monday`,
                  `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`,
                  `sunday`. Required when frequency is `weekly`.

                  - **billing_bimonthly** (object) — `{ "day_of_month_one": int,
                  "day_of_month_two": int }`. Required when frequency is
                  `bimonthly`.

                  - **billing_monthly** (object) — `{ "day_of_month": int }`.
                  Required when frequency is `monthly`.

                  - **billing_two_months** (object) — `{ "starting_month": int,
                  "day_of_month": int }`. Required when frequency is
                  `two_months`.

                  - **billing_quarterly** (object) — `{ "starting_month": int,
                  "day_of_month": int }`. Required when frequency is
                  `quarterly`.

                  - **billing_is_invoice_creation_auto** (boolean) — Whether
                  invoices are generated automatically.

                  - **billing_invoice_amount_threshold** (double) — Minimum
                  amount before an invoice is generated.

                  - **billing_auto_invoice_start_date** (date) — Lookback window
                  start date. Required when auto invoicing is enabled.

                  - **billing_invoice_generation_days_delay** (int) — Days after
                  billing period before invoice is generated.

                  - **billing_default_payment_terms** (int) — Number of days
                  before payment is sent.

                  - **billing_default_invoice_is_hidden** (boolean) — Whether
                  invoices are hidden from affiliates by default.

                  - **referral_is_enabled** (boolean) — Whether referral
                  commissions are enabled.

                  - **referral_method** (string) — Values: `flat_fee`,
                  `percentage`.

                  - **referral_value** (double) — Value of the referral
                  commission.

                  - **referral_commission_basis** (string) — Values: `payout`,
                  `revenue`, `profit`.

                  - **referral_minimum_threshold** (double) — Minimum amount
                  before a commission is paid.

                  - **referral_duration** (double) — Number of days during which
                  the referral commission is effective.
              operator:
                type: string
                description: >
                  Operator determining how the field will be used to modify the
                  affiliates.
                enum:
                  - overwrite
                  - append
                  - delete
                  - clear
    AffiliatePatchResponse:
      description: Response from bulk edit preview or apply.
      type: object
      properties:
        changes:
          type: array
          description: Proposed changes for each affiliate.
          items:
            type: object
            description: A change record for a single affiliate.
            properties:
              network_affiliate:
                type: object
                description: The affiliate being changed.
                properties:
                  network_affiliate_id:
                    type: integer
                    description: Unique affiliate ID.
                  network_id:
                    type: integer
                    description: Network ID.
                  name:
                    type: string
                    description: Affiliate name.
                  account_status:
                    type: string
                    description: Current account status.
              change_status:
                type: string
                description: Status of the change (e.g. "ok", "error").
              current_field:
                type: object
                description: Current value of the field.
                properties:
                  field_type:
                    type: string
                    description: The field type being changed.
                  field_value:
                    description: The current value of the field.
                  operator:
                    type: string
                    description: The operator used.
              changed_field:
                type: object
                description: Proposed new value.
                properties:
                  field_type:
                    type: string
                    description: The field type being changed.
                  field_value:
                    description: The proposed new value.
                  operator:
                    type: string
                    description: The operator used.
              error_message:
                type: string
                description: Error message if the change would fail.
              related_changes:
                type: string
                description: Description of any side-effect changes.
        resource_errors:
          type: array
          description: Errors for affiliates that could not be processed.
          items:
            type: object
            description: An error record for an affiliate that could not be processed.
            properties:
              id:
                type: integer
                description: Affiliate ID that errored.
              label:
                type: string
                description: Affiliate name.
              message:
                type: string
                description: Error description.
  securitySchemes:
    API Key:
      description: The Everflow API key generated from the Control Center > Security.
      in: header
      name: X-Eflow-Api-Key
      type: apiKey

````