openapi: 3.1.0
info:
  title: Brand Tasks API
  version: v11
  description: "Manage assignments for partners or account members. This API allows you to \nretrieve individual task details and list all non-archived tasks. \nTasks include details on urgency, state, type, and associated comments or attachments.\n"
servers:
- url: https://api.impact.com
security:
- basicAuth: []
paths:
  /Advertisers/{AccountSID}/Programs/{ProgramId}/Tasks:
    get:
      operationId: listTasks
      tags:
      - Tasks
      summary: List all tasks
      description: Returns a list of existing tasks that have not been archived.
      parameters:
      - name: AccountSID
        in: path
        required: true
        description: The unique identifier for the account.
        schema:
          type: string
      - name: ProgramId
        in: path
        required: true
        description: The ID of the program to retrieve tasks from.
        schema:
          type: integer
      - name: DateLastUpdatedBefore
        in: query
        description: Return tasks last updated before this date (ISO 8601).
        schema:
          type: string
          format: date-time
      - name: DateLastUpdatedAfter
        in: query
        description: Return tasks last updated after this date (ISO 8601).
        schema:
          type: string
          format: date-time
      responses:
        '200':
          description: A list of task objects.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Tasks:
                    type: array
                    description: The list of task objects.
                    items:
                      $ref: '#/components/schemas/Task'
  /Advertisers/{AccountSID}/Programs/{ProgramId}/Tasks/{TaskId}:
    get:
      operationId: getTask
      tags:
      - Tasks
      summary: Retrieve a task
      description: Retrieves the full object details of an existing task.
      parameters:
      - name: AccountSID
        in: path
        required: true
        description: The unique identifier for the account.
        schema:
          type: string
      - name: ProgramId
        in: path
        required: true
        description: The ID of the program the task belongs to.
        schema:
          type: integer
      - name: TaskId
        in: path
        required: true
        description: The unique identifier for the task.
        schema:
          type: integer
      responses:
        '200':
          description: A single task object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  schemas:
    Task:
      type: object
      properties:
        Id:
          type: string
          description: The unique identifier for the task.
          example: '3562529'
        Reference:
          $ref: '#/components/schemas/TaskReference'
          description: Identifies the partner by ID and custom values.
        Details:
          $ref: '#/components/schemas/TaskDetails'
          description: Details about the task itself.
        Attachments:
          type: array
          description: Details about each attachment.
          items:
            $ref: '#/components/schemas/Attachment'
        DueDate:
          type: string
          format: date-time
          description: Date and time at which the task is due (ISO 8601).
          example: 2021-08-31T04:00:00.000+0000
        AssigneeUser:
          $ref: '#/components/schemas/User'
          description: The user of the partner account that the task is assigned to.
        AssigneeAccount:
          type: string
          description: Name of the partner account that the task is assigned to.
          example: Acme Partners
        TotalActions:
          type: integer
          description: Total number of actions that have been recorded for this task.
          example: 0
        TotalComments:
          type: integer
          description: Total number of comments that have been recorded for this task.
          example: 1
        Comments:
          type: array
          description: Details about each comment on this task.
          items:
            $ref: '#/components/schemas/Comment'
        DateCreated:
          type: string
          format: date-time
          description: The date and time the task was created.
          example: 2021-08-18T16:47:21.000+0000
        DateLastUpdated:
          type: string
          format: date-time
          description: The date and time the task was last updated.
          example: 2021-08-18T22:45:42.000+0000
        CreatedBy:
          $ref: '#/components/schemas/User'
          description: The user that created the task.
        LastUpdatedBy:
          $ref: '#/components/schemas/User'
          description: The user that last updated the task.
    TaskReference:
      type: object
      properties:
        PartnerId:
          type: integer
          description: Unique identifier of the partner this task is about.
          example: 2552842
        PartnerValue1:
          type: string
          description: Custom partner tracking value 1.
          example: vip
        PartnerValue2:
          type: string
          description: Custom partner tracking value 2.
          example: north-america
        PartnerValue3:
          type: string
          description: Custom partner tracking value 3.
          example: tennis
    TaskDetails:
      type: object
      properties:
        Summary:
          type: string
          description: Title of the task.
          example: Acme Rewards Card Update
        Description:
          type: string
          description: Detailed description of the task.
          example: Partner needs help with tracking setup.
        Urgent:
          type: boolean
          description: Whether the task is marked urgent.
          example: false
        State:
          type: string
          description: The current state of the task.
          enum:
          - NEW
          - INPROGRESS
          - DUPLICATE
          - INVALID
          - BLOCKED
          - COMPLETED
          - APPROVED
        Type:
          type: string
          description: The category of the task.
          enum:
          - COMPLIANCE
          - TECHNICAL
          - GENERAL
          - CREATIVE
          - FINANCE
          - CONTRACTS
          - ANALYTICS
          - SEARCH_ENGINE_MONITORING
        SubtypeId:
          type: integer
          nullable: true
          description: The unique identifier of the task subtype.
          example: 1001
        SubtypeName:
          type: string
          nullable: true
          description: The display name of the task subtype.
          example: Tracking Issue
        ResolutionId:
          type: string
          nullable: true
          description: The unique identifier of the task resolution.
          example: '5'
        ResolutionName:
          type: string
          nullable: true
          description: The display name of the task resolution.
          example: Resolved
    Attachment:
      type: object
      properties:
        Id:
          type: string
          description: Unique identifier for the attachment.
          example: task_1223456_988957a0-e0ed-4f16-984b-f5a9259e6be7
        Filename:
          type: string
          description: Original filename of the attachment.
          example: acme_reward_card_details.pdf
        Location:
          type: string
          format: uri
          description: URL to download the attachment.
          example: https://cdn.example.com/task_123456_988957a0-e0ed-4f16-984b-f5a9259e6be7.pdf
    User:
      type: object
      properties:
        Username:
          type: string
          description: The user's username.
          example: Wile E. Coyote
        EmailAddress:
          type: string
          format: email
          description: The user's email address.
          example: wilecoyote@example.com
    Comment:
      type: object
      properties:
        Id:
          type: integer
          description: Unique identifier for the comment.
          example: 98765
        Comment:
          type: string
          description: The comment text.
          example: I've updated our home page with the latest ads, see attached screenshot.
        Commenter:
          type: string
          description: Name of the user who posted the comment.
          example: Wile E. Coyote
        Attachments:
          type: array
          description: Details about each attachment on the comment.
          items:
            $ref: '#/components/schemas/Attachment'
        DateCreated:
          type: string
          format: date-time
          description: The date and time the comment was created.
          example: '2026-01-15T10:00:00-08:00'
