AgreementService / Client / list_agreement_invoice_line_items

list_agreement_invoice_line_items

AgreementService.Client.list_agreement_invoice_line_items(**kwargs)

Allows sellers (proposers) to retrieve aggregated billing data from AWS Marketplace agreements using flexible grouping. Supports invoice-level aggregation with filtering by billing period, invoice type, and issued date.

Note

The groupBy parameter is required and supports only INVOICE_ID as a value. The agreementId parameter is required.

See also: AWS API Documentation

Request Syntax

response = client.list_agreement_invoice_line_items(
    agreementId='string',
    groupBy='INVOICE_ID',
    invoiceId='string',
    invoiceType='INVOICE'|'CREDIT_MEMO',
    invoiceBillingPeriod={
        'month': 123,
        'year': 123
    },
    beforeIssuedTime=datetime(2015, 1, 1),
    afterIssuedTime=datetime(2015, 1, 1),
    maxResults=123,
    nextToken='string'
)
Parameters:
  • agreementId (string) –

    [REQUIRED]

    The unique identifier of the agreement.

  • groupBy (string) –

    [REQUIRED]

    Specifies a grouping strategy for line items. Currently supports INVOICE_ID.

  • invoiceId (string) – An optional filter to retrieve invoice information for a specific invoice.

  • invoiceType (string) – An optional filter for the type of invoice. Valid values are INVOICE and CREDIT_MEMO.

  • invoiceBillingPeriod (dict) –

    An optional filter for the billing period associated with the invoice.

    • month (integer) – [REQUIRED]

      The billing period month. Valid range: 1-12.

    • year (integer) – [REQUIRED]

      The billing period year.

  • beforeIssuedTime (datetime) – An optional filter for invoices issued before the specified timestamp.

  • afterIssuedTime (datetime) – An optional filter for invoices issued after the specified timestamp.

  • maxResults (integer) – The maximum number of results to return in the response.

  • nextToken (string) – A token to specify where to start pagination.

Return type:

dict

Returns:

Response Syntax

{
    'agreementInvoiceLineItemGroupSummaries': [
        {
            'agreementId': 'string',
            'invoiceId': 'string',
            'pricingCurrencyAmount': {
                'amount': 'string',
                'maxAdjustmentAmount': 'string',
                'currencyCode': 'string'
            },
            'invoiceBillingPeriod': {
                'month': 123,
                'year': 123
            },
            'issuedTime': datetime(2015, 1, 1),
            'invoiceType': 'INVOICE'|'CREDIT_MEMO',
            'invoicingEntity': {
                'legalName': 'string',
                'branchName': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • agreementInvoiceLineItemGroupSummaries (list) –

      A list of grouped billing data objects.

      • (dict) –

        A summary of grouped billing data for an agreement invoice line item.

        • agreementId (string) –

          The unique identifier of the agreement.

        • invoiceId (string) –

          The identifier of the invoice for this group.

        • pricingCurrencyAmount (dict) –

          Monetary amounts for this invoice group.

          • amount (string) –

            The monetary amount before tax.

          • maxAdjustmentAmount (string) –

            The maximum refundable amount as a string representation of a decimal number.

          • currencyCode (string) –

            The 3-letter ISO 4217 currency code (e.g., USD, EUR, JPY).

        • invoiceBillingPeriod (dict) –

          The billing period associated with this group.

          • month (integer) –

            The billing period month. Valid range: 1-12.

          • year (integer) –

            The billing period year.

        • issuedTime (datetime) –

          The timestamp when the invoice containing this group was created.

        • invoiceType (string) –

          The type of invoice. Valid values are INVOICE and CREDIT_MEMO.

        • invoicingEntity (dict) –

          The entity that issues the invoice.

          • legalName (string) –

            Legal name of the entity issuing the invoice.

          • branchName (string) –

            The branch where the issuing entity is operating from.

    • nextToken (string) –

      The token used for pagination. The field is null if there are no more results.

Exceptions

  • AgreementService.Client.exceptions.ValidationException

  • AgreementService.Client.exceptions.AccessDeniedException

  • AgreementService.Client.exceptions.ThrottlingException

  • AgreementService.Client.exceptions.ResourceNotFoundException

  • AgreementService.Client.exceptions.InternalServerException