openapi: 3.1.0
info:
  title: Brand Unique URLs API
  version: v11
  description: "Unique URLs are used to track online traffic driven by offline ads\
    \ such as \nflyers or mailers. This API allows you to retrieve individual unique\
    \ URL \nobjects or list all unique URLs created in your account.\n"
servers:
- url: https://api.impact.com
security:
- basicAuth: []
paths:
  /Advertisers/{AccountSID}/UniqueUrls:
    get:
      operationId: listUniqueUrls
      tags:
      - Unique URLs
      summary: List all unique URLs
      description: Returns a list of your unique URLs.
      parameters:
      - name: AccountSID
        in: path
        required: true
        description: The unique identifier for the account.
        schema:
          type: string
      - name: CampaignId
        in: query
        required: false
        description: Id of the program that hosts the unique URL.
        schema:
          type: integer
      - name: State
        in: query
        required: false
        description: Filter by the state of the unique URL.
        schema:
          type: string
          enum:
          - AVAILABLE
          - DELETED
          - INUSE
          - QUARANTINE
          - RESERVED
      responses:
        '200':
          description: A 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:
      operationId: getUniqueUrl
      tags:
      - Unique URLs
      summary: Retrieve a unique URL
      description: Retrieves a specific unique URL object by its ID.
      parameters:
      - name: AccountSID
        in: path
        required: true
        description: The unique identifier for the account.
        schema:
          type: string
      - name: UrlId
        in: path
        required: true
        description: Unique identifier for the unique URL.
        schema:
          type: integer
      responses:
        '200':
          description: A single unique URL object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UniqueUrl'
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  schemas:
    UniqueUrl:
      type: object
      properties:
        Id:
          type: integer
          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
