openapi: 3.0.3
info:
  title: Everflow Network API - Custom Landing Pages
  description: >
    Endpoints for managing custom landing page settings in the Everflow network.
    Custom landing pages let you create unique default landing page URLs for
    specific partners or tracking conditions, overriding the offer's base
    destination. For landing page concepts, see the
    [Pre-Landers guide](https://helpdesk.everflow.io/customer/how-to-leverage-pre-landers-offer-walls-listicles).
  version: 1.0.0
servers:
  - description: Production Server
    url: https://api.eflow.team/v1
tags:
  - name: Custom Landing Pages
    description: Endpoints for managing custom landing page settings.
paths:
  /networks/custom/landingpages/table:
    post:
      summary: Find Custom Landing Pages (Advanced)
      tags:
        - Custom Landing Pages
      parameters:
        - in: query
          name: page
          schema:
            type: integer
            default: 1
          description: Page number (1-based).
        - in: query
          name: page_size
          schema:
            type: integer
            default: 50
          description: Number of results per page.
        - in: query
          name: relationship
          schema:
            type: string
            enum:
              - variables
              - all
          description: >
            Include additional related data. The `offer` and `affiliates`
            relationships are always returned. Use `variables` to add
            variable conditions, or `all` to include variables and creatives.
        - in: query
          name: order_field
          schema:
            type: string
            enum:
              - network_custom_landing_page_setting_id
              - network_custom_landing_page_setting_name
              - offer_name
              - network_custom_landing_page_setting_status
              - network_custom_landing_page_setting_destination_url
              - network_custom_landing_page_setting_time_created
              - network_custom_landing_page_setting_time_saved
          description: Field to order results by.
        - in: query
          name: order_direction
          schema:
            type: string
            enum:
              - asc
              - desc
          description: Sort direction.
      requestBody:
        required: true
        content:
          application/json:
            example:
              search_terms: []
              filters: {}
            schema:
              type: object
              properties:
                search_terms:
                  type: array
                  description: Text search filters.
                  items:
                    type: object
                    properties:
                      search_type:
                        type: string
                        enum:
                          - name
                          - url
                        description: >
                          The field to search on. `name` searches by setting
                          name, `url` searches by destination URL.
                      value:
                        type: string
                        description: The search value.
                filters:
                  type: object
                  description: Structured filters to narrow results.
                  properties:
                    page_setting_status:
                      type: string
                      enum:
                        - active
                        - inactive
                      description: Filter by setting status.
                    network_offer_ids:
                      type: array
                      items:
                        type: integer
                      description: Filter by offer IDs.
                    network_affiliate_ids:
                      type: array
                      items:
                        type: integer
                      description: Filter by affiliate IDs.
                    network_advertiser_ids:
                      type: array
                      items:
                        type: integer
                      description: Filter by advertiser IDs.
                    is_apply_all_affiliates:
                      type: string
                      enum:
                        - enabled
                        - disabled
                      description: Filter by whether the setting applies to all affiliates.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  entries:
                    type: array
                    items:
                      type: object
                      properties:
                        network_custom_landing_page_setting_id:
                          type: integer
                        network_id:
                          type: integer
                        is_apply_all_affiliates:
                          type: boolean
                        network_affiliate_ids:
                          type: array
                          nullable: true
                          items:
                            type: integer
                        network_offer_id:
                          type: integer
                        name:
                          type: string
                        network_offer_landing_page_id:
                          type: integer
                        description:
                          type: string
                        destination_url:
                          type: string
                        custom_setting_status:
                          type: string
                        date_valid_from:
                          type: string
                        date_valid_to:
                          type: string
                        time_created:
                          type: integer
                          example: 1734455015
                        time_saved:
                          type: integer
                          example: 1734455015
                        network_creative_ids:
                          type: array
                          nullable: true
                          items:
                            type: integer
                        relationship:
                          type: object
                          properties:
                            affiliates:
                              type: array
                              description: Associated affiliate details. Always included when the entry has specific affiliates assigned.
                              items:
                                type: object
                                properties:
                                  network_affiliate_id:
                                    type: integer
                                  network_id:
                                    type: integer
                                  name:
                                    type: string
                                  account_status:
                                    type: string
                            offer:
                              type: object
                              description: Associated offer details. Always included.
                              properties:
                                network_offer_id:
                                  type: integer
                                  description: Unique offer ID.
                                network_id:
                                  type: integer
                                  description: Network ID.
                                name:
                                  type: string
                                  description: Offer name.
                                offer_status:
                                  type: string
                                  description: Status of the offer.
                            variables:
                              type: object
                              description: Goal condition variables for this setting (included with `relationship=variables` or `relationship=all`).
                              properties:
                                total:
                                  type: integer
                                  description: Total number of variables.
                                entries:
                                  type: array
                                  description: List of variable conditions.
                                  items:
                                    type: object
                                    properties:
                                      network___custom___landing___page___setting___variable___id:
                                        type: integer
                                        description: Unique variable ID.
                                      network___custom___landing___page___setting___id:
                                        type: integer
                                        description: The parent custom landing page setting ID.
                                      comparison_method:
                                        type: string
                                        description: How to compare the variable against the value.
                                      variable:
                                        type: string
                                        description: The variable name (e.g. `sub1`, `sub2`).
                                      variable_value:
                                        type: string
                                        description: The value to compare against.
                                      variable_secondary_value:
                                        type: string
                                        description: A secondary value used with range-based comparisons.
                            creatives:
                              type: array
                              description: Associated creative details (included with `relationship=all`).
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    description: Creative ID.
                                  label:
                                    type: string
                                    description: Creative label.
                                  status:
                                    type: string
                                    description: Creative status.
                  paging:
                    type: object
                    properties:
                      page:
                        type: integer
                      page_size:
                        type: integer
                      total_count:
                        type: integer
      security:
        - API Key: []

  /networks/custom/landingpages:
    post:
      summary: Create Custom Landing Page Setting
      tags:
        - Custom Landing Pages
      requestBody:
        required: true
        content:
          application/json:
            example:
              network_offer_id: 1
              name: "Custom LP for Affiliate 7"
              network_offer_landing_page_id: 1
              destination_url: "https://example.com/landing"
              custom_setting_status: "active"
              is_apply_all_affiliates: false
              network_affiliate_ids:
                - 7
              network_offer_creative_ids: []
              description: ""
              date_valid_from: ""
              date_valid_to: ""
            schema:
              type: object
              required:
                - network_offer_id
                - name
                - destination_url
                - custom_setting_status
                - is_apply_all_affiliates
                - network_offer_landing_page_id
                - network_offer_creative_ids
              properties:
                is_apply_all_affiliates:
                  type: boolean
                  description: Whether this setting applies to all affiliates.
                network_affiliate_ids:
                  type: array
                  items:
                    type: integer
                  description: Array of affiliate IDs this setting applies to. Required when `is_apply_all_affiliates` is `false`.
                network_offer_id:
                  type: integer
                  description: The offer ID for this landing page setting.
                name:
                  type: string
                  description: Display name for this custom landing page setting.
                network_offer_landing_page_id:
                  type: integer
                  description: The offer landing page ID to override.
                description:
                  type: string
                  description: Optional description for this setting.
                destination_url:
                  type: string
                  description: The custom destination URL.
                custom_setting_status:
                  type: string
                  enum:
                    - active
                    - inactive
                  description: Status of the landing page setting.
                date_valid_from:
                  type: string
                  description: Start date for when this setting is active (YYYY-MM-DD).
                date_valid_to:
                  type: string
                  description: End date for when this setting expires (YYYY-MM-DD).
                network_offer_creative_ids:
                  type: array
                  items:
                    type: integer
                  description: Array of offer creative IDs associated with this setting.
                ruleset:
                  type: object
                  description: >
                    Targeting ruleset for this custom landing page setting. Allows you to
                    restrict when this custom landing page is used based on geographic,
                    device, browser, and connection criteria. See the
                    [Ruleset guide](/user-guide/rulesets) for details.
                variables:
                  type: array
                  description: >
                    Goal condition variables that must match for this custom landing page
                    to take effect. Each variable defines a condition based on tracking
                    parameters.
                  items:
                    type: object
                    required:
                      - variable
                      - variable_value
                      - comparison_method
                    properties:
                      variable:
                        type: string
                        description: The variable to match (e.g. `sub1`, `sub2`, `sub3`, `sub4`, `sub5`, `sub6`, `sub7`, `sub8`, `sub9`, `sub10`, `source_id`).
                      variable_value:
                        type: string
                        description: The value to compare against.
                      variable_secondary_value:
                        type: string
                        description: A secondary value used with range-based comparison methods.
                      comparison_method:
                        type: string
                        enum:
                          - exact_match
                          - contains
                          - begins_with
                          - ends_with
                          - does_not_contain
                          - does_not_match
                          - is_empty
                        description: How to compare the variable against the value.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomLandingPage"
      security:
        - API Key: []

  /networks/custom/landingpages/{settingId}:
    put:
      summary: Update Custom Landing Page Setting
      tags:
        - Custom Landing Pages
      parameters:
        - in: path
          name: settingId
          required: true
          schema:
            type: integer
          description: The custom landing page setting ID.
      requestBody:
        required: true
        content:
          application/json:
            example:
              network_offer_id: 1
              name: "Updated Custom LP"
              network_offer_landing_page_id: 1
              destination_url: "https://example.com/updated-landing"
              custom_setting_status: "active"
              is_apply_all_affiliates: false
              network_affiliate_ids:
                - 7
              network_offer_creative_ids: []
              description: ""
              date_valid_from: ""
              date_valid_to: ""
            schema:
              type: object
              properties:
                is_apply_all_affiliates:
                  type: boolean
                  description: Whether this setting applies to all affiliates.
                network_affiliate_ids:
                  type: array
                  items:
                    type: integer
                  description: Array of affiliate IDs this setting applies to. Required when `is_apply_all_affiliates` is `false`.
                network_offer_id:
                  type: integer
                  description: The offer ID for this landing page setting.
                name:
                  type: string
                  description: Display name for this custom landing page setting.
                network_offer_landing_page_id:
                  type: integer
                  description: The offer landing page ID to override.
                description:
                  type: string
                  description: Optional description for this setting.
                destination_url:
                  type: string
                  description: The custom destination URL.
                custom_setting_status:
                  type: string
                  enum:
                    - active
                    - inactive
                  description: Status of the landing page setting.
                date_valid_from:
                  type: string
                  description: Start date for when this setting is active (YYYY-MM-DD).
                date_valid_to:
                  type: string
                  description: End date for when this setting expires (YYYY-MM-DD).
                network_offer_creative_ids:
                  type: array
                  items:
                    type: integer
                  description: Array of offer creative IDs associated with this setting.
                ruleset:
                  type: object
                  description: >
                    Targeting ruleset for this custom landing page setting. Allows you to
                    restrict when this custom landing page is used based on geographic,
                    device, browser, and connection criteria. See the
                    [Ruleset guide](/user-guide/rulesets) for details.
                variables:
                  type: array
                  description: >
                    Goal condition variables that must match for this custom landing page
                    to take effect. Each variable defines a condition based on tracking
                    parameters.
                  items:
                    type: object
                    required:
                      - variable
                      - variable_value
                      - comparison_method
                    properties:
                      variable:
                        type: string
                        description: The variable to match (e.g. `sub1`, `sub2`, `sub3`, `sub4`, `sub5`, `sub6`, `sub7`, `sub8`, `sub9`, `sub10`, `source_id`).
                      variable_value:
                        type: string
                        description: The value to compare against.
                      variable_secondary_value:
                        type: string
                        description: A secondary value used with range-based comparison methods.
                      comparison_method:
                        type: string
                        enum:
                          - exact_match
                          - contains
                          - begins_with
                          - ends_with
                          - does_not_contain
                          - does_not_match
                          - is_empty
                        description: How to compare the variable against the value.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomLandingPage"
      security:
        - API Key: []
    delete:
      summary: Delete Custom Landing Page Setting
      tags:
        - Custom Landing Pages
      parameters:
        - in: path
          name: settingId
          required: true
          schema:
            type: integer
          description: The custom landing page setting identifier.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: boolean
      security:
        - API Key: []

components:
  schemas:
    CustomLandingPage:
      type: object
      properties:
        network_custom_landing_page_setting_id:
          type: integer
          description: Unique custom landing page setting ID.
          readOnly: true
        network_id:
          type: integer
          description: Network ID.
          readOnly: true
        is_apply_all_affiliates:
          type: boolean
          description: Whether this setting applies to all affiliates.
        network_affiliate_ids:
          type: array
          items:
            type: integer
          description: Array of affiliate IDs this setting applies to.
        network_offer_id:
          type: integer
          description: The associated offer ID.
        name:
          type: string
          description: Display name for this custom landing page setting.
        network_offer_landing_page_id:
          type: integer
          description: The offer landing page ID to override.
        description:
          type: string
          description: Description for this setting.
        destination_url:
          type: string
          description: The custom destination URL.
        custom_setting_status:
          type: string
          enum:
            - active
            - inactive
          description: Status of the landing page setting.
        date_valid_from:
          type: string
          description: Start date for when this setting is active (YYYY-MM-DD).
        date_valid_to:
          type: string
          description: End date for when this setting expires (YYYY-MM-DD).
        network_offer_creative_ids:
          type: array
          nullable: true
          items:
            type: integer
          description: Array of offer creative IDs associated with this setting.
        time_created:
          type: integer
          example: 1734455015
          description: Unix timestamp of creation.
          readOnly: true
        time_saved:
          type: integer
          example: 1734455015
          description: Unix timestamp of last update.
          readOnly: true
        relationship:
          type: object
          properties:
            affiliates:
              type: array
              description: Associated affiliate details (included with `relationship=all`).
              items:
                type: object
                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: Account status of the affiliate.
            offer:
              type: object
              description: Associated offer details.
              properties:
                network_offer_id:
                  type: integer
                  description: Unique offer ID.
                network_id:
                  type: integer
                  description: Network ID.
                network_advertiser_id:
                  type: integer
                  description: Advertiser ID that owns this offer.
                network_offer_group_id:
                  type: integer
                  description: Offer group ID (0 if not grouped).
                name:
                  type: string
                  description: Offer name.
                offer_status:
                  type: string
                  description: Status of the offer.
                network_tracking_domain_id:
                  type: integer
                  description: Tracking domain ID for this offer.
                visibility:
                  type: string
                  description: Visibility setting for this offer.
                currency_id:
                  type: string
                  description: Currency code for this offer.
            variables:
              type: object
              description: Goal condition variables for this setting.
              properties:
                total:
                  type: integer
                  description: Total number of variables.
                entries:
                  type: array
                  description: List of variable conditions.
                  items:
                    type: object
                    properties:
                      network___custom___landing___page___setting___variable___id:
                        type: integer
                        description: Unique variable ID.
                      network___custom___landing___page___setting___id:
                        type: integer
                        description: The parent custom landing page setting ID.
                      comparison_method:
                        type: string
                        description: How to compare the variable against the value.
                      variable:
                        type: string
                        description: The variable name (e.g. `sub1`, `sub2`).
                      variable_value:
                        type: string
                        description: The value to compare against.
                      variable_secondary_value:
                        type: string
                        description: A secondary value used with range-based comparisons.
  securitySchemes:
    API Key:
      description: The Everflow API key generated from the Control Center > Security.
      in: header
      name: X-Eflow-Api-Key
      type: apiKey
