Post /surveys/{{survey-id}}/responses/filter

Example Request

https://api.questionpro.{{env}}/a/api/v2/surveys/{{survey-id}}/responses/filter?page=1&perPage=100

The value of environment {{env}} variable depends upon your datacenter. Refer to the Environment page for more details.


Authorization

arrow_rightSecurity - API Key
Name : api-key
required
Location : Request Header
Type : string

Request Parameters

arrow_rightPath Parameters
survey-id integer
required
page integer
optional - defalut 1
perPage integer
optional - defalut 100

Request Body

arrow_rightPayload
Snippet copied successfully.
application/json

                           {
                                "resultMode": 2,
                                "startDate": "2020-01-01",
                                "endDate": "2020-12-31",
                                "custom1": "Test",
                                "highCustomVariables": {
                                    "custom7": "Operator",
                                    "custom254": "Sales"
                                }
                            }
                    
arrow_rightValues for resultMode
0 integer
Value to be used for all responses.
1 integer
Value to be used for all the incompleted responses.
2 integer
Value to be used for all the completed responses.
arrow_rightAll supported filters
resultMode integer (0 - 2)
Response status filter
startDate + endDate date(YYYY-MM-DD)
Date range filter
custom1 - custom5 string(custom variable value)
Custom variable filter
highCustomVariables(custom6-custom255) string(custom variable value)
High custom variable filter
  • Supported custom variables - "custom1" to "custom5"
  • Supported high custom variables - "custom6" to "custom255"

Example Code

arrow_rightcURL
Snippet copied successfully.
application/json

curl --location 'https://api.questionpro.{{env}}/a/api/v2/surveys/{{survey-id}}/responses/filter?page=1&perPage=100' \
--header 'Content-Type: application/json' \
--header 'api-key: {{api-key}}' \
--data '{
    "resultMode": 2,
    "startDate": "2020-01-01",
    "endDate": "2020-12-31",
    "custom1": "Test",
    "highCustomVariables": {
        "custom7": "Operator",
        "custom254": "Sales"
    }
}'
                
arrow_rightPython
Snippet copied successfully.
application/json

import requests
import json

url = "https://api.questionpro.{{env}}/a/api/v2/surveys/{{survey-id}}/responses/filter?page=1&perPage=100"

payload = json.dumps({
  "resultMode": 2,
  "startDate": "2020-01-01",
  "endDate": "2020-12-31",
  "custom1": "Test",
  "highCustomVariables": {
    "custom7": "Operator",
    "custom254": "Sales"
  }
})
headers = {
  'Content-Type': 'application/json',
  'api-key': '{{api-key}}'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

                    
arrow_rightPHP - cURL
Snippet copied successfully.
application/json

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.questionpro.{{env}}/a/api/v2/surveys/{{survey-id}}/responses/filter?page=1&perPage=100',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "resultMode": 2,
    "startDate": "2020-01-01",
    "endDate": "2020-12-31",
    "custom1": "Test",
    "highCustomVariables": {
        "custom7": "Operator",
        "custom254": "Sales"
    }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'api-key: {{api-key}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

                    

Responses

arrow_rightExample
application/json

                       {
                            "response": [
                            {
                                "responseID": 12345678,
                                "surveyID": 7654321,
                                "surveyName": "Test Survey",
                                "ipAddress": "192.168.0.1",
                                "timestamp": "05 Oct, 2020 02:51:51 PM PDT",
                                "location": {
                                    "country": null,
                                    "region": "16",
                                    "latitude": 0.0,
                                    "longitude": 0.0,
                                    "radius": 0.0,
                                    "countryCode": "IN"
                                },
                                "duplicate": false,
                                "timeTaken": 41,
                                "responseStatus": "Completed",
                                "externalReference": "",
                                "customVariables": {
                                    "custom1": "Test",
                                    "custom7": "Operator",
                                    "custom254": "Sales"
                                },
                                "language": "English",
                                "currentInset": "",
                                "operatingSystem": "WINDOWS_10",
                                "osDeviceType": "COMPUTER",
                                "browser": "CHROME8",
                                "responseSet": [
                                    {
                                        "questionID": 12345678,
                                        "questionDescription": " ",
                                        "questionCode": "Q1",
                                        "questionText": "How often do you conduct surveys?",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 123456789,
                                                "answerText": "Always",
                                                "value": {
                                                    "scale": "1",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 12345679,
                                        "questionDescription": "Contact Information",
                                        "questionCode": "Q2_1",
                                        "questionText": "First Name",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000001,
                                                "answerText": "FIRST_NAME",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "FirstName",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 83734737,
                                        "questionDescription": " ",
                                        "questionCode": "Q2_2",
                                        "questionText": "Last Name",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000002,
                                                "answerText": "LAST_NAME",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "LastName",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 83734738,
                                        "questionDescription": " ",
                                        "questionCode": "Q2_3",
                                        "questionText": "Phone",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000003,
                                                "answerText": "PHONE",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "123-456-7890",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 83734739,
                                        "questionDescription": " ",
                                        "questionCode": "Q2_4",
                                        "questionText": "Email Address",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000004,
                                                "answerText": "EMAIL",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "[email protected]",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                            {
                                "responseID": 12345677,
                                "surveyID": 7654321,
                                "surveyName": "Test Survey",
                                "ipAddress": "192.168.0.1",
                                "timestamp": "05 Oct, 2020 02:51:51 PM PDT",
                                "location": {
                                    "country": null,
                                    "region": "20",
                                    "latitude": 0.0,
                                    "longitude": 0.0,
                                    "radius": 0.0,
                                    "countryCode": "IN"
                                },
                                "duplicate": false,
                                "timeTaken": 41,
                                "responseStatus": "Completed",
                                "externalReference": "",
                                "customVariables": {
                                    "custom1": "Test",
                                    "custom7": "Operator",
                                    "custom254": "Sales"
                                },
                                "language": "English",
                                "currentInset": "",
                                "operatingSystem": "WINDOWS_10",
                                "osDeviceType": "COMPUTER",
                                "browser": "CHROME8",
                                "responseSet": [
                                    {
                                        "questionID": 12345678,
                                        "questionDescription": " ",
                                        "questionCode": "Q1",
                                        "questionText": "How often do you conduct surveys?",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 123456789,
                                                "answerText": "Always",
                                                "value": {
                                                    "scale": "1",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 12345679,
                                        "questionDescription": "Contact Information",
                                        "questionCode": "Q2_1",
                                        "questionText": "First Name",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000001,
                                                "answerText": "FIRST_NAME",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "FirstName",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 83734737,
                                        "questionDescription": " ",
                                        "questionCode": "Q2_2",
                                        "questionText": "Last Name",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000002,
                                                "answerText": "LAST_NAME",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "LastName",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 83734738,
                                        "questionDescription": " ",
                                        "questionCode": "Q2_3",
                                        "questionText": "Phone",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000003,
                                                "answerText": "PHONE",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "123-456-7890",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 83734739,
                                        "questionDescription": " ",
                                        "questionCode": "Q2_4",
                                        "questionText": "Email Address",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000004,
                                                "answerText": "EMAIL",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "[email protected]",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    }
                                ],
                            "utctimestamp": 51
                            }
                        ],
                        "pagination": {
                            "perPage": 100,
                            "totalItems": 2,
                            "currentPage": 1,
                            "totalPages": 1,
                            "links": {
                                "self": "https://api.questionpro.{{env}}/a/api/v2/surveys/{{survey-id}}/responses/filter?page=1&perPage=100",
                                "prev": null,
                                "next": null,
                                "first": "https://api.questionpro.{{env}}/a/api/v2/surveys/{{survey-id}}/responses/filter?page=1&perPage=100",
                                "last": "https://api.questionpro.{{env}}/a/api/v2/surveys/{{survey-id}}/responses/filter?page=1&perPage=100"
                            }
                        },
                            "requestID": "7012fedc-e8ce-48ae-b800-6q5ce287987a7daf"
                    }
                    
arrow_rightSchema
application/json

                       {
                            "response": [
                            {
                                "responseID": 12345678,
                                "surveyID": 7654321,
                                "surveyName": "Test Survey",
                                "ipAddress": "192.168.0.1",
                                "timestamp": "05 Oct, 2020 02:51:51 PM PDT",
                                "location": {
                                    "country": null,
                                    "region": "16",
                                    "latitude": 0.0,
                                    "longitude": 0.0,
                                    "radius": 0.0,
                                    "countryCode": "IN"
                                },
                                "duplicate": false,
                                "timeTaken": 41,
                                "responseStatus": "Completed",
                                "externalReference": "",
                                "customVariables": {
                                    "custom1": "Test",
                                    "custom7": "Operator",
                                    "custom254": "Sales"
                                },
                                "language": "English",
                                "currentInset": "",
                                "operatingSystem": "WINDOWS_10",
                                "osDeviceType": "COMPUTER",
                                "browser": "CHROME8",
                                "responseSet": [
                                    {
                                        "questionID": 12345678,
                                        "questionDescription": " ",
                                        "questionCode": "Q1",
                                        "questionText": "How often do you conduct surveys?",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 123456789,
                                                "answerText": "Always",
                                                "value": {
                                                    "scale": "1",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 12345679,
                                        "questionDescription": "Contact Information",
                                        "questionCode": "Q2_1",
                                        "questionText": "First Name",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000001,
                                                "answerText": "FIRST_NAME",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "FirstName",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 83734737,
                                        "questionDescription": " ",
                                        "questionCode": "Q2_2",
                                        "questionText": "Last Name",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000002,
                                                "answerText": "LAST_NAME",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "LastName",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 83734738,
                                        "questionDescription": " ",
                                        "questionCode": "Q2_3",
                                        "questionText": "Phone",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000003,
                                                "answerText": "PHONE",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "123-456-7890",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 83734739,
                                        "questionDescription": " ",
                                        "questionCode": "Q2_4",
                                        "questionText": "Email Address",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000004,
                                                "answerText": "EMAIL",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "[email protected]",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                            {
                                "responseID": 12345677,
                                "surveyID": 7654321,
                                "surveyName": "Test Survey",
                                "ipAddress": "192.168.0.1",
                                "timestamp": "05 Oct, 2020 02:51:51 PM PDT",
                                "location": {
                                    "country": null,
                                    "region": "20",
                                    "latitude": 0.0,
                                    "longitude": 0.0,
                                    "radius": 0.0,
                                    "countryCode": "IN"
                                },
                                "duplicate": false,
                                "timeTaken": 41,
                                "responseStatus": "Completed",
                                "externalReference": "",
                                "customVariables": {
                                    "custom1": "Test",
                                    "custom7": "Operator",
                                    "custom254": "Sales"
                                },
                                "language": "English",
                                "currentInset": "",
                                "operatingSystem": "WINDOWS_10",
                                "osDeviceType": "COMPUTER",
                                "browser": "CHROME8",
                                "responseSet": [
                                    {
                                        "questionID": 12345678,
                                        "questionDescription": " ",
                                        "questionCode": "Q1",
                                        "questionText": "How often do you conduct surveys?",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 123456789,
                                                "answerText": "Always",
                                                "value": {
                                                    "scale": "1",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 12345679,
                                        "questionDescription": "Contact Information",
                                        "questionCode": "Q2_1",
                                        "questionText": "First Name",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000001,
                                                "answerText": "FIRST_NAME",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "FirstName",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 83734737,
                                        "questionDescription": " ",
                                        "questionCode": "Q2_2",
                                        "questionText": "Last Name",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000002,
                                                "answerText": "LAST_NAME",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "LastName",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 83734738,
                                        "questionDescription": " ",
                                        "questionCode": "Q2_3",
                                        "questionText": "Phone",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000003,
                                                "answerText": "PHONE",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "123-456-7890",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "questionID": 83734739,
                                        "questionDescription": " ",
                                        "questionCode": "Q2_4",
                                        "questionText": "Email Address",
                                        "imageUrl": null,
                                        "answerValues": [
                                            {
                                                "answerID": 100000004,
                                                "answerText": "EMAIL",
                                                "value": {
                                                    "scale": "",
                                                    "other": "",
                                                    "dynamicExplodeText": "",
                                                    "text": "[email protected]",
                                                    "result": "",
                                                    "fileLink": "",
                                                    "weight": 0.0
                                                }
                                            }
                                        ]
                                    }
                                ],
                            "utctimestamp": 51
                            }
                        ],
                        "pagination": {
                            "perPage": 100,
                            "totalItems": 2,
                            "currentPage": 1,
                            "totalPages": 1,
                             "links": {
                                "self": "https://api.questionpro.{{env}}/a/api/v2/surveys/{{survey-id}}/responses/filter?page=1&perPage=100",
                                "prev": null,
                                "next": null,
                                "first": "https://api.questionpro.{{env}}/a/api/v2/surveys/{{survey-id}}/responses/filter?page=1&perPage=100",
                                "last": "https://api.questionpro.{{env}}/a/api/v2/surveys/{{survey-id}}/responses/filter?page=1&perPage=100"
                            }
                        },
                            "requestID": "7012fedc-e8ce-48ae-b800-6q5ce287987a7daf"
                    }
                    
arrow_right400 example
application/json

{
    "response": {
     "error": {
         "docs": www.questionpro.com/api/error-codes.html
         "name": "BAD_REQUEST",
         "httpStatusCode": 400,
         "id" : "1000",
         "message": "Invalid URL parameters",
         "resourceUrl":"resource_url"
        }
    }
}
                                
arrow_rightSchema
application/json

{
  "$schema": "http://json-schema.org/draft-06/schema#                                 ",
  "type": "object",
  "properties": {
    "response": {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "docs": {
              "type": "string"
            },
            "resourceUrl": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "httpStatusCode": {
              "type": "integer"
            }
          },
          "additionalProperties": false,
          "required": [
            "docs",
            "resourceUrl",
            "name",
            "id",
            "message",
            "httpStatusCode"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "error"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "response"
  ]
}
                                
arrow_right401 example
application/json

{
    "response": {
     "error": {
         "docs": www.questionpro.com/api/error-codes.html
         "name": "UNAUTHORIZED",
         "httpStatusCode": 401,
         "id" : "1010",
         "message": "Incorrect API Key",
         "resourceUrl":"resource_url"
        }
    }
}
						
							
arrow_rightSchema
application/json

{
  "$schema": "http://json-schema.org/draft-06/schema#                                 ",
  "type": "object",
  "properties": {
    "response": {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "docs": {
              "type": "string"
            },
            "resourceUrl": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "httpStatusCode": {
              "type": "integer"
            }
          },
          "additionalProperties": false,
          "required": [
            "docs",
            "resourceUrl",
            "name",
            "id",
            "message",
            "httpStatusCode"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "error"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "response"
  ]
}
                                
arrow_right403 example
application/json

{
    "response": {
     "error": {
         "docs": www.questionpro.com/api/error-codes.html
         "name": "FORBIDDEN",
         "httpStatusCode": 403,
         "id" : "1013",
         "message": "The user does not have permission to access the resource",
         "resourceUrl":"resource_url"
        }
    }
}				
							
arrow_rightSchema
application/json

{
  "$schema": "http://json-schema.org/draft-06/schema#                                 ",
  "type": "object",
  "properties": {
    "response": {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "docs": {
              "type": "string"
            },
            "resourceUrl": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "httpStatusCode": {
              "type": "integer"
            }
          },
          "additionalProperties": false,
          "required": [
            "docs",
            "resourceUrl",
            "name",
            "id",
            "message",
            "httpStatusCode"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "error"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "response"
  ]
}
                                
arrow_right404 example
application/json

{
    "response": {
     "error": {
         "docs": www.questionpro.com/api/error-codes.html
         "name": "NOT_FOUND",
         "httpStatusCode": 404,
         "id" : "1040",
         "message": "The resource that you're trying to access doesn't exist",
         "resourceUrl":"resource_url"
        }
    }
}
							
							
arrow_rightSchema
application/json

{
  "$schema": "http://json-schema.org/draft-06/schema#                                 ",
  "type": "object",
  "properties": {
    "response": {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "docs": {
              "type": "string"
            },
            "resourceUrl": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "httpStatusCode": {
              "type": "integer"
            }
          },
          "additionalProperties": false,
          "required": [
            "docs",
            "resourceUrl",
            "name",
            "id",
            "message",
            "httpStatusCode"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "error"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "response"
  ]
}
                                
arrow_right500 example
application/json

{
    "response": {
     "error": {
         "docs": www.questionpro.com/api/error-codes.html
         "name": "INTERNAL_SERVER_ERROR",
         "httpStatusCode": 500,
         "id" : "1026",
         "message": "We are not able to process your request",
         "resourceUrl":"resource_url"
        }
    }
}
							
arrow_rightSchema
application/json

{
  "$schema": "http://json-schema.org/draft-06/schema#                                 ",
  "type": "object",
  "properties": {
    "response": {
      "type": "object",
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "docs": {
              "type": "string"
            },
            "resourceUrl": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "httpStatusCode": {
              "type": "integer"
            }
          },
          "additionalProperties": false,
          "required": [
            "docs",
            "resourceUrl",
            "name",
            "id",
            "message",
            "httpStatusCode"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "error"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "response"
  ]
}