TABLE OF CONTENTS



 

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 Close the Loop API is used to retrieve the latest status of Close the Loop records updated within a specific date range.






Good to Know

  • The “time_to_follow_up” and “time_to_close” data points in the Response Body represent full hours.
  • The API returns “cases”. Survey Responses do not necessarily create a case; a status change, close the loop comment or assignment needs to have been done for a case to be created in CustomerGauge.






Authentication

OAuth2 Authentication is used to connect to this API. In order to create the Connected App, which is needed to generate the Access Token, Administrator access to CustomerGauge is needed. 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/v7/rest/sync/close-loop







Request


Parameters

KeyDescriptionRulesExample
per_pageDefines the amount of records returned per page.Number from 1 to 1000.per_page=100
cursorParameter value returned from the API to navigate pages. The cursor is an integer.Value is returned from the API.cursor=123
updated_at[start]The start date of the date range to select the close the loop data setYYYY-mm-ddupdated_at[start]=2022-07-17
updated_at[end]The end date of the date range to select the close the loop data setYYYY-mm-ddupdated_at[end]=2022-07-25

All parameters are optional.


Example Request

https://api.{{ apiRegion }}.customergauge.com/v7/rest/sync/close-loop?per_page=25






Response

HTTP Status CodeDescription
200OK - everything worked as expected.

Example Response Body
{
"data": [{
"id": 1,
"number_customergauge": 1,
"status": "open",
"assignee": {
"id": 1,
"username": "johndoe",
"email": "john.doe@example.com"
},
"time_to_follow_up": null,
"time_to_close": null,
"created_at": "2022-05-17 12:34:56",
"updated_at": "2022-05-25 12:34:56"
},
{
"id": 2,
"number_customergauge": 2,
"status": "closed",
"assignee": {
"id": 1,
"username": "johndoe",
"email": "john.doe@example.com"
},
"time_to_follow_up": 24,
"time_to_close": 128,
"created_at": "2022-05-17 12:34:56",
"updated_at": "2022-05-25 12:34:56"
}
],
"cursor": {
"next": 123
}
}


401The Access Token obtained has expired, or is invalid. Call the Authenticate API again to obtain a new Access Token.

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








Not the API you're looking for?

Get an overview of our APIs here.