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 PUT Close the Loop API allows you to create Close the Loop actions in CustomerGauge. This action will create or update a case.






Good to Know

  • The API creates or updates “cases”. Survey Responses do not necessarily create a case; a status change 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/close-loop/status






Request


Parameters

KeyDescriptionRulesExample
number_customergaugeUnique Identifier of the Survey Response related to the case.Required.number_customergauge=100
statusThe status of the case, it can be open, progress or closed.Required.
A case needs to be open in order to be set to progress or closed.
status=open
status=progress
status=closed
note
A comment can be added to the case with each status change.Required if status is set to progress.note="note sample"
happened_atThe date and time of the Close the Loop action.Optional. YYYY-mm-dd H:m:shappened_at=2022-07-25 14:10:09


Supported Formats


JSON (raw request body)

Data can be passed to this API using the JSON format in the body of the request.


Example parameters:

{
"number_customergauge": "53499",
"status": "progress",
"happened_at": "2023-07-05 08:50:15",
"note": "Will get in touch about this"
}



x-www-form-urlencoded (body)

Data can be passed to this API using the x-www-form-urlencoded format in the body of the request.


Example parameters:

number_customergauge: "53499"
status: "progress"
happened_at: "2023-07-05 08:50:15"
note: "Will get in touch about this"
Generic






Response

HTTP Status CodeDescription
200OK - everything worked as expected.

Example Response Body
An empty Response Body will be returned when successful.
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."
}


422Unprocessable Entity

Example Response Body
{
"message": "The number customergauge field is required.",
"errors": {
"number_customergauge": [
"The number customergauge field is required."
]
}
}






Examples


Postman example

Download Postman example


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






Not the API you're looking for?

Get an overview of our APIs here.