openapi: 3.1.0
info:
  title: Partner Promo Code Exception Lists API
  description: 'A promo code exception list allows a brand to pay different commission
    rates based on the promo code associated with a tracked action. Promo code exception
    lists are linked to contracts — retrieve the PromoCodeExceptionListId from the
    Contracts API, then use these endpoints to retrieve the list details and its items.

    '
  version: '15'
  contact:
    name: impact.com Developer Support
    url: https://app.impact.com/secure/help/contact-support.ihtml
servers:
- url: https://api.impact.com
tags:
- name: Promo Code Exception Lists
  description: Endpoints for retrieving promo code exception list details and items.
paths:
  /Mediapartners/{AccountSID}/PromoCodeExceptionLists/{PromoCodeExceptionListId}:
    get:
      operationId: retrievePromoCodeExceptionList
      tags:
      - Promo Code Exception Lists
      summary: Retrieve a Promo Code Exception List
      description: 'Retrieves the details of an existing promo code exception list
        using its unique ID. The PromoCodeExceptionListId can be obtained from the
        Contracts API.

        '
      parameters:
      - name: AccountSID
        in: path
        required: true
        schema:
          type: string
        description: Unique identifier for the partner account.
      - name: PromoCodeExceptionListId
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier for the promo code exception list.
      responses:
        '200':
          description: The promo code exception list object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromoCodeExceptionList'
  /Mediapartners/{AccountSID}/PromoCodeExceptionLists/{PromoCodeExceptionListId}/Items:
    get:
      operationId: listPromoCodeExceptionListItems
      tags:
      - Promo Code Exception Lists
      summary: List Promo Code Exception List Items
      description: Returns a list of all items in a specific promo code exception
        list. Each item defines a promo code value that triggers an alternate commission
        rate.
      parameters:
      - name: AccountSID
        in: path
        required: true
        schema:
          type: string
        description: Unique identifier for the partner account.
      - name: PromoCodeExceptionListId
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier for the promo code exception list whose
          items are being retrieved.
      responses:
        '200':
          description: A list of promo code exception list item objects.
          content:
            application/json:
              schema:
                type: object
                properties:
                  PromoCodeExceptionListItems:
                    type: array
                    items:
                      $ref: '#/components/schemas/PromoCodeExceptionListItem'
components:
  schemas:
    PromoCodeExceptionList:
      type: object
      properties:
        Id:
          type: string
          description: Unique identifier for the promo code exception list.
          example: '6001'
        Name:
          type: string
          description: Display name of the promo code exception list.
          example: VIP Partner Promo Exclusions
        State:
          type: string
          enum:
          - ACTIVE
          - CLOSED
          - DEACTIVATED
          description: The current state of the promo code exception list.
          example: ACTIVE
        CampaignId:
          type: string
          description: Unique identifier for the program this promo code exception
            list applies to.
          example: '10306'
        CreatedDate:
          type: string
          format: date-time
          description: Date and time the promo code exception list was created (ISO
            8601).
          example: '2024-03-10T09:00:00-08:00'
        DeactivationDate:
          type: string
          format: date-time
          description: Date and time the promo code exception list was deactivated
            (ISO 8601). Empty if the list is still active.
          example: ''
        NumberOfItems:
          type: integer
          description: The number of items in the promo code exception list.
          example: 5
        ItemsUri:
          type: string
          description: API resource path for retrieving the items in this promo code
            exception list.
          example: /Mediapartners/<AccountSID>/PromoCodeExceptionLists/6001/Items
        Uri:
          type: string
          description: Unique reference to the promo code exception list object in
            the impact.com API.
          example: /Mediapartners/<AccountSID>/PromoCodeExceptionLists/6001
    PromoCodeExceptionListItem:
      type: object
      description: An item within a promo code exception list that defines a specific
        promo code value triggering an alternate commission rate.
      properties:
        Id:
          type: string
          description: Unique identifier for the promo code exception list item.
          example: '1'
        ListId:
          type: string
          description: Unique identifier for the parent promo code exception list.
          example: '6001'
        Name:
          type: string
          description: Display name of the promo code exception list item.
          example: Summer Sale Code
        Value:
          type: string
          description: The promo code value this item matches against.
          example: SUMMER2026
        MatchMode:
          type: string
          enum:
          - EQ
          - REGEX
          description: The matching methodology used to evaluate the promo code value.
            EQ matches exactly; REGEX matches using a regular expression.
          example: EQ
        CreatedDate:
          type: string
          format: date-time
          description: Date and time this item was added to the promo code exception
            list (ISO 8601).
          example: '2024-03-10T09:00:00-08:00'
        Uri:
          type: string
          description: Unique reference to the promo code exception list item in
            the impact.com API.
          example: /Mediapartners/<AccountSID>/PromoCodeExceptionLists/6001/Items/1
