Affise Performance API

REST API for the Affise Performance platform enabling admins and affiliates to manage offers, track conversions, retrieve statistics, handle publisher payouts, and automate billing operations programmatically.

OpenAPI Specification

affise-openapi.yml Raw ↑
openapi: 3.1.1
info:
  title: API Documentation
  version: '3.2'
  x-logo:
    altText: Affise API documentation.
    url: affise_logo.svg
    backgroundColor: '#fafafa'
  description: |
    API 3.1 documentation.

    Authorization

    ```shell
    curl --header "API-Key:23df424b0a53b0899f78685966243ee61" http://YOUR_API_DOMAIN/
    or
    curl http://YOUR_API_DOMAIN/some_path?API-Key=23df424b0a53b0899f78685966243ee61
    ```


    For data exchange using authentication public key passed as parameter in the header API-Key. As the key, a hash generated for your site. API key, you can see in your profile.

    Find out more about where you can get your API URL, API-key and personal API-key for Affiliate here - [Getting Started with API](https://help-center.affise.com/en/articles/6463675-start-with-api-networks)

    Postman collection

    A ready-to-use Postman collection covering all endpoints of this documentation is available in the [affise-postman-api-collection](https://github.com/affise/affise-postman-api-collection) repository. Import the collection together with the Demo environment, set your `baseUrl` and API keys in the environment variables, and you are ready to send requests.

    <aside class="warning">
    All API requests must include an API-Key header or API-Key GET parameter for client authentication.
    </aside>
servers:
  - url: https://api-demo.affise.com
    description: Demo Server
    variables:
      api-key:
        default: 685168e94e6a96fa7c31895e
        description: Demo Test API Key
tags:
  - name: admin-advertisers
    x-displayName: Advertisers
    description: Admin operations on advertisers
  - name: admin-affiliates
    x-displayName: Affiliates
    description: Admin operations on affiliates (partners)
  - name: admin-users
    x-displayName: Users
    description: Admin user management
  - name: admin-offers
    x-displayName: Offers
    description: Admin offer management — create, edit, delete, mass-update, categories, sources, creatives
  - name: admin-conversions
    x-displayName: Conversions
    description: Admin conversion editing and import
  - name: admin-billing
    x-displayName: Advertiser Billing
    description: Advertiser invoice management
  - name: admin-payments
    x-displayName: Billing
    description: Affiliate payments API. Available for Expand, Custom and Trial plans.
  - name: admin-automation
    x-displayName: Automation
    description: KPI and block-logs automation
  - name: admin-presets
    x-displayName: Presets
    description: Admin presets management
  - name: admin-stats
    x-displayName: Statistics
    description: Statistics endpoints available to admin (includes admin-only and multi-role)
  - name: admin-adcosts
    x-displayName: Ad Costs
    description: Ad cost reporting
  - name: admin-tickets
    x-displayName: Tickets
    description: Ticket management — list, view, approve/reject affiliate connections to offers and SmartLinks
  - name: admin-smartlinks
    x-displayName: Smartlinks
    description: Admin smartlinks — categories management
  - name: admin-other
    x-displayName: Other
    description: Other admin endpoints — domains, currencies, custom fields, payment systems
  - name: advertiser-auth
    x-displayName: Auth & Registration
    description: Advertiser registration and login
  - name: advertiser-offers
    x-displayName: Offers
    description: Advertiser offer listing
  - name: advertiser-stats
    x-displayName: Statistics
    description: Statistics endpoints available to advertiser (multi-role only)
  - name: affiliate-profile
    x-displayName: Profile
    description: Affiliate profile, API key
  - name: affiliate-offers
    x-displayName: Offers
    description: Affiliate offer listing, live offers, activation
  - name: affiliate-postbacks
    x-displayName: Postbacks
    description: Affiliate postback management
  - name: affiliate-pixels
    x-displayName: Pixels
    description: Affiliate tracking pixels
  - name: affiliate-stats
    x-displayName: Statistics
    description: Statistics endpoints available to affiliate (multi-role + affiliate-only)
  - name: affiliate-conversions
    x-displayName: Conversions
    description: Affiliate conversion import
  - name: affiliate-news
    x-displayName: News
    description: Affiliate news feed
  - name: affiliate-smartlinks
    x-displayName: Smartlinks
    description: Affiliate smartlinks, referrals
  - name: affiliate-other
    x-displayName: Other
    description: Affiliate balance, product feeds
  - name: resources
    x-displayName: Lookup
    description: Public lookup data — countries, regions, ISPs, OSes, goals, browsers, cities, etc.
paths:
  /3.1/adcosts:
    get:
      tags:
        - admin-adcosts
      summary: Get Ad Costs
      description: |
        `GET /3.1/adcosts`

        Returns ad cost data based on filters.
      parameters:
        - name: api-key
          in: header
          description: API key
          required: true
          schema:
            type: string
        - name: offer_id
          in: query
          description: Offer ID
          required: true
          schema:
            type: integer
        - name: page
          in: query
          description: page with results
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          description: results per page
          schema:
            type: integer
            default: 100
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  costs:
                    type: array
                    items:
                      type: object
                      properties:
                        offer_id:
                          type: integer
                        affiliate_id:
                          type: integer
                        date:
                          type: string
                          format: date
                        sub8:
                          type: string
                        costs:
                          type: number
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                      limit:
                        type: integer
                      total:
                        type: integer
              example:
                status: 1
                costs:
                  - offer_id: 2
                    affiliate_id: 4
                    date: '2025-02-12'
                    sub8: sub_example_1
                    costs: 33.1
                  - offer_id: 2
                    affiliate_id: 5
                    date: '2025-02-01'
                    sub8: sub_example_2
                    costs: 100.4
                  - offer_id: 2
                    affiliate_id: 5
                    date: '2024-01-01'
                    sub8: testS8
                    costs: 20
                pagination:
                  page: 1
                  limit: 100
                  total: 3
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api-demo.affise.com/3.1/adcosts?offer_id=<offer_id>&page=1&limit=100' \
              --header 'api-key: <api-key>'
    post:
      tags:
        - admin-adcosts
      summary: Create or Update Ad Costs
      description: |
        `POST /3.1/adcosts`

        This method is used to create or update ad costs.
      parameters:
        - name: api-key
          in: header
          description: API key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                offer_id:
                  type: integer
                  description: Offer ID
                affiliate_id:
                  type: integer
                  description: Affiliate ID
                date:
                  type: string
                  format: date
                  description: Date (format YYYY-MM-DD)
                sub8:
                  type: string
                  description: Sub8
                costs:
                  type: number
                  format: float
                  description: Costs
              required:
                - offer_id
                - affiliate_id
                - date
                - sub8
                - costs
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
              example:
                status: 1
                message: adcost has been added successfully
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api-demo.affise.com/3.1/adcosts' \
              --header 'api-key: <api-key>' \
              --form 'offer_id=0' \
              --form 'affiliate_id=0' \
              --form 'date=string' \
              --form 'sub8=string' \
              --form 'costs=0'
    delete:
      tags:
        - admin-adcosts
      summary: Delete Ad Costs
      description: |
        `DELETE /3.1/adcosts`

        Method for deleting ad costs.
      parameters:
        - name: api-key
          in: header
          description: API key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                offer_id:
                  type: integer
                  description: Offer ID
                affiliate_id:
                  type: integer
                  description: Affiliate ID
                date:
                  type: string
                  format: date
                  description: Date (format YYYY-MM-DD)
                sub8:
                  type: string
                  description: Sub8
              required:
                - offer_id
                - affiliate_id
                - date
                - sub8
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
              example:
                status: 1
                message: adcost has been removed successfully
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url 'https://api-demo.affise.com/3.1/adcosts' \
              --header 'api-key: <api-key>' \
              --form 'offer_id=0' \
              --form 'affiliate_id=0' \
              --form 'date=string' \
              --form 'sub8=string'
  /3.0/admin/advertiser-invoices:
    get:
      tags:
        - admin-billing
      summary: Invoices list
      description: |
        `GET /3.0/admin/advertiser-invoices`

        Get list of invoices
      parameters:
        - name: api-key
          in: header
          description: API key
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: Page of entities
          schema:
            type: integer
        - name: limit
          in: query
          description: Limit of entities
          schema:
            type: integer
            default: 100
        - name: status
          in: query
          description: Status of invoice
          schema:
            type: string
            enum:
              - paid
              - unpaid
        - name: start_date
          in: query
          description: Start date of period
          schema:
            type: string
            format: date
        - name: end_date
          in: query
          description: End date of period
          schema:
            type: string
            format: date
        - name: supplier_id
          in: query
          description: Advertiser ID
          schema:
            type: string
        - name: sort
          in: query
          description: Sort field
          schema:
            type: string
            enum:
              - number
              - supplier_id
              - created_at
              - start_date
              - end_date
              - status
        - name: sort_type
          in: query
          description: Sort direction
          schema:
            type: string
            enum:
              - asc
              - desc
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: array
                    items:
                      type: object
                      properties:
                        number:
                          type: integer
                        supplier_id:
                          type: string
                        created_at:
                          type: string
                          format: date
                        updated_at:
                          type: string
                          format: date
                        start_date:
                          type: string
                          format: date
                        end_date:
                          type: string
                          format: date
                        status:
                          type: string
                        detail:
                          type: array
                          items:
                            type: object
                            properties:
                              offer_id:
                                type: integer
                              payout_type:
                                type: string
                              actions:
                                type: integer
                              amount:
                                type: integer
                              comment:
                                type: string
                        currency:
                          type: string
                        comment:
                          type: string
                  pagination:
                    type: object
                    properties:
                      per_page:
                        type: integer
                      total_count:
                        type: integer
                      page:
                        type: integer
              example:
                status: 1
                message:
                  - number: 1
                    supplier_id: 5a37c01cbf0b6b18008b4567
                    created_at: '2018-01-11'
                    updated_at: '2018-01-11'
                    start_date: '2017-12-05'
                    end_date: '2017-12-07'
                    status: unpaid
                    detail:
                      - offer_id: 1
                        payout_type: RPA
                        actions: 100
                        amount: 100
                        comment: null
                    currency: USD
                    comment: null
                  - number: 2
                    supplier_id: 5a37c01cbf0b6b18008b4567
                    created_at: '2018-01-11'
                    updated_at: '2018-01-11'
                    start_date: '2018-01-11'
                    end_date: '2018-01-11'
                    status: unpaid
                    detail:
                      - offer_id: 1
                        payout_type: RPA
                        actions: 55
                        amount: 666
                        comment: null
                    currency: USD
                    comment: some comment
                pagination:
                  per_page: 100
                  total_count: 2
                  page: 1
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api-demo.affise.com/3.0/admin/advertiser-invoices?limit=100&status=paid&sort=number&sort_type=asc' \
              --header 'api-key: <api-key>'
  /3.0/admin/advertiser-invoice:
    post:
      tags:
        - admin-billing
      summary: Add invoice
      description: |
        `POST /3.0/admin/advertiser-invoice`

        Add new invoice
      parameters:
        - name: api-key
          in: header
          description: API key
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                supplier_id:
                  type: string
                  description: Advertiser Id
                start_date:
                  type: string
                  description: Start date of invoice period
                end_date:
                  type: string
                  description: End date of invoice period
                status:
                  type: string
                  description: Invoice status
                  enum:
                    - paid
                    - unpaid
                currency:
                  type: string
                  description: One of the active currencies (RUB, USD, EUR etc)
                comment:
                  type: string
                  description: Comment
                detail:
                  type: array
                  items:
                    type: object
                    properties:
                      offer_id:
                        type: integer
                        description: Offer id
                      payout_type:
                        type: string
                        description: Payout type
                        enum:
                          - RPA
                          - RPS
                          - RPA + RPS
                          - RPC
                          - RPM
                      actions:
                        type: integer
                        description: Actions
                      amount:
                        type: integer
                        description: Amount
                      comment:
                        type: string
                        description: Comment for detail
              required:
                - supplier_id
                - currency
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
              example:
                status: 1
                message: Invoice created.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api-demo.affise.com/3.0/admin/advertiser-invoice' \
              --header 'api-key: <api-key>' \
              --form 'supplier_id=string' \
              --form 'start_date=string' \
              --form 'end_date=string' \
              --form 'status=paid' \
              --form 'currency=string' \
              --form 'comment=string' \
              --form 'detail[0][offer_id]=0' \
              --form 'detail[0][payout_type]=RPA' \
              --form 'detail[0][actions]=0' \
              --form 'detail[0][amount]=0' \
              --form 'detail[0][comment]=string'
  /3.0/admin/advertiser-invoice/{number}:
    get:
      tags:
        - admin-billing
      summary: Invoices view
      description: |
        `GET /3.0/admin/advertiser-invoice/{number}`

        Get a invoice
      parameters:
        - name: api-key
          in: header
          description: API key
          required: true
          schema:
            type: string
        - name: number
          in: path
          description: Invoice number
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: object
                    properties:
                      number:
                        type: integer
                      supplier_id:
                        type: string
                      created_at:
                        type: string
                        format: date
                      updated_at:
                        type: string
                        format: date
                      start_date:
                        type: string
                        format: date
                      end_date:
                        type: string
                        format: date
                      status:
                        type: string
                      detail:
                        type: array
                        items:
                          type: object
                          properties:
                            offer_id:
                              type: integer
                            payout_type:
                              type: string
                            actions:
                              type: integer
                            amount:
                              type: integer
                            comment:
                              type: string
                      currency:
                        type: string
                      comment:
                        type: string
              example:
                status: 1
                message:
                  number: 1
                  supplier_id: 5a37c01cbf0b6b18008b4567
                  created_at: '2018-01-11'
                  updated_at: '2018-01-11'
                  start_date: '2017-12-05'
                  end_date: '2017-12-07'
                  status: paid
                  detail:
                    - offer_id: 1
                      payout_type: RPA
                      actions: 100
                      amount: 100
                      comment: null
                  currency: USD
                  comment: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api-demo.affise.com/3.0/admin/advertiser-invoice/{number}' \
              --header 'api-key: <api-key>'
    post:
      tags:
        - admin-billing
      summary: Edit invoice
      description: |
        `POST /3.0/admin/advertiser-invoice/{number}`

        Change an invoice's data
      parameters:
        - name: api-key
          in: header
          description: API key
          required: true
          schema:
            type: string
        - name: number
          in: path
          description: Invoice number
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                supplier_id:
                  type: string
                  description: Advertiser Id
                start_date:
                  type: string
                  description: Start date of invoice period
                end_date:
                  type: string
                  description: End date of invoice period
                status:
                  type: string
                  description: Invoice status
                  enum:
                    - paid
                    - unpaid
                comment:
                  type: string
                  description: Comment
                detail:
                  type: array
                  items:
                    type: object
                    properties:
                      offer_id:
                        type: integer
                        description: Offer id
                      payout_type:
                        type: string
                        description: Payout type
                        enum:
                          - RPA
                          - RPS
                          - RPA + RPS
                          - RPC
                          - RPM
                      actions:
                        type: integer
                        description: Actions
                      amount:
                        type: integer
                        description: Amount
                      comment:
                        type: string
                        description: Comment for detail
                currency:
                  type: string
                  description: 'Currency code (one of the currencies active in the network). Example: USD'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
              example:
                status: 1
                message: Invoice updated
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api-demo.affise.com/3.0/admin/advertiser-invoice/{number}' \
              --header 'api-key: <api-key>' \
              --form 'supplier_id=string' \
              --form 'start_date=string' \
              --form 'end_date=string' \
              --form 'status=paid' \
              --form 'comment=string' \
              --form 'detail[0][offer_id]=0' \
              --form 'detail[0][payout_type]=RPA' \
              --form 'detail[0][actions]=0' \
              --form 'detail[0][amount]=0' \
              --form 'detail[0][comment]=string' \
              --form 'currency=string'
  /3.0/admin/advertiser/{id}:
    get:
      tags:
        - admin-advertisers
      summary: Get advertiser
      description: |
        `GET /3.0/admin/advertiser/{id}`

        Get advertiser by ID
      parameters:
        - name: api-key
          in: header
          description: API key
          required: true
          example: 23df424b0a53b0899f78685966243ee61
          schema:
            type: string
        - name: id
          in: path
          description: Advertiser ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  advertiser:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type: string
                      contact:
                        type: string
                      email:
                        type: string
                      skype:
                        type: string
                      manager:
                        type: string
                      manager_obj:
                        type: object
                      url:
                        type: string
                      address_1:
                        type: string
                      address_2:
                        type: string
                      city:
                        type: string
                      country:
                        type: string
                      zip_code:
                        type: string
                      vat_code:
                        type: string
                      allowed_ip:
                        type: array
                        items:
                          type: string
                      disallowed_ip:
                        type: array
                        items:
                          type: string
                      consider_personal_targeting_only:
                        type: boolean
                      tags:
                        type: array
                        items:
                          type: string
                      hash_password:
                        type: string
                      skad_network_id:
                        type: array
                        items:
                          type: string
                      disabled_choice_postback_status:
                        type: boolean
                      hide_conversion_status:
                        type: boolean
                      hosts_only:
                        type: boolean
                      sign_clicks_integration:
                        type: string
                      sub_accounts:
                        type: object
                      note:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      affiliates_enabled:
                        type: array
                        items:
                  

# --- truncated at 32 KB (1038 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/affise/refs/heads/main/openapi/affise-openapi.yml