Invalidate Transaction

It submits a request to invalidate the transaction.

📘

Try out Invalidate Transaction API reference here.

Request

This API will be used to update the transaction data to Bazaarvoice. Users of the API are allowed to modify specific fields of the transaction for a given transaction-id. Users can invalidate a transaction using status as CANCELED due to order cancellation, returned, product OOS etc.

📘

HTTP POST is required.

PATCH https://[stg].api.bazaarvoice.com/customer-transactions/transactions/<id> HTTP/1.1

Content-Type: application/json
Authorization: Bearer {ACCESS_TOKEN}

...

{
  "clientName": "test-client"
}

Ellipses (…) in above example indicate that your application 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 the contentmanagement URL until further notice.

Parameters

NameDescriptionRequired
Header
Content-Typeapplication/json.Yes
AuthorizationThe Authorization value will consist of the string Bearer followed by the OAuth2 access token. Refer to OAuth2 Integration for more information.Yes
Body
clientNameUnique identifier of the client.Yes

Response

Header

HTTP status 200 indicates success.

Body

Below is an example of a successful creation of a transaction request:

{
    "transactionId": "transaction-id",
    "transactionStatus": "ACCEPTED"
}

Errors

For a detailed description and solution to Response API errors, refer to Troubleshooting.

The following lists specific errors that may be encountered when creating a new client response request:

clientId must not be empty

The required parameter clientId is not included in the request.

{
  "type": "/problems/bad-request",
  "instance": "/customer-transactions/transactions",
  "title": "Bad Request",
  "status": 400,
  "detail": "The required fields are missing. Ensure the Request Body has all required fields and try again."
}
Valid AccessToken must be provided.

The required parameter AccessToken is not included in the request or expired:

{
  "type": "/problems/unauthorized",
  "instance": "/customer-transactions/transactions",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Request lacks valid authentication credentials for this resource."
}
Provided client details in the header must be correct.

The client details are invalid:

{
  "type": "/problems/forbidden",
  "instance": "/customer-transactions/transactions",
  "title": "Forbidden",
  "status": 403,
  "detail": "Credentials lack the permission to perform this action with this resource."
}
Something unexpected occurs.

Unexpected network issue occurs:

{
  "type": "/problems/internal-error",
  "instance": "/customer-transactions/transactions",
  "title": "Internal Error",
  "status": 500,
  "detail": "An unexpected error has occurred, please retry. Contact Bazaarvoice if the problem persists."
}