openapi: 3.1.0
info:
  title: Brand Report Export API
  version: v11
  description: "Discover and run reports to extract performance and financial data. \nThe ReportExport endpoint is the recommended asynchronous method for \ndownloading large datasets via a background job. The legacy Reports \nendpoint allows for direct data retrieval and metadata discovery.\n"
servers:
- url: https://api.impact.com
security:
- basicAuth: []
paths:
  /Advertisers/{AccountSID}/ReportExport/{ReportId}:
    get:
      operationId: exportReport
      tags:
      - Report Export
      summary: Export a report asynchronously
      description: "Schedules an asynchronous job to export report data. Returns a job ID \nwhich can be polled via the Jobs endpoint. To include specific columns, \nappend them to the query string (e.g., SHOW_ACTION_BATCH_DATE=1).\n"
      parameters:
      - name: AccountSID
        in: path
        required: true
        description: The unique identifier for the account.
        schema:
          type: string
      - name: ReportId
        in: path
        required: true
        description: The unique ID or handle of the report to export.
        schema:
          type: string
      - name: SUBAID
        in: query
        required: true
        description: The Program ID to filter report data.
        schema:
          type: integer
      - name: StartDate
        in: query
        required: true
        description: Start date for the report as an ISO 8601 date-time (YYYY-MM-DDThh:mm:ssZ), e.g. 2026-01-15T00:00:00Z.
        schema:
          type: string
          format: date-time
      - name: EndDate
        in: query
        required: true
        description: End date for the report as an ISO 8601 date-time (YYYY-MM-DDThh:mm:ssZ), e.g. 2026-01-15T00:00:00Z.
        schema:
          type: string
          format: date-time
      - name: ResultFormat
        in: query
        required: false
        description: The file format for the exported report.
        schema:
          type: string
          enum:
          - CSV
          - JSON
          - XML
          default: CSV
      responses:
        '200':
          description: The report export job has been successfully queued.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Status:
                    type: string
                    description: Indicates whether the job was queued successfully.
                    example: QUEUED
                  QueuedUri:
                    type: string
                    format: uri-reference
                    description: The URI to poll for the job's status.
                  ResultUri:
                    type: string
                    format: uri-reference
                    description: The URI to download the result file once the job completes.
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -L \
            --url 'https://api.impact.com/Advertisers/{AccountSID}/ReportExport/{ReportId}' \
            --user '{AccountSID}:{AuthToken}' \
            --header 'Accept: */*'
  /Advertisers/{AccountSID}/Reports:
    get:
      operationId: listAllReports
      tags:
      - Reports (Legacy)
      summary: List all reports
      description: Retrieves a list of all reports available to the brand account.
      parameters:
      - name: AccountSID
        in: path
        required: true
        description: The unique identifier for the account.
        schema:
          type: string
      responses:
        '200':
          description: A list of report metadata objects.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Reports:
                    type: array
                    description: The list of report objects.
                    items:
                      $ref: '#/components/schemas/ReportDiscovery'
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -L \
            --url 'https://api.impact.com/Advertisers/{AccountSID}/Reports' \
            --user '{AccountSID}:{AuthToken}' \
            --header 'Accept: */*'
  /Advertisers/{AccountSID}/Reports/{ReportId}:
    get:
      operationId: runReportLegacy
      tags:
      - Reports (Legacy)
      summary: Run a report [Deprecation Planned]
      description: "Directly retrieves report records. Note that page size is fixed \nat 20,000 records regardless of input. Use ReportExport for large sets.\n"
      parameters:
      - name: AccountSID
        in: path
        required: true
        description: The unique identifier for the account.
        schema:
          type: string
      - name: ReportId
        in: path
        required: true
        description: The unique ID or handle of the report to run.
        schema:
          type: string
      - name: SUBAID
        in: query
        required: true
        description: The Program ID to filter report data.
        schema:
          type: integer
      - name: StartDate
        in: query
        required: true
        description: Start date for the report (YYYY-MM-DD).
        schema:
          type: string
          format: date
      - name: EndDate
        in: query
        required: true
        description: End date for the report (YYYY-MM-DD).
        schema:
          type: string
          format: date
      - name: RQueryIDx
        in: query
        description: Specify which table to view if the report returns multiple tables.
        schema:
          type: integer
          default: 0
      responses:
        '200':
          description: A list of report records.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Records:
                    type: array
                    description: The records from the report.
                    items:
                      type: object
                      additionalProperties: true
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -L \
            --url 'https://api.impact.com/Advertisers/{AccountSID}/Reports/{ReportId}' \
            --user '{AccountSID}:{AuthToken}' \
            --header 'Accept: */*'
  /Advertisers/{AccountSID}/Reports/{ReportId}/MetaData:
    get:
      operationId: getReportMetadata
      tags:
      - Reports (Legacy)
      summary: Retrieve report metadata
      description: "Retrieves dynamic documentation for a report, including available \nfilters and output attributes.\n"
      parameters:
      - name: AccountSID
        in: path
        required: true
        description: The unique identifier for the account.
        schema:
          type: string
      - name: ReportId
        in: path
        required: true
        description: The unique ID or handle of the report.
        schema:
          type: string
      responses:
        '200':
          description: The metadata object for the requested report.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportMetadata'
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -L \
            --url 'https://api.impact.com/Advertisers/{AccountSID}/Reports/{ReportId}/MetaData' \
            --user '{AccountSID}:{AuthToken}' \
            --header 'Accept: */*'
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  schemas:
    ReportDiscovery:
      type: object
      properties:
        Name:
          type: string
          description: The display name of the report.
          example: DEFAULT_MODEL
        Id:
          type: string
          description: The unique identifier or handle for the report.
          example: adv_action_listing_pm
        Category:
          type: string
          description: The category the report belongs to.
          example: Performance
        Description:
          type: string
          description: A description of what the report contains.
          example: Lists all actions for a date range.
        ApiAccessible:
          type: boolean
          description: Whether this report can be run via the API.
          example: true
        ApiRunUri:
          type: string
          format: uri-reference
          description: The URI to run this report synchronously.
          example: /Advertisers/<AccountSID>/Reports/adv_action_listing_pm
        DeferredApiRunUri:
          type: string
          format: uri-reference
          description: The URI to schedule this report as an asynchronous export job.
          example: /Advertisers/<AccountSID>/ReportExport/adv_action_listing_pm
        MetaDataUri:
          type: string
          format: uri-reference
          description: The URI to retrieve this report's metadata.
          example: /Advertisers/<AccountSID>/ReportsMetadata/adv_action_listing_pm
        RunUri:
          type: string
          format: uri-reference
          description: The URI to run this report in the impact.com platform.
          example: https://app.impact.com/secure/reports/run/adv_action_listing_pm
    ReportMetadata:
      type: object
      properties:
        Name:
          type: string
          description: The display name of the report.
          example: Action Listing
        Id:
          type: string
          description: The unique identifier or handle for the report.
          example: adv_action_listing_pm
        Description:
          type: string
          description: A description of what the report contains.
          example: Lists all actions for a date range.
        Filters:
          type: array
          description: The filter parameters available when running the report.
          items:
            type: object
            properties:
              Name:
                type: string
                description: The filter parameter name.
                example: START_DATE
              DataType:
                type: string
                description: The data type of the filter (e.g., String, Integer, Date).
                example: DATE
              Format:
                type: string
                description: The expected format of the filter value, if applicable.
                example: yyyy-MM-dd
        Attributes:
          type: array
          description: The attributes (columns) returned by the report.
          items:
            type: object
            properties:
              Name:
                type: string
                description: The attribute name.
                example: ActionDate
              DataType:
                type: string
                description: The data type of the attribute.
                example: DATETIME
              Description:
                type: string
                description: A description of the attribute.
                example: Date the action occurred.
        RunUri:
          type: string
          format: uri-reference
          description: The URI to run this report.
          example: /Advertisers/<AccountSID>/Reports/adv_action_listing_pm
        Uri:
          type: string
          format: uri-reference
          description: The unique reference to this metadata object in the impact.com API.
          example: /Advertisers/<AccountSID>/ReportsMetadata/adv_action_listing_pm
x-default-client: cURL
