openapi: 3.1.0
info:
  title: Brand API - Unique URLs
  description: 'API for retrieving unique URLs used to track online traffic driven
    by offline ads.

    This is a read-only endpoint. URLs must be managed via the impact.com web app.'
  version: v12
servers:
- url: https://api.impact.com
paths:
  /Advertisers/{AccountSID}/UniqueUrls:
    get:
      summary: List All Unique URLs
      description: Returns a list of your unique URLs, with options for filtering
        by campaign and state.
      operationId: listUniqueUrls
      tags:
      - Unique URLs
      parameters:
      - name: AccountSID
        in: path
        required: true
        schema:
          type: string
        description: Your unique Account SID.
      - name: CampaignId
        in: query
        schema:
          type: integer
        description: Filter by the ID of the program (campaign) that hosts the URL.
      - name: State
        in: query
        schema:
          type: string
          enum:
          - AVAILABLE
          - DELETED
          - INUSE
          - QUARANTINE
          - RESERVED
        description: Filter by the current state of the unique URL.
      responses:
        '200':
          description: A paginated list of unique URL objects.
          content:
            application/json:
              schema:
                type: object
                properties:
                  UniqueUrls:
                    type: array
                    description: The list of unique URL objects.
                    items:
                      $ref: '#/components/schemas/UniqueUrl'
  /Advertisers/{AccountSID}/UniqueUrls/{UrlId}:
    get:
      summary: Retrieve a Unique URL
      description: Retrieves the details of a single unique URL by its ID.
      operationId: getUniqueUrlById
      tags:
      - Unique URLs
      parameters:
      - name: AccountSID
        in: path
        required: true
        schema:
          type: string
        description: Your unique Account SID.
      - name: UrlId
        in: path
        required: true
        schema:
          type: integer
        description: The unique identifier for the URL.
      responses:
        '200':
          description: A single unique URL object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UniqueUrl'
components:
  schemas:
    UniqueUrl:
      type: object
      properties:
        Id:
          type: string
          description: The unique identifier for the unique URL.
          example: '00005'
        Url:
          type: string
          format: uri
          description: The unique URL itself.
          example: https://impact.com
        LandingPage:
          type: string
          format: uri
          description: The landing page the URL redirects to.
          example: https://impact.com
        CampaignId:
          type: integer
          description: Id of the program (formerly known as campaign) that hosts
            the unique URL.
          example: '1000'
        CampaignName:
          type: string
          description: The display name of the program.
          example: Acme Campaign
        State:
          type: string
          description: State of the unique URL.
          enum:
          - AVAILABLE
          - DELETED
          - INUSE
          - QUARANTINE
          - RESERVED
          example: AVAILABLE
        MediaPartnerId:
          type: integer
          nullable: true
          description: The unique identifier of the partner the URL is assigned to,
            if any.
          example: '10000'
        MediaPartnerName:
          type: string
          nullable: true
          description: The display name of the assigned partner.
          example: Acme Partner
        DateCreated:
          type: string
          format: date-time
          description: The date and time the unique URL was created.
          example: '2020-09-18T19:17:36-04:00'
        DateLastAssigned:
          type: string
          format: date-time
          nullable: true
          description: The date and time the unique URL was last assigned to a partner.
          example: ''
        DateLastReleased:
          type: string
          format: date-time
          nullable: true
          description: The date and time the unique URL was last released from a
            partner.
          example: ''
        Uri:
          type: string
          format: uri-reference
          description: The unique reference to this unique URL in the impact.com
            API.
          example: /Advertisers/<AccountSID>/UniqueUrls/00005
