FirstPromoter Affiliate Promoter Campaigns API

FirstPromoter Affiliate Promoter Campaigns API - 1 operation(s) on the promoter-facing (api/v2/affiliate) surface, from FirstPromoter's own published OpenAPI definition (3.0.1) indexed in https://docs.firstpromoter.com/llms.txt.

OpenAPI Specification

firstpromoter-v2-affiliate-promoter-campaigns-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: FirstPromoter API
  version: '1.0'
  description: API for managing promoter campaigns in the FirstPromoter system
servers:
- url: https://api.firstpromoter.com/api/v2/affiliate
security:
- BearerAuth: []
paths:
  /promoter_campaigns/{id}:
    put:
      summary: Update promotion ref_token for the promoter_campaign
      tags:
      - Promoter Campaigns
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: id
        in: path
        required: true
        description: The id of the promoter_campaign to be updated
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - ref_token
              properties:
                ref_token:
                  type: string
                  description: The ref_token of the promoter_campaign's promotion
      responses:
        '200':
          description: Promoter campaign updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromoterCampaign'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    AccountId:
      name: Account-ID
      in: header
      required: true
      description: Account identifier that specifies which account is making the request
      schema:
        type: string
        example: acc_123456
  schemas:
    PromoterCampaign:
      type: object
      properties:
        id:
          type: integer
        campaign_id:
          type: integer
        created_at:
          type: string
          format: date-time
        campaign:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
            color:
              type: string
        state:
          type: string
          example: accepted
        promoter_id:
          type: integer
        stats:
          type: object
          properties:
            clicks_count:
              type: integer
            referrals_count:
              type: integer
            sales_count:
              type: integer
            customers_count:
              type: integer
            revenue_amount:
              type: number
        coupon:
          type: object
        display_coupon:
          type: object
        ref_token:
          type: string
        ref_link:
          type: string
        has_monetary_rewards:
          type: boolean
        rewards_for_promoters:
          type: array
          items:
            type: object
            properties:
              apply_on:
                type: string
              product_ids:
                type: array
                items:
                  type: string
              reward_id:
                type: integer
              reward:
                type: object
                properties:
                  name:
                    type: string
                  promoter_reward_type:
                    type: string
                  hide_reward:
                    type: boolean
                  tier_level:
                    type: integer
                  coupon:
                    type: object
              products:
                type: object
        rewards_for_referrals:
          type: array
          items:
            type: object
        promo_codes:
          type: array
          items:
            type: object
        recruitment_link_url:
          type: string
        track_ad_traffic:
          type: boolean
          nullable: true
          description: Whether ad traffic tracking is enabled for this promoter campaign
    Error:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Access token passed as a Bearer token in the Authorization header
    accountId:
      type: apiKey
      in: header
      name: ACCOUNT-ID
      description: Account ID required with bearer token