Partner Survey Integration Docs
  • Getting Started
    • Introduction
    • Overview
    • Server URL
    • Authentication
  • API Integration
    • Check Respondent Availability
    • Publishing the Survey
    • Update the Survey
    • Redirection Page
    • Submission Notify Webhook
Powered by GitBook
On this page

Was this helpful?

  1. API Integration

Update the Survey

PreviousPublishing the SurveyNextRedirection Page

Last updated 9 months ago

Was this helpful?

Description

The purpose of this endpoint is to allow PARTNER to update the status of their surveys, either starting or stopping a survey. The service ensures that only the owner of a survey can change its status, maintaining the integrity and security of the survey data. Additionally, users can update the quota for the survey when necessary.

Field Descriptions:

  • surveyId:

    Type: String

    Description: The unique ID of the survey to be updated. (required)

  • status:

    Type: String

    Description: The action to either start or stop the survey. (required if quota is not provided)

    Possible values:

    • START: Starts the survey.

    • STOP: Stops the survey.

  • quota:

    Type: Integer

    Description: The updated quota for the survey. (required if status is not provided)

Error Response

Invalid Quota Error Response (400):

This error occurs when the new quota is less than the total number of submissions already made for the survey.

{
  "error": {
    "code": "INVALID_NEW_QUOTA",
    "errors": [],
    "message": "New quota cannot be less than the current survey total submissions."
  },
  "result": {},
  "success": false,
  "traceId": "string",
  "metadata": {}
}

Common Error Codes:

  • 400: Bad request – usually due to invalid parameters, such as an invalid quota value.

  • 401: Unauthorized – token or API key is missing or invalid.

  • 404: Not found – survey not found or doesn't belong to the user.

  • 500: Internal server error – an issue on the server side.

  • Description
  • Error Response