List all customer invoices
1 min
GET
https://app.amberflo.io/payments/billing/customer-product-invoice/all
Query Parameters
- customerIdstringrequiredExampleDescription
- productIdstringExampleDescriptionDefault1
- startTimeInSecondsinteger<int64>ExampleDescription
- endTimeInSecondsinteger<int64>ExampleDescription
- fromCachebooleanDescriptionDefaulttrue
Responses
200
- payment.billing.detailed.DetailedCustomerProductInvoice.out[]Description
- invoiceUristringDescription
- uuidstringDescription
- invoiceKeypayment.billing.CustomerProductInvoiceKey.outDescription
- accountIdstringDescription
- customerIdstringDescription
- productIdstringDescription
- productPlanIdstringDescription
- yearinteger<int32>Description
- monthinteger<int32>Description
- dayinteger<int32>Description
- planBillingPeriodpayment.pricing.BillingPeriod.outDescription
- intervalpayment.pricing.BillingPeriodInterval.inDescription
- intervalsCountinteger<int32>Description
- planNamestringDescription
- invoiceStartTimeInSecondsinteger<int64>Description
- invoiceEndTimeInSecondsinteger<int64>Description
- gracePeriodInHoursinteger<int32>Description
- productItemInvoicespayment.billing.detailed.DetailedCustomerProductItemInvoice.out[]Description
- keypayment.billing.CustomerProductItemInvoiceKey.outDescription
- accountIdstringDescription
- customerIdstringDescription
- productIdstringDescription
- productPlanIdstringDescription
- yearinteger<int32>Description
- monthinteger<int32>Description
- dayinteger<int32>Description
- productItemKeystringDescription
- productItemIdstringDescription
- productItemNamestringDescription
- meterApiNamestringDescription
- productPlanNamestringDescription
- productItemInvoiceLabelstringDescription
- scalarnumberDescription
- productItemVariantspayment.billing.detailed.DetailedProductItemVariantInvoice.out[]Description
- keystringDescription
- itemDimensionsmap<string, string>Description
- dimensionLabelstringDescription
- hourlyBillInfospayment.billing.detailed.DetailedItemVariantBill.out[]Description
- startTimeInSecondsintegerDescription
- endTimeInSecondsintegerDescription
- meterUnitsnumberDescription
- pricenumberDescription
- meteredUnitsPerTiermap<string, number>Description
- pricePerTiermap<string, number>Description
- primaryMeterUnitNamestringDescription
- secondaryMeterUnitsPerTiermap<string, object>Description
- secondaryPricePerTiermap<string, object>Description
- priceInCreditsnumberDescription
- priceInBaseCurrencynumberDescription
- totalBillpayment.billing.detailed.DetailedItemVariantBill.outDescription
- startTimeInSecondsintegerDescription
- endTimeInSecondsintegerDescription
- meterUnitsnumberDescription
- pricenumberDescription
- meteredUnitsPerTiermap<string, number>Description
- pricePerTiermap<string, number>Description
- primaryMeterUnitNamestringDescription
- secondaryMeterUnitsPerTiermap<string, object>Description
- secondaryPricePerTiermap<string, object>Description
- priceInCreditsnumberDescription
- priceInBaseCurrencynumberDescription
- lateArrivalMetersnumberDescription
- totalBillpayment.billing.detailed.DetailedItemVariantBill.outDescription
- startTimeInSecondsintegerDescription
- endTimeInSecondsintegerDescription
- meterUnitsnumberDescription
- pricenumberDescription
- meteredUnitsPerTiermap<string, number>Description
- pricePerTiermap<string, number>Description
- primaryMeterUnitNamestringDescription
- secondaryMeterUnitsPerTiermap<string, object>Description
- secondaryPricePerTiermap<string, object>Description
- priceInCreditsnumberDescription
- priceInBaseCurrencynumberDescription
- appliedPromotionspayment.billing.detailed.DetailedInvoiceAppliedPromotion.out[]Description
- customerAppliedPromotionIdstringDescription
- promotionIdstringDescription
- promotionNamestringDescription
- promotionTypepayment.pricing.promotions.attributes.PromotionType.inDescription
- discountnumberDescription
- hourlyDiscountsmap<string, number>Description
- promotionAppliedTimeInSecondsinteger<int64>Description
- maxDiscountPossiblenumberDescription
- canBeUsedForPayAsYouGobooleanDescription
- granularitystringDescription
- entityTdstringDescription
- dimensionsmap<string, string>Description
- promotionAppliedTimeRangepayment.common.TimeRange.inDescription
- startTimeInSecondsinteger<int64>Description
- endTimeInSecondsinteger<int64>Description
- discountInCreditsnumberDescription
- discountInBaseCurrencynumberDescription
- maxDiscountInBaseCurrencynumberDescription
- appliedPrepaidspayment.billing.detailed.DetailedInvoiceAppliedPrepaid.out[]Description
- prepaidUristringDescription
- productPlanFeespayment.billing.detailed.DetailedProductPlanFee.out[]Description
- idstringDescription
- namestringDescription
- descriptionstringDescription
- costnumberDescription
- isOneTimeFeebooleanDescription
- isProratedbooleanDescription
- prorateToDaybooleanDescription
- discountablebooleanDescription
- prepayablebooleanDescription
- costInCreditsnumberDescription
- costInBaseCurrencynumberDescription
- appliedInvoiceBasedFeespayment.billing.detailed.DetailedInvoiceBasedAppliedFee.out[]Description
- feeIdstringDescription
- feeNamestringDescription
- feeAmountnumberDescription
- feeByTimeInSecondsmap<string, number>Description
- feeInCreditsnumberDescription
- feeInBaseCurrencynumberDescription
- appliedInvoiceSpendingLimitFeespayment.billing.detailed.DetailedInvoiceAppliedSpendingLimitFee.out[]Description
- idstringDescription
- labelstringDescription
- feeAmountnumberDescription
- feeAmountInCreditsnumberDescription
- feeAmountInBaseCurrencynumberDescription
- appliedCommitmentspayment.billing.detailed.DetailedInvoiceAppliedCommitmentFee.out[]Description
- commitmentIdstringDescription
- obligationIdstringDescription
- obligationNamestringDescription
- feeAmountnumberDescription
- feeInCreditsnumberDescription
- feeInBaseCurrencynumberDescription
- itemSubscriptionDetailspayment.billing.SubscriptionItemDetail.out[]Description
- productItemIdstringDescription
- variantSubscriptionDetailspayment.billing.SubscriptionVariantDetail.out[]Description
- groupInfopayment.meters.GroupInfo.outDescription
- gimap<string, string>Description
- hourlyUsagepayment.billing.SubscriptionUsage.out[]Description
- startTimeInSecondsinteger<int64>Description
- endTimeInSecondsinteger<int64>Description
- subscriptionUnitsnumberDescription
- overageUnitsnumberDescription
- totalBillpayment.billing.ProductPlanBill.outDescription
- startTimeInSecondsinteger<int64>Description
- endTimeInSecondsinteger<int64>Description
- totalPricenumberDescription
- itemPricenumberDescription
- fixPricenumberDescription
- invoiceBasedFeesnumberDescription
- invoiceSpendingLimitFeesnumberDescription
- commitmentsFeesnumberDescription
- prepaidnumberDescription
- totalDiscountnumberDescription
- totalPriceBeforeDiscountnumberDescription
- totalPriceBeforePrepaidnumberDescription
- totalPriceBeforeCommitmentsnumberDescription
- totalPriceBeforeSalesTaxnumberDescription
- discountableFixPricenumberDescription
- discountableBasePricenumberDescription
- prepayableFixPricenumberDescription
- prepayableNotDiscountableFeesnumberDescription
- prepayableCommitmentsFeesnumberDescription
- totalPrepayablePricenumberDescription
- invoicePriceStatuspayment.billing.InvoiceStatus.outDescription
- creditUnitpayment.pricing.CreditUnit.outDescription
- idstringDescription
- shortNamestringDescription
- namestringDescription
- ratioToCurrencynumberDescription
- descriptionstringDescription
- activebooleanDescription
- lastUpdateTimeInMillisinteger<int64>Description
- paymentStatuspayment.payment.PaymentStatus.inDescription
- paymentCreatedInSecondsinteger<int64>Description
- externalSystemStatusstringDescription
- invoiceBillInBaseCurrencypayment.billing.ProductPlanBill.outDescription
- startTimeInSecondsinteger<int64>Description
- endTimeInSecondsinteger<int64>Description
- totalPricenumberDescription
- itemPricenumberDescription
- fixPricenumberDescription
- invoiceBasedFeesnumberDescription
- invoiceSpendingLimitFeesnumberDescription
- commitmentsFeesnumberDescription
- prepaidnumberDescription
- totalDiscountnumberDescription
- totalPriceBeforeDiscountnumberDescription
- totalPriceBeforePrepaidnumberDescription
- totalPriceBeforeCommitmentsnumberDescription
- totalPriceBeforeSalesTaxnumberDescription
- discountableFixPricenumberDescription
- discountableBasePricenumberDescription
- prepayableFixPricenumberDescription
- prepayableNotDiscountableFeesnumberDescription
- prepayableCommitmentsFeesnumberDescription
- totalPrepayablePricenumberDescription
- invoiceBillInCreditspayment.billing.ProductPlanBill.outDescription
- startTimeInSecondsinteger<int64>Description
- endTimeInSecondsinteger<int64>Description
- totalPricenumberDescription
- itemPricenumberDescription
- fixPricenumberDescription
- invoiceBasedFeesnumberDescription
- invoiceSpendingLimitFeesnumberDescription
- commitmentsFeesnumberDescription
- prepaidnumberDescription
- totalDiscountnumberDescription
- totalPriceBeforeDiscountnumberDescription
- totalPriceBeforePrepaidnumberDescription
- totalPriceBeforeCommitmentsnumberDescription
- totalPriceBeforeSalesTaxnumberDescription
- discountableFixPricenumberDescription
- discountableBasePricenumberDescription
- prepayableFixPricenumberDescription
- prepayableNotDiscountableFeesnumberDescription
- prepayableCommitmentsFeesnumberDescription
- totalPrepayablePricenumberDescription
- prepaidPriceUsedBaseCurrencynumberDescription
- prepaidPriceUsednumberDescription
- availablePrepaidLeftnumberDescription
- availablePrepaidLeftBaseCurrencynumberDescription
- prepaidUsageUsednumberDescription
- availablePrepaidUsageLeftnumberDescription
- availablePrepaidLeftInCreditsnumberDescription
- invoiceSalesTaxintegration.tax.InvoiceSalesTax.outDescription
- totalTaxAmountnumberDescription
- totalTaxableAmountnumberDescription
- totalExemptAmountnumberDescription
- combinedTaxRatenumberDescription
- hasNexusbooleanDescription
- taxCodestringDescription
- availablePayAsYouGoMoneynumberDescription
- availablePayAsYouGoMoneyInBaseCurrencynumberDescription
- availablePayAsYouGoMoneyInCreditsnumberDescription
- paymentCurrencyInfopayment.billing.PaymentCurrencyInfo.outDescription
- basePlanCurrencystringExampleDescription
- paymentCurrencystringExampleDescription
- exchangeRatenumberDescription
- paymentMethodpayment.payment.PaymentMethod.outDescription
- methodTypestringDescription
- last4stringDescription
- brandstringDescription
- messagescommon.entity_message.EntityMessage.out[]Description
- levelcommon.entity_message.MessageLevel.outDescription
- codecommon.entity_message.MessageCode.outDescription
- messagestringDescription
- invoiceStartTimestringDescription
- invoiceEndTimestringDescription
- voidedbooleanDescription
400
401
403
404
500
curl
curl --request GET \
--url 'https://app.amberflo.io/payments/billing/customer-product-invoice/all?customerId=customer_123&productId=1&fromCache=true' \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://app.amberflo.io/payments/billing/customer-product-invoice/all?customerId=customer_123&productId=1&fromCache=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://app.amberflo.io/payments/billing/customer-product-invoice/all?customerId=customer_123&productId=1&fromCache=true")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://app.amberflo.io/payments/billing/customer-product-invoice/all?customerId=customer_123&productId=1&fromCache=true"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Returns array of all customer invoices with detailed usage and payment information
[
{
"invoiceUri": "",
"uuid": "",
"invoiceKey": {
"accountId": "",
"customerId": "",
"productId": "",
"productPlanId": "",
"year": "",
"month": "",
"day": ""
},
"planBillingPeriod": {
"interval": "",
"intervalsCount": ""
},
"planName": "",
"invoiceStartTimeInSeconds": "",
"invoiceEndTimeInSeconds": "",
"gracePeriodInHours": "",
"productItemInvoices": [
{
"key": {
"accountId": "",
"customerId": "",
"productId": "",
"productPlanId": "",
"year": "",
"month": "",
"day": "",
"productItemKey": ""
},
"productItemId": "",
"productItemName": "",
"meterApiName": "",
"productPlanName": "",
"productItemInvoiceLabel": "",
"scalar": 0,
"productItemVariants": [
{
"key": "",
"itemDimensions": "",
"dimensionLabel": "",
"hourlyBillInfos": [
{
"startTimeInSeconds": 0,
"endTimeInSeconds": 0,
"meterUnits": 0,
"price": 0,
"meteredUnitsPerTier": "",
"pricePerTier": "",
"primaryMeterUnitName": "",
"secondaryMeterUnitsPerTier": "",
"secondaryPricePerTier": "",
"priceInCredits": 0,
"priceInBaseCurrency": 0
}
],
"totalBill": {
"startTimeInSeconds": 0,
"endTimeInSeconds": 0,
"meterUnits": 0,
"price": 0,
"meteredUnitsPerTier": "",
"pricePerTier": "",
"primaryMeterUnitName": "",
"secondaryMeterUnitsPerTier": "",
"secondaryPricePerTier": "",
"priceInCredits": 0,
"priceInBaseCurrency": 0
},
"lateArrivalMeters": 0
}
],
"totalBill": {
"startTimeInSeconds": 0,
"endTimeInSeconds": 0,
"meterUnits": 0,
"price": 0,
"meteredUnitsPerTier": "",
"pricePerTier": "",
"primaryMeterUnitName": "",
"secondaryMeterUnitsPerTier": "",
"secondaryPricePerTier": "",
"priceInCredits": 0,
"priceInBaseCurrency": 0
}
}
],
"appliedPromotions": [
{
"customerAppliedPromotionId": "",
"promotionId": "",
"promotionName": "",
"promotionType": "",
"discount": 0,
"hourlyDiscounts": "",
"promotionAppliedTimeInSeconds": "",
"maxDiscountPossible": 0,
"canBeUsedForPayAsYouGo": false,
"granularity": "",
"entityTd": "",
"dimensions": "",
"promotionAppliedTimeRange": {
"startTimeInSeconds": "",
"endTimeInSeconds": ""
},
"discountInCredits": 0,
"discountInBaseCurrency": 0,
"maxDiscountInBaseCurrency": 0
}
],
"appliedPrepaids": [
{
"prepaidUri": ""
}
],
"productPlanFees": [
{
"id": "",
"name": "",
"description": "",
"cost": 0,
"isOneTimeFee": false,
"isProrated": false,
"prorateToDay": false,
"discountable": false,
"prepayable": false,
"costInCredits": 0,
"costInBaseCurrency": 0
}
],
"appliedInvoiceBasedFees": [
{
"feeId": "",
"feeName": "",
"feeAmount": 0,
"feeByTimeInSeconds": "",
"feeInCredits": 0,
"feeInBaseCurrency": 0
}
],
"appliedInvoiceSpendingLimitFees": [
{
"id": "",
"label": "",
"feeAmount": 0,
"feeAmountInCredits": 0,
"feeAmountInBaseCurrency": 0
}
],
"appliedCommitments": [
{
"commitmentId": "",
"obligationId": "",
"obligationName": "",
"feeAmount": 0,
"feeInCredits": 0,
"feeInBaseCurrency": 0
}
],
"itemSubscriptionDetails": [
{
"productItemId": "",
"variantSubscriptionDetails": [
{
"groupInfo": {
"gi": ""
},
"hourlyUsage": [
{
"startTimeInSeconds": "",
"endTimeInSeconds": "",
"subscriptionUnits": 0,
"overageUnits": 0
}
]
}
]
}
],
"totalBill": {
"startTimeInSeconds": "",
"endTimeInSeconds": "",
"totalPrice": 0,
"itemPrice": 0,
"fixPrice": 0,
"invoiceBasedFees": 0,
"invoiceSpendingLimitFees": 0,
"commitmentsFees": 0,
"prepaid": 0,
"totalDiscount": 0,
"totalPriceBeforeDiscount": 0,
"totalPriceBeforePrepaid": 0,
"totalPriceBeforeCommitments": 0,
"totalPriceBeforeSalesTax": 0,
"discountableFixPrice": 0,
"discountableBasePrice": 0,
"prepayableFixPrice": 0,
"prepayableNotDiscountableFees": 0,
"prepayableCommitmentsFees": 0,
"totalPrepayablePrice": 0
},
"invoicePriceStatus": "",
"creditUnit": {
"id": "",
"shortName": "",
"name": "",
"ratioToCurrency": 0,
"description": "",
"active": false,
"lastUpdateTimeInMillis": ""
},
"paymentStatus": "",
"paymentCreatedInSeconds": "",
"externalSystemStatus": "",
"invoiceBillInBaseCurrency": {
"startTimeInSeconds": "",
"endTimeInSeconds": "",
"totalPrice": 0,
"itemPrice": 0,
"fixPrice": 0,
"invoiceBasedFees": 0,
"invoiceSpendingLimitFees": 0,
"commitmentsFees": 0,
"prepaid": 0,
"totalDiscount": 0,
"totalPriceBeforeDiscount": 0,
"totalPriceBeforePrepaid": 0,
"totalPriceBeforeCommitments": 0,
"totalPriceBeforeSalesTax": 0,
"discountableFixPrice": 0,
"discountableBasePrice": 0,
"prepayableFixPrice": 0,
"prepayableNotDiscountableFees": 0,
"prepayableCommitmentsFees": 0,
"totalPrepayablePrice": 0
},
"invoiceBillInCredits": {
"startTimeInSeconds": "",
"endTimeInSeconds": "",
"totalPrice": 0,
"itemPrice": 0,
"fixPrice": 0,
"invoiceBasedFees": 0,
"invoiceSpendingLimitFees": 0,
"commitmentsFees": 0,
"prepaid": 0,
"totalDiscount": 0,
"totalPriceBeforeDiscount": 0,
"totalPriceBeforePrepaid": 0,
"totalPriceBeforeCommitments": 0,
"totalPriceBeforeSalesTax": 0,
"discountableFixPrice": 0,
"discountableBasePrice": 0,
"prepayableFixPrice": 0,
"prepayableNotDiscountableFees": 0,
"prepayableCommitmentsFees": 0,
"totalPrepayablePrice": 0
},
"prepaidPriceUsedBaseCurrency": 0,
"prepaidPriceUsed": 0,
"availablePrepaidLeft": 0,
"availablePrepaidLeftBaseCurrency": 0,
"prepaidUsageUsed": 0,
"availablePrepaidUsageLeft": 0,
"availablePrepaidLeftInCredits": 0,
"invoiceSalesTax": {
"totalTaxAmount": 0,
"totalTaxableAmount": 0,
"totalExemptAmount": 0,
"combinedTaxRate": 0,
"hasNexus": false,
"taxCode": ""
},
"availablePayAsYouGoMoney": 0,
"availablePayAsYouGoMoneyInBaseCurrency": 0,
"availablePayAsYouGoMoneyInCredits": 0,
"paymentCurrencyInfo": {
"basePlanCurrency": "USD",
"paymentCurrency": "USD",
"exchangeRate": 0
},
"paymentMethod": {
"methodType": "",
"last4": "",
"brand": ""
},
"messages": [
{
"level": "",
"code": "",
"message": ""
}
],
"invoiceStartTime": "",
"invoiceEndTime": "",
"voided": false
}
]400
// Invalid customer ID or query parameters provided
401
// Authentication required or invalid API key provided
403
// Insufficient permissions to access customer invoice data
404
// Customer not found or no invoices available
500
// Internal server error occurred while retrieving invoice data