The Bazaarvoice Response API lets you programmatically manage review responses. To learn more, go to the Response API documentation home page.

Contents

(+ show- hide)

This page describes how to:

  • Get a specific client review response
  • Get all client responses for a given review

Get a specific client review response

The request is scoped to a specific resource by using that resource's GUID.

Request

HTTP GET is required.
https://[stg.]api.bazaarvoice.com/contentmanagement/v1/clientResponses/{responseGuid}?passkey={RESPONSE_API_PASSKEY} HTTP/1.1

Authorization: Bearer {ACCESS_TOKEN}
…

Ellipses (…) in above example indicate that your app may generate other headers.

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 Overview.

Body

The response will contain a JSON object in the body. The following demonstrates a typical successful GET of a client response record:

{
    "data": [
        {
            "type": "clientResponse",
            "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
            "attributes": {
                "department": "Some department name",
                "response": "This is a sample client response.",
                "responseBy": "Name of owner of OAuth Application",
                "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/contentmanagement/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/relationships/author",
                        "related": "https://[stg.]api.bazaarvoice.com/contentmanagement/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/author"
                    }
                },
                "review": {
                    "data": {
                        "type": "review",
                        "id": "75266",
                        "clientName": "{}"
                    },
                    "links": {
                        "self": "https://[stg.]api.bazaarvoice.com/contentmanagement/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/relationships/review",
                        "related": "https://[stg.]api.bazaarvoice.com/contentmanagement/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/review"
                    }
                }
            },
            "links": {
                "self": "https://[stg.]api.bazaarvoice.com/contentmanagement/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
            }
        }
    ],
    "links": {
        "self": "https://[stg.]api.bazaarvoice.com/contentmanagement/v1/contentmanagement/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 Overview.

Both the responseBy and the responseSource values in the response are 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

Please see Troubleshooting for a detailed description and solution for Response API errors.

Get all client review responses for a given review

The request is scoped to a specific review resource by using the reviewId.

HTTP GET is required.
GET https://[stg.]api.bazaarvoice.com/contentmanagement/v1/clientResponses/{client}/reviews/{reviewId}?passkey={RESPONSE_API_PASSKEY} HTTP/1.1

Authorization: Bearer {ACCESS_TOKEN}
…

Ellipses (…) in above example indicate that your app may generate other headers.

Request

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 Overview.

Body

The response will contain a JSON object in the body. The following demonstrates a typical successful GET of a client response record:

{
    "data": [
        {
            "type": "clientResponse",
            "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
            "attributes": {
                "department": "Some department name",
                "response": "This is a sample client response.",
                "responseBy": "Name of owner of OAuth Application",
                "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/contentmanagement/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/relationships/author",
                        "related": "https://[stg.]api.bazaarvoice.com/contentmanagement/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/author"
                    }
                },
                "review": {
                    "data": {
                        "type": "review",
                        "id": "75266",
                        "clientName": "{client}"
                    },
                    "links": {
                        "self": "https://[stg.]api.bazaarvoice.com/contentmanagement/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/relationships/review",
                        "related": "https://[stg.]api.bazaarvoice.com/contentmanagement/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/review"
                    }
                }
            },
            "links": {
                "self": "https://[stg.]api.bazaarvoice.com/contentmanagement/v1/clientResponses/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
            }
        },
        {
        .....
        },
        {
        .....
        },
        {
        .....
        }
    ]
}

The definition of the key/values returned in the response body are documented in the Overview.

Errors

Please see Troubleshooting for a detailed description and solution for Response API errors.

Bad API Passkey

<h1>Developer Inactive</h1>

Bad Bearer Token

{
    "httpCode": 403,
    "requestURI": "/contentmanagement/v1/clientResponses/{client}/reviews/{reviewId}",
    "errors": [
        {
            "code": "OAUTH2_INVALID_ACCESS_TOKEN",
            "field": "Authorization",
            "message": "Invalid access token"
        }
    ]
}

Bad client name

{
    "httpCode": 500,
    "requestURI": "/contentmanagement/v1/clientResponses/{client}/reviews/{reviewId}",
    "errors": [
        {
            "code": "INTERNAL_SERVER_ERROR",
            "field": "",
            "message": "Could not retrieve review for {client}:{reviewId}"
        }
    ]
}