components:
  schemas:
    Account:
      properties:
        accountType:
          enum:
            - APP
            - SITE
          type: string
        appId:
          type: string
        appImageURL:
          type: string
        appName:
          type: string
        appURL:
          type: string
        cachedOn:
          format: date-time
          type: string
        category:
          items:
            type: string
          type: array
        domainURL:
          type: string
        id:
          type: string
        logoURL:
          type: string
        name:
          type: string
        partnerId:
          type: string
        platform:
          type: string
        status:
          type: string
        supplier:
          type: string
      type: object
    AccountNetworkActivationDTO:
      properties:
        accountId:
          type: string
        active:
          type: boolean
        configuration:
          additionalProperties:
            type: string
          type: object
        networkId:
          type: string
        partnerId:
          type: string
      type: object
    AccountStatusUpdateDTO:
      properties:
        accountId:
          type: string
      type: object
    Adunit:
      properties:
        accountId:
          type: string
        active:
          type: boolean
        adunitId:
          type: string
        adunitNetworkLinks:
          items:
            $ref: '#/components/schemas/AdunitNetworkLink'
          type: array
        bidSettings:
          $ref: '#/components/schemas/BidSettings'
        code:
          format: int64
          type: integer
        createdAt:
          format: int64
          type: integer
        deleted:
          type: boolean
        excludedBrands:
          items:
            $ref: '#/components/schemas/Brand'
          type: array
        id:
          type: string
        includedBrands:
          items:
            $ref: '#/components/schemas/Brand'
          type: array
        inventoryType:
          enum:
            - inapp
            - website
          type: string
        maxVideoDuration:
          format: int32
          type: integer
        minVideoDuration:
          format: int32
          type: integer
        name:
          type: string
        placementIds:
          items:
            type: string
          type: array
        placementInfo:
          items:
            $ref: '#/components/schemas/Placement'
          type: array
        previouslyActive:
          type: boolean
        priceConfigurations:
          items:
            $ref: '#/components/schemas/FloorPriceConfiguration'
          type: array
        size:
          $ref: '#/components/schemas/AdunitSize'
        type:
          enum:
            - banner
            - interstitial
            - rewarded
            - DISPLAY
            - VIDEO
            - NATIVE
          type: string
        updatedAt:
          format: int64
          type: integer
      type: object
    AdunitDTO:
      properties:
        accountId:
          type: string
        adunitNetworkLinks:
          items:
            $ref: '#/components/schemas/AdunitNetworkLink'
          type: array
        bidSettings:
          $ref: '#/components/schemas/BidSettings'
        excludedBrands:
          items:
            $ref: '#/components/schemas/Brand'
          type: array
        includedBrands:
          items:
            $ref: '#/components/schemas/Brand'
          type: array
        inventoryType:
          enum:
            - inapp
            - website
          type: string
        maxVideoDuration:
          format: int32
          type: integer
        minVideoDuration:
          format: int32
          type: integer
        name:
          type: string
        placementIds:
          items:
            type: string
          type: array
        priceConfigurations:
          items:
            $ref: '#/components/schemas/FloorPriceConfiguration'
          type: array
        size:
          $ref: '#/components/schemas/AdunitSize'
        type:
          enum:
            - banner
            - interstitial
            - rewarded
            - DISPLAY
            - VIDEO
            - NATIVE
          type: string
      type: object
    AdunitInfoDTO:
      properties:
        code:
          format: int64
          type: integer
        maxVideoDuration:
          format: int32
          type: integer
        minVideoDuration:
          format: int32
          type: integer
        name:
          type: string
      type: object
    AdunitNetworkActivationDTO:
      properties:
        accountId:
          type: string
        adunitId:
          format: int64
          type: integer
        configuration:
          additionalProperties:
            type: string
          type: object
        networkId:
          type: string
        priority:
          format: int32
          type: integer
      type: object
    AdunitNetworkLink:
      properties:
        active:
          type: boolean
        networkConfiguration:
          additionalProperties:
            type: string
          type: object
        networkId:
          type: string
        priority:
          format: int32
          type: integer
        updatedAt:
          format: int64
          type: integer
      type: object
    AdunitPlacementDTO:
      properties:
        code:
          format: int64
          type: integer
        placementIds:
          items:
            type: string
          type: array
      type: object
    AdunitSize:
      properties:
        height:
          format: int32
          type: integer
        width:
          format: int32
          type: integer
      type: object
    BasicDBObject:
      additionalProperties: {}
      properties:
        empty:
          type: boolean
        partialObject:
          type: boolean
      type: object
    BidSettingDTO:
      properties:
        biddingType:
          enum:
            - normal
            - waterfall
          type: string
        code:
          format: int64
          type: integer
        defaultFloorPrice:
          format: double
          type: number
        frequencyCapping:
          $ref: '#/components/schemas/FrequencyCapping'
        pricingType:
          enum:
            - kai
            - manual
          type: string
      type: object
    BidSettings:
      properties:
        biddingType:
          enum:
            - normal
            - waterfall
          type: string
        defaultFloorPrice:
          format: double
          type: number
        frequencyCapping:
          $ref: '#/components/schemas/FrequencyCapping'
        pricingType:
          enum:
            - kai
            - manual
          type: string
      type: object
    Brand:
      properties:
        name:
          type: string
        url:
          type: string
      type: object
    BrandDTO:
      properties:
        brandList:
          items:
            $ref: '#/components/schemas/Brand'
          type: array
        code:
          format: int64
          type: integer
      type: object
    FloorPriceConfigDTO:
      properties:
        code:
          format: int64
          type: integer
        priceConfigurations:
          items:
            $ref: '#/components/schemas/FloorPriceConfiguration'
          type: array
      type: object
    FloorPriceConfiguration:
      properties:
        condition:
          enum:
            - time
            - location
          type: string
        endTime:
          format: int64
          type: integer
        price:
          format: double
          type: number
        startTime:
          format: int64
          type: integer
      type: object
    FrequencyCapping:
      properties:
        duration:
          format: int32
          type: integer
        enabled:
          type: boolean
        impressions:
          format: int64
          type: integer
        timeUnit:
          enum:
            - minute
            - hour
            - day
          type: string
      type: object
    OverallAnalyticsQuery:
      properties:
        account:
          type: string
        accounts:
          items:
            type: string
          type: array
        countries:
          items:
            type: string
          type: array
        endDate:
          type: string
        networks:
          items:
            type: string
          type: array
        partner:
          type: string
        sortBy:
          enum:
            - revenue
            - impressions
            - date
          type: string
        startDate:
          type: string
      type: object
    PageAdunit:
      properties:
        content:
          items:
            $ref: '#/components/schemas/Adunit'
          type: array
        empty:
          type: boolean
        first:
          type: boolean
        last:
          type: boolean
        number:
          format: int32
          type: integer
        numberOfElements:
          format: int32
          type: integer
        pageable:
          $ref: '#/components/schemas/PageableObject'
        size:
          format: int32
          type: integer
        sort:
          $ref: '#/components/schemas/SortObject'
        totalElements:
          format: int64
          type: integer
        totalPages:
          format: int32
          type: integer
      type: object
    PageableObject:
      properties:
        offset:
          format: int64
          type: integer
        pageNumber:
          format: int32
          type: integer
        pageSize:
          format: int32
          type: integer
        paged:
          type: boolean
        sort:
          $ref: '#/components/schemas/SortObject'
        unpaged:
          type: boolean
      type: object
    PartnerBillingAddressDTO:
      properties:
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        country:
          type: string
        id:
          type: string
        postalCode:
          type: string
        state:
          type: string
        stateCode:
          type: string
      type: object
    PartnerBillingContactDTO:
      properties:
        company:
          type: string
        email:
          type: string
        id:
          type: string
        name:
          type: string
        sendEmail:
          type: boolean
      type: object
    PartnerNetworkConfig:
      properties:
        accountRequirements:
          items:
            type: string
          type: array
        active:
          type: boolean
        adunitRequirements:
          items:
            type: string
          type: array
        configuration:
          additionalProperties:
            type: string
          type: object
        connected:
          type: boolean
        id:
          type: string
        networkId:
          type: string
        partnerId:
          type: string
        updatedAt:
          format: int64
          type: integer
      type: object
    Placement:
      properties:
        active:
          type: boolean
        description:
          type: string
        id:
          type: string
        name:
          type: string
        placementId:
          type: string
        siteId:
          type: string
        supportedAdFormats:
          items:
            enum:
              - banner
              - interstitial
              - rewarded
              - DISPLAY
              - VIDEO
              - NATIVE
            type: string
          type: array
        supportedSizes:
          items:
            $ref: '#/components/schemas/AdunitSize'
          type: array
      type: object
    PlacementAdunitDTO:
      properties:
        adunitCodes:
          items:
            format: int64
            type: integer
          type: array
        placementId:
          type: string
      type: object
    PlacementDTO:
      properties:
        adunitIds:
          items:
            format: int64
            type: integer
          type: array
        description:
          type: string
        name:
          type: string
        placementId:
          type: string
        siteId:
          type: string
        supportedAdFormats:
          items:
            enum:
              - banner
              - interstitial
              - rewarded
              - DISPLAY
              - VIDEO
              - NATIVE
            type: string
          type: array
        supportedSizes:
          items:
            $ref: '#/components/schemas/AdunitSize'
          type: array
      type: object
    PlacementInfoDTO:
      properties:
        description:
          type: string
        name:
          type: string
        placementId:
          type: string
      type: object
    SortObject:
      properties:
        empty:
          type: boolean
        sorted:
          type: boolean
        unsorted:
          type: boolean
      type: object
  securitySchemes:
    oauth2:
      flows:
        clientCredentials:
          tokenUrl: https://id-test.knorex.com/api/oauth2/token
      type: oauth2
info:
  title: AscendX API
  version: v1.9
openapi: 3.1.0
paths:
  /api/external/v1/account:
    get:
      operationId: getAccounts_1
      parameters:
        - in: query
          name: partner
          required: true
          schema:
            type: string
        - in: query
          name: accountType
          required: false
          schema:
            enum:
              - APP
              - SITE
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  - appId: com.google.android.youtube
                    appImageURL: >-
                      https://play-lh.googleusercontent.com/lMoItBgdPPVDJsNOVtP26EKHePkwBg-PkuY9NOrc-fumRtTFP4XhpUNk_22syN4Datc=w240-h480
                    appName: YouTube
                    appURL: >-
                      https://play.google.com/store/apps/details?id=com.google.android.youtube
                    id: knx000001
                    partnerId: asxPartnerID
                    platform: android
                    status: active
                    supplier: Google LLC
                success: true
          description: Get accounts by partner ID
      summary: Get accounts by partner ID
      tags:
        - Account API
  /api/external/v1/account/deactivate:
    post:
      operationId: deactivateAccount
      requestBody:
        content:
          application/json:
            example:
              accountId: knx000001
            schema:
              $ref: '#/components/schemas/AccountStatusUpdateDTO'
        description: Account to create
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  appId: com.google.android.youtube
                  appName: YouTube
                  id: knx000001
                  partnerId: asxPartnerID
                  status: suspended
                success: true
          description: Deactivate account
      summary: Deactivate account
      tags:
        - Account API
  /api/external/v1/account/reactivate:
    post:
      operationId: reactivateAccount
      requestBody:
        content:
          application/json:
            example:
              accountId: knx000001
            schema:
              $ref: '#/components/schemas/AccountStatusUpdateDTO'
        description: Account to create
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  appId: com.google.android.youtube
                  appName: YouTube
                  id: knx000001
                  partnerId: asxPartnerID
                  status: active
                success: true
          description: Reactivate account
      summary: Reactivate account
      tags:
        - Account API
  /api/external/v1/account/{id}:
    get:
      operationId: getAccount
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  appId: com.google.android.youtube
                  appName: YouTube
                  id: knx000001
                  partnerId: ''
                success: true
          description: Get account by account ID
      summary: Get account by ID
      tags:
        - Account API
  /api/external/v1/adunit:
    get:
      operationId: getBidderNetwork_1
      parameters:
        - in: query
          name: account
          required: true
          schema:
            type: string
        - in: query
          name: search
          required: false
          schema:
            type: string
        - in: query
          name: appendPlacementIds
          required: false
          schema:
            default: false
            type: boolean
        - in: query
          name: active
          required: false
          schema:
            type: boolean
        - in: query
          name: adunitType
          required: false
          schema:
            enum:
              - banner
              - interstitial
              - rewarded
              - DISPLAY
              - VIDEO
              - NATIVE
            type: string
        - in: query
          name: inventoryType
          required: false
          schema:
            enum:
              - inapp
              - website
            type: string
        - in: query
          name: page
          required: false
          schema:
            default: 0
            format: int32
            type: integer
        - in: query
          name: size
          required: false
          schema:
            default: 10
            format: int32
            type: integer
        - in: query
          name: sortField
          required: false
          schema:
            default: name
            enum:
              - name
              - active
              - inventory_type
            type: string
        - in: query
          name: sortDirection
          required: false
          schema:
            default: DESC
            enum:
              - ASC
              - DESC
            type: string
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/PageAdunit'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/PageAdunit'
          description: OK
      summary: Get list of adunits
      tags:
        - Adunit API
    post:
      operationId: createAdunit_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdunitDTO'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Create adunit
      tags:
        - Adunit API
  /api/external/v1/adunit/bid_settings:
    put:
      operationId: updateAdunitBidSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BidSettingDTO'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Update adunit bid settings
      tags:
        - Adunit API
  /api/external/v1/adunit/brand/exclude:
    post:
      operationId: excludeBrand
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrandDTO'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Update adunit brand exclusions
      tags:
        - Adunit API
  /api/external/v1/adunit/brand/include:
    post:
      operationId: includeBrand_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrandDTO'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Update adunit brand inclusions
      tags:
        - Adunit API
  /api/external/v1/adunit/disable:
    put:
      operationId: deactivateAdunit_1
      parameters:
        - in: query
          name: code
          required: true
          schema:
            format: int64
            type: integer
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Deactivate adunit
      tags:
        - Adunit API
  /api/external/v1/adunit/enable:
    put:
      operationId: activateAdunit
      parameters:
        - in: query
          name: code
          required: true
          schema:
            format: int64
            type: integer
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Activate adunit
      tags:
        - Adunit API
  /api/external/v1/adunit/info:
    put:
      operationId: updateAdunitInfo
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdunitInfoDTO'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Update adunit info
      tags:
        - Adunit API
  /api/external/v1/adunit/placements:
    put:
      operationId: updateAdunitPlacements
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdunitPlacementDTO'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Update the adunit's linked placements
      tags:
        - Adunit API
  /api/external/v1/adunit/price_configuration:
    post:
      operationId: addFloorPriceConfiguration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FloorPriceConfigDTO'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Update adunit floor price configuration
      tags:
        - Adunit API
  /api/external/v1/adunit/{code}:
    get:
      operationId: getSingleAdunit
      parameters:
        - in: path
          name: code
          required: true
          schema:
            format: int64
            type: integer
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Get adunit by id
      tags:
        - Adunit API
  /api/external/v1/analytics/performance/breakdown/{type}:
    post:
      operationId: getBreakdownByTime
      parameters:
        - in: path
          name: type
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OverallAnalyticsQuery'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Get performance breakdown by time/geo/network
      tags:
        - Analytics API
  /api/external/v1/analytics/performance/overall:
    post:
      operationId: getOverallAnalytics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OverallAnalyticsQuery'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Get overall performance between a start and end date
      tags:
        - Analytics API
  /api/external/v1/app:
    post:
      operationId: createAccount
      parameters:
        - in: query
          name: userEmail
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            example:
              appId: com.google.android.youtube
              appImageURL: >-
                https://play-lh.googleusercontent.com/lMoItBgdPPVDJsNOVtP26EKHePkwBg-PkuY9NOrc-fumRtTFP4XhpUNk_22syN4Datc=w240-h480
              appName: YouTube
              appURL: >-
                https://play.google.com/store/apps/details?id=com.google.android.youtube
              partnerId: asxPartnerID
              platform: android
              supplier: Google LLC
            schema:
              $ref: '#/components/schemas/Account'
        description: Account to create
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  appId: com.google.android.youtube
                  appName: YouTube
                  id: knx000001
                  partnerId: asxPartnerID
                success: true
          description: Create app
      summary: Create app
      tags:
        - App API
  /api/external/v1/countries:
    get:
      operationId: getCountryListExternal
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  - alpha2Code: US
                    code: USA
                    name: United States
                success: true
          description: Get list of countries and their ISO alpha-2 and ISO alpha-3 codes
      summary: Get list of countries
      tags:
        - Location API
  /api/external/v1/mobile_app/search:
    get:
      operationId: searchMobileApps
      parameters:
        - in: query
          name: platform
          required: true
          schema:
            enum:
              - android
              - ios
            type: string
        - in: query
          name: keyword
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                mobileAppList:
                  - app_url: >-
                      https://play.google.com/store/apps/details?id=com.google.android.apps.automotive.youtube
                    id: com.google.android.apps.automotive.youtube
                    imageUrl: >-
                      https://play-lh.googleusercontent.com/RC3mZYU2LBpGfBuN6rMwdvsgm4xpY-VWSJMwhxPIwCCPOZF4W3F92i_mCj4CRrJYE8U=w416-h235
                    name: YouTube
                    supplier: Google LLC
                success: true
          description: Query mobile apps by platform and keyword
      summary: Query mobile apps
      tags:
        - Mobile App API
  /api/external/v1/network:
    get:
      operationId: getBidderNetwork_3
      parameters:
        - in: query
          name: partner
          required: true
          schema:
            type: string
        - in: query
          name: account
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  - accountRequirements:
                      - appId
                      - appSecret
                    active: true
                    adunitRequirements:
                      - placementId
                    configuration: {}
                    connected: true
                    logo: >-
                      https://cdn.knorex.com/arena/staging/ascendx/logo/audience_network.png
                    name: 'Audience Network '
                    networkId: audienceNetwork
                    partnerRequirements: []
                    scope: app
                success: true
          description: Get bidder network details by partner and account
      summary: Get bidder networks
      tags:
        - Bidder Network API
  /api/external/v1/network/account/activate:
    post:
      operationId: activateNetworkAtAccount_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountNetworkActivationDTO'
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                success: true
          description: OK
      summary: Activate bidder network at account level
      tags:
        - Bidder Network API
  /api/external/v1/network/account/deactivate:
    post:
      operationId: deactivateNetworkAtAccount_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountNetworkActivationDTO'
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                success: true
          description: OK
      summary: Deactivate bidder network at account level
      tags:
        - Bidder Network API
  /api/external/v1/network/adunit/activate:
    post:
      operationId: activateNetworkAtAdunit_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdunitNetworkActivationDTO'
        required: true
      responses:
        '200':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Activate bidder network at adunit level
      tags:
        - Bidder Network API
  /api/external/v1/network/adunit/deactivate:
    post:
      operationId: deactivateNetworkAtAdunit_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdunitNetworkActivationDTO'
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                success: true
          description: OK
      summary: Deactivate bidder network at adunit level
      tags:
        - Bidder Network API
  /api/external/v1/network/partner/connect:
    post:
      operationId: connectBidderNetwork_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerNetworkConfig'
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  accountRequirements:
                    - appId
                    - appSecret
                  active: true
                  adunitRequirements:
                    - placementId
                  configuration: {}
                  connected: true
                  id: 68f0554b83c0a3a0ebed7be5
                  networkId: audienceNetwork
                  partnerId: Zmpfk6dgewj7
                  updatedAt: 1760683531
                success: true
          description: OK
      summary: Connect bidder network at partner level
      tags:
        - Bidder Network API
  /api/external/v1/network/partner/disable:
    put:
      operationId: disableNetworkAtPartner_1
      parameters:
        - in: query
          name: partner
          required: true
          schema:
            type: string
        - in: query
          name: network
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Disable bidder network at partner level
      tags:
        - Bidder Network API
  /api/external/v1/network/partner/enable:
    put:
      operationId: enableNetworkAtPartner_1
      parameters:
        - in: query
          name: partner
          required: true
          schema:
            type: string
        - in: query
          name: network
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  accountRequirements:
                    - appId
                    - appSecret
                  active: true
                  adunitRequirements:
                    - placementId
                  configuration: {}
                  connected: true
                  id: 68f0554b83c0a3a0ebed7be5
                  networkId: audienceNetwork
                  partnerId: Zmpfk6dgewj7
                  updatedAt: 1760680144
                success: true
          description: OK
      summary: Enable bidder network at partner level
      tags:
        - Bidder Network API
  /api/external/v1/partner:
    get:
      operationId: getPartners_1
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Get list of partners
      tags:
        - Partner API
    put:
      operationId: updatePartner_1
      parameters:
        - description: JSON string containing the partner data to update
          examples:
            PartnerUpdate:
              description: PartnerUpdate
              summary: Partner update payload
              value:
                id: asxPartnerID
                name: AscendX Prtner 1
                url: https://ascendxnow.com
          in: query
          name: data
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: Optional logo image file for the partner
                  format: binary
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Update partner details
      tags:
        - Partner API
  /api/external/v1/partner/billing_address:
    put:
      operationId: updatePartnerBillingAddress_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerBillingAddressDTO'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Update partner billing address
      tags:
        - Partner API
  /api/external/v1/partner/billing_contact:
    put:
      operationId: updatePartnerBillingContact_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerBillingContactDTO'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Update partner billing contact
      tags:
        - Partner API
  /api/external/v1/partner/{id}:
    get:
      operationId: getPartner_1
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Get partner by id
      tags:
        - Partner API
  /api/external/v1/placement:
    get:
      operationId: getPlacementsBySite
      parameters:
        - in: query
          name: siteId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Get placements by site ID
      tags:
        - Placement API
    post:
      operationId: createPlacement
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlacementDTO'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Create placement
      tags:
        - Placement API
  /api/external/v1/placement/adunits:
    put:
      operationId: updatePlacementAdunitLink
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlacementAdunitDTO'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Update placement's linked adunits
      tags:
        - Placement API
  /api/external/v1/placement/deactivate:
    put:
      operationId: deactivatePlacement
      parameters:
        - in: query
          name: placementId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Deactivate placement
      tags:
        - Placement API
  /api/external/v1/placement/info:
    put:
      operationId: updatePlacementInfo_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlacementInfoDTO'
        required: true
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Update placement info
      tags:
        - Placement API
  /api/external/v1/placement/reactivate:
    put:
      operationId: reactivatePlacement
      parameters:
        - in: query
          name: placementId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Reactivate placement
      tags:
        - Placement API
  /api/external/v1/placement/{placementId}:
    get:
      operationId: getPlacement
      parameters:
        - in: path
          name: placementId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Get placement by placement ID
      tags:
        - Placement API
  /api/external/v1/site:
    post:
      operationId: createSite_1
      parameters:
        - description: JSON string containing the site data to create
          examples:
            SiteCreate:
              description: SiteCreate
              summary: Site creation payload
              value:
                accountType: SITE
                category:
                  - Retail
                  - Ecommerce
                domainURL: https://site1.example
                name: AscendX Site 1
                partnerId: asxPartnerID
          in: query
          name: siteToCreate
          required: true
          schema:
            type: string
        - description: Email address of the user creating the site
          in: query
          name: userEmail
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: Optional logo image file for the site
                  format: binary
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Create a site account
      tags:
        - Site API
    put:
      operationId: updateSite_1
      parameters:
        - description: JSON string containing the site data to update
          examples:
            SiteUpdate:
              description: SiteUpdate
              summary: Site update payload
              value:
                accountType: SITE
                category:
                  - Retail
                domainURL: https://site1-new.example
                id: knx000001
                name: AscendX Site 1 - New
          in: query
          name: siteToUpdate
          required: true
          schema:
            type: string
        - description: Email address of the user updating the site
          in: query
          name: userEmail
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: Optional logo image file for the site
                  format: binary
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/BasicDBObject'
          description: OK
      summary: Update site name/url/logo/category
      tags:
        - Site API
  /api/external/v1/states:
    get:
      operationId: getStates
      parameters:
        - description: 2-letter country code
          example: SG
          in: query
          name: country
          required: true
          schema:
            type: string
        - description: Search query
          example: bukit
          in: query
          name: query
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                states:
                  - code: BKM
                    countryCode: SG
                    name: Bukit Merah Estate
                    type: location
                success: true
          description: Get list of states of the country
      summary: Get list of states in a country
      tags:
        - Location API
security:
  - oauth2: []
servers:
  - description: Generated server url
    url: https://console-stg.ascendxnow.com
tags:
  - description: APIs related to bidder networks
    name: Bidder Network API
  - description: APIs to query countries, states, etc
    name: Location API
  - description: APIs related to placement
    name: Placement API
  - description: APIs to get performance metrics
    name: Analytics API
  - description: APIs related to partners
    name: Partner API
  - description: APIs related to sites.
    name: Site API
  - description: APIs related to account
    name: Account API
  - description: APIs to query mobile app details
    name: Mobile App API
  - description: APIs related to apps
    name: App API
  - description: APIs related to adunits
    name: Adunit API
