API Setup

Choose your Host Region to have the documentation adapt to your use case.


Host Region
LabelValue
EUeu
USus
AUau


Business Use Case

The GET Responses API is used to request responses from your CustomerGauge system. All responses returned will contain all fields and custom fields enabled. This is ideal to populate your data lake on a daily basis.


Good to Know

Up to 400 responses are returned per page and ordered by CGID (returned as "number_customergauge"), latest first. The request will also return a cursor parameter value which is used to navigate to next page or previous page.


Authentication

OAuth2 Authentication is used to connect to this API. Once you've created your Connected App, you can acquire a Bearer Access Token by calling our OAuth2/Token API:

curl -X POST -H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials&client_id={{ Client ID }}&client_secret={{ Client Secret }}"
https://auth.{{ apiRegion }}.customergauge.com/oauth2/token

The acquired Bearer Access Token is used in the Authorization header in your API request.


Endpoint

Endpoint URL
https://api.{{ apiRegion }}.customergauge.com/v6/rest/responses


Request


Parameters

KeyDescriptionRulesExample Values
per_pageDefines the amount of responses returned per page.Number from 1 to 400.100
cursorParameter value returned from the API to navigate pages.Value is returned from the API.eyJudW1iZXJfY3VzdG9tZXJnYXVnZSI6MTMwODQsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0


Example Request

https://api.{{ apiRegion }}.customergauge.com/v6/rest/responses?per_page=25




Response

HTTP Status CodeDescription
200OK - everything worked as expected.

Example Response Body
{
"data": [
{
"contact": {
"first_name": "John",
"last_name": "Doe"
},
"account": {
"name": "ACME",
"number": "123"
},
"number_customergauge": 3414,
"number_customer": "123",
"email": "example@customergauge.com",
"phone": "1234567890",
"nps": 10,
"comment": {
"original": "Comentário de exemplo",
"translation": "Example Comment"
},
"date_creation": "2022-03-30 12:34:56",
"date_order": "2022-03-30 12:34:56",
"date_email_sent": "2022-03-30 12:34:56",
"date_survey_response": "2022-03-30 12:34:56",
"language": "EN",
"follow_up": {
"requested": false,
"details": "1234567890"
},
"tags": [
{
"label": "Product"
},
{
"label": "Support"
}
],
"questions": [
{
"title": "To what extent do you agree or disagree with the following statement:<br><br>We made it easy to solve your support issue.",
"answer": "7"
}
],
"drivers": [
{
"label": "Account Management"
}
],
"properties": [
{
"field": "Country",
"reference": null
},
{
"field": "Division",
"reference": "Global"
},
{
"field": "Touchpoint",
"reference": null
},
{
"field": "Key Contact",
"reference": null
},
{
"field": "Segment A",
"reference": null
},
{
"field": "Account Manager",
"reference": null
}
]
}
]
}


401The Access Token obtained has expired, or is invalid.

Example Response Body
{
"message": "Unauthenticated."
}



Examples


Postman example

Download Postman example


After importing the Postman example, make sure to change the Host Region and Authentication accordingly.


cURL example

curl --location --request GET 'https://api.{{ apiRegion }}.customergauge.com/v6/rest/responses' \
--header 'Authorization: Bearer XXXXX' \
--header 'Content-Type: application/json' \



Not the API you're looking for?

Get an overview of our APIs here.