openapi: 3.1.0
info:
  title: Banking Admin Campaigns
  description: |-
    Manages advertising _campaigns_ for inclusion in Apiture's mobile and web banking applications. A campaign is an advertising effort that has a name, description/purpose, audience (list of customers), one or more different digital ads, a schedule, and a state. Campaigns start in a `draft` state when created. When an admin user schedules a campaign, it's state becomes `scheduled`. When the current date/time is within one of the campaign's scheduled periods, the campaign's state is `active`. The admin may cancel the campaign if it should stop running before the last scheduled end date. If the scheduled time frame is finished without being canceled, the campaign state becomes `completed`.

    Clients can create new campaigns from scratch, or they may create a `copyOf` an existing campaign. Completed campaigns cannot be activated/resumed; instead, copy the campaign so that the copied campaign can collect its own metrics.

    Active, canceled, and completed campaigns cannot be changed. Active campaigns must be paused before they can be edited. Completed, paused, scheduled, testing, draft, and canceled campaigns can also be [archived](#op-archiveCampaign). Archived campaigns can be restored with the [unarchive](#op-unarchiveCampaign) operation. When completed campaigns are unarchived, they will return to the `completed` state. When campaigns of any other `state` are restored, they will return to the `draft` state.

    A campaign has one or more advertisements or _ads_. An ad can have specific imagery or other text content, and a redirect link (URL) that the user will be routed to when they click the ad. Copying a campaign also copies the ads in it.

    Ads have a `priority` which determines the order in which they are displayed to the customer. A `priority` value of 1 represents the highest priority ad in a campaign. A `priority` value of 100 represents the lowest priority ad in a campaign.

    Ads have a location that tells the client where the application should place the ad, for example, on the account summary page of the mobile app or the payments page of the web app. A client can create a new campaign ad location based on the overall design of their application, and then create ads that display in those locations. A campaign can only have a single ad in a given location.

    The API presents advertising metrics for active or completed campaigns including the number of impressions (how often ads were presented to customers), the number of click in the ads, and the number of times customers followed the ad's call to action.

    Endpoints marked with a `security` method of `clientCredentials` are intended to be used by external applications, such as an online banking provider. These applications do not have the ability to authenticate with the Data Portal product, so an alternative authentication method is provided. These operations include [dismiss](#op-dismissCampaignAd), [click](#op-trackCampaignAdClick), and [getNextAd](#op-getNextAd). All other endpoints marked with a `security` method of `accessToken` are intended to be used by the Data Portal application.
  version: 0.16.1
  contact:
    name: Apiture
    email: api@apiture.com
    url: https://developer.apiture.com
  termsOfService: https://developer.apiture.com/docs/Apiture-API-License-Agreement.pdf
  license:
    name: Apiture API License
    url: https://developer.apiture.com/docs/Apiture-API-License-Agreement.pdf
x-apiture-namespace: bankingAdminCampaigns
tags:
  - name: Campaigns
    description: Advertising Campaigns
  - name: Campaign Actions
    description: Actions on Campaign Resources
  - name: Campaign Ads
    description: Ads within Advertising Campaigns
  - name: Campaign Metrics
    description: Metrics for Campaign Advertisements
  - name: Campaign Ad Locations
    description: Display Locations for Campaign Ads
  - name: Campaign Ad Dismissals
    description: Actions to Dismiss Campaign Ads
servers:
  - url: /bankingAdmin
paths:
  /campaigns:
    get:
      summary: Return a collection of campaigns
      description: Return a collection of campaigns.
      operationId: listCampaigns
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaigns
      security:
        - accessToken:
            - adminData/read
      parameters:
        - name: q
          in: query
          description: Optional search string. This search is case insensitive and will return campaigns where any part of the name or description matches the search string. See "Using Search Strings" in the Admin Search API for details on searching for multiple words.
          schema:
            type: string
            format: text
            minLength: 1
            maxLength: 1000
        - name: state
          in: query
          description: Filter the response to only events whose `state` is in this pipe-delimited set of state names.
          style: pipeDelimited
          explode: false
          schema:
            type: array
            minItems: 1
            maxItems: 8
            uniqueItems: true
            items:
              $ref: '#/components/schemas/campaignState'
        - name: audience
          description: Return campaigns whose `audience.id` equals the given `audience` value.
          in: query
          schema:
            $ref: '#/components/schemas/resourceId'
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaigns'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaigns'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: listCampaigns
    post:
      summary: Create a new campaign
      description: Create a new advertising campaign, adding it to the the campaigns collection. The request may include an `copyOf` query parameter to make a copy of an existing campaign. The `state` of the new campaign is always `draft`. Use [`scheduleCampaign`](#op-scheduleCampaign) schedule the new campaign.
      operationId: createCampaign
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaigns
      security:
        - accessToken:
            - adminData/write
      parameters:
        - name: copyOf
          description: Make a new campaign that is a copy of an existing campaign, its campaign ads, and its audience. The parameter value is the `id` (`{campaignId}`) of the campaign to copy. Values in the request body override those from the existing campaign, except for `id`, `state`, `createdAt`, `createdBy`, `updatedAt` and `updatedBy` which are not copied.
          in: query
          schema:
            $ref: '#/components/schemas/resourceId'
      requestBody:
        description: The data necessary to create a new campaign.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/newCampaign'
          application/vnd.restful+json:
            schema:
              $ref: '#/components/schemas/newCampaign'
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaign'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaign'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
            Location:
              description: The URI of the new campaign.
              schema:
                type: string
                format: uri-reference
                maxLength: 128
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '422':
          description: |
            Unprocessable Entity. The request body and/or query parameters were well formed but otherwise invalid.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/overlappingIntervals/v1.0.0`](https://static.api.apiture.com/errors/overlappingIntervals/v1.0.0)<br>
              The given `schedule` has two `interval` date-times that overlap.
              Remediation: Resubmit the request with `interval` values that do not overlap.

            * [`https://static.api.apiture.com/errors/invalidCampaignSchedule/v1.0.0`](https://static.api.apiture.com/errors/invalidCampaignSchedule/v1.0.0)<br>
              The campaign `schedule` is invalid.
              Remediation: Choose a `startAt` and `endAt` date that is not in the past. `startAt` must also be on or before `endAt`.

            * [`https://static.api.apiture.com/errors/invalidSourceCampaign/v1.0.0`](https://static.api.apiture.com/errors/invalidSourceCampaign/v1.0.0)<br>
              The source campaign does not exist or is not a campaign that is eligible to be copied.
              Remediation: Pass the `id` of a mutable, copyable campaign.
          x-apiture-errors:
            - overlappingIntervals
            - invalidCampaignSchedule
            - invalidSourceCampaign
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: createCampaign
  /campaigns/{campaignId}:
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
    get:
      summary: Fetch a representation of this campaign
      description: Return a representation of this campaign resource. This is a _conditional operation_ when the `If-None-Match` header is used. If the client has a `campaign` response and the `ETag` returned from a previous call, this operation returns a 304 Not Modified if called again when the campaign has not changed.
      operationId: getCampaign
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaigns
      security:
        - accessToken:
            - adminData/read
      parameters:
        - $ref: '#/components/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaign'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaign'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '304':
          $ref: '#/components/responses/304'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: getCampaign
    patch:
      summary: Update this campaign
      description: Perform a partial update of this campaign as per [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7396) format and processing rules. Only fields in the request body are updated on the resource; fields which are omitted are not updated. If a campaign `state` is `paused`, updating any properties other than `name` and `description` changes the campaign `state` to `draft`. This operation is only accepted whenever `allows.edit` is `true`.
      operationId: patchCampaign
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaigns
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      requestBody:
        description: The campaign parameters to update.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/campaignPatch'
          application/vnd.restful+json:
            schema:
              $ref: '#/components/schemas/campaignPatch'
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaign'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaign'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: |
            Conflict.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/campaignIsImmutable/v1.0.0`](https://static.api.apiture.com/errors/campaignIsImmutable/v1.0.0)<br>
              Cannot add, update, or delete an ad if the campaign is active, canceled, or completed.
              Remediation: Only add, update, and delete campaigns and ads for draft, scheduled, testing, and paused campaigns.
          x-apiture-errors:
            - campaignIsImmutable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '412':
          $ref: '#/components/responses/412'
        '422':
          description: |
            Unprocessable Entity. The request body and/or query parameters were well formed but otherwise invalid.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/overlappingIntervals/v1.0.0`](https://static.api.apiture.com/errors/overlappingIntervals/v1.0.0)<br>
              The given `schedule` has two `interval` date-times that overlap.
              Remediation: Resubmit the request with `interval` values that do not overlap.

            * [`https://static.api.apiture.com/errors/invalidCampaignSchedule/v1.0.0`](https://static.api.apiture.com/errors/invalidCampaignSchedule/v1.0.0)<br>
              The campaign `schedule` is invalid.
              Remediation: Choose a `startAt` and `endAt` date that is not in the past. `startAt` must also be on or before `endAt`.

            * [`https://static.api.apiture.com/errors/invalidSourceCampaign/v1.0.0`](https://static.api.apiture.com/errors/invalidSourceCampaign/v1.0.0)<br>
              The source campaign does not exist or is not a campaign that is eligible to be copied.
              Remediation: Pass the `id` of a mutable, copyable campaign.
          x-apiture-errors:
            - overlappingIntervals
            - invalidCampaignSchedule
            - invalidSourceCampaign
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: patchCampaign
    delete:
      summary: Delete this campaign resource
      description: Delete this campaign resource and any resources that are owned by it, including ads. This operation can only be called on `archived` campaigns.
      operationId: deleteCampaign
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaigns
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '204':
          $ref: '#/components/responses/204'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: |
            Conflict.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/cannotDeleteCampaign/v1.0.0`](https://static.api.apiture.com/errors/cannotDeleteCampaign/v1.0.0)<br>
              Only `archived` campaigns can be deleted.
              Remediation: Archive the campaign and retry the operation.
          x-apiture-errors:
            - cannotDeleteCampaign
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '412':
          $ref: '#/components/responses/412'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: deleteCampaign
  /campaigns/{campaignId}/historyRecords:
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
    get:
      summary: Fetch the history records for this campaign.
      description: Return a list of history records for this campaign.
      operationId: listCampaignHistoryRecords
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaigns
      security:
        - accessToken:
            - adminData/read
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignHistoryRecords'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaignHistoryRecords'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: listCampaignHistoryRecords
  /campaigns/{campaignId}/ads:
    description: Ads associated with a campaign.
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
    get:
      summary: Return a collection of ads
      description: Return a collection of ads for the given campaign.
      operationId: listCampaignAds
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Ads
      security:
        - accessToken:
            - adminData/read
      parameters:
        - $ref: '#/components/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignAds'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaignAds'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '304':
          $ref: '#/components/responses/304'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: listCampaignAds
    post:
      summary: Create a new campaign ad
      description: Create a new ad within a campaign. If the campaign's ad rotation policy is `none`, the default policy is assigned. A campaign can only have a single ad in a given location. Ads cannot be added to `active`, `scheduled`, or `completed` campaigns. If an ad is added to a `paused` campaign, then the campaign state is automatically set to `draft`. This operation is only accepted whenever the campaign's `allows.addAd` and `allows.edit` is `true`.
      operationId: createCampaignAd
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Ads
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      requestBody:
        description: The data necessary to create a new ad.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/newCampaignAd'
          application/vnd.restful+json:
            schema:
              $ref: '#/components/schemas/newCampaignAd'
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignAd'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaignAd'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
            Location:
              description: The URI of the new campaign ad.
              schema:
                type: string
                format: uri-reference
                maxLength: 128
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: |
            Conflict.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/campaignIsImmutable/v1.0.0`](https://static.api.apiture.com/errors/campaignIsImmutable/v1.0.0)<br>
              Cannot add, update, or delete an ad if the campaign is active, canceled, or completed.
              Remediation: Only add, update, and delete campaigns and ads for draft, scheduled, testing, and paused campaigns.

            * [`https://static.api.apiture.com/errors/multipleAdsInLocation/v1.0.0`](https://static.api.apiture.com/errors/multipleAdsInLocation/v1.0.0)<br>
              Multiple ads cannot be placed in a single location within a campaign.
              Remediation: Delete the existing ad in the given location or select a new location.

            * [`https://static.api.apiture.com/errors/tooManyAds/v1.0.0`](https://static.api.apiture.com/errors/tooManyAds/v1.0.0)<br>
              The campaign has the maximum number of ads.
              Remediation: Delete an existing ad before creating a new one or start a new campaign.
          x-apiture-errors:
            - campaignIsImmutable
            - multipleAdsInLocation
            - tooManyAds
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '412':
          $ref: '#/components/responses/412'
        '422':
          $ref: '#/components/responses/422CampaignAd'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: createCampaignAd
  /campaigns/{campaignId}/ads/{adId}:
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
      - $ref: '#/components/parameters/adIdPathParam'
    get:
      summary: Fetch a representation of this ad
      description: Return a representation of this ad resource.
      operationId: getCampaignAd
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Ads
      security:
        - accessToken:
            - adminData/read
      parameters:
        - $ref: '#/components/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignAd'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaignAd'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '304':
          $ref: '#/components/responses/304'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404CampaignAd'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: getCampaignAd
    patch:
      summary: Update this ad
      description: Perform a partial update of this ad as per [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7396) format and processing rules. Only fields in the request body are updated on the resource; fields which are omitted are not updated. Ads cannot be updated on `active`, `scheduled`, or `completed` campaigns. If an ad is updated on a `paused` campaign, then the campaign state is automatically set to `draft`. This operation is only accepted whenever the campaign's `allows.edit` is `true`.
      operationId: patchCampaignAd
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Ads
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      requestBody:
        description: The ad parameters to update.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/campaignAdPatch'
          application/vnd.restful+json:
            schema:
              $ref: '#/components/schemas/campaignAdPatch'
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignAd'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaignAd'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404CampaignAd'
        '409':
          description: |
            Conflict.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/campaignIsImmutable/v1.0.0`](https://static.api.apiture.com/errors/campaignIsImmutable/v1.0.0)<br>
              Cannot add, update, or delete an ad if the campaign is active, canceled, or completed.
              Remediation: Only add, update, and delete campaigns and ads for draft, scheduled, testing, and paused campaigns.

            * [`https://static.api.apiture.com/errors/multipleAdsInLocation/v1.0.0`](https://static.api.apiture.com/errors/multipleAdsInLocation/v1.0.0)<br>
              Multiple ads cannot be placed in a single location within a campaign.
              Remediation: Delete the existing ad in the given location or select a new location.
          x-apiture-errors:
            - campaignIsImmutable
            - multipleAdsInLocation
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '412':
          $ref: '#/components/responses/412'
        '422':
          $ref: '#/components/responses/422CampaignAd'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: patchCampaignAd
    delete:
      summary: Delete this ad resource
      description: Delete this ad resource and any resources that are owned by it. Ads cannot be deleted from `active`, `scheduled`, or `completed` campaigns. If an ad is deleted from a `paused` campaign, then the campaign state is automatically set to `draft`. This operation is only accepted whenever the campaign's `allows.edit` is `true`.
      operationId: deleteCampaignAd
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Ads
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '204':
          $ref: '#/components/responses/204'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404CampaignAd'
        '409':
          description: |
            Conflict.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/campaignIsImmutable/v1.0.0`](https://static.api.apiture.com/errors/campaignIsImmutable/v1.0.0)<br>
              Cannot add, update, or delete an ad if the campaign is active, canceled, or completed.
              Remediation: Only add, update, and delete campaigns and ads for draft, scheduled, testing, and paused campaigns.
          x-apiture-errors:
            - campaignIsImmutable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '412':
          $ref: '#/components/responses/412'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: deleteCampaignAd
  /campaigns/{campaignId}/ads/{adId}/dismissed:
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
      - $ref: '#/components/parameters/adIdPathParam'
    post:
      summary: Track when a user has dismissed an ad.
      description: Track when a user has dismissed an ad so that the ad will not be presented to them again.
      operationId: dismissCampaignAd
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Ad Dismissals
      x-apiture-unauthenticated: true
      parameters:
        - $ref: '#/components/parameters/institutionIdHeaderParam'
        - $ref: '#/components/parameters/requiredUserQueryParam'
      requestBody:
        description: The data required to dismiss an ad.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/newCampaignAdDismissal'
          application/vnd.restful+json:
            schema:
              $ref: '#/components/schemas/newCampaignAdDismissal'
      responses:
        '200':
          description: OK. The operation succeeded. The ad will not be returned for the user anymore.
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404CampaignAd'
        '422':
          description: |
            Unprocessable Entity. The request body and/or query parameters were well formed but otherwise invalid.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/missingInstitutionId/v1.0.0`](https://static.api.apiture.com/errors/missingInstitutionId/v1.0.0)<br>
              The `institutionId` could not derived from the authorization token and an `Institution-Id` header was not provided.
              Remediation: Provide an authorization token with institution data or an `Institution-Id` header and resubmit the request.
          x-apiture-errors:
            - missingInstitutionId
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
  /campaigns/{campaignId}/ads/{adId}/clicked:
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
      - $ref: '#/components/parameters/adIdPathParam'
    post:
      summary: Track when user has clicked an ad.
      description: Indicates that user has clicked an ad. This is tracked for metrics.
      operationId: trackCampaignAdClick
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Ads
      x-apiture-unauthenticated: true
      parameters:
        - $ref: '#/components/parameters/institutionIdHeaderParam'
        - $ref: '#/components/parameters/requiredUserQueryParam'
      responses:
        '200':
          description: OK. The operation succeeded.
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404CampaignAd'
        '422':
          description: |
            Unprocessable Entity. The request body and/or query parameters were well formed but otherwise invalid.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/missingInstitutionId/v1.0.0`](https://static.api.apiture.com/errors/missingInstitutionId/v1.0.0)<br>
              The `institutionId` could not derived from the authorization token and an `Institution-Id` header was not provided.
              Remediation: Provide an authorization token with institution data or an `Institution-Id` header and resubmit the request.
          x-apiture-errors:
            - missingInstitutionId
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
  /nextCampaignAd:
    get:
      summary: Get the next priority ad to display
      description: Get the next ad that the given client should display in the given location, based on the campaign with the highest priority. If no ad is available for the user in the given location, then a `204` will be returned.
      operationId: getNextAd
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Ads
      x-apiture-unauthenticated: true
      parameters:
        - $ref: '#/components/parameters/institutionIdHeaderParam'
        - $ref: '#/components/parameters/requiredUserQueryParam'
        - name: location
          description: The ad location resourceId. This parameter must be provided if locationName is empty.
          in: query
          schema:
            $ref: '#/components/schemas/resourceId'
        - name: locationName
          description: The ad location name. This parameter must be provided if location is empty.
          in: query
          schema:
            $ref: '#/components/schemas/campaignAdLocationName'
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignAd'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaignAd'
        '204':
          description: No Content. The customer does not have any ads to view.
          $ref: '#/components/responses/204'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '422':
          $ref: '#/components/responses/422NextCampaignAd'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
  /ads:
    get:
      summary: Return a collection of ads
      description: Return a collection of ads from all campaigns.
      operationId: listAds
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Ads
      security:
        - accessToken:
            - adminData/read
      parameters:
        - name: location
          in: query
          description: Filter the response to only ads whose `location` matches the given ID.
          schema:
            $ref: '#/components/schemas/resourceId'
        - name: state
          in: query
          description: Filter the response to only events whose `state` is in this pipe-delimited set of state names.
          style: pipeDelimited
          explode: false
          schema:
            type: array
            minItems: 1
            maxItems: 8
            uniqueItems: true
            items:
              $ref: '#/components/schemas/campaignState'
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignAds'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaignAds'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: listAds
  /campaignMetrics:
    get:
      summary: Return the summary metrics across campaigns
      description: Return campaign metrics for all active campaigns.
      operationId: listCampaignMetrics
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Metrics
      security:
        - accessToken:
            - adminData/read
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignMetricsList'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaignMetricsList'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: listCampaignMetrics
  /campaigns/{campaignId}/canceled:
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
    post:
      summary: Cancel a campaign
      description: 'Cancel a campaign. This changes the `state` property of the campaign to `canceled`. A campaign can only be canceled if the campaign `state` is `scheduled`, `active`, or `paused`. The response is the updated representation of the campaign. This operation is idempotent: no changes are made if the campaign is already `canceled`. This operation is only accepted whenever `allows.cancel` is `true`.'
      operationId: cancelCampaign
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Actions
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK. The operation succeeded. The campaign was updated and its `state` changed to `canceled`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaign'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaign'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: Conflict. The request to cancel the campaign is not allowed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '412':
          $ref: '#/components/responses/412'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: cancelCampaign
  /campaigns/{campaignId}/archived:
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
    post:
      summary: Archive a campaign
      description: 'Archive a campaign. This changes the `state` property of the campaign to `archived`, as well as setting the `updatedAt` and `updatedBy` properties. A campaign can only be archived if the campaign `state` is `draft`, `scheduled`, or `testing`, `paused`, or `completed`. The response is the updated representation of the campaign. This operation is idempotent: no changes are made if the campaign is already archived. This operation is only accepted whenever `allows.archive` is `true`.'
      operationId: archiveCampaign
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Actions
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK. The operation succeeded. The campaign was updated and its `state` property changed to `archived`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaign'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaign'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: |
            Conflict. The request to archive the campaign is not allowed.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/archiveCampaignInvalidState/v1.0.0`](https://static.api.apiture.com/errors/archiveCampaignInvalidState/v1.0.0)<br>
              The state of the campaign may not be changed to archived unless the campaign state is `draft`, `scheduled`, `testing`, `paused`, or `completed`.
              Remediation: Check the state of your campaign and ensure it is `draft`, `scheduled`, `testing`, `paused`, or `completed`.
          x-apiture-errors:
            - archiveCampaignInvalidState
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '412':
          $ref: '#/components/responses/412'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: archiveCampaign
  /campaigns/{campaignId}/unarchived:
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
    post:
      summary: Unarchive a campaign
      description: 'Unarchive a campaign. If a campaign was `completed` at the time that it was archived, restoring it will return the state to `completed`. If the campaign was in any non-complete state when it was archived, then it will be set to the `draft` state. The response is the updated representation of the campaign. This operation is idempotent: no changes are made if the campaign is not `archived`. This operation is only accepted whenever `allows.restore` is `true`.'
      operationId: restoreCampaign
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Actions
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK. The operation succeeded. The campaign was updated and its `state` property changed to the necessary state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaign'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaign'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: Conflict. The request to unarchive the campaign is not allowed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '412':
          $ref: '#/components/responses/412'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: restoreCampaign
  /campaigns/{campaignId}/scheduled:
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
    post:
      summary: Schedule a campaign
      description: 'Schedule a draft campaign so that it runs during its scheduled period. Draft campaigns must be scheduled for them to run. This changes the `state` property of the campaign to `scheduled`, unless the `startAt` has passed, in which case the campaign `state` is `active`. A campaign can only be scheduled if the campaign `state` is `draft` or `testing`. The response is the updated representation of the campaign. This operation is idempotent: no changes are made if the campaign is already `scheduled`. This operation is only accepted whenever `allows.schedule` is `true`.'
      operationId: scheduleCampaign
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Actions
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK. The operation succeeded. The campaign was updated and its `state` changed to `scheduled`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaign'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaign'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: |-
            Conflict. The request to schedule the campaign is not allowed.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/scheduleCampaignInvalidState/v1.0.0`](https://static.api.apiture.com/errors/scheduleCampaignInvalidState/v1.0.0)<br>
              The state of the campaign may not be changed to scheduled unless the campaign state is `draft` or `testing`.
              Remediation: Check the state of your campaign and ensure it is `draft` or `testing`.

            * [`https://static.api.apiture.com/errors/scheduleCampaignMissingRequiredProperties/v1.0.0`](https://static.api.apiture.com/errors/scheduleCampaignMissingRequiredProperties/v1.0.0)<br>
              The state of the campaign may not be changed to scheduled unless all required fields are set.
              Remediation: Update the campaign and associated ads to have all necessary fields and resubmit the operation.
            The `attributes` object in the error may have the properties defined for [`scheduleCampaignMissingRequiredProperties`](https://static.api.apiture.com/errors/scheduleCampaignMissingRequiredProperties/v1.0.0).
          x-apiture-errors:
            - scheduleCampaignInvalidState
            - scheduleCampaignMissingRequiredProperties
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '412':
          $ref: '#/components/responses/412'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: scheduleCampaign
  /campaigns/{campaignId}/resumed:
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
    post:
      summary: Resume a campaign
      description: 'Resume a campaign. This changes the `state` property of the campaign to `active`. The response is the updated representation of the campaign. A campaign can only be resumed if the campaign `state` is `paused` and the current date-time is after the scheduled `startAt`. If the campaign `state` is `paused` and the current date-time is after the scheduled `endAt`, then the campaign state will have been moved to `completed` and the campaign cannot be resumed. This operation is idempotent: no changes are made if the campaign is already `active`. This operation is only accepted whenever `allows.resume` is `true`.'
      operationId: resumeCampaign
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Actions
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK. The operation succeeded. The campaign was updated and its `state` changed to `active`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaign'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaign'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: |
            Conflict. The request to resume the campaign is not allowed.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/activateCampaignInvalidState/v1.0.0`](https://static.api.apiture.com/errors/activateCampaignInvalidState/v1.0.0)<br>
              The state of the campaign may not be changed to active unless the campaign state is `paused` or `scheduled`.
              Remediation: Check the state of your campaign and ensure it is `paused`. If it is `scheduled` and you expect it to be `active`, then check the schedule and ensure the `startAt` date is set correctly.
          x-apiture-errors:
            - activateCampaignInvalidState
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '412':
          $ref: '#/components/responses/412'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: resumeCampaign
  /campaigns/{campaignId}/paused:
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
    post:
      summary: Pause a campaign
      description: 'Pause a campaign. Ads from the campaign are not served to customers, as if the campaign were outside of its `startAt`/`endAt` time frame. This changes the `state` property of the campaign to `paused`.  The response is the updated representation of the campaign. A campaign can only be paused if the campaign `state` is `active`. A `paused` campaign is automatically moved to `completed` whenever the current date-time passes the scheduled `endAt`. This operation is idempotent: no changes are made if the campaign is already `paused`. Use the [`resumeCampaign`](#op-resumeCampaign) operation to resume a paused campaign. This operation is only accepted whenever `allows.pause` is `true`.'
      operationId: pauseCampaign
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Actions
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK. The operation succeeded. The campaign was updated and its `state` changed to `paused`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaign'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaign'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: |
            Conflict. The request to pause the campaign is not allowed.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/pauseCampaignInvalidState/v1.0.0`](https://static.api.apiture.com/errors/pauseCampaignInvalidState/v1.0.0)<br>
              The state of the campaign may not be changed to paused unless the campaign state is `active`.
              Remediation: Check the state of your campaign and ensure it is `active`.
          x-apiture-errors:
            - pauseCampaignInvalidState
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '412':
          $ref: '#/components/responses/412'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: pauseCampaign
  /campaigns/{campaignId}/draft:
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
    post:
      summary: Mark a campaign as draft
      description: 'Mark a campaign as draft. This changes the `state` property of the campaign to `draft`. The response is the updated representation of the campaign. A campaign can only be set as draft if the campaign `state` is `scheduled`, `paused`, or `testing`. This operation is idempotent: no changes are made if the campaign is already `draft`. This operation is only accepted whenever `allows.draft` is `true`.'
      operationId: markCampaignAsDraft
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Actions
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK. The operation succeeded. The campaign was updated and its `state` changed to `draft`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaign'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaign'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: |
            Conflict. The request to draft the campaign is not allowed.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/draftCampaignInvalidState/v1.0.0`](https://static.api.apiture.com/errors/draftCampaignInvalidState/v1.0.0)<br>
              The state of the campaign may not be changed to draft unless the campaign state is `scheduled`, `testing`, or `paused`.
              Remediation: Check the state of your campaign and ensure it is `scheduled`, `testing`, or `paused`.
          x-apiture-errors:
            - draftCampaignInvalidState
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '412':
          $ref: '#/components/responses/412'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: markCampaignAsDraft
  /campaigns/{campaignId}/testing:
    parameters:
      - $ref: '#/components/parameters/campaignIdPathParam'
    post:
      summary: Test a campaign
      description: |-
        Test a campaign. Ads from the campaign are served to customers from the audience with the provided `testingAudience`.`id`. This changes the `state` property of the campaign to `testing`.
         The response is the updated representation of the campaign. A campaign can only be tested
        if the campaign `state` is `draft` or `scheduled`. This operation is idempotent: no changes are made if the campaign `state` is already `testing`. This operation is only accepted whenever `allows.test` is `true`.
        Testing can only be entered and exited on a manual basis. An admin user must move the campaign into a `testing` state and into a `scheduled` or `draft` state when testing is completed. Editing a campaign that is in `testing` will set the campaign back to `draft`.
      operationId: testCampaign
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Actions
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      requestBody:
        description: The data required to update ad priorities.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/testCampaignRequest'
          application/vnd.restful+json:
            schema:
              $ref: '#/components/schemas/testCampaignRequest'
      responses:
        '200':
          description: OK. The operation succeeded. The campaign was updated and its `state` changed to `testing`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaign'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaign'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: |-
            Conflict. The request to test the campaign is not allowed.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/testingCampaignInvalidState/v1.0.0`](https://static.api.apiture.com/errors/testingCampaignInvalidState/v1.0.0)<br>
              The state of the campaign may not be changed to testing unless the campaign state is `draft` or `scheduled`.
              Remediation: Check the state of your campaign and ensure it is `draft` or `scheduled`.

            * [`https://static.api.apiture.com/errors/testingCampaignMissingRequiredProperties/v1.0.0`](https://static.api.apiture.com/errors/testingCampaignMissingRequiredProperties/v1.0.0)<br>
              The state of the campaign may not be changed to testing unless all required fields are set.
              Remediation: Update the campaign and associated ads to have all necessary fields and resubmit the operation.
            The `attributes` object in the error may have the properties defined for [`testingCampaignMissingRequiredProperties`](https://static.api.apiture.com/errors/testingCampaignMissingRequiredProperties/v1.0.0).
          x-apiture-errors:
            - testingCampaignInvalidState
            - testingCampaignMissingRequiredProperties
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '412':
          $ref: '#/components/responses/412'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: testCampaign
  /campaignAdLocations:
    get:
      summary: Return a collection of campaign ad locations
      description: Return a collection of campaign ad locations.
      operationId: listCampaignAdLocations
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Ad Locations
      security:
        - accessToken:
            - adminData/read
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignAdLocations'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaignAdLocations'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: listCampaignAdLocations
  /campaignAdLocations/{campaignAdLocationId}:
    parameters:
      - $ref: '#/components/parameters/campaignAdLocationIdPathParam'
    get:
      summary: Fetch a representation of this campaign ad location
      description: Return a representation of this campaign ad location resource.
      operationId: getCampaignAdLocation
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Ad Locations
      security:
        - accessToken:
            - adminData/read
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignAdLocation'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaignAdLocation'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: getCampaignAdLocation
  /ads/priority:
    put:
      summary: Update ad priorities.
      description: Update the ad priorities of every ad at the given location. To retrieve all ads in a given location, use the [`listAds`](#op-listAccounts) operation with the `?location` query parameter.
      operationId: updateAdPriority
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Ads
      security:
        - accessToken:
            - adminData/write
      parameters:
        - name: location
          description: The location to update priorities for.
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/resourceId'
      requestBody:
        description: The data required to update ad priorities.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateCampaignAdPrioritiesRequest'
          application/vnd.restful+json:
            schema:
              $ref: '#/components/schemas/updateCampaignAdPrioritiesRequest'
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignAds'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaignAds'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '422':
          description: |
            Unprocessable Entity. The request body and/or query parameters were well formed but otherwise invalid.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/duplicatePriority/v1.0.0`](https://static.api.apiture.com/errors/duplicatePriority/v1.0.0)<br>
              The given `priority` is already in use by another ad.
              Remediation: Resubmit the request with a unique `priority`.

            * [`https://static.api.apiture.com/errors/campaignAdDoesNotExistInLocation/v1.0.0`](https://static.api.apiture.com/errors/campaignAdDoesNotExistInLocation/v1.0.0)<br>
              The given ad does not exist in the given campaign or location.
              Remediation: Pass the `id` of a valid ad.

            * [`https://static.api.apiture.com/errors/invalidAdLocation/v1.0.0`](https://static.api.apiture.com/errors/invalidAdLocation/v1.0.0)<br>
              The given ad location does not exist.
              Remediation: Pass the `id` of a valid `adLocation`.

            * [`https://static.api.apiture.com/errors/allAdsNotGiven/v1.0.0`](https://static.api.apiture.com/errors/allAdsNotGiven/v1.0.0)<br>
              There is one or more ads that exist in the ad location, but they were not included in the request.
              Remediation: Include all ads in an ad location when updating the priority order.
          x-apiture-errors:
            - duplicatePriority
            - campaignAdDoesNotExistInLocation
            - invalidAdLocation
            - allAdsNotGiven
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: updateAdPriority
  /campaignAdDismissalReasons:
    get:
      summary: Return a collection of campaign ad dismissal reasons
      description: Return a collection of campaign ad dismissal reasons.
      operationId: listCampaignAdDismissalReasons
      x-apiture-api: bankingAdminCampaigns
      tags:
        - Campaign Ad Dismissals
      x-apiture-unauthenticated: true
      parameters:
        - $ref: '#/components/parameters/institutionIdHeaderParam'
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignAdDismissalReasons'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/campaignAdDismissalReasons'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '422':
          description: |
            Unprocessable Entity. The request body and/or query parameters were well formed but otherwise invalid.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/missingInstitutionId/v1.0.0`](https://static.api.apiture.com/errors/missingInstitutionId/v1.0.0)<br>
              The `institutionId` could not derived from the authorization token and an `Institution-Id` header was not provided.
              Remediation: Provide an authorization token with institution data or an `Institution-Id` header and resubmit the request.
          x-apiture-errors:
            - missingInstitutionId
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
components:
  parameters:
    adIdPathParam:
      name: adId
      description: The unique identifier of this ad. This is an opaque string.
      required: true
      in: path
      schema:
        $ref: '#/components/schemas/resourceId'
    campaignIdPathParam:
      name: campaignId
      description: The unique identifier of this campaign. This is an opaque string.
      required: true
      in: path
      schema:
        $ref: '#/components/schemas/resourceId'
    campaignAdLocationIdPathParam:
      name: campaignAdLocationId
      description: The unique identifier of this campaign ad location. This is an opaque string.
      required: true
      in: path
      schema:
        $ref: '#/components/schemas/resourceId'
    requiredUserQueryParam:
      name: user
      description: The identifier of a banking customer.
      in: query
      required: true
      schema:
        $ref: '#/components/schemas/resourceId'
    ifNoneMatchHeaderParam:
      name: If-None-Match
      description: The entity tag that was returned in the `ETag` response header of a previous call. If the resource's current entity tag value matches this header value, the `GET` will return 304 (Not Modified) and no response body, else the current resource representation and updated `ETag` is returned.
      in: header
      schema:
        $ref: '#/components/schemas/entityTag'
      x-resolved-from: ../../common/openapi.yaml#/components/parameters/ifNoneMatchHeaderParam
    ifMatchHeaderParam:
      name: If-Match
      description: The entity tag that was returned in the `ETag` response header of a previous call. If passed, this must match the current entity tag of the resource, else the operation fails with a 412 Precondition Failed error.
      in: header
      schema:
        $ref: '#/components/schemas/entityTag'
      x-resolved-from: ../../common/openapi.yaml#/components/parameters/ifMatchHeaderParam
    institutionIdHeaderParam:
      name: Institution-Id
      description: The unique identifier of the financial institution.
      in: header
      schema:
        $ref: '#/components/schemas/institutionId'
      x-resolved-from: ../../common/openapi.yaml#/components/parameters/institutionIdHeaderParam
  responses:
    '204':
      description: No Content. The operation succeeded but returned no response body.
      x-resolved-from: ../../common/openapi.yaml#/components/responses/204
    '304':
      description: Not Modified. The resource has not been modified since it was last fetched.
      x-resolved-from: ../../common/openapi.yaml#/components/responses/304
    '400':
      description: |
        Bad Request. The request body, request headers, and/or query parameters are not well-formed.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/badRequest/v1.0.0`](https://static.api.apiture.com/errors/badRequest/v1.0.0)<br>
          The request body and/or parameters was not well-formed.
          Remediation: Correct any syntax or schema errors in the request body or parameters.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/badRequest'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/badRequest/v1.0.0
              title: Bad Request
              status: 400
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: Input did not parse as JSON
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/badRequest/v1.0.0
              title: Bad Request
              status: 400
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: Input did not parse as JSON
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/400
    '401':
      description: |
        Unauthorized. The operation requires authentication but no authentication or insufficient authentication was given.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/unauthorized/v1.0.0`](https://static.api.apiture.com/errors/unauthorized/v1.0.0)<br>
          The request lacks valid authentication credentials for the target resource or operation.
          Remediation: Authenticate the user and pass the required authorization with the request.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/unauthorized'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/unauthorized/v1.0.0
              title: Unauthorized
              status: 401
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The request lacks valid authentication credentials
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/unauthorized/v1.0.0
              title: Unauthorized
              status: 401
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The request lacks valid authentication credentials
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/401
    '403':
      description: |
        Forbidden. The authenticated caller is not authorized to perform the requested operation.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/forbidden/v1.0.0`](https://static.api.apiture.com/errors/forbidden/v1.0.0)<br>
          The user or agent is not allowed to perform this operation; authentication credentials were provided in the request, but the server considers them insufficient to grant access.
          Remediation: Check the user's permissions and entitlements before attempting the operation.

        * [`https://static.api.apiture.com/errors/customerDisabled/v1.0.0`](https://static.api.apiture.com/errors/customerDisabled/v1.0.0)<br>
          The customer is disabled.
          Remediation: Have the customer contact the financial institution for support.

        * [`https://static.api.apiture.com/errors/antiMalwareRequired/v1.0.0`](https://static.api.apiture.com/errors/antiMalwareRequired/v1.0.0)<br>
          The financial institution requires the customer to have anti-malware software installed.
          Remediation: Direct the user to the software requirements guide to install the correct anti-malware software.

        * [`https://static.api.apiture.com/errors/modificationForbidden/v1.0.0`](https://static.api.apiture.com/errors/modificationForbidden/v1.0.0)<br>
          The customer is properly authenticated but not authorized to create, modify, or delete resources.
          Remediation: Avoid modification operation for customers with read-only authorization.

        * [`https://static.api.apiture.com/errors/challengeRequired/v1.0.0`](https://static.api.apiture.com/errors/challengeRequired/v1.0.0)<br>
          The operation requires the customer to complete an identity challenge.
          Remediation: Complete the challenge as per the problem response, and add an additional `Challenge` header to the call.
        The `attributes` object in the error may have the properties defined by the [`requiredIdentityChallenge` schema](#schema-requiredIdentityChallenge).
        * [`https://static.api.apiture.com/errors/challengeBlocked/v1.0.0`](https://static.api.apiture.com/errors/challengeBlocked/v1.0.0)<br>
          The user has failed challenges too many times and is blocked from attempting more or performing operations which require additional authentication.
          Remediation: Have the user end their login session and login again.

        * [`https://static.api.apiture.com/errors/noIdentityChallengeFactors/v1.0.0`](https://static.api.apiture.com/errors/noIdentityChallengeFactors/v1.0.0)<br>
          This operation requires an identity challenge, but the user does not have the necessary registered authentication factors.
          Remediation: Have the user register one or more challenge security code delivery factors.

        * [`https://static.api.apiture.com/errors/invalidIdentityChallengeHeader/v1.0.0`](https://static.api.apiture.com/errors/invalidIdentityChallengeHeader/v1.0.0)<br>
          The additional on-time `Challenge` header in this request is expired, already used, or otherwise invalid.
          Remediation: Supply a valid, unexpired, unclaimed `Challenge` header in the request.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/forbidden'
        - $ref: '#/components/x-apiture-errors/customerDisabled'
        - $ref: '#/components/x-apiture-errors/antiMalwareRequired'
        - $ref: '#/components/x-apiture-errors/modificationForbidden'
        - $ref: '#/components/x-apiture-errors/challengeRequired'
        - $ref: '#/components/x-apiture-errors/challengeBlocked'
        - $ref: '#/components/x-apiture-errors/noIdentityChallengeFactors'
        - $ref: '#/components/x-apiture-errors/invalidIdentityChallengeHeader'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/forbidden/v1.0.0
              title: Forbidden
              status: 403
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The request has valid authentication, but the authenticated agent is forbidden from accessing this resource or operation
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/forbidden/v1.0.0
              title: Forbidden
              status: 403
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The request has valid authentication, but the authenticated agent is forbidden from accessing this resource or operation
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/403
    '404':
      description: |
        Not found. There is no such resource at the request URL.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/notFound/v1.0.0`](https://static.api.apiture.com/errors/notFound/v1.0.0)<br>
          The resource at the requested URL does not exist.
          Remediation: Use the URL of an existing resource.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/notFound'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/notFound/v1.0.0
              title: Not Found
              status: 404
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The resource at the request URL does not exist.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/notFound/v1.0.0
              title: Not Found
              status: 404
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The resource at the request URL does not exist.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/404
    '412':
      description: |
        Precondition Failed. One or more conditions given in the request header fields evaluated to false when tested on the server.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/preconditionFailed/v1.0.0`](https://static.api.apiture.com/errors/preconditionFailed/v1.0.0)<br>
          One or more conditions given in the request header fields evaluated to false when tested on the server.
          Remediation: Update resources and use it's most recent ETag or modification time stamp.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/preconditionFailed'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
      x-resolved-from: ../../common/openapi.yaml#/components/responses/412
    '422':
      description: |
        Unprocessable Entity. The request body and/or query parameters were well-formed but otherwise invalid.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/unprocessableEntity/v1.0.0`](https://static.api.apiture.com/errors/unprocessableEntity/v1.0.0)<br>
          The syntax of the request entity is correct but was unable to process the contained instructions.
          Remediation: Provide a semantically correct request.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/unprocessableEntity'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/unprocessableEntity/v1.0.0
              title: Unprocessable Entity
              status: 422
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The request body and/or query parameters were well-formed but otherwise invalid.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/unprocessableEntity/v1.0.0
              title: Unprocessable Entity
              status: 422
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The request body and/or query parameters were well-formed but otherwise invalid.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/422
    '429':
      description: |
        Too Many Requests. The client has sent too many requests in a given amount of time.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/tooManyRequests/v1.0.0`](https://static.api.apiture.com/errors/tooManyRequests/v1.0.0)<br>
          The client has sent too many requests in a given amount of time, exceeding rate limiting.
          Remediation: Slow down the rate of API calls.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/tooManyRequests'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/tooManyRequests/v1.0.0
              title: Too Many Requests
              status: 429
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The user has sent too many requests in a given amount of time.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/tooManyRequests/v1.0.0
              title: Too Many Requests
              status: 429
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The user has sent too many requests in a given amount of time.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/429
    404CampaignAd:
      description: |
        Not Found. There is no such ad resource at the specified `{adId}`.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/noSuchCampaign/v1.0.0`](https://static.api.apiture.com/errors/noSuchCampaign/v1.0.0)<br>
          There is no such campaign resource for the given `campaignId`.
          Remediation: Pass a valid campaign ID.

        * [`https://static.api.apiture.com/errors/noSuchCampaignAd/v1.0.0`](https://static.api.apiture.com/errors/noSuchCampaignAd/v1.0.0)<br>
          There is no such campaign ad resource for the given `adId`.
          Remediation: Pass a valid campaign ad ID.
      x-apiture-errors:
        - noSuchCampaign
        - noSuchCampaignAd
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
        application/vnd.restful+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
    422NextCampaignAd:
      description: |
        Unprocessable Entity. The request body and/or query parameters were well formed but otherwise invalid.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/invalidAdLocation/v1.0.0`](https://static.api.apiture.com/errors/invalidAdLocation/v1.0.0)<br>
          The given ad location does not exist.
          Remediation: Pass the `id` of a valid `adLocation`.

        * [`https://static.api.apiture.com/errors/invalidLocationQueryParam/v1.0.0`](https://static.api.apiture.com/errors/invalidLocationQueryParam/v1.0.0)<br>
          Neither a `location` nor `locationName` query parameter was given with the request, or both were given.
          Remediation: Resubmit the request with either a valid `location` or `locationName` query parameter, but not both.

        * [`https://static.api.apiture.com/errors/locationIdAndNameMutuallyExclusive/v1.0.0`](https://static.api.apiture.com/errors/locationIdAndNameMutuallyExclusive/v1.0.0)<br>
          The `location` and `locationName` query parameters cannot be given in the same request.
          Remediation: Resubmit the query with either the `location` or `locationName` parameter, but not both.

        * [`https://static.api.apiture.com/errors/missingInstitutionId/v1.0.0`](https://static.api.apiture.com/errors/missingInstitutionId/v1.0.0)<br>
          The `institutionId` could not derived from the authorization token and an `Institution-Id` header was not provided.
          Remediation: Provide an authorization token with institution data or an `Institution-Id` header and resubmit the request.
      x-apiture-errors:
        - invalidAdLocation
        - invalidLocationQueryParam
        - locationIdAndNameMutuallyExclusive
        - missingInstitutionId
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
    422CampaignAd:
      description: |
        Unprocessable Entity. The request body and/or query parameters were well formed but otherwise invalid.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/duplicatePriority/v1.0.0`](https://static.api.apiture.com/errors/duplicatePriority/v1.0.0)<br>
          The given `priority` is already in use by another ad.
          Remediation: Resubmit the request with a unique `priority`.

        * [`https://static.api.apiture.com/errors/invalidAdLocation/v1.0.0`](https://static.api.apiture.com/errors/invalidAdLocation/v1.0.0)<br>
          The given ad location does not exist.
          Remediation: Pass the `id` of a valid `adLocation`.
      x-apiture-errors:
        - duplicatePriority
        - invalidAdLocation
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
    4XX:
      description: Client Request Problem. The client request had a problem not listed under another specific 400-level HTTP response code. View the `detail` in the problem response for additional details.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/methodNotAllowed/v1.0.0
              title: Method Not Allowed
              status: 405
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: This HTTP method is not allowed for the given resource URL.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/methodNotAllowed/v1.0.0
              title: Method Not Allowed
              status: 405
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: This HTTP method is not allowed for the given resource URL.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/4XX
    5XX:
      description: Server Problem. The server encountered a problem not listed under another specific 500-level HTTP response code. View the `detail` in the problem response for additional details.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/gatewayTimeout/v1.0.0
              title: Insufficient Storage
              status: 507
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The server is unable to store the representation needed to successfully complete the request.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/gatewayTimeout/v1.0.0
              title: Insufficient Storage
              status: 507
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The server is unable to store the representation needed to successfully complete the request.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/5XX
  schemas:
    campaignAdContent:
      x-apiture-version: 1.2.0
      title: Campaign Ad Content (v1.2.0)
      description: Language-specific presentation content for an ad.
      type:
        - object
        - 'null'
      properties:
        title:
          type: string
          format: text
          description: The title for the ad. This is a short phrase with no line breaks.
          minLength: 1
          maxLength: 80
        body:
          description: The main text of the ad. This is [Markdown](https://help.github.com/articles/basic-writing-and-formatting-syntax/) text and may include lists, **bold** text, _italics_ text, etc.
          type: string
          format: markdown
          minLength: 1
          maxLength: 400
        imageName:
          description: The name of the uploaded image. This property is only `required` if the ad `type` is `image`.
          type: string
          format: text
          minLength: 4
          maxLength: 255
          example: holidayPromotion.jpeg
        image:
          description: The [Base64-encoded](https://en.wikipedia.org/wiki/Base64) content of the ad image. This property is only `required` if the ad `type` is `image`
          type: string
          format: byte
          contentEncoding: base64
          maxLength: 2000000
        thumbnail_url:
          description: The URL where the thumbnail is located. This property only applies for ads with a `type` value of `image`. This must be publicly accessible without authentication.
          type: string
          format: uri
          maxLength: 400
        contentType:
          $ref: '#/components/schemas/campaignAdContentType'
        altText:
          description: Descriptive text for the image ad. This property is only `required` if the ad `type` is `image`.
          type: string
          format: text
          minLength: 1
          maxLength: 100
      example:
        title: Save for the Holidays!
        body: Open a Holiday Savings Account today so you are prepared for holiday giving.
        image: QmFzZTY0IGVuY29kZWQgaW1hZ2UgY29udGVudCBoZXJlLi4u
        thumbnail_url: http://cdn.example.com/links/thumbnail-image
        contentType: image/jpeg
        altText: An ad for a new CD interest rate.
    campaignAdPatch:
      x-apiture-version: 1.6.0
      title: Campaign Ad Patch (v1.6.0)
      description: Request to patch a campaign ad.
      allOf:
        - $ref: '#/components/schemas/campaignAdFields'
    campaignAdFields:
      x-apiture-version: 1.5.0
      title: Campaign Ad Fields (v1.5.0)
      description: Common fields of the ad resource used to build other model schemas.
      x-apiture-fragment: true
      properties:
        redirect_url:
          description: The URL that the user is directed to whenever they click the ad.
          type: string
          format: uri-reference
          maxLength: 2048
        redirectLinkLabel:
          description: Text that is displayed over the redirect_url.
          type: string
          format: text
          maxLength: 30
        dismissible:
          description: Boolean indicating whether the ad can be dismissed.
          type: boolean
        dismiss_url:
          description: An optional URL that is called whenever the user dismisses an ad. This can be used to collect data about ad dismissals.
          type: string
          format: uri
          maxLength: 2048
        icon:
          description: Properties that relate to an icon shown on the ad.
          $ref: '#/components/schemas/campaignAdIcon'
        priority:
          description: An integer value that determines when the ad will be displayed over another ad. Ad `priority` is unique within an ad location. Two ads in the same location cannot have the same `priority` value. If an audience is subject to multiple ads, the one with the highest priority will be shown. A value of `1` represents the highest priority, and a value of `100` represents the lowest priority.
          type: integer
          format: int16
          minimum: 1
          maximum: 100
        location:
          description: The display location of the ad within the client application.
          $ref: '#/components/schemas/campaignAdLocationReference'
        content:
          description: The ad's localizable visual content. This object maps locales/languages to the ad content to display for customers, based on their language preference. Keys are [RFC 3066](https://tools.ietf.org/html/rfc3066) locale strings such as `"en"`, `"fr"`, `"es-MX"` and so on.
          $ref: '#/components/schemas/campaignAdLocalizedContent'
    campaignAdLocalizedContent:
      title: Campaign Ad Localized Content (v1.0.0)
      description: Campaign Ad Localized Content.
      type: object
      required:
        - en
      properties:
        en:
          description: The (default) English ad content.
          $ref: '#/components/schemas/campaignAdContent'
      patternProperties:
        ^[a-z]{2,3}(?:-[A-Z]{2,3}(?:-[a-zA-Z]{4})?)?$:
          $ref: '#/components/schemas/campaignAdContent'
      x-apiture-version: 1.0.0
    newCampaignAd:
      x-apiture-version: 1.6.0
      title: New Campaign Ad (v1.6.0)
      description: Representation used to create a new campaign ad.
      required:
        - location
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/campaignAdFields'
      example:
        redirect_url: http://cdn.example.com/links/banking-ad
        redirectLinkLabel: Learn More
        dismissible: true
        dismiss_url: http://cdn.example.com/links/dismiss-link
        priority: 1
        icon:
          visible: true
        location:
          id: 0399abed-ac23
          applicationType: mobile
          type: image
          name: home
          label: Home
          description: The home page of the mobile application
        content:
          en:
            title: Save for the Holidays!
            body: Open a Holiday Savings Account today so you are prepared for holiday giving.
            imageName: holidayPromotion.jpeg
            image: QmFzZTY0IGVuY29kZWQgaW1hZ2UgY29udGVudCBoZXJlLi4u
            contentType: image/jpeg
            altText: An advertisement for new banking CD rates
    campaignAdItem:
      x-apiture-version: 1.7.0
      title: Campaign Ad Item (v1.7.0)
      description: 'Summary representation of an ad resource in a campaign. Note: In this schema, the `content` only includes `en` and not other locales.'
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/campaignAdFields'
        - type: object
          properties:
            id:
              description: The unique identifier for this ad resource. This is an immutable opaque string.
              $ref: '#/components/schemas/resourceId'
            metrics:
              description: The metrics for this ad.
              $ref: '#/components/schemas/campaignAdMetrics'
            campaign:
              description: A reference of the campaign that this ad belongs to.
              $ref: '#/components/schemas/campaignReference'
            createdAt:
              description: The date-time when the ad was created.
              $ref: '#/components/schemas/readOnlyTimestamp'
            createdBy:
              description: The admin user that created this ad.
              $ref: '#/components/schemas/userAccountReference'
            updatedAt:
              description: The date-time when the ad was last updated.
              $ref: '#/components/schemas/readOnlyTimestamp'
            updatedBy:
              description: The admin user that last updated this ad.
              $ref: '#/components/schemas/userAccountReference'
      example:
        id: 0399abed-fd3d
        redirect_url: http://cdn.example.com/links/banking-ad
        redirectLinkLabel: Learn More
        dismissible: true
        dismiss_url: http://cdn.example.com/links/dismiss-link
        priority: 1
        icon:
          visible: true
        metrics:
          impressionCount: 432
          adClickCount: 321
          clickThroughRate: 25
          dismissCount: 210
        campaign:
          id: 0399abed-fdab
          name: New Customers Ages 35-49
          state: active
          audience:
            id: 590c0c441f3241de9526
            name: New Customers Ages 35-49
        location:
          id: 0399abed-ac23
          applicationType: mobile
          type: image
          name: home
          label: Home
          description: The home page of the mobile application
        content:
          en:
            title: Save for the Holidays!
            body: Open a Holiday Savings Account today so you are prepared for holiday giving.
            image: QmFzZTY0IGVuY29kZWQgaW1hZ2UgY29udGVudCBoZXJlLi4u
            thumbnail_url: http://cdn.example.com/links/thumbnail-image
            contentType: image/jpeg
            altText: An advertisement for new banking CD rates
        createdAt: '2023-07-02T10:30:43.375Z'
        createdBy:
          id: 22707c1196c6f1c6938e
          username: MetricMagician
          firstName: Andy
          lastName: Analytics
        updatedAt: '2023-07-02T10:30:43.375Z'
        updatedBy:
          id: 22707c1196c6f1c6938e
          username: MetricMagician
          firstName: Andy
          lastName: Analytics
    campaignAd:
      x-apiture-version: 1.7.0
      title: Campaign Ad (v1.7.0)
      description: Representation of an ad, which is an in-app advertisement that can be included in a campaign.
      allOf:
        - $ref: '#/components/schemas/campaignAdItem'
      example:
        id: 0399abed-fd3d
        redirect_url: http://cdn.example.com/links/banking-ad
        redirectLinkLabel: Learn More
        dismissible: true
        dismiss_url: http://cdn.example.com/links/dismiss-link
        priority: 1
        icon:
          visible: true
        metrics:
          impressionCount: 432
          adClickCount: 321
          clickThroughRate: 25
          dismissCount: 210
        location:
          id: 0399abed-ac23
          applicationType: mobile
          type: image
          name: home
          label: Home
          description: The home page of the mobile application
        content:
          en:
            title: Save for the Holidays!
            body: Open a Holiday Savings Account today so you are prepared for holiday giving.
            imageName: holidayPromotion.jpeg
            image: QmFzZTY0IGVuY29kZWQgaW1hZ2UgY29udGVudCBoZXJlLi4u
            thumbnail_url: http://cdn.example.com/links/thumbnail-image
            contentType: image/jpeg
            altText: An advertisement for new banking CD rates
    campaignAds:
      x-apiture-version: 1.7.0
      title: Campaign Ad Collection (v1.7.0)
      description: Collection of ads.
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - type: object
          properties:
            items:
              description: An array containing ad items.
              type: array
              maxItems: 1000
              items:
                $ref: '#/components/schemas/campaignAdItem'
      example:
        items:
          - id: 0399abed-fd3d
            redirect_url: http://cdn.example.com/links/banking-ad
            redirectLinkLabel: Learn More
            dismissible: true
            dismiss_url: http://cdn.example.com/links/dismiss-link
            priority: 1
            icon:
              visible: true
            metrics:
              impressionCount: 432
              adClickCount: 321
              clickThroughRate: 25
              dismissCount: 210
            location:
              id: 0399abed-ac23
              applicationType: mobile
              type: image
              name: home
              label: Home
              description: The home page of the mobile application
            campaign:
              id: 0399abed-fdab
              name: New Customers Ages 35-49
              state: active
              audience:
                id: 6f886635-d136
                customerCount: 25000
                totalCustomerCount: 50000
                state: active
                customerCountUpdatedAt: '2023-04-24T08:48:05.000Z'
            content:
              en:
                title: Save for the Holidays!
                body: Open a Holiday Savings Account today so you are prepared for holiday giving.
                imageName: holidayPromotion.jpeg
                image: QmFzZTY0IGVuY29kZWQgaW1hZ2UgY29udGVudCBoZXJlLi4u
                thumbnail_url: http://cdn.example.com/links/thumbnail-image
                contentType: image/jpeg
                altText: An advertisement for new banking CD rates
          - id: d62c0701-0d74-4836-83f9-ebf3709442ea
            redirect_url: http://cdn.example.com/links/banking-ad
            redirectLinkLabel: Learn More
            dismissible: true
            dismiss_url: http://cdn.example.com/links/dismiss-link
            priority: 1
            icon:
              visible: true
            location:
              id: 0399abed-ac23
              applicationType: web
              type: text
              name: overviewSide
              label: Overview Side
              description: The side bar of the web application.
            campaign:
              id: 0399abed-fdab
              name: New Customers Ages 35-49
              state: active
              audience:
                id: f3e33a0d-63f2
                customerCount: 25000
                totalCustomerCount: 50000
                state: active
                customerCountUpdatedAt: '2023-04-24T08:48:05.000Z'
            content:
              en:
                title: Save for the Holidays!
                body: Open a Holiday Savings Account today so you are prepared for holiday giving.
                imageName: holidayPromotion.jpeg
                image: QmFzZTY0IGVuY29kZWQgaW1hZ2UgY29udGVudCBoZXJlLi4u
                thumbnail_url: http://cdn.example.com/links/thumbnail-image
                contentType: image/jpeg
                altText: An advertisement for new banking CD rates
    campaign:
      x-apiture-version: 2.3.0
      title: Campaign (v2.3.0)
      description: Representation of a campaign resource. An advertising campaign with one or more advertisements.
      required:
        - id
        - name
        - state
        - createdAt
        - createdBy
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/campaignItem'
      example:
        id: 0399abed-fd3d
        name: Holiday Savings Campaign
        state: active
        audience:
          id: 590c0c441f3241de9526
          name: New Customers Ages 35-49
          customerCount: 25000
          totalCustomerCount: 50000
          state: active
          customerCountUpdatedAt: '2023-04-24T08:48:05.000Z'
        metrics:
          impressionCount: 432
          adClickCount: 321
          clickThroughRate: 25
          dismissCount: 210
        schedule:
          startAt: '2023-08-01T12:00:00.00Z'
          endAt: '2023-08-10T12:00:00.00Z'
          intervals:
            - daysOfWeek:
                - monday
              startTime: '09:00:00.000'
              endTime: '15:00:00.000'
        daysRunning: 10
        description: Promote the savings account for holiday giving.
        createdAt: '2023-07-02T10:30:43.375Z'
        createdBy:
          id: 22707c1196c6f1c6938e
          username: MetricMagician
          firstName: Andy
          lastName: Analytics
        updatedAt: '2023-07-02T10:30:43.375Z'
        updatedBy:
          id: 22707c1196c6f1c6938e
          username: MetricMagician
          firstName: Andy
          lastName: Analytics
        metricsResetAt: '2023-07-02T10:30:43.375Z'
    campaignAdIcon:
      title: Campaign Ad Icon (v1.0.0)
      description: Properties that pertain to an icon displayed on the ad.
      type: object
      properties:
        visible:
          description: Indicates whether an icon should be shown on the ad.
          type: boolean
          default: false
      x-apiture-version: 1.0.0
    campaignSchedule:
      title: Campaign Schedule (v1.0.0)
      description: Start date, end date, and run time intervals for an ad campaign schedule.
      type: object
      properties:
        startAt:
          description: The date-time when the ad campaign is scheduled to begin, in [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC date-time format ( `YYYY-MM-DDThh:mm:ss.sssZ` ).
          type: string
          format: date-time
          minLength: 20
          maxLength: 30
        endAt:
          description: The date-time when the ad campaign is scheduled to end, in [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC date-time format ( `YYYY-MM-DDThh:mm:ss.sssZ` ). This must be later than the `startAt`.
          type: string
          format: date-time
          minLength: 20
          maxLength: 30
        intervals:
          description: An optional list of items containing the days of the week and time ranges of when the ad should be displayed. A time range for a given day of the week cannot overlap with another time range on that same day of the week.
          type: array
          minItems: 1
          maxItems: 20
          items:
            $ref: '#/components/schemas/campaignInterval'
      example:
        startAt: '2023-08-01T12:00:00.00Z'
        endAt: '2023-09-01T12:00:00.00Z'
        intervals:
          - daysOfWeek:
              - monday
              - tuesday
              - wednesday
            startTime: '09:00:00.000'
            endTime: '15:00:00.000'
          - daysOfWeek:
              - thursday
              - friday
            startTime: '11:00:00.000'
            endTime: '15:00:00.000'
      x-apiture-version: 1.0.0
    campaignInterval:
      title: Campaign Interval (v1.0.0)
      description: Day of the week and time range when an ad should be displayed.
      type: object
      required:
        - startTime
        - endTime
        - daysOfWeek
      properties:
        daysOfWeek:
          description: A list of the days of the week when the interval should apply.
          type: array
          maxItems: 10
          items:
            $ref: '#/components/schemas/dayOfWeek'
        startTime:
          description: The time when the ad campaign is scheduled to start, in [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC time format ( `hh:mm:ss.sss` ).
          type: string
          format: time
          minLength: 7
          maxLength: 12
        endTime:
          description: The time when the ad campaign is scheduled to end, in [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC time format ( `hh:mm:ss.sss` ). This must be later than the `startTime`.
          type: string
          format: time
          minLength: 7
          maxLength: 12
      example:
        daysOfWeek:
          - daily
        startTime: '09:00:00.000'
        endTime: '15:00:00.000'
      x-apiture-version: 1.0.0
    dayOfWeek:
      title: Days of Week (v1.0.0)
      description: |-
        The day(s) of the week that an ad can run on. `daily`, `weekdays`, and `weekends` are also accepted values. `daily` will run the ad on every day of the week. `weekdays` will run the ad
         `monday` through `friday`. `weekends` will run the ad on `saturday` and `sunday`.
      type: string
      enum:
        - monday
        - tuesday
        - wednesday
        - thursday
        - friday
        - saturday
        - sunday
        - daily
        - weekdays
        - weekends
      x-apiture-version: 1.0.0
    campaignPatch:
      x-apiture-version: 1.4.0
      title: Campaign Patch (v1.4.0)
      description: Request to patch a campaign.
      allOf:
        - $ref: '#/components/schemas/campaignFields'
        - type: object
          properties:
            audience:
              $ref: '#/components/schemas/campaignAudienceReference'
            testingAudience:
              $ref: '#/components/schemas/testingCampaignAudienceReference'
    campaignFields:
      x-apiture-version: 1.1.0
      title: Campaign Fields (v1.1.0)
      description: Common fields of the campaign resource used to build other model schemas.
      x-apiture-fragment: true
      properties:
        name:
          description: The name of this campaign. The name does not need to be unique.
          type: string
          format: text
          maxLength: 100
          minLength: 3
        description:
          description: The description of this campaign, including the purpose/goals.
          type: string
          format: text
          maxLength: 500
          minLength: 3
        schedule:
          $ref: '#/components/schemas/campaignSchedule'
      example:
        name: PFM Promotion
        description: Promote the financial institution's personal financial management module.
        audience:
          id: 590c0c441f3241de9526
          name: New Customers Ages 35-49
          customerCount: 25000
          totalCustomerCount: 50000
          state: active
          customerCountUpdatedAt: '2023-04-24T08:48:05.000Z'
        testingAudience:
          id: 0c4241de952641f3590c
          name: New Customers Ages 24-35
          customerCount: 1000
          totalCustomerCount: 50000
          state: active
          customerCountUpdatedAt: '2023-04-21T08:42:01.000Z'
        schedule:
          startAt: '2023-08-01T00:00:00Z'
          endAt: '2023-08-10T00:00:00Z'
    campaignMetricsList:
      title: Campaign Metric List (v1.0.0)
      description: A Collection of campaign metrics.
      required:
        - items
      properties:
        items:
          description: An array containing campaign metrics
          type: array
          maxItems: 1000
          items:
            $ref: '#/components/schemas/campaignMetrics'
      example:
        items:
          - campaignId: 590c0c441f3241de9526
            impressionCount: 432
            adClickCount: 321
            clickThroughRate: 25
            dismissCount: 210
      x-apiture-version: 1.0.0
    campaignMetricsFields:
      title: Campaign Metrics Fields (v1.0.0)
      description: Defines common campaign metrics fields. These may describe ads or campaigns.
      type: object
      properties:
        impressionCount:
          description: The number of times the target group was presented with ads from the associated campaign.
          type: integer
          format: int32
          readOnly: true
          minimum: 0
          maximum: 2147483647
        adClickCount:
          description: The number of times an ad from the associated campaign was clicked.
          type: integer
          format: int32
          readOnly: true
          minimum: 0
          maximum: 2147483647
        clickThroughRate:
          description: The percentage of ad clicks to impressions.
          type: number
          format: float
          readOnly: true
          minimum: 0
          maximum: 100
        dismissCount:
          description: The number of times the ad was dismissed.
          type: integer
          format: int32
          readOnly: true
          minimum: 0
          maximum: 2147483647
      example:
        campaignId: 590c0c441f3241de9526
        impressionCount: 432
        adClickCount: 321
        clickThroughRate: 25
        dismissCount: 210
      x-apiture-version: 1.0.0
    campaignMetrics:
      title: Campaign Metrics (v1.0.0)
      description: Metrics for campaigns.
      allOf:
        - $ref: '#/components/schemas/campaignMetricsFields'
        - type: object
          properties:
            campaignId:
              description: The ID of the campaign that these metrics pertain to.
              $ref: '#/components/schemas/readOnlyResourceId'
      x-apiture-version: 1.0.0
    campaignAdMetrics:
      title: Campaign Ad Metrics (v1.0.0)
      description: Metrics for campaign ads.
      allOf:
        - $ref: '#/components/schemas/campaignMetricsFields'
        - type: object
          properties:
            adId:
              description: The ID of the ad that these metrics pertain to.
              $ref: '#/components/schemas/readOnlyResourceId'
      x-apiture-version: 1.0.0
    campaigns:
      x-apiture-version: 2.3.0
      title: Campaign Collection (v2.3.0)
      description: Collection of campaigns.
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - type: object
          required:
            - items
          properties:
            items:
              description: An array containing campaign items.
              type: array
              maxItems: 1000
              items:
                $ref: '#/components/schemas/campaignItem'
      example:
        items:
          - id: 0399abed-fd3d
            name: PFM Promotion
            description: Promote the financial institution's personal financial management module.
            audience:
              id: 590c0c441f3241de9526
              name: New Customers Ages 35-49
              customerCount: 25000
              totalCustomerCount: 50000
              state: active
              customerCountUpdatedAt: '2023-04-24T08:48:05.000Z'
            state: active
            metrics:
              impressionCount: 432
              adClickCount: 321
              clickThroughRate: 25
              dismissCount: 210
            adCount: 10
            ads:
              - id: 0399abed-fd3d
                redirect_url: http://cdn.example.com/links/banking-ad
                redirectLinkLabel: Learn More
                dismissible: true
                dismiss_url: http://cdn.example.com/links/dismiss-link
                priority: 1
                icon:
                  visible: true
                metrics:
                  impressionCount: 432
                  adClickCount: 321
                  clickThroughRate: 25
                  dismissCount: 210
                location:
                  id: 0399abed-ac23
                  applicationType: mobile
                  type: image
                  name: home
                  label: Home
                  description: The home page of the mobile application
                content:
                  en:
                    title: Save for the Holidays!
                    body: Open a Holiday Savings Account today so you are prepared for holiday giving.
                    imageName: holidayPromotion.jpeg
                    image: QmFzZTY0IGVuY29kZWQgaW1hZ2UgY29udGVudCBoZXJlLi4u
                    thumbnail_url: http://cdn.example.com/links/thumbnail-image
                    contentType: image/jpeg
                    altText: An advertisement for new banking CD rates
            schedule:
              startAt: '2023-08-01T12:00:00.00Z'
              endAt: '2023-08-10T12:00:00.00Z'
              intervals:
                - daysOfWeek:
                    - weekdays
                  startTime: '09:00:00.000'
                  endTime: '15:00:00.000'
            daysRunning: 10
            allows:
              edit: true
              share: true
              copy: true
              draft: true
              schedule: true
              test: true
              resume: false
              pause: true
              cancel: true
              archive: false
              restore: false
              addAd: true
            createdBy:
              id: 22707c1196c6f1c6938e
              username: MetricMagician
              firstName: Andy
              lastName: Analytics
            createdAt: '2023-07-02T10:30:43.375Z'
            updatedAt: '2023-07-02T10:30:43.375Z'
            metricsResetAt: '2023-07-02T10:30:43.375Z'
    newCampaign:
      x-apiture-version: 1.3.0
      title: New Campaign (v1.3.0)
      description: Representation used to create a new campaign.
      required:
        - name
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/campaignFields'
        - type: object
          properties:
            audience:
              $ref: '#/components/schemas/campaignAudienceReference'
            testingAudience:
              $ref: '#/components/schemas/testingCampaignAudienceReference'
      example:
        name: PFM Promotion
        description: Promote the financial institution's personal financial management module.
        audience:
          id: 590c0c441f3241de9526
          name: New Customers Ages 35-49
        testingAudience:
          id: 0c4241de952641f3590c
          name: New Customers Ages 24-35
        schedule:
          startAt: '2023-08-01T12:00:00.00Z'
          endAt: '2023-08-10T12:00:00.00Z'
          intervals:
            - daysOfWeek:
                - weekends
              startTime: '09:00:00.000'
              endTime: '15:00:00.000'
    campaignState:
      title: Campaign States (v1.0.0)
      description: |+
        The set of states a campaign may have.

        <strong><code>campaignState</code></strong> strings may have one of the following
        [enumerated values](https://developer.apiture.com/docs/concepts/label-groups#enumerations):

        <table>
        <tr>
          <th>Value</th><th>Description</th>
        </tr>

        <tr>
            <td><strong><code>draft</code></strong></td><td>Draft: <p>A campaign that is created but yet to be scheduled</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>testing</code></strong></td><td>Testing: <p>A campaign that is running for a specific audience for the purpose of testing before it is made public. Campaigns that have finished their tests move back to a draft or scheduled state when completed.</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>scheduled</code></strong></td><td>Scheduled: <p>A campaign that has been scheduled to be published on a set date but has not started running</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>active</code></strong></td><td>Active: <p>A running campaign. This includes a campaign that may or may not be displayed to end users due to scheduling</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>paused</code></strong></td><td>Paused: <p>An active campaign that is paused but may be resumed. No further ads are served from this campaign</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>canceled</code></strong></td><td>Canceled: <p>A campaign that has been canceled before the scheduled end date of the campaign</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>completed</code></strong></td><td>Completed: <p>A campaign that ran for its full schedule without being canceled</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>archived</code></strong></td><td>Archived: <p>A campaign that has been archived</p>
        </td>
            </tr>
        </table>

      type: string
      x-apiture-enum: campaignState
      enum:
        - draft
        - scheduled
        - testing
        - active
        - paused
        - canceled
        - completed
        - archived
      x-apiture-version: 1.0.0
    campaignAllows:
      x-apiture-version: 2.0.0
      title: Campaign Allows (v2.0.0)
      description: |-
        Lists the actions the current analyst is allowed to perform on the
         current campaign.
      type: object
      required:
        - edit
        - share
        - copy
        - draft
        - schedule
        - test
        - resume
        - pause
        - cancel
        - archive
        - restore
        - addAd
      properties:
        edit:
          description: The analyst is allowed to edit this campaign. This includes updating the name, audience, description, setting a schedule, and adding advertisements to the campaign.
          type: boolean
        share:
          description: The analyst is allowed to share this campaign with other analysts.
          type: boolean
        copy:
          description: The analyst is allowed to copy this campaign.
          type: boolean
        draft:
          description: The analyst is allowed to mark this campaign as `draft`. This is `true` if the analyst is entitled to mark the campaign as `draft` and if the campaign `state` is `scheduled`, `paused`, or `testing`.
          type: boolean
        schedule:
          description: The analyst is allowed to schedule this campaign. This is `true` if the analyst is entitled to schedule the campaign and if the campaign `state` is `draft`, `paused`, or `testing`. The campaign must also have a `schedule`, `audience`, and `ads` defined for this to be `true`.
          type: boolean
        test:
          description: The analyst is allowed to test this campaign. This is only `true` if the analyst is entitled to move the campaign to `testing` and if the campaign `state` is `draft` or `scheduled`.
          type: boolean
        resume:
          description: The analyst is allowed to resume this campaign. This is only `true` if the analyst is entitled to resume the campaign and if the campaign `state` is `paused`.
          type: boolean
        pause:
          description: The analyst is allowed to pause this campaign. This is only `true` if the analyst is entitled to pause the campaign and if the campaign `state` is `active`.
          type: boolean
        cancel:
          description: The analyst is allowed to cancel this campaign. This is only `true` if the analyst is entitled to cancel the campaign and if the campaign `state` is `active`.
          type: boolean
        archive:
          description: The analyst is allowed to archive this campaign. This is only `true` if the analyst is entitled to archive the campaign and if the campaign `state` is `completed`, `draft`, `paused`, `scheduled` or `testing`. If the campaign's state is `archived`, this is always `false`.
          type: boolean
        restore:
          description: The analyst is allowed to restore (unarchive) this campaign. If the campaign's state is not `archived`, this is always `false`.
          type: boolean
        addAd:
          description: The analyst is allowed to create ads in this campaign. This is only `true` if the user is entitled to create ads and the campaign does not have the maximum number of ads.
          type: boolean
    campaignAdLocationType:
      title: Campaign Ad Location Type (v1.0.0)
      description: |+
        The type of ad that can be placed at this location. A location can display only `image` or `text` ads but not both types.

        <strong><code>campaignAdLocationType</code></strong> strings may have one of the following
        [enumerated values](https://developer.apiture.com/docs/concepts/label-groups#enumerations):

        <table>
        <tr>
          <th>Value</th><th>Description</th>
        </tr>

        <tr>
            <td><strong><code>image</code></strong></td><td>Image: <p>A location for an image ad</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>text</code></strong></td><td>Text: <p>A location for a text ad</p>
        </td>
            </tr>
        </table>

      type: string
      x-apiture-enum: campaignAdLocationType
      enum:
        - image
        - text
      x-apiture-version: 1.0.0
    campaignAdApplicationType:
      title: Campaign Ad Application Type (v1.0.0)
      description: |+
        The application type of an ad location.

        <strong><code>campaignAdApplicationType</code></strong> strings may have one of the following
        [enumerated values](https://developer.apiture.com/docs/concepts/label-groups#enumerations):

        <table>
        <tr>
          <th>Value</th><th>Description</th>
        </tr>

        <tr>
            <td><strong><code>web</code></strong></td><td>Web: <p>A web application type for an ad location</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>mobile</code></strong></td><td>Mobile: <p>A mobile application type for an ad location</p>
        </td>
            </tr>
        </table>

      type: string
      x-apiture-enum: campaignAdApplicationType
      enum:
        - web
        - mobile
      x-apiture-version: 1.0.0
    campaignItem:
      x-apiture-version: 2.3.0
      title: Campaign Item (v2.3.0)
      description: Summary representation of a campaign resource in a campaign collection.
      required:
        - id
        - name
        - state
        - allows
        - ads
        - adCount
        - createdBy
        - createdAt
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/campaignFields'
        - type: object
          properties:
            id:
              description: The unique identifier for this campaign resource. This is an immutable opaque string.
              $ref: '#/components/schemas/resourceId'
            state:
              description: The state of this campaign. Update a draft campaign to scheduled via [`scheduleCampaign`](#op-scheduleCampaign) or [`cancelCampaign`](#op-cancelCampaign), [`pausedCampaign`](#op-pauseCampaign) (if active), or [`resumeCampaign`](#op-resumeCampaign) (if paused). The service automatically changes the state to `active` or `completed` at the start or end of the scheduled run period.
              readOnly: true
              $ref: '#/components/schemas/campaignState'
            allows:
              $ref: '#/components/schemas/campaignAllows'
            metrics:
              $ref: '#/components/schemas/campaignMetrics'
            ads:
              description: An array containing up to the first 20 campaign ads for this campaign. Within the list of customer audiences returned from [`listCampaigns`](#op-listCampaigns), this list is limited to the first 20 ads. The full list is available in the full [`campaign`](#schema-campaign) response from the [`getCampaign`](#op-getCampaign).
              readOnly: true
              type: array
              maxItems: 20
              items:
                $ref: '#/components/schemas/campaignAd'
            audience:
              $ref: '#/components/schemas/campaignAudienceSummary'
            testingAudience:
              description: The testing audience for this campaign. This only applies when the campaign is in the `testing` state.
              $ref: '#/components/schemas/campaignAudienceSummary'
            adCount:
              description: The total number of ads in a campaign.
              type: integer
              format: int16
              minimum: 0
              maximum: 100
              readOnly: true
            daysRunning:
              description: The number of days that the campaign has run. This is only returned when the campaign `state` is `active`, `paused`, or `completed`. If the campaign `state` is `active` or `paused`, then this value represents the number of days that the campaign has run so far. When a campaign is paused or resumed, then this value is incremented if the campaign was run at any point during the day the action occurred. If the campaign `state` is `completed`, this value represents the total number of days that the campaign ran.
              type: integer
              format: int16
              readOnly: true
              minimum: 0
              maximum: 5000
            createdAt:
              description: The date-time when the campaign was created.
              $ref: '#/components/schemas/readOnlyTimestamp'
            createdBy:
              description: The admin user that created this campaign.
              $ref: '#/components/schemas/userAccountReference'
            updatedAt:
              description: The date-time when the campaign was last updated.
              $ref: '#/components/schemas/readOnlyTimestamp'
            updatedBy:
              description: The admin user that updated this campaign.
              $ref: '#/components/schemas/userAccountReference'
            metricsResetAt:
              description: The date-time when the campaign metrics were last reset.
              $ref: '#/components/schemas/readOnlyTimestamp'
      example:
        id: 0399abed-fd3d
        name: PFM Promotion
        description: Promote the financial institution's personal financial management module.
        audience:
          id: 590c0c441f3241de9526
          name: New Customers Ages 35-49
          customerCount: 25000
          totalCustomerCount: 50000
          state: active
          customerCountUpdatedAt: '2023-04-24T08:48:05.000Z'
        state: active
        metrics:
          impressionCount: 432
          adClickCount: 321
          clickThroughRate: 25
          dismissCount: 210
        adCount: 10
        ads:
          - id: 0399abed-fd3d
            redirect_url: http://cdn.example.com/links/banking-ad
            redirectLinkLabel: Learn More
            dismissible: true
            dismiss_url: http://cdn.example.com/links/dismiss-link
            priority: 1
            icon:
              visible: true
            metrics:
              impressionCount: 432
              adClickCount: 321
              clickThroughRate: 25
              dismissCount: 210
            location:
              id: 0399abed-ac23
              applicationType: mobile
              type: image
              name: home
              label: Home
              description: The home page of the mobile application
            content:
              en:
                title: Save for the Holidays!
                body: Open a Holiday Savings Account today so you are prepared for holiday giving.
                imageName: holidayPromotion.jpeg
                image: QmFzZTY0IGVuY29kZWQgaW1hZ2UgY29udGVudCBoZXJlLi4u
                thumbnail_url: http://cdn.example.com/links/thumbnail-image
                contentType: image/jpeg
                altText: An advertisement for new banking CD rates
        schedule:
          startAt: '2023-08-01T12:00:00.00Z'
          endAt: '2023-08-10T12:00:00.00Z'
          intervals:
            - daysOfWeek:
                - weekdays
              startTime: '09:00:00.000'
              endTime: '15:00:00.000'
        daysRunning: 10
        allows:
          edit: true
          share: true
          copy: true
          draft: true
          schedule: true
          test: true
          resume: false
          pause: true
          cancel: true
          archive: false
          restore: false
          addAd: true
        createdAt: '2023-07-02T10:30:43.375Z'
        createdBy:
          id: 22707c1196c6f1c6938e
          username: MetricMagician
          firstName: Andy
          lastName: Analytics
        updatedAt: '2023-07-02T10:30:43.375Z'
        updatedBy:
          id: 22707c1196c6f1c6938e
          username: MetricMagician
          firstName: Andy
          lastName: Analytics
        metricsResetAt: '2023-07-02T10:30:43.375Z'
    campaignReference:
      x-apiture-version: 1.3.0
      title: Campaign Reference (v1.3.0)
      description: An object that references a summary of the campaign.
      required:
        - id
        - name
        - state
        - audience
      type: object
      properties:
        id:
          description: The unique identifier for this campaign resource. This is an immutable opaque string.
          $ref: '#/components/schemas/resourceId'
        name:
          description: The campaign name.
          type: string
          format: text
          minLength: 3
          maxLength: 100
        state:
          $ref: '#/components/schemas/campaignState'
        audience:
          $ref: '#/components/schemas/campaignAudienceReference'
      example:
        id: 0399abed-fd3d
        name: Holiday Savings Campaign
        state: active
        audience:
          id: 590c0c441f3241de9526
          name: New Customers Ages 35-49
    campaignAudienceReference:
      x-apiture-version: 1.1.0
      title: Campaign Audience Reference (v1.1.0)
      description: An object that references a Campaign Audience by its `id` and `name`.
      required:
        - id
      type: object
      properties:
        id:
          description: The unique identifier for this campaign resource. This is an immutable opaque string.
          $ref: '#/components/schemas/resourceId'
        name:
          description: The audience name.
          type: string
          format: text
          maxLength: 100
      example:
        id: 590c0c441f3241de9526
        name: New Customers Ages 35-49
    testingCampaignAudienceReference:
      x-apiture-version: 1.1.0
      title: Testing Campaign Audience Reference (v1.1.0)
      description: The testing audience for this campaign. This only applies when the campaign is in the `testing` state. When the testingAudience is updated while the campaign is in the `testing` state, the metrics for the campaign are reset.
      required:
        - id
      type: object
      $ref: '#/components/schemas/campaignAudienceReference'
    testCampaignRequest:
      title: Test Campaign Request (v1.0.0)
      description: Request to test a campaign.
      required:
        - testingAudience
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - type: object
          properties:
            testingAudience:
              $ref: '#/components/schemas/testingCampaignAudienceReference'
      x-apiture-version: 1.0.0
    campaignAudienceSummary:
      x-apiture-version: 1.1.0
      title: Campaign Audience Summary (v1.1.0)
      description: Summary representation of an audience resource for a campaign.
      required:
        - id
        - name
        - state
        - customerCount
        - totalCustomerCount
        - customerCountUpdatedAt
      allOf:
        - $ref: '#/components/schemas/campaignAudienceReference'
        - type: object
          properties:
            customerCount:
              description: The number of customers who match the audience's filter criteria.
              type: integer
              format: int32
              minimum: 0
              maximum: 1000000000
            totalCustomerCount:
              description: The total number of customers at the financial institution, ignoring any filter criteria.
              type: integer
              format: int32
              minimum: 0
              maximum: 1000000000
            state:
              $ref: '#/components/schemas/customerAudienceState'
            customerCountUpdatedAt:
              description: The timestamp when the `customerCount` was last updated, in [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC `YYYY-MM-DDThh:mm:ss.sssZ` date-time format.
              $ref: '#/components/schemas/timestamp'
      example:
        id: 590c0c441f3241de9526
        name: New Customers Ages 35-49
        customerCount: 25000
        totalCustomerCount: 100000
        state: active
        customerCountUpdatedAt: '2023-04-24T08:48:05.000Z'
    campaignHistoryRecords:
      x-apiture-version: 1.1.0
      title: Campaign History Records (v1.1.0)
      description: A list of campaign history records. This response is used to see the user interactions with the campaign.
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - type: object
          required:
            - items
          properties:
            items:
              description: An array containing campaign history records.
              type: array
              maxItems: 10000
              items:
                $ref: '#/components/schemas/campaignHistoryRecord'
      example:
        items:
          - type: scheduled
            state: scheduled
            occurredAt: '2023-10-10T06:00:00Z'
            updatedBy:
              id: 22707c1196c6f1c6938e
              username: MetricMagician
              firstName: Andy
              lastName: Analytics
          - type: completed
            state: completed
            occurredAt: '2023-10-20T06:00:00Z'
            updatedBy:
              id: 22707c1196c6f1c6938e
              username: MetricMagician
              firstName: Andy
              lastName: Analytics
    campaignHistoryRecord:
      x-apiture-version: 1.1.0
      title: Campaign Activity Record (v1.1.0)
      description: Representation of a campaign history record. This response is used to see the user interactions with the campaign.
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - type: object
          required:
            - type
            - occurredAt
            - updatedBy
          properties:
            type:
              description: A description of the event that was performed on the campaign.
              $ref: '#/components/schemas/campaignHistoryRecordType'
            occurredAt:
              description: The date-time when the event occurred.
              $ref: '#/components/schemas/readOnlyTimestamp'
            updatedBy:
              description: The user that updated the campaign.
              $ref: '#/components/schemas/userAccountReference'
            secondaryCampaignId:
              description: The ID of the related campaign associated with this action. This field is only set if `type` is one of `copied`.
              $ref: '#/components/schemas/resourceId'
            state:
              description: The state of the campaign as a result of the event.
              $ref: '#/components/schemas/campaignState'
      example:
        type: scheduled
        state: scheduled
        occurredAt: '2023-10-10T06:00:00Z'
        updatedBy:
          id: 22707c1196c6f1c6938e
          username: MetricMagician
          firstName: Andy
          lastName: Analytics
    campaignHistoryRecordType:
      x-apiture-version: 1.3.0
      title: Campaign History Record Type (v1.3.0)
      description: |+
        The type of a campaign history record.

        <strong><code>campaignHistoryRecordType</code></strong> strings may have one of the following
        [enumerated values](https://developer.apiture.com/docs/concepts/label-groups#enumerations):

        <table>
        <tr>
          <th>Value</th><th>Description</th>
        </tr>

        <tr>
            <td><strong><code>created</code></strong></td><td>Created: <p>The campaign was created</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>copiedTo</code></strong></td><td>Copied: <p>The campaign was copied to another campaign.</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>copiedFrom</code></strong></td><td>Copied: <p>The campaign was copied from another campaign.</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>draft</code></strong></td><td>Draft: <p>The campaign was moved to draft</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>scheduled</code></strong></td><td>Scheduled: <p>The campaign was scheduled</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>testing</code></strong></td><td>Testing: <p>The campaign was moved to testing</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>active</code></strong></td><td>Active: <p>The campaign was activated</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>paused</code></strong></td><td>Paused: <p>The campaign was paused</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>canceled</code></strong></td><td>Canceled: <p>The campaign was canceled</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>completed</code></strong></td><td>Completed: <p>The campaign was completed</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>archived</code></strong></td><td>Archived: <p>The campaign was archived</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>unarchived</code></strong></td><td>Unarchived: <p>The campaign was unarchived</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>edited</code></strong></td><td>Edited: <p>The campaign was edited</p>
        </td>
            </tr>
        </table>

      type: string
      x-apiture-enum: campaignHistoryRecordType
      enum:
        - created
        - copiedTo
        - copiedFrom
        - draft
        - scheduled
        - testing
        - active
        - paused
        - canceled
        - completed
        - archived
        - unarchived
        - edited
    campaignAdLocations:
      x-apiture-version: 1.1.0
      title: Campaign Ad Location Collection (v1.1.0)
      description: Collection of campaign ad locations. The items in the collection are ordered in the `items` array.
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - type: object
          required:
            - items
          properties:
            items:
              description: An array containing campaign ad location items.
              type: array
              maxItems: 1000
              items:
                $ref: '#/components/schemas/campaignAdLocation'
      example:
        items:
          - id: 0399abed-fd3a
            name: home
            label: Home
            applicationType: mobile
            type: image
            description: The home page of the mobile application.
            aspectRatio: '6:1'
            positionPriority: 1
          - id: d62c0701-0d75
            name: overviewTop
            label: Overview Top
            applicationType: web
            type: text
            description: The top header of the overview page.
            aspectRatio: '3:1'
            positionPriority: 2
    campaignAdLocation:
      x-apiture-version: 1.1.0
      title: Campaign Ad Location (v1.1.0)
      description: Representation of a campaign ad location resource. Campaign Ad Locations provide data about where the ad should be placed in the client application.
      required:
        - id
        - name
        - label
        - description
        - applicationType
        - type
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/campaignAdLocationFields'
        - type: object
          properties:
            id:
              description: The unique identifier for this campaign ad location resource. This is an immutable opaque string.
              $ref: '#/components/schemas/resourceId'
      example:
        id: 27db0ea3-584e-4173-9ff2-77223de7b8bf
        name: home
        label: Home
        applicationType: mobile
        type: image
        description: The home page of the mobile application.
        aspectRatio: '6:1'
        positionPriority: 1
    campaignAdLocationReference:
      title: Campaign Ad Location Reference (v1.0.0)
      description: An object that references a campaign ad location by its `id`.
      unevaluatedProperties: false
      required:
        - id
      type: object
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/campaignAdLocationFields'
        - type: object
          properties:
            id:
              description: The unique identifier for this campaign ad location resource. This is an immutable opaque string.
              $ref: '#/components/schemas/resourceId'
      example:
        id: 27db0ea3-584e-4173-9ff2-77223de7b8bf
        name: home
        label: Home
        applicationType: mobile
        type: image
        description: The home page of the mobile application.
        aspectRatio: '6:1'
        positionPriority: 100
      x-apiture-version: 1.0.0
    campaignAdLocationFields:
      x-apiture-version: 1.1.0
      title: Campaign Ad Location Fields (v1.1.0)
      description: Common fields of the campaign ad location resource used to build other model schemas.
      x-apiture-fragment: true
      properties:
        name:
          description: The name of this campaign ad location. This value must be unique.
          $ref: '#/components/schemas/campaignAdLocationName'
        label:
          description: The label of this campaign ad location.
          type: string
          format: text
          minLength: 2
          maxLength: 255
        applicationType:
          description: The application type for this campaign ad location.
          $ref: '#/components/schemas/campaignAdApplicationType'
        type:
          description: The type of ad that this location displays.
          $ref: '#/components/schemas/campaignAdLocationType'
        description:
          description: The description of this campaign ad location.
          type: string
          format: text
          maxLength: 500
          minLength: 1
        aspectRatio:
          description: |-
            The aspect ratio for ad locations. This property only applies for ads with a `type` value of `image`. This takes the form of `width:height`, such as `3:1` for an ad location that is three times as wide as it is tall. For example, an image 600 pixels wide and 300 pixels tall will have an aspect ratio of `2:1`.
            Images are scaled to match the aspect ratio and location's actual size, so they do not have to match the aspect ratio exactly.
          type: string
          pattern: ^[1-9](\d){0,2}\:[1-9](\d){0,2}$
          minLength: 3
          maxLength: 9
        positionPriority:
          description: An integer that indicates this location's importance, relative to other locations, to allow the client to sort filter types by location importance. `positionPriority` is unique. So two locations cannot have the same `positionPriority` value. A value of `1` represents the highest priority, and a value of `100` represents the lowest priority.
          type: integer
          format: int32
          minimum: 1
          maximum: 100
      example:
        name: home
        label: Home
        applicationType: mobile
        type: image
        description: The home page of the mobile application.
        aspectRatio: '6:1'
        positionPriority: 100
    campaignAdLocationName:
      title: Campaign Ad Location Name (v1.0.0)
      description: The name of a campaign ad location.
      type: string
      format: text
      pattern: '[a-z][a-zA-Z0-9]{1,99}'
      minLength: 2
      maxLength: 100
      x-apiture-version: 1.0.0
    campaignAdDismissalReasonReference:
      x-apiture-version: 1.1.0
      title: Campaign Ad Dismissal Reason Reference (v1.1.0)
      description: An object that references a dismissal reason.
      required:
        - id
      type: object
      $ref: '#/components/schemas/campaignAdDismissalReasonFields'
    newCampaignAdDismissal:
      x-apiture-version: 1.1.0
      title: New Campaign Ad Dismissal (v1.1.0)
      description: A request to dismiss a campaign ad.
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - type: object
          properties:
            reason:
              $ref: '#/components/schemas/campaignAdDismissalReasonReference'
          example:
            reason:
              id: 0399abed-ac23
    campaignAdDismissalReasons:
      title: Campaign Ad Dismissal Reason Collection (v1.0.0)
      description: Collection of campaign ad dismissal reasons. The items in the collection are ordered in the `items` array.
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - type: object
          required:
            - items
          properties:
            items:
              description: An array containing campaign ad dismissal reason items.
              type: array
              maxItems: 1000
              items:
                $ref: '#/components/schemas/campaignAdDismissalReason'
      example:
        items:
          - id: 0399abed-ac23
            name: notRelevant
            label: This offer is not relevant to me
          - id: d25ed4ea-228e
            name: betterOffers
            label: I have better offers from other sources
      x-apiture-version: 1.0.0
    campaignAdDismissalReason:
      x-apiture-version: 1.1.0
      title: Campaign Ad Dismissal Reason (v1.1.0)
      description: Representation of a campaign ad dismissal reason. Campaign Ad Dismissal Reasons tell why a user dismissed a campaign ad.
      required:
        - id
      type: object
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/campaignAdDismissalReasonFields'
      example:
        id: 0399abed-ac23
        name: notRelevant
        label: This offer is not relevant to me
    campaignAdDismissalReasonFields:
      x-apiture-version: 1.1.0
      title: Campaign Ad Dismissal Reason Fields (v1.1.0)
      description: Common fields of the campaign ad dismissal reason resource used to build other model schemas.
      x-apiture-fragment: true
      properties:
        id:
          description: The unique identifier for this campaign ad dismissal reason. This is an immutable opaque string.
          $ref: '#/components/schemas/resourceId'
        name:
          description: The name of this campaign ad dismissal reason.
          type: string
          format: text
          pattern: ^[a-z][a-zA-Z0-9]{2,99}$
          minLength: 3
          maxLength: 100
        label:
          description: The label of this campaign ad dismissal reason.
          type: string
          format: text
          minLength: 2
          maxLength: 255
      example:
        id: 0399abed-ac23
        name: notRelevant
        label: This offer is not relevant to me
    campaignAdContentType:
      title: Campaign Ad Content Type (v1.0.0)
      description: The list of allowed content types for ads.
      type: string
      enum:
        - text/plain
        - image/png
        - image/jpeg
        - image/svg
        - image/unknown
      x-apiture-version: 1.0.0
    adPriorityUpdate:
      title: Ad Priority Update (v1.0.0)
      description: The fields required to update a single ad's priority.
      required:
        - adId
        - priority
      properties:
        adId:
          description: The ID of the ad to update the priority of.
          $ref: '#/components/schemas/resourceId'
        priority:
          description: An integer value that determines when the ad will be displayed over another ad. Ad `priority` is unique within an ad location. Two ads in the same location cannot have the same `priority` value. If an audience is subject to multiple ads, the one with the highest priority will be shown. A value of `1` represents the highest priority, and a value of `100` represents the lowest priority.
          type: integer
          format: int16
          minimum: 1
          maximum: 100
      example:
        adId: f3e33a0d-ab13
        priority: 35
      x-apiture-version: 1.0.0
    updateCampaignAdPrioritiesRequest:
      title: Update Campaign Ad Priorities Request (v1.0.0)
      description: Update the priorities of the ads in a campaign.
      required:
        - ads
      properties:
        ads:
          description: A list of ads to update and their desired priorities.
          type: array
          minItems: 1
          maxItems: 100
          items:
            $ref: '#/components/schemas/adPriorityUpdate'
      example:
        ads:
          - adId: f3e33a0d-ab13
            priority: 1
          - adId: f3e33a0d-de13
            priority: 2
      x-apiture-version: 1.0.0
    resourceId:
      x-apiture-version: 1.0.1
      title: Resource Identifier (v1.0.1)
      description: The unique, opaque system identifier for a resource. This case-sensitive ID is also used as path parameters in URLs or in other properties or parameters that reference a resource by ID rather than URL.
      type: string
      pattern: ^[-_:.~$a-zA-Z0-9]{6,48}$
      minLength: 6
      maxLength: 48
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/resourceId
    problemResponse:
      title: Problem Response (v0.4.1)
      x-apiture-version: 0.4.1
      description: API problem or error response, as per [RFC 9457 application/problem+json](https://tools.ietf.org/html/rfc9457).
      type: object
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/apiProblem'
      example:
        id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
        type: https://static.api.apiture.com/errors/noSuchAccount/v1.0.0
        title: Account Not Found
        status: 422
        occurredAt: '2022-04-25T12:42:21.375Z'
        detail: No account exists for the given account reference
        instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/problemResponse
    entityTag:
      title: Entity Tag (v1.0.0)
      description: An strong or weak [HTTP Entity Tag (ETag)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag). Strong ETags take the form `"{printable-non-control-ASCII-characters}"` but for backwards compatibility the surrounding double quotes are optional. Weak ETags take the form `W/"{printable-non-control-ASCII-characters}"`.
      type: string
      minLength: 3
      maxLength: 512
      pattern: ^(([\x21\x23-\x7e]{1,512})|(W\/\"[\x21\x23-\x7e]{1,509}\"))$
      example: W/"325cf1cc-e370-4baf-8faf-c6db23f195a2"
      x-apiture-version: 1.0.0
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/entityTag
    institutionId:
      x-apiture-version: 1.1.0
      title: Institution ID (v1.1.0)
      description: The unique immutable identifier of a financial institution.
      type: string
      pattern: ^[A-Z0-9_]{2,8}$
      maxLength: 8
      minLength: 2
      example: TIBURON
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/institutionId
    abstractBody:
      title: Abstract Body (v0.2.0)
      x-apiture-version: 0.2.0
      description: An abstract schema used to define other request and response body model schemas.
      x-apiture-fragment: true
      type: object
      properties: {}
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/abstractBody
    readOnlyTimestamp:
      title: Read-Only Timestamp (v1.0.0)
      description: 'A readonly or derived timestamp (an instant in time) formatted in [RFC 3339](https://tools.ietf.org/html/rfc3339) `date-time` UTC format: `YYYY-MM-DDThh:mm:ss.sssZ`.'
      type: string
      minLength: 20
      maxLength: 30
      format: date-time
      readOnly: true
      example: '2021-10-30T19:06:04.250Z'
      x-apiture-since: 0.4.0
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/readOnlyTimestamp
      x-apiture-version: 1.0.0
    userAccountReference:
      x-apiture-version: 2.0.0
      title: User Account Reference (v2.0.0)
      description: The representation of a user account.
      type: object
      required:
        - id
        - firstName
        - lastName
        - username
      properties:
        id:
          description: The immutable, unique, opaque identifier for the user.
          $ref: '#/components/schemas/resourceId'
        firstName:
          description: The user's first name.
          type: string
          format: text
          maxLength: 56
        lastName:
          description: The user's last name.
          type: string
          format: text
          maxLength: 56
        username:
          description: The user's login name.
          $ref: '#/components/schemas/customerUsername'
      example:
        id: 0399abed-fd3d
        firstName: Benny
        lastName: Billings
        username: bbillings
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/userAccountReference
    readOnlyResourceId:
      x-apiture-version: 1.0.1
      title: Read-only Resource Identifier (v1.0.1)
      description: The unique, opaque system-assigned identifier for a resource. This case-sensitive ID is also used in URLs as path parameters or in other properties or parameters that reference a resource by ID rather than URL. Resource IDs are immutable.
      readOnly: true
      allOf:
        - $ref: '#/components/schemas/resourceId'
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/readOnlyResourceId
    customerAudienceState:
      title: Customer Audience State (v1.0.0)
      description: |+
        The state of a Customer Audience

        <strong><code>customerAudienceState</code></strong> strings may have one of the following
        [enumerated values](https://developer.apiture.com/docs/concepts/label-groups#enumerations):

        <table>
        <tr>
          <th>Value</th><th>Description</th>
        </tr>

        <tr>
            <td><strong><code>active</code></strong></td><td>Active: <p>The audience is active and available for use.</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>archived</code></strong></td><td>Archived: <p>The audience is archived and not available for use. Archived audiences are deleted 30 days after being archived.</p>
        </td>
            </tr>
        </table>

      type: string
      x-apiture-enum: customerAudienceState
      enum:
        - active
        - archived
      x-resolved-from: ../../adminCustomerAudiences/openapi.yaml#/components/schemas/customerAudienceState
      x-apiture-version: 1.0.0
    timestamp:
      title: Timestamp (v1.0.0)
      description: A timestamp (an instant in time) formatted in `YYYY-MM-DDThh:mm:ss.sssZ` [RFC 3339](https://tools.ietf.org/html/rfc3339) `date-time` UTC format.
      type: string
      minLength: 20
      maxLength: 30
      format: date-time
      example: '2021-10-30T19:06:04.250Z'
      x-apiture-since: 0.4.0
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/timestamp
      x-apiture-version: 1.0.0
    apiProblem:
      x-apiture-version: 1.2.1
      title: API Problem (v1.2.1)
      description: API problem or error, as per [RFC 7807 application/problem+json](https://tools.ietf.org/html/rfc7807).
      type: object
      properties:
        type:
          type: string
          format: uri-reference
          description: |
            A [URI reference (RFC3986)](https://tools.ietf.org/html/rfc3986) that identifies the problem type. If present, this is the URL of human-readable HTML documentation for the problem type. When this member is not present, its value is assumed to be `"about:blank"`.
          example: https://static.api.apiture.com/errors/forbidden/v1.0.0
          maxLength: 2048
        title:
          type: string
          description: |
            A short, human-readable summary of the problem type. The title is usually the same for all problem with the same `type`.
          maxLength: 120
          format: text
          example: User is not authorized to perform the requested action or access the requested resource.
        status:
          type: integer
          format: int32
          description: |
            The [HTTP status code](https://datatracker.ietf.org/doc/html/rfc7231#section-6) for this occurrence of the problem.
          minimum: 100
          maximum: 599
          example: 403
        detail:
          type: string
          description: |
            A human-readable explanation specific to this occurrence of the problem.
          maxLength: 256
          format: text
          example: User is not authorized to perform this operation.
        instance:
          type: string
          format: uri-reference
          description: |
            A URI reference that identifies the specific occurrence of the problem. This is the URI of an API resource that the problem is related to, with a unique error correlation ID URI fragment
          example: https://prduction.api.apiture.com/banking/accounts/ad80fc3e722q5402a#189c13ff-c54c-45f7-b8e0-c88984ba724d
          maxLength: 2048
        id:
          description: The unique identifier for this problem. This is an immutable opaque string.
          $ref: '#/components/schemas/readOnlyResourceId'
        occurredAt:
          description: The timestamp when the problem occurred, in [RFC 3339](https://tools.ietf.org/html/rfc3339) date-time `YYYY-MM-DDThh:mm:ss.sssZ` format, UTC.
          $ref: '#/components/schemas/readOnlyTimestamp'
        problems:
          description: Optional root-causes if there are multiple problems in the request or API call processing.
          type: array
          maxItems: 128
          items:
            $ref: '#/components/schemas/apiProblem'
        attributes:
          type: object
          description: Additional optional attributes related to the problem. This data conforms to the schema associated with the error type.
      example:
        id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
        type: https://static.api.apiture.com/errors/accountNotFound/v1.0.0
        title: Account Not Found
        status: 422
        occurredAt: '2022-04-25T12:42:21.375Z'
        detail: No account exists at the given account_url
        instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/apiProblem
    customerUsername:
      x-apiture-version: 2.0.0
      title: Customer Username (v2.0.0)
      description: A customer's login username.
      type: string
      format: text
      minLength: 5
      maxLength: 20
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/customerUsername
    requiredIdentityChallenge:
      x-apiture-version: 1.2.3
      title: Required Challenge (v1.2.3)
      description: A request from the service for the user to verify their identity. This contains a challenge ID, the corresponding operation ID, and a list of challenge factors for identity verification. The user must complete one of these challenge factors to satisfy the challenge. This schema defines the attributes in the 401 [Unauthorized problem response](#schema-apiProblem) when the 401 problem type name is `challengeRequired`. See the "Challenge API" for details.
      type: object
      required:
        - operationId
        - challengeId
        - factors
      properties:
        operationId:
          $ref: '#/components/schemas/challengeOperationId'
        challengeId:
          description: The unique ID of this challenge instance. This is an opaque string. This is passed when starting a challenge factor or when validating the identity challenge responses.
          $ref: '#/components/schemas/readOnlyResourceId'
        factors:
          description: 'A list of challenge factors. The user must complete one of these challenge factors. The `labels` in each factor identify one or more channels the user may use, such as a list of email addresses the system may use to send a one-time passcode to the user. ***Note**: The same channel may be used by multiple factors in the array of factors. For example, the user''s primary mobile phone number may be used for both an `sms` factor and a `voice` factor.'
          type: array
          minItems: 1
          maxItems: 8
          items:
            $ref: '#/components/schemas/challengeFactor'
      example:
        operationId: createTransfer
        challengeId: 0504076c566a3cf7009c
        factors:
          - type: sms
            labels:
              - '9876'
            id: 85c0ee5753fcd0b0953f
          - type: voice
            labels:
              - '9876'
            id: d089e10a80a8627df37b
          - type: voice
            labels:
              - '6754'
            id: 10506ecf9d1c2ee00403
          - type: email
            labels:
              - an****nk@example.com
              - an****98@example.com
            id: e917d671cb2f030b56f1
          - type: authenticatorToken
            labels:
              - Acme fob
            id: fe6c452d7da0bbb4e407
          - type: securityQuestions
            securityQuestions:
              questions:
                - id: q1
                  prompt: What is your mother's maiden name?
                - id: q4
                  prompt: What is your high school's name?
                - id: q9
                  prompt: What is the name of your first pet?
            id: df33c6f88a37d6b3f0a6
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/requiredIdentityChallenge
    challengeOperationId:
      x-apiture-version: 1.0.1
      title: Challenge Operation ID (v1.0.1)
      description: The ID of an operation/action for which the user must verify their identity via an identity challenge. This is passed when starting a challenge factor or when validating the identity challenge responses.
      type: string
      pattern: ^[-a-zA-Z0-9$_]{6,48}$
      minLength: 6
      maxLength: 48
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengeOperationId
    challengeFactor:
      x-apiture-version: 1.2.1
      title: Challenge Factor (v1.2.1)
      description: A challenge factor. See [`requiredIdentityChallenge`](#schema-requiredIdentityChallenge) for multiple examples.
      type: object
      required:
        - type
      properties:
        id:
          description: |-
            The ID of an a challenge factor. This ID is unique within the challenge factors associated with a challenge. The client should pass this `id` value as the `factorId` when starting or verifying a challenge factor.

            *Note*: The `id` will become `required` in a future update to this schema.
          $ref: '#/components/schemas/challengeFactorId'
        type:
          $ref: '#/components/schemas/challengeFactorType'
        labels:
          description: A list of text label which identifies the channel(s) through which the user completes the challenge. For an `sms` or `voice` challenge, the only label item is the last four digits of the corresponding phone number. For an `email` challenge, each label is the masked email address.
          type: array
          minItems: 1
          maxItems: 4
          items:
            type: string
            maxLength: 300
            format: text
        securityQuestions:
          $ref: '#/components/schemas/challengeSecurityQuestions'
      example:
        type: sms
        labels:
          - '9876'
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengeFactor
    challengeFactorId:
      title: Challenge Factor ID (v1.0.0)
      description: The ID of an a challenge factor. This ID is unique within the factors offered with a challenge.
      type: string
      pattern: ^[-a-zA-Z0-9$_]{3,48}$
      minLength: 3
      maxLength: 48
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengeFactorId
      x-apiture-version: 1.0.0
    challengeFactorType:
      title: Challenge Factor Type (v1.0.0)
      description: |+
        The name of challenge factor.

        <strong><code>challengeFactorType</code></strong> strings may have one of the following
        [enumerated values](https://developer.apiture.com/docs/concepts/label-groups#enumerations):

        <table>
        <tr>
          <th>Value</th><th>Description</th>
        </tr>

        <tr>
            <td><strong><code>sms</code></strong></td><td>SMS: <p>One-time passcode sent to the primary mobile phone number</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>email</code></strong></td><td>Email: <p>One-time passcode sent to the primary email address</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>voice</code></strong></td><td>Voice: <p>One-time passcode communicated via automated voice phone call</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>authenticatorToken</code></strong></td><td>authenticator Token: <p>One-time passcode issued by a pre-registered hardware device, such as a token key fob, or an authenticator app</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>securityQuestions</code></strong></td><td>Security Questions: <p>Prompt with the user&#39;s security questions registered with their security profile</p>
        </td>
            </tr>
        </table>

      type: string
      x-apiture-enum: challengeFactorType
      enum:
        - sms
        - email
        - voice
        - securityQuestions
        - authenticatorToken
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengeFactorType
      x-apiture-version: 1.0.0
    challengeSecurityQuestions:
      x-apiture-version: 1.0.1
      title: Challenge Security Questions (v1.0.1)
      description: Describes a `securityQuestions` challenge. This is omitted if the challenge `type` is not `securityQuestions`.
      type: object
      required:
        - questions
      properties:
        questions:
          description: The array of security questions.
          type: array
          minItems: 1
          maxItems: 8
          items:
            $ref: '#/components/schemas/challengeSecurityQuestion'
      example:
        questions:
          - id: q1
            prompt: What is your mother's maiden name?
          - id: q4
            prompt: What is your high school's name?
          - id: q9
            prompt: What is the name of your first pet?
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengeSecurityQuestions
    challengeSecurityQuestion:
      x-apiture-version: 1.0.1
      title: Challenge Security Question (v1.0.1)
      description: A single security question within the `questions` array of the [`challengeSecurityQuestions`](#schema-challengeSecurityQuestions)
      type: object
      required:
        - id
        - prompt
      properties:
        id:
          description: The unique ID of security question prompt. This should be included in the [`challengeVerification`](#schema-challengeVerification) response as the `promptId`.
          $ref: '#/components/schemas/challengePromptId'
        prompt:
          description: The text prompt of this security question.
          type: string
          format: text
          maxLength: 80
      example:
        id: 74699fa628911e762ea5
        prompt: What is your mother's maiden name?
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengeSecurityQuestion
    challengePromptId:
      title: Challenge Prompt ID (v1.0.0)
      description: The unique ID of a prompt (such as a security question) in a challenge factor.
      type: string
      pattern: ^[-_:.~$a-zA-Z0-9]+$
      minLength: 1
      maxLength: 48
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengePromptId
      x-apiture-version: 1.0.0
  securitySchemes:
    apiKey:
      type: apiKey
      name: API-Key
      in: header
      description: API Key based client identification. See details at [Secure Access](https://developer.apiture.com/docs/secure-access).
      x-resolved-from: ../../common/openapi.yaml#/components/securitySchemes/apiKey
    accessToken:
      type: openIdConnect
      description: OpenId Connect (OIDC) authentication/authorization. The client uses the `authorization_endpoint` and `token_endpoint` to obtain an access token to pass in the `Authorization` header. Those endpoints are available via the OIDC Configuration URL. The actual URL may vary with each financial institution. See details at [Secure Access](https://dx.apiture.com/docs/api/concepts/api-keys/).
      openIdConnectUrl: https://auth.apiture.com/oidc/.well-known/openid-configuration
      x-resolved-from: ../../common/openapi.yaml#/components/securitySchemes/accessToken
    clientCredentials:
      type: oauth2
      description: Client Credentials OAuth2 flow that allows a secure service application to access resources. (This access is not used with insecure clients such as web or mobile applications.) See details at [Secure Access](https://dx.apiture.com/docs/api/guides/secure-access/).
      flows:
        clientCredentials:
          tokenUrl: https://dev-oidc.apiture-comm-nonprod.com/oidc/token
          scopes:
            bankingAdmin/read: Read a wide variety of banking and other financial institution and customer data.
            bankingAdmin/write: Write a wide variety of banking and other financial institution and customer data.
            adminData/read: Read access to non-banking data and resources.
            adminData/write: Read, write, and delete access to non-banking data and resources.
            samlPlatform/write: Write access to security-critical Apiture internal key and certificate data.
            samlPlatform/read: Read access to integration resources, e.g. supported codes.
            samlAdmin/write: Write, delete and execute access to service provider metadata and SAML computation operations.
            systemIntegrations/read: Read access to integration definition resources.
            systemIntegrations/write: Write, delete and execute access to integration definition resources.
      x-resolved-from: ../../common/openapi.yaml#/components/securitySchemes/clientCredentials
  headers:
    ETag:
      description: The value of this resource's _entity tag_, to be passed with `If-Match` and `If-None-Match` request headers in other conditional API calls for this resource.
      schema:
        $ref: '#/components/schemas/entityTag'
      x-resolved-from: ../../common/openapi.yaml#/components/headers/ETag
  x-apiture-errors:
    badRequest:
      description: The request body and/or parameters was not well-formed.
      remediation: Correct any syntax or schema errors in the request body or parameters.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/badRequest
    unauthorized:
      description: The request lacks valid authentication credentials for the target resource or operation.
      remediation: Authenticate the user and pass the required authorization with the request.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/unauthorized
    forbidden:
      description: The user or agent is not allowed to perform this operation; authentication credentials were provided in the request, but the server considers them insufficient to grant access.
      remediation: Check the user's permissions and entitlements before attempting the operation.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/forbidden
    customerDisabled:
      description: The customer is disabled.
      remediation: Have the customer contact the financial institution for support.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/customerDisabled
    antiMalwareRequired:
      description: The financial institution requires the customer to have anti-malware software installed.
      remediation: Direct the user to the software requirements guide to install the correct anti-malware software.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/antiMalwareRequired
    modificationForbidden:
      description: The customer is properly authenticated but not authorized to create, modify, or delete resources.
      remediation: Avoid modification operation for customers with read-only authorization.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/modificationForbidden
    challengeRequired:
      description: The operation requires the customer to complete an identity challenge.
      remediation: Complete the challenge as per the problem response, and add an additional `Challenge` header to the call.
      attributes:
        $ref: '#/components/schemas/requiredIdentityChallenge'
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/challengeRequired
    challengeBlocked:
      description: The user has failed challenges too many times and is blocked from attempting more or performing operations which require additional authentication.
      remediation: Have the user end their login session and login again.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/challengeBlocked
    noIdentityChallengeFactors:
      description: This operation requires an identity challenge, but the user does not have the necessary registered authentication factors.
      remediation: Have the user register one or more challenge security code delivery factors.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/noIdentityChallengeFactors
    invalidIdentityChallengeHeader:
      description: The additional on-time `Challenge` header in this request is expired, already used, or otherwise invalid.
      remediation: Supply a valid, unexpired, unclaimed `Challenge` header in the request.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/invalidIdentityChallengeHeader
    notFound:
      description: The resource at the requested URL does not exist.
      remediation: Use the URL of an existing resource.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/notFound
    preconditionFailed:
      description: One or more conditions given in the request header fields evaluated to false when tested on the server.
      remediation: Update resources and use it's most recent ETag or modification time stamp.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/preconditionFailed
    unprocessableEntity:
      description: The syntax of the request entity is correct but was unable to process the contained instructions.
      remediation: Provide a semantically correct request.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/unprocessableEntity
    tooManyRequests:
      description: The client has sent too many requests in a given amount of time, exceeding rate limiting.
      remediation: Slow down the rate of API calls.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/tooManyRequests
x-apiture-errors:
  missingInstitutionId:
    description: The `institutionId` could not derived from the authorization token and an `Institution-Id` header was not provided.
    remediation: Provide an authorization token with institution data or an `Institution-Id` header and resubmit the request.
  invalidLocationQueryParam:
    description: Neither a `location` nor `locationName` query parameter was given with the request, or both were given.
    remediation: Resubmit the request with either a valid `location` or `locationName` query parameter, but not both.
  invalidCampaignSchedule:
    description: The campaign `schedule` is invalid.
    remediation: Choose a `startAt` and `endAt` date that is not in the past. `startAt` must also be on or before `endAt`.
  campaignIsImmutable:
    description: Cannot add, update, or delete an ad if the campaign is active, canceled, or completed.
    remediation: Only add, update, and delete campaigns and ads for draft, scheduled, testing, and paused campaigns.
  noSuchCampaign:
    description: There is no such campaign resource for the given `campaignId`.
    remediation: Pass a valid campaign ID.
  noSuchCampaignAd:
    description: There is no such campaign ad resource for the given `adId`.
    remediation: Pass a valid campaign ad ID.
  multipleAdsInLocation:
    description: Multiple ads cannot be placed in a single location within a campaign.
    remediation: Delete the existing ad in the given location or select a new location.
  cannotDeleteCampaign:
    description: Only `archived` campaigns can be deleted.
    remediation: Archive the campaign and retry the operation.
  tooManyAds:
    description: The campaign has the maximum number of ads.
    remediation: Delete an existing ad before creating a new one or start a new campaign.
  duplicatePriority:
    description: The given `priority` is already in use by another ad.
    remediation: Resubmit the request with a unique `priority`.
  overlappingIntervals:
    description: The given `schedule` has two `interval` date-times that overlap.
    remediation: Resubmit the request with `interval` values that do not overlap.
  invalidSourceCampaign:
    description: The source campaign does not exist or is not a campaign that is eligible to be copied.
    remediation: Pass the `id` of a mutable, copyable campaign.
  locationIdAndNameMutuallyExclusive:
    description: The `location` and `locationName` query parameters cannot be given in the same request.
    remediation: Resubmit the query with either the `location` or `locationName` parameter, but not both.
  campaignAdDoesNotExistInLocation:
    description: The given ad does not exist in the given campaign or location.
    remediation: Pass the `id` of a valid ad.
  invalidAdLocation:
    description: The given ad location does not exist.
    remediation: Pass the `id` of a valid `adLocation`.
  allAdsNotGiven:
    description: There is one or more ads that exist in the ad location, but they were not included in the request.
    remediation: Include all ads in an ad location when updating the priority order.
  activateCampaignInvalidState:
    description: The state of the campaign may not be changed to active unless the campaign state is `paused` or `scheduled`.
    remediation: Check the state of your campaign and ensure it is `paused`. If it is `scheduled` and you expect it to be `active`, then check the schedule and ensure the `startAt` date is set correctly.
  pauseCampaignInvalidState:
    description: The state of the campaign may not be changed to paused unless the campaign state is `active`.
    remediation: Check the state of your campaign and ensure it is `active`.
  scheduleCampaignInvalidState:
    description: The state of the campaign may not be changed to scheduled unless the campaign state is `draft` or `testing`.
    remediation: Check the state of your campaign and ensure it is `draft` or `testing`.
  draftCampaignInvalidState:
    description: The state of the campaign may not be changed to draft unless the campaign state is `scheduled`, `testing`, or `paused`.
    remediation: Check the state of your campaign and ensure it is `scheduled`, `testing`, or `paused`.
  testingCampaignInvalidState:
    description: The state of the campaign may not be changed to testing unless the campaign state is `draft` or `scheduled`.
    remediation: Check the state of your campaign and ensure it is `draft` or `scheduled`.
  archiveCampaignInvalidState:
    description: The state of the campaign may not be changed to archived unless the campaign state is `draft`, `scheduled`, `testing`, `paused`, or `completed`.
    remediation: Check the state of your campaign and ensure it is `draft`, `scheduled`, `testing`, `paused`, or `completed`.
  scheduleCampaignMissingRequiredProperties:
    description: The state of the campaign may not be changed to scheduled unless all required fields are set.
    remediation: Update the campaign and associated ads to have all necessary fields and resubmit the operation.
    attributes:
      properties:
        missingProperties:
          description: The required properties to schedule a campaign.
          type: array
          maxItems: 100
          items:
            type: string
            format: text
            maxLength: 256
  testingCampaignMissingRequiredProperties:
    description: The state of the campaign may not be changed to testing unless all required fields are set.
    remediation: Update the campaign and associated ads to have all necessary fields and resubmit the operation.
    attributes:
      properties:
        missingProperties:
          description: The required properties to test a campaign.
          type: array
          maxItems: 100
          items:
            type: string
            format: text
            maxLength: 256
x-apiture-traits:
  - api:
      name: admin campaigns
      applied: true
      basePath: advertising
  - resource:
      name: campaign
      description: An advertising campaign with one or more ads.
      applied: true
      etag: false
      searchable: false
  - resource:
      name: campaign metric
      description: Metrics for the ads within a campaign
      applied: true
      etag: false
      excludeMethods:
        - put
        - get
        - post
        - delete
        - patch
      filterable: false
      pathPrefix: /campaigns/{campaignId}/
      searchable: false
      sortable: false
  - resource:
      name: campaign ad
      pathPrefix: /campaigns/{campaignId}/
      description: An in-app advertisement that can be included in a campaign.
      applied: true
      etag: false
      searchable: false
  - resource:
      name: campaign history record
      pathPrefix: /campaigns/{campaignId}/
      description: A history log of user actions on the campaign.
      applied: true
      etag: false
      searchable: false
  - resource:
      name: campaign ad location
      description: A location for the campaign ad to be displayed.
      applied: true
      etag: false
      searchable: false
  - resource:
      name: campaign ad dismissal reason
      description: A reason for the campaign ad to be dismissed.
      applied: true
      etag: false
      excludeMethods:
        - put
        - get
        - post
        - delete
        - patch
      searchable: false
  - state:
      name: campaign
      applied: true
      etag: false
      state: active
      verb: resume
  - state:
      name: campaign
      applied: true
      etag: false
      state: paused
      verb: pause
  - state:
      name: campaign
      applied: true
      etag: false
      state: scheduled
      verb: schedule
  - state:
      name: campaign
      applied: true
      etag: false
      state: canceled
      verb: cancel
  - state:
      name: campaign
      applied: true
      etag: false
      state: tested
      verb: test
  - state:
      name: campaign
      applied: true
      etag: false
      state: archived
      verb: archive
  - security:
      applied: true
      baseScope: admin
x-resolved-from: ../../adminCampaigns/status-codes-openapi.yaml
x-resolved-at: '2024-12-09T22:09:28.858Z'
x-apiture-annotated-at: '2024-12-09T22:09:29.138Z'
