Post /cx/responses

Example Request

https://api.questionpro.{{env}}/a/api/v2/cx/responses?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 Body

arrow_rightPayload
application/json

                    {
                        "transactionEndDate": "01/16/2020", 
                        "transactionStartDate": "01/16/2019"
                    }


                    

Responses

arrow_rightExample
application/json

                       {
                            "response": [
                                {
                                    "responseID": 31105,
                                    "surveyID": 6706,
                                    "ipAddress": "127.0.0.1",
                                    "timestamp": "15 Jan, 2020 03:54:44 PM IST",
                                    "location": {
                                        "country": null,
                                        "region": null,
                                        "latitude": 0,
                                        "longitude": 0,
                                        "radius": 0
                                    },
                                    "duplicate": false,
                                    "timeTaken": 477,
                                    "responseStatus": "Completed",
                                    "externalReference": "",
                                    "customVariables": {
                                        "Test": "abc",
                                        "Test1": "Test1",
                                        "custom3": null,
                                        "custom4": null,
                                        "Test2": "Test2"
                                    },
                                    "language": "English",
                                    "currentInset": "",
                                    "operatingSystem": "LINUX",
                                    "osDeviceType": "COMPUTER",
                                    "browser": "CHROME",
                                    "responseSet": [
                                        {
                                            "questionID": 17609223,
                                            "questionDescription": "{detractor:Very Unlikely,promoter:Very Likely}",
                                            "questionCode": "Q4",
                                            "questionText": "CSAT2 ",
                                            "imageUrl": null,
                                            "answerValues": [
                                                {
                                                    "answerID": 147769,
                                                    "answerText": "3",
                                                    "value": {
                                                        "scale": "3",
                                                        "other": "",
                                                        "dynamicExplodeText": "",
                                                        "text": "",
                                                        "result": "",
                                                        "fileLink": "",
                                                        "weight": 0
                                                    }
                                                }
                                            ]
                                        },
                                        {
                                            "questionID": 17609222,
                                            "questionDescription": "{detractor:Very Unlikely,promoter:Very Likely}",
                                            "questionCode": "Q3",
                                            "questionText": "CSAT1",
                                            "imageUrl": null,
                                            "answerValues": [
                                                {
                                                    "answerID": 147760,
                                                    "answerText": "4",
                                                    "value": {
                                                        "scale": "4",
                                                        "other": "",
                                                        "dynamicExplodeText": "",
                                                        "text": "",
                                                        "result": "",
                                                        "fileLink": "",
                                                        "weight": 0
                                                    }
                                                }
                                            ]
                                        },
                                        {
                                            "questionID": 17609220,
                                            "questionDescription": "{detractor:Very Unlikely,promoter:Very Likely}",
                                            "questionCode": "Q1",
                                            "questionText": "How likely is it that you would recommend {company/product/service} to a friend or colleague?",
                                            "imageUrl": null,
                                            "answerValues": [
                                                {
                                                    "answerID": 147748,
                                                    "answerText": "3",
                                                    "value": {
                                                        "scale": "4",
                                                        "other": "",
                                                        "dynamicExplodeText": "",
                                                        "text": "",
                                                        "result": "",
                                                        "fileLink": "",
                                                        "weight": 0
                                                    }
                                                }
                                            ]
                                        },
                                        {
                                            "questionID": 17609221,
                                            "questionDescription": " ",
                                            "questionCode": "Q2",
                                            "questionText": "What is the primary reason for your score?",
                                            "imageUrl": null,
                                            "answerValues": [
                                                {
                                                    "answerID": 147756,
                                                    "answerText": "",
                                                    "value": {
                                                        "scale": "",
                                                        "other": "",
                                                        "dynamicExplodeText": "",
                                                        "text": "swdfghj",
                                                        "result": "",
                                                        "fileLink": "",
                                                        "weight": 0
                                                    }
                                                }
                                            ]
                                        }
                                    ],
                                    "utctimestamp": 44
                                },
                                {
                                    "responseID": 31104,
                                    "surveyID": 6706,
                                    "ipAddress": "127.0.0.1",
                                    "timestamp": "10 Jan, 2020 01:08:30 PM IST",
                                    "location": {
                                        "country": null,
                                        "region": null,
                                        "latitude": 0,
                                        "longitude": 0,
                                        "radius": 0
                                    },
                                    "duplicate": false,
                                    "timeTaken": 9,
                                    "responseStatus": "Started",
                                    "completionUrl": "http://www.questionpro.com/a/TakeSurvey?tt=SCDdTKmO%2BnY%3D&_ct=uHEyyBNTzNC5RCNGxsIbHA%3D%3D",
                                    "externalReference": "Survey_Token",
                                    "customVariables": {
                                        "Test": null,
                                        "Test1": null,
                                        "custom3": null,
                                        "custom4": null,
                                        "Test2": null
                                    },
                                    "language": "English",
                                    "currentInset": "",
                                    "operatingSystem": "LINUX",
                                    "osDeviceType": "COMPUTER",
                                    "browser": "CHROME",
                                    "responseSet": [
                                        {
                                            "questionID": 17609223,
                                            "questionDescription": "{detractor:Very Unlikely,promoter:Very Likely}",
                                            "questionCode": "Q4",
                                            "questionText": "CSAT2 ",
                                            "imageUrl": null,
                                            "answerValues": [
                                                {
                                                    "answerID": 147768,
                                                    "answerText": "2",
                                                    "value": {
                                                        "scale": "2",
                                                        "other": "",
                                                        "dynamicExplodeText": "",
                                                        "text": "",
                                                        "result": "",
                                                        "fileLink": "",
                                                        "weight": 0
                                                    }
                                                }
                                            ]
                                        },
                                        {
                                            "questionID": 17609222,
                                            "questionDescription": "{detractor:Very Unlikely,promoter:Very Likely}",
                                            "questionCode": "Q3",
                                            "questionText": "CSAT1",
                                            "imageUrl": null,
                                            "answerValues": [
                                                {
                                                    "answerID": 147765,
                                                    "answerText": "9",
                                                    "value": {
                                                        "scale": "9",
                                                        "other": "",
                                                        "dynamicExplodeText": "",
                                                        "text": "",
                                                        "result": "",
                                                        "fileLink": "",
                                                        "weight": 0
                                                    }
                                                }
                                            ]
                                        },
                                        {
                                            "questionID": 17609220,
                                            "questionDescription": "{detractor:Very Unlikely,promoter:Very Likely}",
                                            "questionCode": "Q1",
                                            "questionText": "How likely is it that you would recommend {company/product/service} to a friend or colleague?",
                                            "imageUrl": null,
                                            "answerValues": [
                                                {
                                                    "answerID": 147746,
                                                    "answerText": "1",
                                                    "value": {
                                                        "scale": "2",
                                                        "other": "",
                                                        "dynamicExplodeText": "",
                                                        "text": "",
                                                        "result": "",
                                                        "fileLink": "",
                                                        "weight": 0
                                                    }
                                                }
                                            ]
                                        },
                                        {
                                            "questionID": 17609221,
                                            "questionDescription": " ",
                                            "questionCode": "Q2",
                                            "questionText": "What is the primary reason for your score?",
                                            "imageUrl": null,
                                            "answerValues": [
                                                {
                                                    "answerID": 147756,
                                                    "answerText": "",
                                                    "value": {
                                                        "scale": "",
                                                        "other": "",
                                                        "dynamicExplodeText": "",
                                                        "text": "defrgthyj",
                                                        "result": "",
                                                        "fileLink": "",
                                                        "weight": 0
                                                    }
                                                }
                                            ]
                                        }
                                    ],
                                    "utctimestamp": 30
                                },
                                {
                                    "responseID": 31103,
                                    "surveyID": 6706,
                                    "ipAddress": "127.0.0.1",
                                    "timestamp": "10 Jan, 2020 11:38:33 AM IST",
                                    "location": {
                                        "country": null,
                                        "region": null,
                                        "latitude": 0,
                                        "longitude": 0,
                                        "radius": 0
                                    },
                                    "duplicate": false,
                                    "timeTaken": 48,
                                    "responseStatus": "Completed",
                                    "externalReference": "Survey_Token",
                                    "customVariables": {
                                        "Test": null,
                                        "Test1": null,
                                        "custom3": null,
                                        "custom4": null,
                                        "Test2": null
                                    },
                                    "language": "English",
                                    "currentInset": "",
                                    "operatingSystem": "LINUX",
                                    "osDeviceType": "COMPUTER",
                                    "browser": "CHROME",
                                    "responseSet": [
                                        {
                                            "questionID": 17609223,
                                            "questionDescription": "{detractor:Very Unlikely,promoter:Very Likely}",
                                            "questionCode": "Q4",
                                            "questionText": "CSAT2 ",
                                            "imageUrl": null,
                                            "answerValues": []
                                        },
                                        {
                                            "questionID": 17609222,
                                            "questionDescription": "{detractor:Very Unlikely,promoter:Very Likely}",
                                            "questionCode": "Q3",
                                            "questionText": "CSAT1",
                                            "imageUrl": null,
                                            "answerValues": []
                                        },
                                        {
                                            "questionID": 17609220,
                                            "questionDescription": "{detractor:Very Unlikely,promoter:Very Likely}",
                                            "questionCode": "Q1",
                                            "questionText": "How likely is it that you would recommend {company/product/service} to a friend or colleague?",
                                            "imageUrl": null,
                                            "answerValues": [
                                                {
                                                    "answerID": 147745,
                                                    "answerText": "0",
                                                    "value": {
                                                        "scale": "1",
                                                        "other": "",
                                                        "dynamicExplodeText": "",
                                                        "text": "",
                                                        "result": "",
                                                        "fileLink": "",
                                                        "weight": 0
                                                    }
                                                }
                                            ]
                                        },
                                        {
                                            "questionID": 17609221,
                                            "questionDescription": " ",
                                            "questionCode": "Q2",
                                            "questionText": "What is the primary reason for your score?",
                                            "imageUrl": null,
                                            "answerValues": [
                                                {
                                                    "answerID": 147756,
                                                    "answerText": "",
                                                    "value": {
                                                        "scale": "",
                                                        "other": "",
                                                        "dynamicExplodeText": "",
                                                        "text": "wertyhuj",
                                                        "result": "",
                                                        "fileLink": "",
                                                        "weight": 0
                                                    }
                                                }
                                            ]
                                        }
                                    ],
                                    "utctimestamp": 33
                                },
                                {
                                    "responseID": 31102,
                                    "surveyID": 6706,
                                    "ipAddress": "127.0.0.1",
                                    "timestamp": "10 Jan, 2020 11:37:03 AM IST",
                                    "location": {
                                        "country": null,
                                        "region": null,
                                        "latitude": 0,
                                        "longitude": 0,
                                        "radius": 0
                                    },
                                    "duplicate": false,
                                    "timeTaken": 30,
                                    "responseStatus": "Completed",
                                    "externalReference": "Survey_Token",
                                    "customVariables": {
                                        "Test": null,
                                        "Test1": null,
                                        "custom3": null,
                                        "custom4": null,
                                        "Test2": null
                                    },
                                    "language": "English",
                                    "currentInset": "",
                                    "operatingSystem": "LINUX",
                                    "osDeviceType": "COMPUTER",
                                    "browser": "CHROME",
                                    "responseSet": [
                                        {
                                            "questionID": 17609223,
                                            "questionDescription": "{detractor:Very Unlikely,promoter:Very Likely}",
                                            "questionCode": "Q4",
                                            "questionText": "CSAT2 ",
                                            "imageUrl": null,
                                            "answerValues": []
                                        },
                                        {
                                            "questionID": 17609222,
                                            "questionDescription": "{detractor:Very Unlikely,promoter:Very Likely}",
                                            "questionCode": "Q3",
                                            "questionText": "CSAT1",
                                            "imageUrl": null,
                                            "answerValues": []
                                        },
                                        {
                                            "questionID": 17609220,
                                            "questionDescription": "{detractor:Very Unlikely,promoter:Very Likely}",
                                            "questionCode": "Q1",
                                            "questionText": "How likely is it that you would recommend {company/product/service} to a friend or colleague?",
                                            "imageUrl": null,
                                            "answerValues": [
                                                {
                                                    "answerID": 147745,
                                                    "answerText": "0",
                                                    "value": {
                                                        "scale": "1",
                                                        "other": "",
                                                        "dynamicExplodeText": "",
                                                        "text": "",
                                                        "result": "",
                                                        "fileLink": "",
                                                        "weight": 0
                                                    }
                                                }
                                            ]
                                        },
                                        {
                                            "questionID": 17609221,
                                            "questionDescription": " ",
                                            "questionCode": "Q2",
                                            "questionText": "What is the primary reason for your score?",
                                            "imageUrl": null,
                                            "answerValues": [
                                                {
                                                    "answerID": 147756,
                                                    "answerText": "",
                                                    "value": {
                                                        "scale": "",
                                                        "other": "",
                                                        "dynamicExplodeText": "",
                                                        "text": "wefghjl",
                                                        "result": "",
                                                        "fileLink": "",
                                                        "weight": 0
                                                    }
                                                }
                                            ]
                                        }
                                    ],
                                    "utctimestamp": 3
                                }
                            ],
                            "pagination": {
                                "perPage": 12,
                                "totalItems": 4,
                                "currentPage": 1,
                                "totalPages": 1,
                                "links": {
                                    "self": "https://api.questionpro{{env}}./a/api/v2/cx/responses?page=1&perPage=12",
                                    "prev": null,
                                    "next": null,
                                    "first": "https://api.questionpro.{{env}}/a/api/v2/cx/responses?page=1&perPage=12",
                                    "last": "https://api.questionpro.{{env}}/a/api/v2/cx/responses?page=1&perPage=12"
                                }
                            }, 
                            "requestID": "4012fedc-e8ce-48ae-b800-6q5ce287987a7dje"
                        }

                    
arrow_rightSchema
application/json
{
  "$schema": "http://json-schema.org/draft-06/schema# ",
  "type": "object",
  "properties": {
    "pagination": {
      "type": "object",
      "properties": {
        "totalItems": {
          "type": "integer"
        },
        "perPage": {
          "type": "integer"
        },
        "requestID": {
          "type": "string"
        },
        "totalPages": {
          "type": "integer"
        },
        "links": {
          "type": "object",
          "properties": {
            "next": {
              "type": "null"
            },
            "last": {
              "type": "string"
            },
            "prev": {
              "type": "null"
            },
            "self": {
              "type": "string"
            },
            "first": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "last",
            "self",
            "first"
          ]
        },
        "currentPage": {
          "type": "integer"
        }
      },
      "additionalProperties": false,
      "required": [
        "totalItems",
        "perPage",
        "requestID",
        "totalPages",
        "links",
        "currentPage"
      ]
    },
    "response": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "surveyID": {
            "type": "integer"
          },
          "ipAddress": {
            "type": "string",
            "format": "ipv4"
          },
          "language": {
            "type": "string"
          },
          "duplicate": {
            "type": "boolean"
          },
          "completionUrl": {
            "type": "string"
          },
          "responseStatus": {
            "type": "string"
          },
          "operatingSystem": {
            "type": "string"
          },
          "customVariables": {
            "type": "object",
            "properties": {
              "Test1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "Test": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "custom3": {
                "type": "null"
              },
              "custom4": {
                "type": "null"
              },
              "Test2": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "additionalProperties": false
          },
          "externalReference": {
            "type": "string"
          },
          "osDeviceType": {
            "type": "string"
          },
          "timeTaken": {
            "type": "integer"
          },
          "currentInset": {
            "type": "string"
          },
          "utctimestamp": {
            "type": "integer"
          },
          "browser": {
            "type": "string"
          },
          "location": {
            "type": "object",
            "properties": {
              "country": {
                "type": "null"
              },
              "latitude": {
                "type": "integer"
              },
              "region": {
                "type": "null"
              },
              "radius": {
                "type": "integer"
              },
              "longitude": {
                "type": "integer"
              }
            },
            "additionalProperties": false,
            "required": [
              "latitude",
              "radius",
              "longitude"
            ]
          },
          "responseSet": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "questionDescription": {
                  "type": "string"
                },
                "questionID": {
                  "type": "integer"
                },
                "questionCode": {
                  "type": "string"
                },
                "imageUrl": {
                  "type": "null"
                },
                "answerValues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "answerID": {
                        "type": "integer"
                      },
                      "answerText": {
                        "type": "string"
                      },
                      "value": {
                        "type": "object",
                        "properties": {
                          "result": {
                            "type": "string"
                          },
                          "other": {
                            "type": "string"
                          },
                          "fileLink": {
                            "type": "string"
                          },
                          "scale": {
                            "type": "string"
                          },
                          "dynamicExplodeText": {
                            "type": "string"
                          },
                          "weight": {
                            "type": "integer"
                          },
                          "text": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "result",
                          "other",
                          "fileLink",
                          "scale",
                          "dynamicExplodeText",
                          "weight",
                          "text"
                        ]
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "answerID",
                      "answerText",
                      "value"
                    ]
                  }
                },
                "questionText": {
                  "type": "string"
                }
              },
              "additionalProperties": false,
              "required": [
                "questionDescription",
                "questionID",
                "questionCode",
                "answerValues",
                "questionText"
              ]
            }
          },
          "responseID": {
            "type": "integer"
          },
          "timestamp": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "surveyID",
          "ipAddress",
          "language",
          "duplicate",
          "responseStatus",
          "operatingSystem",
          "customVariables",
          "externalReference",
          "osDeviceType",
          "timeTaken",
          "currentInset",
          "utctimestamp",
          "browser",
          "location",
          "responseSet",
          "responseID",
          "timestamp"
        ]
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "pagination",
    "response"
  ]
}
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"
  ]
}