

# CancelAgreementCancellationRequest
<a name="API_marketplace-agreements_CancelAgreementCancellationRequest"></a>

Allows sellers (proposers) to withdraw an existing agreement cancellation request that is in a pending state. Once cancelled, the cancellation request transitions to `CANCELLED` status and can no longer be approved or rejected by the buyer.

**Note**  
Only cancellation requests in `PENDING_APPROVAL` status can be cancelled. A `ConflictException` is thrown if the cancellation request is in any other status.

## Request Syntax
<a name="API_marketplace-agreements_CancelAgreementCancellationRequest_RequestSyntax"></a>

```
{
   "agreementCancellationRequestId": "string",
   "agreementId": "string",
   "cancellationReason": "string"
}
```

## Request Parameters
<a name="API_marketplace-agreements_CancelAgreementCancellationRequest_RequestParameters"></a>

The request accepts the following data in JSON format.

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

 ** [agreementCancellationRequestId](#API_marketplace-agreements_CancelAgreementCancellationRequest_RequestSyntax) **   <a name="AWSMarketplaceService-marketplace-agreements_CancelAgreementCancellationRequest-request-agreementCancellationRequestId"></a>
The unique identifier of the cancellation request to cancel.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `acr-[a-zA-Z0-9]+`   
Required: Yes

 ** [agreementId](#API_marketplace-agreements_CancelAgreementCancellationRequest_RequestSyntax) **   <a name="AWSMarketplaceService-marketplace-agreements_CancelAgreementCancellationRequest-request-agreementId"></a>
The unique identifier of the agreement associated with the cancellation request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[A-Za-z0-9_/-]+`   
Required: Yes

 ** [cancellationReason](#API_marketplace-agreements_CancelAgreementCancellationRequest_RequestSyntax) **   <a name="AWSMarketplaceService-marketplace-agreements_CancelAgreementCancellationRequest-request-cancellationReason"></a>
A required message explaining why the cancellation request is being withdrawn (1-2000 characters).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 2000.  
Pattern: `.+`   
Required: Yes

## Response Syntax
<a name="API_marketplace-agreements_CancelAgreementCancellationRequest_ResponseSyntax"></a>

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

## Response Elements
<a name="API_marketplace-agreements_CancelAgreementCancellationRequest_ResponseElements"></a>

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](#API_marketplace-agreements_CancelAgreementCancellationRequest_ResponseSyntax) **   <a name="AWSMarketplaceService-marketplace-agreements_CancelAgreementCancellationRequest-response-agreementCancellationRequestId"></a>
The unique identifier of the cancelled cancellation request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `acr-[a-zA-Z0-9]+` 

 ** [agreementId](#API_marketplace-agreements_CancelAgreementCancellationRequest_ResponseSyntax) **   <a name="AWSMarketplaceService-marketplace-agreements_CancelAgreementCancellationRequest-response-agreementId"></a>
The unique identifier of the agreement associated with this cancellation request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[A-Za-z0-9_/-]+` 

 ** [createdAt](#API_marketplace-agreements_CancelAgreementCancellationRequest_ResponseSyntax) **   <a name="AWSMarketplaceService-marketplace-agreements_CancelAgreementCancellationRequest-response-createdAt"></a>
The date and time when the cancellation request was originally created, as a POSIX timestamp (Unix epoch seconds).  
Type: Timestamp

 ** [description](#API_marketplace-agreements_CancelAgreementCancellationRequest_ResponseSyntax) **   <a name="AWSMarketplaceService-marketplace-agreements_CancelAgreementCancellationRequest-response-description"></a>
The detailed description of the original cancellation reason, if provided.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 2000.  
Pattern: `.+` 

 ** [reasonCode](#API_marketplace-agreements_CancelAgreementCancellationRequest_ResponseSyntax) **   <a name="AWSMarketplaceService-marketplace-agreements_CancelAgreementCancellationRequest-response-reasonCode"></a>
The original reason code provided when the cancellation request was created.  
Type: String  
Valid Values: `INCORRECT_TERMS_ACCEPTED | REPLACING_AGREEMENT | TEST_AGREEMENT | ALTERNATIVE_PROCUREMENT_CHANNEL | PRODUCT_DISCONTINUED | UNINTENDED_RENEWAL | BUYER_DISSATISFACTION | OTHER` 

 ** [status](#API_marketplace-agreements_CancelAgreementCancellationRequest_ResponseSyntax) **   <a name="AWSMarketplaceService-marketplace-agreements_CancelAgreementCancellationRequest-response-status"></a>
The updated status of the cancellation request, which is `CANCELLED`.  
Type: String  
Valid Values: `PENDING_APPROVAL | APPROVED | REJECTED | CANCELLED | VALIDATION_FAILED` 

 ** [statusMessage](#API_marketplace-agreements_CancelAgreementCancellationRequest_ResponseSyntax) **   <a name="AWSMarketplaceService-marketplace-agreements_CancelAgreementCancellationRequest-response-statusMessage"></a>
A message providing additional context about the cancellation request status.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 2000.

 ** [updatedAt](#API_marketplace-agreements_CancelAgreementCancellationRequest_ResponseSyntax) **   <a name="AWSMarketplaceService-marketplace-agreements_CancelAgreementCancellationRequest-response-updatedAt"></a>
The date and time when the cancellation request was cancelled, as a POSIX timestamp (Unix epoch seconds).  
Type: Timestamp

## Errors
<a name="API_marketplace-agreements_CancelAgreementCancellationRequest_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** 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
<a name="API_marketplace-agreements_CancelAgreementCancellationRequest_Examples"></a>

### Sample request
<a name="API_marketplace-agreements_CancelAgreementCancellationRequest_Example_1"></a>

This example illustrates one usage of CancelAgreementCancellationRequest.

```
{
    "agreementCancellationRequestId": "acr-EXAMPLE752jqvg74yo7k",
    "agreementId": "agmt-EXAMPLE752jqvg74yo7k",
    "cancellationReason": "Requested agreement cancellation by mistake"
}
```

### Sample response
<a name="API_marketplace-agreements_CancelAgreementCancellationRequest_Example_2"></a>

This example illustrates one usage of CancelAgreementCancellationRequest.

```
{
    "agreementCancellationRequestId": "acr-EXAMPLE752jqvg74yo7k",
    "agreementId": "agmt-EXAMPLE752jqvg74yo7k",
    "reasonCode": "PRODUCT_DISCONTINUED",
    "description": "Product is being discontinued and no longer supported",
    "status": "CANCELLED",
    "statusMessage": "Cancellation requested by seller",
    "createdAt": 1736935800,
    "updatedAt": 1737022200
}
```

## See Also
<a name="API_marketplace-agreements_CancelAgreementCancellationRequest_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/marketplace-agreement-2020-03-01/CancelAgreementCancellationRequest) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/marketplace-agreement-2020-03-01/CancelAgreementCancellationRequest) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/marketplace-agreement-2020-03-01/CancelAgreementCancellationRequest) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/marketplace-agreement-2020-03-01/CancelAgreementCancellationRequest) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/marketplace-agreement-2020-03-01/CancelAgreementCancellationRequest) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/marketplace-agreement-2020-03-01/CancelAgreementCancellationRequest) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/marketplace-agreement-2020-03-01/CancelAgreementCancellationRequest) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/marketplace-agreement-2020-03-01/CancelAgreementCancellationRequest) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/marketplace-agreement-2020-03-01/CancelAgreementCancellationRequest) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/marketplace-agreement-2020-03-01/CancelAgreementCancellationRequest) 