SendAgreementCancellationRequest - AWS Marketplace

SendAgreementCancellationRequest

Allows sellers (proposers) to submit a cancellation request for an active agreement. The cancellation request is created in PENDING_APPROVAL status, at which point the buyer can review it.

Request Syntax

{ "agreementId": "string", "clientToken": "string", "description": "string", "reasonCode": "string" }

Request Parameters

The request accepts the following data in JSON format.

Note

In the following list, the required parameters are described first.

agreementId

The unique identifier of the agreement for which the cancellation request is being submitted.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [A-Za-z0-9_/-]+

Required: Yes

reasonCode

The reason code for the cancellation request.

Type: String

Valid Values: INCORRECT_TERMS_ACCEPTED | REPLACING_AGREEMENT | TEST_AGREEMENT | ALTERNATIVE_PROCUREMENT_CHANNEL | PRODUCT_DISCONTINUED | UNINTENDED_RENEWAL | BUYER_DISSATISFACTION | OTHER

Required: Yes

clientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9-]+

Required: No

description

An optional detailed description of the cancellation reason (1-2000 characters).

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2000.

Pattern: .+

Required: No

Response Syntax

{ "agreementCancellationRequestId": "string", "agreementId": "string", "createdAt": number, "description": "string", "reasonCode": "string", "status": "string", "updatedAt": number }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

agreementCancellationRequestId

The unique identifier for the created cancellation request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: acr-[a-zA-Z0-9]+

agreementId

The unique identifier of the agreement.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [A-Za-z0-9_/-]+

createdAt

The time when the cancellation request was created, as a POSIX timestamp (Unix epoch seconds).

Type: Timestamp

description

The detailed description of the cancellation reason, if provided.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2000.

Pattern: .+

reasonCode

The reason code provided for the cancellation.

Type: String

Valid Values: INCORRECT_TERMS_ACCEPTED | REPLACING_AGREEMENT | TEST_AGREEMENT | ALTERNATIVE_PROCUREMENT_CHANNEL | PRODUCT_DISCONTINUED | UNINTENDED_RENEWAL | BUYER_DISSATISFACTION | OTHER

status

The current status of the cancellation request. The initial status is PENDING_APPROVAL.

Type: String

Valid Values: PENDING_APPROVAL | APPROVED | REJECTED | CANCELLED | VALIDATION_FAILED

updatedAt

The time when the cancellation request was last updated, as a POSIX timestamp (Unix epoch seconds).

Type: Timestamp

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

User does not have sufficient access to perform this action.

requestId

The unique identifier for the error.

HTTP Status Code: 400

ConflictException

The request could not be completed due to a conflict with the current state of the resource.

requestId

The unique identifier for the error.

resourceId

The unique identifier for the resource.

resourceType

The type of resource.

HTTP Status Code: 400

InternalServerException

Unexpected error during processing of request.

requestId

The unique identifier for the error.

HTTP Status Code: 500

ResourceNotFoundException

Request references a resource which does not exist.

requestId

The unique identifier for the error.

resourceId

The unique identifier for the resource.

resourceType

The type of resource.

HTTP Status Code: 400

ThrottlingException

Request was denied due to request throttling.

requestId

The unique identifier for the error.

HTTP Status Code: 400

ValidationException

The input fails to satisfy the constraints specified by the service.

fields

The fields associated with the error.

reason

The reason associated with the error.

requestId

The unique identifier associated with the error.

HTTP Status Code: 400

Examples

Sample request

This example illustrates one usage of SendAgreementCancellationRequest.

{ "agreementId": "agmt-EXAMPLE752jqvg74yo7k", "reasonCode": "OTHER", "description": "Due to budget constraints, we are unable to continue with our current subscription", "clientToken": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }

Sample response

This example illustrates one usage of SendAgreementCancellationRequest.

{ "agreementId": "agmt-EXAMPLE752jqvg74yo7k", "agreementCancellationRequestId": "acr-EXAMPLE752jqvg74yo7k", "status": "PENDING_APPROVAL", "reasonCode": "OTHER", "description": "Due to budget constraints, we are unable to continue with our current subscription", "createdAt": 1736935800, "updatedAt": 1736935800 }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: