Activate / Deactivate

The following endpoints available can be used to activate / deactivate a questionnaire version (available only for ADMIN).

Activate

To activate a questionnaire version you can use the following PATCH request:

https://pistis-market.eu/srv/intention-analytics/api/questionnaire/:id/:version/activate

The id parameter should be the id of the questionnaire (e.g db469342-d725-4d20-b06d-0ffa6feaeb76), and the version its version (e.g 3) - depending on which version you want to activate.

Server Response upon activating

Upon successful activation the server will return the activated questionnaire version, for example:

{
  "id": "db469342-d725-4d20-b06d-0ffa6feaeb76",
  "version": "3",
  "isForVerifiedBuyers": true,
  "isActive": true,
  "publicationDate": "2024-06-17T11:42:58.356Z" // sets the current datetime upon activation
}

Note: All the other questionnaire versions of the questionnaire type (e.g for verified buyers), will be deactivated, so that only one questionnaire version can be active.

Deactivate

To deactivate a questionnaire version you can use the following PATCH request:

https://pistis-market.eu/srv/intention-analytics/api/questionnaire/:id/:version/deactivate

The id parameter should be the id of the questionnaire (e.g e65e6e58-680f-4d9d-ba5e-53e2a90da367), and the version its version (e.g 1) - depending on which version you want to deactivate.

Server Response upon deactivating

Upon successful deactivation the server will return the information for the deactivated questionnaire version, for example:

{
  "id": "e65e6e58-680f-4d9d-ba5e-53e2a90da367",
  "version": "1",
  "isActive": false
}