ListAgreementInvoiceLineItems
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.
Request Syntax
{
"afterIssuedTime": number,
"agreementId": "string",
"beforeIssuedTime": number,
"groupBy": "string",
"invoiceBillingPeriod": {
"month": number,
"year": number
},
"invoiceId": "string",
"invoiceType": "string",
"maxResults": number,
"nextToken": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common 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.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[A-Za-z0-9_/-]+Required: Yes
- groupBy
-
Specifies a grouping strategy for line items. Currently supports
INVOICE_ID.Type: String
Valid Values:
INVOICE_IDRequired: Yes
- afterIssuedTime
-
An optional filter for invoices issued after the specified timestamp.
Type: Timestamp
Required: No
- beforeIssuedTime
-
An optional filter for invoices issued before the specified timestamp.
Type: Timestamp
Required: No
- invoiceBillingPeriod
-
An optional filter for the billing period associated with the invoice.
Type: InvoiceBillingPeriod object
Required: No
- invoiceId
-
An optional filter to retrieve invoice information for a specific invoice.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[A-Za-z0-9_/-]+Required: No
- invoiceType
-
An optional filter for the type of invoice. Valid values are
INVOICEandCREDIT_MEMO.Type: String
Valid Values:
INVOICE | CREDIT_MEMORequired: No
- maxResults
-
The maximum number of results to return in the response.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 50.
Required: No
- nextToken
-
A token to specify where to start pagination.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 8192.
Pattern:
[a-zA-Z0-9+/=_-]+Required: No
Response Syntax
{
"agreementInvoiceLineItemGroupSummaries": [
{
"agreementId": "string",
"invoiceBillingPeriod": {
"month": number,
"year": number
},
"invoiceId": "string",
"invoiceType": "string",
"invoicingEntity": {
"branchName": "string",
"legalName": "string"
},
"issuedTime": number,
"pricingCurrencyAmount": {
"amount": "string",
"currencyCode": "string",
"maxAdjustmentAmount": "string"
}
}
],
"nextToken": "string"
}
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.
- agreementInvoiceLineItemGroupSummaries
-
A list of grouped billing data objects.
Type: Array of AgreementInvoiceLineItemGroupSummary objects
- nextToken
-
The token used for pagination. The field is
nullif there are no more results.Type: String
Length Constraints: Minimum length of 0. Maximum length of 8192.
Pattern:
[a-zA-Z0-9+/=_-]+
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.
- message
-
Description of the error.
- reason
-
The reason for the access denied exception.
- requestId
-
The unique identifier for the error.
HTTP Status Code: 400
- InternalServerException
-
Unexpected error during processing of request.
- message
-
Description of the error.
- requestId
-
The unique identifier for the error.
HTTP Status Code: 500
- ResourceNotFoundException
-
Request references a resource which does not exist.
- message
-
Description of the error.
- 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.
- message
-
Description of the error.
- 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.
- message
-
Description of 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 ListAgreementInvoiceLineItems.
{ "agreementId": "agmt-EXAMPLESvIzsqYMyQwI3", "groupBy": "INVOICE_ID" }
Sample response
This example illustrates one usage of ListAgreementInvoiceLineItems.
{ "agreementInvoiceLineItemGroupSummaries": [ { "agreementId": "agmt-EXAMPLESvIzsqYMyQwI3", "invoiceId": "E2E20250105a108cfae", "pricingCurrencyAmount": { "amount": "1080.00", "maxAdjustmentAmount": "1000.00", "currencyCode": "USD" }, "invoiceBillingPeriod": { "month": 1, "year": 2025 }, "issuedTime": 1736103549, "invoiceType": "INVOICE", "invoicingEntity": { "legalName": "Amazon Web Services, Inc." } } ], "nextToken": null }
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: