get:
  operationId: getCampaignTemplate
  tags:
    - Certification Campaigns
  summary: Get a Campaign Template
  description: Fetches a campaign template by ID.
  parameters:
    - in: path
      name: id
      schema:
        type: string
      required: true
      description: The desired campaign template's ID.
  responses:
    '200':
      description: The data for the campaign matching the given ID.
      content:
        application/json:
          schema:
            $ref: '../schemas/CampaignTemplate.yaml'
          examples:
            Manager:
              $ref: '../schemas/campaign/examples/CampaignTemplateManager.yaml'
            Search:
              $ref: '../schemas/campaign/examples/CampaignTemplateSearch.yaml'
            Source Owner:
              $ref: '../schemas/campaign/examples/CampaignTemplateSourceOwner.yaml'
            RoleComposition:
              $ref: '../schemas/campaign/examples/CampaignTemplateRoleComposition.yaml'
    '401':
      $ref: '../../v3/responses/401.yaml'
    '403':
      $ref: '../../v3/responses/403.yaml'
    '404':
      $ref: '../../v3/responses/404.yaml'
    '429':
      $ref: '../../v3/responses/429.yaml'
    '500':
      $ref: '../../v3/responses/500.yaml'
patch:
  operationId: patchCampaignTemplate
  tags:
    - Certification Campaigns
  summary: Update a Campaign Template
  description: Allows updating individual fields on a campaign template using the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard.
  parameters:
    - in: path
      name: id
      schema:
        type: string
      required: true
      description: The ID of the campaign template being modified.
      example: 2c9180835d191a86015d28455b4a2329
  requestBody:
    required: true
    description: |
      A list of campaign update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard.

      The following fields are patchable:
      * name
      * description
      * ownerRef
      * deadlineDuration
      * campaign (all fields that are allowed during create)
    content:
      application/json-patch+json:
        schema:
          type: array
          items:
            type: object
        example:
            - op: "replace"
              path: "/description"
              value: "Updated description!"
            - op: "replace"
              path: "/campaign/filter/id"
              value: "ff80818155fe8c080155fe8d925b0316"
  responses:
    '200':
      description: >-
        Indicates the PATCH operation succeeded, and returns the template's new representation.
      content:
        application/json:
          schema:
            $ref: '../schemas/CampaignTemplate.yaml'
          examples:
            Manager:
              $ref: '../schemas/campaign/examples/CampaignTemplateManager.yaml'
            Search:
              $ref: '../schemas/campaign/examples/CampaignTemplateSearch.yaml'
            Source Owner:
              $ref: '../schemas/campaign/examples/CampaignTemplateSourceOwner.yaml'
            RoleComposition:
              $ref: '../schemas/campaign/examples/CampaignTemplateRoleComposition.yaml'
    '400':
      $ref: '../../v3/responses/400.yaml'
    '401':
      $ref: '../../v3/responses/401.yaml'
    '403':
      $ref: '../../v3/responses/403.yaml'
    '404':
      $ref: '../../v3/responses/404.yaml'
    '429':
      $ref: '../../v3/responses/429.yaml'
    '500':
      $ref: '../../v3/responses/500.yaml'
delete:
  operationId: deleteCampaignTemplate
  tags:
    - Certification Campaigns
  summary: Delete a Campaign Template
  description: Deletes a campaign template by ID.
  parameters:
    - in: path
      name: id
      schema:
        type: string
      required: true
      description: The ID of the campaign template being deleted.
      example: 2c9180835d191a86015d28455b4a2329
  responses:
    '204':
      $ref: '../../v3/responses/204.yaml'
      description: The Source was successfully deleted.
    '404':
      $ref: '../../v3/responses/404.yaml'
    '401':
      $ref: '../../v3/responses/401.yaml'
    '403':
      $ref: '../../v3/responses/403.yaml'
    '429':
      $ref: '../../v3/responses/429.yaml'
    '500':
      $ref: '../../v3/responses/500.yaml'
