Overview
This page contains general information about using the Response API.
Environments
The following environments are supported:
Environment | Domain | Description |
---|---|---|
Staging | stg.api.bazaarvoice.com | Development environment for testing functionality prior to deployment to a live production environment. |
Production | api.bazaarvoice.com | Live client-facing environment where the final version of a product or feature is deployed. |
API request pattern
The following examples demonstrate the basic URL patterns for Response API requests. To access tools and applications that help you work with the Response API, refer to Tools.
Request responses for a given review ID
To retrieve all client responses for a particular reviewId
, use the following pattern:
https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/{client}/reviews/{reviewId}?passkey={RESPONSE_API_PASSKEY}
Request a specific client response
To retrieve a specific client response resource using the responseGUID
use the following pattern:
https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/{responseGUID}?passkey={RESPONSE_API_PASSKEY}
Request a resource related to a response
To retrieve a specific resource related to a client response, follow the pattern below. This is accomplished using the query parameter resourceType
with a value of either 'author' or 'review' and the query parameter responseGUID
:
https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/{responseGUID}/{review or author response type}?passkey={RESPONSE_API_PASSKEY}
For further details, refer to API Reference.
Response headers
An HTTP status 200 indicates success. Other header values include:
Key | Definition |
---|---|
Content-Type | Value should be application/json . |
X-Bazaarvoice-QPM-Allotted | Queries per minute allowed for the API key. |
X-Bazaarvoice-QPM-Current | The current queries per minute for that key. |
X-Bazaarvoice-QPS-Allotted | Queries per second allowed for the API key. |
X-Bazaarvoice-QPS-Current | The current queries per second for that key. |
X-Bazaarvoice-Quota-Allotted | The maximum number of calls that can be made on daily basis. |
X-Bazaarvoice-Quota-Current | The current count of calls made in the current limit period, i.e. the current day. |
X-Bazaarvoice-Quota-Reset | Timestamp at which the quota is reset. |
Resources
A successful response will contain a JSON object in the body. The following demonstrates a typical client response:
Client response resource
{
"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-26T14:48:44Z",
"updated": "2018-06-26T14:48:44Z"
},
"relationships": {
"author": {
"data": {
"type": "author",
"id": "Name of owner of OAuth Application"
},
"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": "XXXXX",
"clientName": "client_name"
},
"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 following table elaborates on the key/values returned in the response body.
Key | Definition |
---|---|
id | Unique value identifying the client response resource |
type | "clientResponse" |
attributes | Container element |
department | Name of the department responding to the review |
response | Textual response to a review |
responseBy | Value provided in the responseBy field in the request. If not set this will be omitted from the response. |
responseSource | Name of Application created for OAuth. This value cannot be overridden in the submission POST |
created | Date/time when the resource was created |
updated | Date/time when the resource was last updated |
*All other key/values returned in the response JSON are used to support the JSON API specfication. This includes relationships
, author
, data
, type
, id
, links
, self
, related
and review
.
Author resource
{
"data": {
"type": "author",
"id": "1"
},
"links": {
"self": "https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/author",
"related": "https://[stg.]api.bazaarvoice.com/response/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/author"
}
}
Review resource
{
"data": {
"type": "review",
"id": "75266",
"clientName": "someClientName"
},
"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"
}
}
Updated 8 months ago