Update Client Response
This page describes how to update a client response record.
Request
HTTP PATCH is required.
PATCH https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/{responseGuid}?passkey={RESPONSE_API_PASSKEY} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {ACCESS_TOKEN}
...
{
"attributes": {
"department": "string",
"response": "string",
"responseBy": "string"
}
}
Ellipses (…) in above example indicate that your app may generate other headers.
When updating a client response, the body must include the exact JSON structure shown above. This includes
attributes
,department
, andresponse
elements. Older applications may be usinghttps://[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.
Parameters
Name | Description | Required |
---|---|---|
Path | ||
responseGuid | Guid of the review response. | Yes |
QueryString | ||
passkey | Response API passkey. | Yes |
Header | ||
Content-Type | application/json. | Yes |
Authorization | The Authorization value will consist of the string Bearer followed by the OAuth2 access token. Refer to OAuth2 Integration for more information. | Yes |
Body | ||
attributes | Container node that wraps the department ,response and responseBy . | Yes |
department | The department name providing the response. If you don't specify a value, the current value will be retained. | No |
response | The textual response to the review. Limited to 65,535 ascii characters. Ascii. If you don't specify a value, the current value will be retained. | No |
responseBy | The name of the responder. If you don't specify a value, the current value will be retained. | No |
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. This following code demonstrates how a typical successful update (PATCH request) of a client response record is performed.
{
"type": "clientResponse",
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"attributes": {
"department": "Some department name - updated",
"response": "This is a sample client response.",
"responseBy": "Name of responder",
"responseSource": "Name of Application created for OAuth",
"responderClient": "Client ID"
"created": "2018-06-22T19:55:03Z",
"updated": "2018-06-27T14:32:15Z"
},
"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": "apitestcustomer"
},
"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 are documented in the API Reference.
The updated
value now will be the timestamp of executed PATCH.
The responseSource
node value in the response is obtained from the OAuth application created by Bazaarvoice when providing access to the Client Response API. This value cannot be overridden in the submission PATCH.
Contents within the relationships
node are provided as part of the JSON API specification.
Errors
For solutions to common Response API errors, refer to Troubleshooting.
Duplicate response
text is submitted for the same reviewId:
{
"httpCode": 400,
"requestURI": "/response/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"errors": [
{
"code": "INVALID_PROPERTY_VALUE",
"field": "response",
"message": "Duplicate '{response text}' detected for ClientResponse.response"
}
]
}
Considerations
Moderation
Client responses should come from individuals who are well-versed in the product and brand. Any user-generated content (UGC) submitted through your website generally goes through a rigorous moderation process.
It’s important to note that the Bazaarvoice Client Response API cannot be used to moderate review responses. Client responses submitted via the Response API will be displayed on your website as they are and will not be subject to Bazaarvoice’s UGC moderati
Time to live
All actions within the Bazaarvoice Client Response API are 'near real-time'. The success of response modifications, creations, and deletions is dependent on the time required for the Bazaarvoice caches to update. Additionally, the rate at which responses appear can be influenced by client-implemented caching.
Updated 11 months ago