https://api.questionpro.{{env}}/a/api/v2/micropanel/profiles?page=1&perPage=100
The value of environment {{env}} variable depends upon your datacenter. Refer to the Environment page for more details.
curl --location 'https://api.questionpro.{{env}}/a/api/v2/micropanel/profiles?page=1&perPage=100' \
--header 'api-key': '{{api-key}}' \
import requests
url = "https://api.questionpro.{{env}}/a/api/v2/micropanel/profiles?page=1&perPage=100"
payload = {}
headers = {
'apiKey': '{{api-key}}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.questionpro.{{env}}/a/api/v2/micropanel/profiles?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 => 'GET',
CURLOPT_HTTPHEADER => array(
'api-key': '{{api-key}}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"response": [
{
"profileFieldId": 223979,
"title": "Who do you Identify As",
"label": "Who do you Identify As",
"fieldType": 20,
"fieldSubType": 2,
"maxCharacters": 0,
"mergeTag": "{PROFILE_223979}",
"profileGroup": null,
"enableConditional": false,
"conditionalChoiceID": 0,
"choices": [
{
"choiceId": 4006494,
"choiceName": "Female"
},
{
"choiceId": 4006495,
"choiceName": "Male"
},
{
"choiceId": 4006496,
"choiceName": "Non-Binary/Transgender"
},
{
"choiceId": 4047642,
"choiceName": "Other"
},
{
"choiceId": 4336661,
"choiceName": "Prefer not to say"
}
],
"required": true,
"privateField": false
},
{
"profileFieldId": 223991,
"title": "What kind of pet(s) do you have? (Select all that apply)",
"label": "What kind of pet(s) do you have? Select all that apply",
"fieldType": 21,
"fieldSubType": 5,
"maxCharacters": 0,
"mergeTag": "{PROFILE_223991}",
"profileGroup": null,
"enableConditional": false,
"conditionalChoiceID": 0,
"choices": [
{
"choiceId": 4006774,
"choiceName": "Dog"
},
{
"choiceId": 4006775,
"choiceName": "Cat"
},
{
"choiceId": 4006776,
"choiceName": "Bird"
},
{
"choiceId": 4006777,
"choiceName": "Fish"
},
{
"choiceId": 4006778,
"choiceName": "Amphibian such as frog, toad, newt, salamander"
},
{
"choiceId": 4047639,
"choiceName": "Reptiles such as turtles, snakes, lizards, alligators, crocodiles"
},
{
"choiceId": 4047640,
"choiceName": "Pig"
},
{
"choiceId": 4047641,
"choiceName": "Mouse/hamster/guinea pig"
},
{
"choiceId": 4226430,
"choiceName": "Other"
}
],
"required": true,
"privateField": false
},
{
"profileFieldId": 237317,
"title": "Year of Birth",
"label": "Year of Birth",
"fieldType": 30,
"fieldSubType": 0,
"maxCharacters": 0,
"mergeTag": "{PROFILE_237317}",
"profileGroup": null,
"enableConditional": false,
"conditionalChoiceID": 0,
"choices": null,
"required": false,
"privateField": false
},
{
"profileFieldId": 238537,
"title": "Country",
"label": "Country",
"fieldType": 20,
"fieldSubType": 2,
"maxCharacters": 0,
"mergeTag": "{PROFILE_238537}",
"profileGroup": null,
"enableConditional": false,
"conditionalChoiceID": 0,
"choices": [
{
"choiceId": 4346080,
"choiceName": "Argentina"
},
{
"choiceId": 4346081,
"choiceName": "Australia"
},
{
"choiceId": 4346082,
"choiceName": "Bangladesh"
},
{
"choiceId": 4346083,
"choiceName": "Brazil"
},
{
"choiceId": 4346084,
"choiceName": "Canada"
},
{
"choiceId": 4346085,
"choiceName": "Chile"
},
{
"choiceId": 4346086,
"choiceName": "China"
},
{
"choiceId": 4346087,
"choiceName": "Germany"
},
{
"choiceId": 4346088,
"choiceName": "India"
},
{
"choiceId": 4346089,
"choiceName": "Japan"
},
{
"choiceId": 4346090,
"choiceName": "Mexico"
},
{
"choiceId": 4346091,
"choiceName": "Nepal"
},
{
"choiceId": 4346092,
"choiceName": "Poland"
},
{
"choiceId": 4346093,
"choiceName": "Portugal"
},
{
"choiceId": 4346094,
"choiceName": "Russia"
},
{
"choiceId": 4346095,
"choiceName": "Saudi Arabia"
},
{
"choiceId": 4346096,
"choiceName": "South Africa"
},
{
"choiceId": 4346097,
"choiceName": "Spain"
},
{
"choiceId": 4346098,
"choiceName": "Thailand"
},
{
"choiceId": 4346099,
"choiceName": "Turkey"
},
{
"choiceId": 4346100,
"choiceName": "UAE"
},
{
"choiceId": 4346101,
"choiceName": "UK"
},
{
"choiceId": 4346102,
"choiceName": "Ukraine"
},
{
"choiceId": 4346380,
"choiceName": "USA"
}
],
"required": false,
"privateField": false
}
],
"pagination": {
"perPage": 100,
"totalItems": 4,
"currentPage": 1,
"totalPages": 1,
"links": {
"self": "https://api.questionpro.com/a/api/v2/micropanel/profiles?page=1&perPage=100",
"prev": null,
"next": null,
"first": "https://api.questionpro.com/a/api/v2/micropanel/profiles?page=1&perPage=100",
"last": "https://api.questionpro.com/a/api/v2/micropanel/profiles?page=1&perPage=100"
}
},
"requestID": "c8e4ff5d-9dee-48ed-aabb-ef5b4c6de53c"
}
{
"$schema": "http://json-schema.org/draft-06/schema# ",
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"totalItems": {
"type": "integer"
},
"perPage": {
"type": "integer"
},
"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",
"totalPages",
"links",
"currentPage"
]
},
"response": {
"type": "array",
"items": {
"type": "object",
"properties": {
"enableConditional": {
"type": "boolean"
},
"label": {
"type": "string"
},
"title": {
"type": "string"
},
"required": {
"type": "boolean"
},
"conditionalChoiceID": {
"type": "integer"
},
"profileFieldId": {
"type": "integer"
},
"privateField": {
"type": "boolean"
},
"maxCharacters": {
"type": "integer"
},
"profileGroup": {
"type": "null"
},
"mergeTag": {
"type": "string"
},
"fieldSubType": {
"type": "integer"
},
"choices": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"choiceId": {
"type": "integer"
},
"choiceName": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"choiceId",
"choiceName"
]
}
}
]
},
"fieldType": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"enableConditional",
"label",
"title",
"required",
"conditionalChoiceID",
"profileFieldId",
"privateField",
"maxCharacters",
"mergeTag",
"fieldSubType",
"fieldType"
]
}
},
"requestID": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"pagination",
"response",
"requestID"
]
}
{
"response": {
"error": {
"docs": www.questionpro.com/api/error-codes.html
"name": "BAD_REQUEST",
"httpStatusCode": 400,
"id" : "1000",
"message": "Invalid URL parameters",
"resourceUrl":"resource_url"
}
}
}
{
"$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"
]
}
{
"response": {
"error": {
"docs": www.questionpro.com/api/error-codes.html
"name": "UNAUTHORIZED",
"httpStatusCode": 401,
"id" : "1010",
"message": "Incorrect API Key",
"resourceUrl":"resource_url"
}
}
}
{
"$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"
]
}
{
"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"
}
}
}
{
"$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"
]
}
{
"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"
}
}
}
{
"$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"
]
}
{
"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"
}
}
}
{
"$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"
]
}