Read Client Response
This page describes how to:
- Retrieve (GET) a specific client review response.
- Retrieve (GET) all client responses for a specific review.
Get a specific client review response
The request is scoped to a specific response by using that response's GUID.
Request
HTTP GET is required.
GET https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/{responseGuid}?passkey={RESPONSE_API_PASSKEY} HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
...
The ellipses (...) in the above example indicate that your app may generate other headers.
Older applications may be using https://[stg.]api.bazaarvoice.com/contentmanagement as the base URL for the Response API, instead of https://[stg.]api.bazaarvoice.com/response.The
contentmanagement
URL has been deprecated. However, Bazaarvoice will continue to support applications that use thecontentmanagement
URL until further notice.
Parameters
Name | Description | Required |
---|---|---|
Path | ||
responseGuid | Guid of the review response. | Yes |
QueryString | ||
passkey | Response API passkey. | Yes |
Header | ||
Authorization | The Authorization value will consist of the string Bearer followed by the OAuth2 access token. Refer to OAuth2 Integration for more information. | Yes |
Response
Header
HTTP status 200 indicates success. Other header values are documented in the API Reference .
Body
The response will contain a JSON object in the body. The following code demonstrates how to obtain data related to a client response record using a GET request.
{
"data": [
{
"type": "clientResponse",
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"attributes": {
"department": "Some department name",
"response": "This is a sample client response.",
"responseBy": "Name of the responder",
"responseSource": "Name of Application created for OAuth",
"created": "2018-06-22T19:55:03Z",
"updated": "2018-06-22T19:55:03Z"
},
"relationships": {
"author": {
"data": {
"type": "author",
"id": "Dav OAuth"
},
"links": {
"self": "https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/relationships/author",
"related": "https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/author"
}
},
"review": {
"data": {
"type": "review",
"id": "75266",
"clientName": "{}"
},
"links": {
"self": "https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/relationships/review",
"related": "https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/review"
}
}
},
"links": {
"self": "https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
}
}
],
"links": {
"self": "https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/{client_name}/reviews/{reviewId}?passkey={RESPONSE_API_PASSKEY}"
}
}
The definition of the key/values returned in the response body are documented in the API Reference.
The responseSource
value in the response is obtained from the OAuth application created by Bazaarvoice when providing access to the Response API.
Contents within the relationships
node are provided as part of the JSON API specification.
Errors
For a detailed description and solution for Response API errors, refer to Troubleshooting.
Get all client review responses for a given review
The request is scoped to a specific review resource by using the review Id.
HTTP GET is required.
GET https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/{client}/reviews/{reviewId}?passkey={RESPONSE_API_PASSKEY} HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
...
The ellipses (…) in above example indicate that your app may generate other headers.
Older applications may be using
https://[stg.]api.bazaarvoice.com/**contentmanagement**
as the base URL for the Response API, instead ofhttps://[stg.]api.bazaarvoice.com/**response**
.Thecontentmanagement
URL has been deprecated. However, Bazaarvoice will continue to support applications that use thecontentmanagement
URL until further notice.
Request
Parameters
Name | Description | Required |
---|---|---|
Path | ||
reviewId | Identifier of the review for the associated response(s). | Yes |
QueryString | ||
passkey | Response API passkey. | Yes |
Header | ||
Authorization | The Authorization value will consist of the string Bearer followed by the OAuth2 access token. Refer to OAuth2 Integration for more information. | Yes |
Response
Header
HTTP status 200 indicates success. Other header values are documented in the API Reference.
Body
The response will contain a JSON object in the body. The following code demonstrates how to obtain all reviews related to a client response record using a GET request.
{
"data": [
{
"type": "clientResponse",
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"attributes": {
"department": "Some department name",
"response": "This is a sample client response.",
"responseBy": "The name of the responder. If you don't specify a name the value will be omitted from the response.",
"responseSource": "Name of Application created for OAuth",
"created": "2018-06-22T19:55:03Z",
"updated": "2018-06-22T19:55:03Z"
},
"relationships": {
"author": {
"data": {
"type": "author",
"id": "Dav OAuth"
},
"links": {
"self": "https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/relationships/author",
"related": "https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/author"
}
},
"review": {
"data": {
"type": "review",
"id": "75266",
"clientName": "{client}"
},
"links": {
"self": "https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/relationships/review",
"related": "https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/review"
}
}
},
"links": {
"self": "https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
}
},
{
.....
},
{
.....
},
{
.....
}
]
}
The definition of the key/values returned in the response body is documented in the API Reference.
Errors
For a detailed description and solution for Response API errors, refer to Troubleshooting.
// These are being double-checked
Bad API Passkey
<h1>Developer Inactive</h1>
Bad Bearer Token
{
"httpCode": 403,
"requestURI": "/response/v1/clientResponses/{client}/reviews/{reviewId}",
"errors": [
{
"code": "OAUTH2_INVALID_ACCESS_TOKEN",
"field": "Authorization",
"message": "Invalid access token"
}
]
}
Bad Client Name
{
"httpCode": 500,
"requestURI": "/response/v1/clientResponses/{client}/reviews/{reviewId}",
"errors": [
{
"code": "INTERNAL_SERVER_ERROR",
"field": "",
"message": "Could not retrieve review for {client}:{reviewId}"
}
]
}
Updated 10 months ago