> ## Documentation Index
> Fetch the complete documentation index at: https://developers.partoo.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get campaign requirements

> <Warning>
The Feedback Management API is currently in **BETA**, therefore the following endpoints are subject to modification, given a **2 week notice**.

If you are planning to use any of them, please **notify us** so we will be able to keep you informed about upcoming changes.
</Warning>

Returns the recipient fields and template variables needed to prepare a feedback email campaign
for the given feedback form and email template.

Use this endpoint before [Send a feedback email campaign](/api-reference/feedback-management/send-a-feedback-email-campaign)
to determine which keys to include in each recipient payload.




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml get /feedback/campaign/requirements
openapi: 3.1.0
info:
  title: Partoo Rest API
  version: v2
  license:
    name: © Copyright Partoo
    url: https://www.partoo.co/en/gtu-api/
  x-logo:
    url: >-
      https://partoo-client-images.s3.amazonaws.com/logo-partoo-restapi-white.png
  description: >
    ## Introduction

    The Partoo Rest API allows you to automate all the actions that are possible
    to do in the Partoo Web Application.


    The Partoo Rest API can be used for many different purposes:
      - Create/update/delete your businesses & users if you are a client.
      - Create/subscribe/manage organizations, businesses & users if you are a reseller.
      - Retrieve data on businesses you have access to if you are a publisher.
      - ...
servers:
  - url: https://api.partoo.co/v2
    description: Production server
  - url: https://api.sandbox.partoo.co/v2
    description: Sandbox server (dev environment for clients & partners)
security:
  - ApiKeyAuth: []
paths:
  /feedback/campaign/requirements:
    get:
      tags:
        - Feedback Management
      summary: Get campaign requirements
      description: >
        <Warning>

        The Feedback Management API is currently in **BETA**, therefore the
        following endpoints are subject to modification, given a **2 week
        notice**.


        If you are planning to use any of them, please **notify us** so we will
        be able to keep you informed about upcoming changes.

        </Warning>


        Returns the recipient fields and template variables needed to prepare a
        feedback email campaign

        for the given feedback form and email template.


        Use this endpoint before [Send a feedback email
        campaign](/api-reference/feedback-management/send-a-feedback-email-campaign)

        to determine which keys to include in each recipient payload.
      operationId: getFeedbackEmailCampaignRequirements
      parameters:
        - in: query
          name: feedback_form_id
          required: true
          schema:
            type: string
          description: ID of the feedback form to associate with the campaign
          example: 5a3f8c2e1b4d7f9a0c6e2b18
        - in: query
          name: feedback_email_template_id
          required: true
          schema:
            type: integer
          description: ID of the email template to inspect
          example: 42
      responses:
        '200':
          description: Campaign requirements retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignRequirementsResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          description: Feedback form or email template not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Form not found.
        '422':
          description: Query parameter validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        loc:
                          type: array
                          items: {}
                        msg:
                          type: string
                        type:
                          type: string
components:
  schemas:
    CampaignRequirementsResponse:
      type: object
      required:
        - feedback_form_id
        - feedback_email_template_id
        - recipient_fields
        - variable_fields
      properties:
        feedback_form_id:
          type: string
          description: ID of the feedback form associated with the campaign
          example: 5a3f8c2e1b4d7f9a0c6e2b18
        feedback_email_template_id:
          type: integer
          description: ID of the email template used to compute campaign requirements
          example: 42
        recipient_fields:
          type: array
          description: |
            Recipient-level fields supported by the send endpoint.

            This list currently includes `email_address` and `unsubscribe_url`.
          items:
            type: string
            enum:
              - email_address
              - unsubscribe_url
          example:
            - email_address
            - unsubscribe_url
        variable_fields:
          type: array
          description: |
            Template variable names recipients should provide under `variables`,
            sorted alphabetically.
          items:
            type: string
          example:
            - first_name
            - store_code
  responses:
    '401':
      description: You are not authenticated
      content:
        application/json:
          schema:
            description: Error that occurs when you are not authenticated
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authentication:
                    type: string
                    default: User not authenticated
    '403':
      description: |
        You are not allowed to perform this action
      content:
        application/json:
          schema:
            description: >
              Error that occurs when you are authenticated but you are trying to
              perform an action you are not allowed to perform
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authorization:
                    type: string
                    default: Operation not allowed
  securitySchemes:
    ApiKeyAuth:
      description: >
        The authentication system on Partoo API is using API Key that should be
        put in the header of the request (the name of the header is `x-APIKey`).
        An api_key is linked to a user. This user's role will give you different
        access level to the API features.
      type: apiKey
      in: header
      name: x-APIKey

````