AgreementService / Client / batch_create_billing_adjustment_request

batch_create_billing_adjustment_request

AgreementService.Client.batch_create_billing_adjustment_request(**kwargs)

Allows sellers (proposers) to submit billing adjustment requests for one or more invoices within an agreement. Each entry in the batch specifies an invoice and the adjustment amount. The operation returns successfully created adjustment request IDs and any errors for entries that failed validation.

Note

Each entry requires a unique clientToken for idempotency. A ValidationException is returned if the adjustment amount exceeds the maximum refundable amount for the invoice.

See also: AWS API Documentation

Request Syntax

response = client.batch_create_billing_adjustment_request(
    billingAdjustmentRequestEntries=[
        {
            'agreementId': 'string',
            'originalInvoiceId': 'string',
            'adjustmentAmount': 'string',
            'currencyCode': 'string',
            'adjustmentReasonCode': 'INCORRECT_TERMS_ACCEPTED'|'INCORRECT_METERING'|'TEST_ENVIRONMENT_CHARGES'|'ALTERNATIVE_PROCUREMENT_CHANNEL'|'UNINTENDED_RENEWAL'|'BUYER_DISSATISFACTION'|'OTHER',
            'description': 'string',
            'clientToken': 'string'
        },
    ]
)
Parameters:

billingAdjustmentRequestEntries (list) –

[REQUIRED]

A list of billing adjustment request entries. Each entry specifies the invoice and adjustment details.

  • (dict) –

    An individual entry in a batch billing adjustment request, specifying the invoice and adjustment details.

    • agreementId (string) – [REQUIRED]

      The unique identifier of the agreement associated with the invoice.

    • originalInvoiceId (string) – [REQUIRED]

      The identifier of the original invoice to adjust.

    • adjustmentAmount (string) – [REQUIRED]

      The adjustment amount as a string representation of a decimal number in the currency of the invoice.

    • currencyCode (string) – [REQUIRED]

      The 3-letter ISO 4217 currency code for the adjustment amount (e.g., USD).

    • adjustmentReasonCode (string) – [REQUIRED]

      The reason code for the billing adjustment. Valid values include INCORRECT_TERMS_ACCEPTED, INCORRECT_METERING, TEST_ENVIRONMENT_CHARGES, ALTERNATIVE_PROCUREMENT_CHANNEL, UNINTENDED_RENEWAL, BUYER_DISSATISFACTION, and OTHER.

    • description (string) –

      An optional detailed description of the adjustment reason.

    • clientToken (string) – [REQUIRED]

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

Return type:

dict

Returns:

Response Syntax

{
    'items': [
        {
            'billingAdjustmentRequestId': 'string',
            'clientToken': 'string'
        },
    ],
    'errors': [
        {
            'code': 'CONFLICT_EXCEPTION'|'VALIDATION_EXCEPTION'|'RESOURCE_NOT_FOUND_EXCEPTION'|'INTERNAL_FAILURE',
            'message': 'string',
            'clientToken': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • items (list) –

      A list of successfully created billing adjustment items, each containing the billingAdjustmentRequestId and clientToken.

      • (dict) –

        A successfully created billing adjustment request item.

        • billingAdjustmentRequestId (string) –

          The unique identifier of the created billing adjustment request.

        • clientToken (string) –

          The client token provided in the corresponding request entry.

    • errors (list) –

      A list of errors for entries that failed validation, each containing the clientToken, error code, and message.

      • (dict) –

        An error for a billing adjustment request entry that failed validation.

        • code (string) –

          The error code indicating the reason for failure.

        • message (string) –

          A human-readable message describing the error.

        • clientToken (string) –

          The client token of the request entry that failed.

Exceptions

  • AgreementService.Client.exceptions.ValidationException

  • AgreementService.Client.exceptions.AccessDeniedException

  • AgreementService.Client.exceptions.ThrottlingException

  • AgreementService.Client.exceptions.InternalServerException

  • AgreementService.Client.exceptions.ConflictException