From 6ca692465bef55fc904e63561f2ef0b852cc1c46 Mon Sep 17 00:00:00 2001 From: groyoh <7434196+groyoh@users.noreply.github.com> Date: Thu, 5 Nov 2026 16:03:48 +0000 Subject: [PATCH 1/3] chore(spec): synchronize Lago OpenAPI --- docs/reference/lago_activity-logs_list.md | 20 +- docs/reference/lago_add-ons_create.md | 6 +- docs/reference/lago_add-ons_delete.md | 2 +- docs/reference/lago_add-ons_list.md | 4 +- docs/reference/lago_add-ons_update.md | 6 +- .../reference/lago_analytics_gross-revenue.md | 5 +- .../lago_analytics_invoice-collection.md | 14 +- .../lago_analytics_invoiced-usage.md | 13 +- docs/reference/lago_analytics_mrr.md | 25 +- .../lago_analytics_overdue-balance.md | 7 +- docs/reference/lago_analytics_usage.md | 7 +- docs/reference/lago_api-logs.md | 4 +- docs/reference/lago_api-logs_get.md | 4 +- docs/reference/lago_api-logs_list.md | 21 +- .../reference/lago_billable-metrics_create.md | 18 +- ...go_billable-metrics_evaluate-expression.md | 9 +- docs/reference/lago_billable-metrics_list.md | 4 +- .../reference/lago_billable-metrics_update.md | 20 +- .../reference/lago_billing-entities_create.md | 20 +- .../reference/lago_billing-entities_update.md | 22 +- docs/reference/lago_coupons_apply.md | 12 +- docs/reference/lago_coupons_create.md | 6 +- .../lago_coupons_list-applied-coupons.md | 4 +- docs/reference/lago_coupons_list.md | 4 +- docs/reference/lago_coupons_update.md | 8 +- docs/reference/lago_credit-notes_create.md | 2 + docs/reference/lago_credit-notes_download.md | 3 +- docs/reference/lago_credit-notes_estimate.md | 2 + docs/reference/lago_credit-notes_list.md | 6 +- .../lago_customers_applied-coupons.md | 4 +- docs/reference/lago_customers_create.md | 46 +- docs/reference/lago_customers_credit-notes.md | 13 +- .../reference/lago_customers_current-usage.md | 2 +- docs/reference/lago_customers_export.md | 4 +- docs/reference/lago_customers_invoices.md | 14 +- docs/reference/lago_customers_list.md | 4 +- docs/reference/lago_customers_past-usage.md | 6 +- .../lago_customers_payment-requests.md | 5 +- docs/reference/lago_customers_payments.md | 4 +- docs/reference/lago_customers_portal-url.md | 4 +- .../lago_customers_projected-usage.md | 5 + .../reference/lago_customers_subscriptions.md | 9 +- docs/reference/lago_entitlements_create.md | 2 +- ...troy-subscription-entitlement-privilege.md | 4 +- ...ements_destroy-subscription-entitlement.md | 4 +- ...tlements_list-subscription-entitlements.md | 2 +- ...ements_update-subscription-entitlements.md | 4 +- docs/reference/lago_entitlements_update.md | 2 +- docs/reference/lago_events.md | 2 +- docs/reference/lago_events_estimate-fees.md | 11 +- docs/reference/lago_events_get.md | 2 +- docs/reference/lago_events_list.md | 8 +- docs/reference/lago_events_send.md | 6 +- docs/reference/lago_features.md | 2 +- docs/reference/lago_features_create.md | 8 +- .../lago_features_delete-feature-privilege.md | 4 +- docs/reference/lago_features_list.md | 6 +- docs/reference/lago_features_update.md | 8 +- docs/reference/lago_fees_list.md | 6 +- docs/reference/lago_fees_update.md | 2 +- docs/reference/lago_invoices_create.md | 2 +- docs/reference/lago_invoices_download.md | 3 +- docs/reference/lago_invoices_list.md | 8 +- docs/reference/lago_invoices_preview.md | 15 +- docs/reference/lago_order-forms_list.md | 4 +- docs/reference/lago_orders_list.md | 4 +- docs/reference/lago_organizations_update.md | 18 +- ...-methods_list-customers-payment-methods.md | 6 +- ...t-methods_payment-method-set-as-default.md | 2 +- docs/reference/lago_payment-receipts_list.md | 6 +- .../reference/lago_payment-requests_create.md | 8 +- docs/reference/lago_payment-requests_list.md | 4 +- docs/reference/lago_payments_create.md | 8 +- docs/reference/lago_payments_list.md | 4 +- docs/reference/lago_plans_charges.md | 4 +- .../lago_plans_create-plan-charge-filter.md | 2 +- docs/reference/lago_plans_create.md | 2 +- docs/reference/lago_plans_filters.md | 4 +- docs/reference/lago_plans_fixed-charges.md | 4 +- docs/reference/lago_plans_list.md | 4 +- .../lago_plans_update-plan-charge-filter.md | 2 +- .../lago_plans_update-plan-charge.md | 4 + .../lago_plans_update-plan-fixed-charge.md | 4 + docs/reference/lago_plans_update.md | 2 +- docs/reference/lago_quotes_list.md | 4 +- docs/reference/lago_quotes_versions.md | 4 +- docs/reference/lago_subscriptions_alerts.md | 6 +- docs/reference/lago_subscriptions_charges.md | 6 +- ...subscriptions_create-subscription-alert.md | 2 +- ...tions_create-subscription-charge-filter.md | 4 +- docs/reference/lago_subscriptions_create.md | 3 +- ...riptions_delete-all-subscription-alerts.md | 2 +- ...subscriptions_delete-subscription-alert.md | 2 +- ...ions_destroy-subscription-charge-filter.md | 2 +- docs/reference/lago_subscriptions_filters.md | 6 +- .../lago_subscriptions_fixed-charges.md | 6 +- ...go_subscriptions_get-subscription-alert.md | 2 +- ...riptions_get-subscription-charge-filter.md | 2 +- ...o_subscriptions_get-subscription-charge.md | 2 +- ...criptions_get-subscription-fixed-charge.md | 2 +- docs/reference/lago_subscriptions_get.md | 4 +- docs/reference/lago_subscriptions_list.md | 8 +- ...scriptions_override-subscription-charge.md | 2 +- ...ions_override-subscription-fixed-charge.md | 2 +- .../reference/lago_subscriptions_terminate.md | 3 +- ...subscriptions_update-subscription-alert.md | 6 +- ...tions_update-subscription-charge-filter.md | 4 +- docs/reference/lago_subscriptions_update.md | 17 +- docs/reference/lago_taxes.md | 2 +- docs/reference/lago_taxes_create.md | 8 +- docs/reference/lago_taxes_get.md | 4 +- docs/reference/lago_taxes_list.md | 6 +- docs/reference/lago_taxes_update.md | 8 +- .../lago_wallets_create-customer-wallet.md | 11 +- .../lago_wallets_create-wallet-transaction.md | 2 + docs/reference/lago_wallets_create.md | 11 +- ...lago_wallets_get-customer-wallet-alerts.md | 4 + .../lago_wallets_get-wallet-transaction.md | 2 +- .../lago_wallets_list-customer-wallets.md | 7 +- ...ts_list-wallet-transaction-consumptions.md | 4 +- ...allets_list-wallet-transaction-fundings.md | 4 +- docs/reference/lago_wallets_list.md | 4 +- ...go_wallets_update-customer-wallet-alert.md | 4 +- .../lago_wallets_update-customer-wallet.md | 6 +- docs/reference/lago_wallets_update.md | 6 +- .../lago_wallets_wallet-transactions.md | 7 +- docs/reference/lago_webhook-endpoints.md | 2 +- .../lago_webhook-endpoints_create.md | 12 +- docs/reference/lago_webhook-endpoints_list.md | 4 +- .../lago_webhook-endpoints_update.md | 8 +- .../lago_webhooks_json-public-key.md | 2 +- docs/reference/lago_webhooks_public-key.md | 2 +- internal/generated/spec_gen.go | 6 +- man/lago-activity-logs-list.1 | 20 +- man/lago-add-ons-create.1 | 6 +- man/lago-add-ons-delete.1 | 2 +- man/lago-add-ons-list.1 | 4 +- man/lago-add-ons-update.1 | 6 +- man/lago-analytics-gross-revenue.1 | 8 +- man/lago-analytics-invoice-collection.1 | 9 +- man/lago-analytics-invoiced-usage.1 | 8 +- man/lago-analytics-mrr.1 | 26 +- man/lago-analytics-overdue-balance.1 | 10 +- man/lago-analytics-usage.1 | 7 +- man/lago-api-logs-get.1 | 4 +- man/lago-api-logs-list.1 | 24 +- man/lago-billable-metrics-create.1 | 19 +- ...ago-billable-metrics-evaluate-expression.1 | 9 +- man/lago-billable-metrics-list.1 | 4 +- man/lago-billable-metrics-update.1 | 22 +- man/lago-billing-entities-create.1 | 20 +- man/lago-billing-entities-update.1 | 22 +- man/lago-coupons-apply.1 | 13 +- man/lago-coupons-create.1 | 6 +- man/lago-coupons-list-applied-coupons.1 | 4 +- man/lago-coupons-list.1 | 4 +- man/lago-coupons-update.1 | 9 +- man/lago-credit-notes-create.1 | 2 + man/lago-credit-notes-download.1 | 3 +- man/lago-credit-notes-estimate.1 | 2 + man/lago-credit-notes-list.1 | 6 +- man/lago-customers-applied-coupons.1 | 4 +- man/lago-customers-create.1 | 46 +- man/lago-customers-credit-notes.1 | 22 +- man/lago-customers-current-usage.1 | 2 +- man/lago-customers-export.1 | 4 +- man/lago-customers-invoices.1 | 32 +- man/lago-customers-list.1 | 4 +- man/lago-customers-past-usage.1 | 6 +- man/lago-customers-payment-requests.1 | 8 +- man/lago-customers-payments.1 | 4 +- man/lago-customers-portal-url.1 | 5 +- man/lago-customers-projected-usage.1 | 20 + man/lago-customers-subscriptions.1 | 18 +- man/lago-entitlements-create.1 | 2 +- ...stroy-subscription-entitlement-privilege.1 | 4 +- ...lements-destroy-subscription-entitlement.1 | 4 +- ...itlements-list-subscription-entitlements.1 | 2 +- ...lements-update-subscription-entitlements.1 | 4 +- man/lago-entitlements-update.1 | 2 +- man/lago-events-estimate-fees.1 | 4 + man/lago-events-get.1 | 2 +- man/lago-events-list.1 | 8 +- man/lago-events-send.1 | 6 +- man/lago-features-create.1 | 8 +- man/lago-features-delete-feature-privilege.1 | 4 +- man/lago-features-list.1 | 6 +- man/lago-features-update.1 | 8 +- man/lago-fees-list.1 | 6 +- man/lago-fees-update.1 | 2 +- man/lago-invoices-create.1 | 2 +- man/lago-invoices-download.1 | 3 +- man/lago-invoices-list.1 | 14 +- man/lago-invoices-preview.1 | 18 +- man/lago-order-forms-list.1 | 4 +- man/lago-orders-list.1 | 4 +- man/lago-organizations-update.1 | 18 +- ...t-methods-list-customers-payment-methods.1 | 6 +- ...nt-methods-payment-method-set-as-default.1 | 2 +- man/lago-payment-receipts-list.1 | 6 +- man/lago-payment-requests-create.1 | 8 +- man/lago-payment-requests-list.1 | 4 +- man/lago-payments-create.1 | 8 +- man/lago-payments-list.1 | 4 +- man/lago-plans-charges.1 | 4 +- man/lago-plans-create-plan-charge-filter.1 | 2 +- man/lago-plans-create.1 | 2 +- man/lago-plans-filters.1 | 4 +- man/lago-plans-fixed-charges.1 | 4 +- man/lago-plans-list.1 | 4 +- man/lago-plans-update-plan-charge-filter.1 | 2 +- man/lago-plans-update-plan-charge.1 | 6 + man/lago-plans-update-plan-fixed-charge.1 | 6 + man/lago-plans-update.1 | 2 +- man/lago-quotes-list.1 | 4 +- man/lago-quotes-versions.1 | 4 +- man/lago-subscriptions-alerts.1 | 18 +- man/lago-subscriptions-charges.1 | 6 +- ...-subscriptions-create-subscription-alert.1 | 2 +- ...ptions-create-subscription-charge-filter.1 | 4 +- man/lago-subscriptions-create.1 | 6 +- ...criptions-delete-all-subscription-alerts.1 | 2 +- ...-subscriptions-delete-subscription-alert.1 | 2 +- ...tions-destroy-subscription-charge-filter.1 | 2 +- man/lago-subscriptions-filters.1 | 6 +- man/lago-subscriptions-fixed-charges.1 | 6 +- ...ago-subscriptions-get-subscription-alert.1 | 2 +- ...criptions-get-subscription-charge-filter.1 | 2 +- ...go-subscriptions-get-subscription-charge.1 | 2 +- ...scriptions-get-subscription-fixed-charge.1 | 2 +- man/lago-subscriptions-get.1 | 4 +- man/lago-subscriptions-list.1 | 8 +- ...bscriptions-override-subscription-charge.1 | 2 +- ...tions-override-subscription-fixed-charge.1 | 2 +- man/lago-subscriptions-terminate.1 | 4 +- ...-subscriptions-update-subscription-alert.1 | 6 +- ...ptions-update-subscription-charge-filter.1 | 4 +- man/lago-subscriptions-update.1 | 31 +- man/lago-taxes-create.1 | 8 +- man/lago-taxes-get.1 | 4 +- man/lago-taxes-list.1 | 6 +- man/lago-taxes-update.1 | 8 +- man/lago-wallets-create-customer-wallet.1 | 14 +- man/lago-wallets-create-wallet-transaction.1 | 8 + man/lago-wallets-create.1 | 14 +- man/lago-wallets-get-customer-wallet-alerts.1 | 16 + man/lago-wallets-get-wallet-transaction.1 | 2 +- man/lago-wallets-list-customer-wallets.1 | 10 +- ...ets-list-wallet-transaction-consumptions.1 | 4 +- ...wallets-list-wallet-transaction-fundings.1 | 4 +- man/lago-wallets-list.1 | 4 +- ...ago-wallets-update-customer-wallet-alert.1 | 4 +- man/lago-wallets-update-customer-wallet.1 | 12 +- man/lago-wallets-update.1 | 12 +- man/lago-wallets-wallet-transactions.1 | 10 +- man/lago-webhook-endpoints-create.1 | 12 +- man/lago-webhook-endpoints-list.1 | 4 +- man/lago-webhook-endpoints-update.1 | 8 +- man/lago-webhooks-json-public-key.1 | 2 +- man/lago-webhooks-public-key.1 | 2 +- spec/openapi.yaml | 3961 ++++++++++++----- spec/operations.json | 1269 ++++-- 262 files changed, 4678 insertions(+), 2356 deletions(-) diff --git a/docs/reference/lago_activity-logs_list.md b/docs/reference/lago_activity-logs_list.md index d7dd907..1ab7654 100644 --- a/docs/reference/lago_activity-logs_list.md +++ b/docs/reference/lago_activity-logs_list.md @@ -4,7 +4,7 @@ List all activity logs ### Synopsis -This endpoint retrieves all existing activity logs that represent actions performed on application resources. +This endpoint retrieves all existing activity logs that represent actions performed on application resources. Logs are returned from the most recent to the oldest. ``` lago activity-logs list [flags] @@ -19,20 +19,20 @@ lago activity-logs list [flags] ### Options ``` - --activity-sources string Filter results by activity sources - --activity-types string Filter results by activity types + --activity-sources string Filter results by activity sources. + --activity-types string Filter results by activity types. --all Fetch every page --external-customer-id string Unique identifier assigned to the customer in your application. --external-subscription-id string External subscription ID - --from-date string Filter activity logs from a specific date. + --from-date string Filter activity logs logged at or after this date. A date or a full ISO 8601 datetime is accepted. -h, --help help for list --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. - --resource-ids string Filter results by resources unique identifiers - --resource-types string Filter results by resource class types - --to-date string Filter activity logs up to a specific date. - --user-emails string Filter results by user emails + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. + --resource-ids string Filter results by the unique identifiers of the resources the actions were applied to. + --resource-types string Filter results by resource types. + --to-date string Filter activity logs logged at or before this date. A date or a full ISO 8601 datetime is accepted. + --user-emails string Filter results by the email of the user who performed the activity. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_add-ons_create.md b/docs/reference/lago_add-ons_create.md index 13d21d8..379f8ca 100644 --- a/docs/reference/lago_add-ons_create.md +++ b/docs/reference/lago_add-ons_create.md @@ -20,13 +20,13 @@ lago add-ons create [flags] ### Options ``` - --amount-cents string The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. - --amount-currency string The currency of the add-on.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --amount-cents string The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. It must be greater than zero. By creating a one-off invoice, you will be able to override this value. + --amount-currency string The currency of the add-on.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --code string Unique code used to identify the add-on. --description string The description of the add-on. -h, --help help for create --input string Complete JSON request body or @file.json - --invoice-display-name string Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. + --invoice-display-name string Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name. --name string The name of the add-on. --tax-codes string List of unique code used to identify the taxes. ``` diff --git a/docs/reference/lago_add-ons_delete.md b/docs/reference/lago_add-ons_delete.md index 2ea00e6..6ca826f 100644 --- a/docs/reference/lago_add-ons_delete.md +++ b/docs/reference/lago_add-ons_delete.md @@ -4,7 +4,7 @@ Delete an add-on ### Synopsis -This endpoint is used to delete an existing add-on. +This endpoint is used to delete an existing add-on. The fixed charges that use this add-on are deleted too. ``` lago add-ons delete [flags] diff --git a/docs/reference/lago_add-ons_list.md b/docs/reference/lago_add-ons_list.md index a85bc24..71560b5 100644 --- a/docs/reference/lago_add-ons_list.md +++ b/docs/reference/lago_add-ons_list.md @@ -22,8 +22,8 @@ lago add-ons list [flags] --all Fetch every page -h, --help help for list --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_add-ons_update.md b/docs/reference/lago_add-ons_update.md index e34c60e..cc407c5 100644 --- a/docs/reference/lago_add-ons_update.md +++ b/docs/reference/lago_add-ons_update.md @@ -20,13 +20,13 @@ lago add-ons update [flags] ### Options ``` - --amount-cents string The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. - --amount-currency string The currency of the add-on.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --amount-cents string The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. It must be greater than zero. By creating a one-off invoice, you will be able to override this value. + --amount-currency string The currency of the add-on.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --code string Unique code used to identify the add-on. --description string The description of the add-on. -h, --help help for update --input string Complete JSON request body or @file.json - --invoice-display-name string Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. + --invoice-display-name string Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name. --name string The name of the add-on. --tax-codes string List of unique code used to identify the taxes. ``` diff --git a/docs/reference/lago_analytics_gross-revenue.md b/docs/reference/lago_analytics_gross-revenue.md index adfa003..a520be1 100644 --- a/docs/reference/lago_analytics_gross-revenue.md +++ b/docs/reference/lago_analytics_gross-revenue.md @@ -4,7 +4,7 @@ List gross revenue ### Synopsis -Gross revenue is the sum of monthly `finalized` invoice payments and fees paid in advance that are not invoiceable. This total is calculated after deducting taxes and discounts. +Gross revenue is the monthly sum of the totals of `finalized` invoices and of the amounts of the fees paid in advance that are not attached to an invoice. Invoice totals include taxes, are net of coupons, and are reduced by the amounts refunded through credit notes. Self-billed invoices and invoices with a lost payment dispute are excluded. ``` lago analytics gross-revenue [flags] @@ -19,7 +19,8 @@ lago analytics gross-revenue [flags] ### Options ``` - --currency string Currency of revenue analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --billing-entity-code string Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. + --currency string Currency of revenue analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --external-customer-id string The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level. -h, --help help for gross-revenue --months string Show data only for given number of months. diff --git a/docs/reference/lago_analytics_invoice-collection.md b/docs/reference/lago_analytics_invoice-collection.md index 05e4730..e863eba 100644 --- a/docs/reference/lago_analytics_invoice-collection.md +++ b/docs/reference/lago_analytics_invoice-collection.md @@ -4,7 +4,8 @@ List of finalized invoices ### Synopsis -Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`. +Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`. Self-billed invoices and invoices with a lost payment dispute are excluded. +This is a premium feature. ``` lago analytics invoice-collection [flags] @@ -19,11 +20,12 @@ lago analytics invoice-collection [flags] ### Options ``` - --currency string The currency of revenue analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW - -h, --help help for invoice-collection - --months string Show data only for given number of months. - --watch Poll and re-render when the response changes - --watch-interval duration Polling interval used with --watch (default 2s) + --billing-entity-code string Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. + --currency string The currency of revenue analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + -h, --help help for invoice-collection + --months string Show data only for given number of months. + --watch Poll and re-render when the response changes + --watch-interval duration Polling interval used with --watch (default 2s) ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_analytics_invoiced-usage.md b/docs/reference/lago_analytics_invoiced-usage.md index 461cfca..f2937ca 100644 --- a/docs/reference/lago_analytics_invoiced-usage.md +++ b/docs/reference/lago_analytics_invoiced-usage.md @@ -4,7 +4,7 @@ List usage revenue ### Synopsis -Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts. +Reports the monthly revenue generated by usage-based fees, broken down by billable metric. It only counts usage that has already been invoiced, so the usage of the current billing period is not included. Amounts exclude taxes and are net of coupons. Fees on self-billed invoices and on invoices with a lost payment dispute are left out. ``` lago analytics invoiced-usage [flags] @@ -19,11 +19,12 @@ lago analytics invoiced-usage [flags] ### Options ``` - --currency string The currency of invoiced usage analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW - -h, --help help for invoiced-usage - --months string Show data only for given number of months. - --watch Poll and re-render when the response changes - --watch-interval duration Polling interval used with --watch (default 2s) + --billing-entity-code string Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. + --currency string The currency of invoiced usage analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + -h, --help help for invoiced-usage + --months string Show data only for given number of months. + --watch Poll and re-render when the response changes + --watch-interval duration Polling interval used with --watch (default 2s) ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_analytics_mrr.md b/docs/reference/lago_analytics_mrr.md index c8c272d..16b147b 100644 --- a/docs/reference/lago_analytics_mrr.md +++ b/docs/reference/lago_analytics_mrr.md @@ -4,7 +4,13 @@ List MRR ### Synopsis -This endpoint is used to list MRR. +Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle: + +- Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued. +- Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing). +- Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing). +- Revenue from `semiannual` subscription invoices is distributed evenly over six months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing). +- Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month. ``` lago analytics mrr [flags] @@ -19,17 +25,12 @@ lago analytics mrr [flags] ### Options ``` - --currency string Quantifies the revenue generated from 'subscription' fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle: - - - Revenue from 'monthly' subscription invoices is included in the MRR for the month in which the invoice is issued. - - Revenue from 'quarterly' subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing). - - Revenue from 'yearly' subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing). - - Revenue from 'semiannual' subscription invoices is distributed evenly over six months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing). - - Revenue from 'weekly' subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW - -h, --help help for mrr - --months string Show data only for given number of months. - --watch Poll and re-render when the response changes - --watch-interval duration Polling interval used with --watch (default 2s) + --billing-entity-code string Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. + --currency string The currency of MRR analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + -h, --help help for mrr + --months string Show data only for given number of months. + --watch Poll and re-render when the response changes + --watch-interval duration Polling interval used with --watch (default 2s) ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_analytics_overdue-balance.md b/docs/reference/lago_analytics_overdue-balance.md index 18ebb32..0026cf6 100644 --- a/docs/reference/lago_analytics_overdue-balance.md +++ b/docs/reference/lago_analytics_overdue-balance.md @@ -4,7 +4,7 @@ List overdue balance ### Synopsis -Overdue balance is the total amount associated with overdue invoices (invoices with pending or failed payments which are past their due dates). +Overdue balance is the amount still due on invoices that are past their payment due date. Each entry covers one month of payment due dates and sums the invoice totals minus the amounts already paid and minus the credits applied by finalized credit notes. Self-billed invoices are excluded. ``` lago analytics overdue-balance [flags] @@ -19,8 +19,9 @@ lago analytics overdue-balance [flags] ### Options ``` - --currency string Currency of revenue analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW - --external-customer-id string The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level. + --billing-entity-code string Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. + --currency string Filter the overdue balances by the currency of the invoices. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --external-customer-id string The customer external unique identifier (provided by your own application). Use it to restrict the overdue balances to a single customer. -h, --help help for overdue-balance --months string Show data only for given number of months. --watch Poll and re-render when the response changes diff --git a/docs/reference/lago_analytics_usage.md b/docs/reference/lago_analytics_usage.md index 6476ad9..757a3f3 100644 --- a/docs/reference/lago_analytics_usage.md +++ b/docs/reference/lago_analytics_usage.md @@ -4,7 +4,8 @@ List usage ### Synopsis -Returns usages. +Returns the usage billed by each billable metric, aggregated over the requested period and time granularity. +This is a premium feature. On a non-premium license the response always covers the last 30 days with a daily granularity, and only the `billable_metric_code` filter is applied. ``` lago analytics usage [flags] @@ -20,7 +21,7 @@ lago analytics usage [flags] ``` --billable-metric-code string The code of the usage-based billable metrics for which the usage analytics is calculated. - --currency string The currency of usage analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --currency string The currency of usage analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --customer-country string The country of the customer for which the usage analytics is calculated.; one of: AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW --customer-type string The type of customer for which the usage analytics is calculated. Possible values are 'individual', 'company'.; one of: individual, company --external-customer-id string The external identifier of the customer for which the usage analytics is calculated. @@ -29,7 +30,7 @@ lago analytics usage [flags] -h, --help help for usage --is-billable-metric-recurring string Indicates whether the billable metric associated with the usage is recurring. --plan-code string The code of the plan for which the usage analytics is calculated. - --time-granularity string The time granularity of usage analytics. Possible values are 'daily', 'weekly', 'monthly', 'yearly'.; one of: daily, weekly, monthly + --time-granularity string The time granularity of usage analytics. Possible values are 'daily', 'weekly' and 'monthly'. Defaults to 'daily'.; one of: daily, weekly, monthly --to-date string The end date of the period for which the usage analytics is calculated. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) diff --git a/docs/reference/lago_api-logs.md b/docs/reference/lago_api-logs.md index 104ae2b..64a627b 100644 --- a/docs/reference/lago_api-logs.md +++ b/docs/reference/lago_api-logs.md @@ -29,5 +29,5 @@ Manage Lago api logs ### SEE ALSO * [lago](lago) - The official CLI for Lago billing -* [lago api-logs get](lago_api-logs_get) - Retrieve an api log -* [lago api-logs list](lago_api-logs_list) - List all api logs +* [lago api-logs get](lago_api-logs_get) - Retrieve an API log +* [lago api-logs list](lago_api-logs_list) - List all API logs diff --git a/docs/reference/lago_api-logs_get.md b/docs/reference/lago_api-logs_get.md index e02a46a..1f4a054 100644 --- a/docs/reference/lago_api-logs_get.md +++ b/docs/reference/lago_api-logs_get.md @@ -1,10 +1,10 @@ ## lago api-logs get -Retrieve an api log +Retrieve an API log ### Synopsis -This endpoint retrieves an existing api log that represents a request made to the API. The api log is identified by its unique request_id. +This endpoint retrieves an existing API log, which represents a request made to Lago's API. The API log is identified by its request id. ``` lago api-logs get [flags] diff --git a/docs/reference/lago_api-logs_list.md b/docs/reference/lago_api-logs_list.md index 16931a7..e67c628 100644 --- a/docs/reference/lago_api-logs_list.md +++ b/docs/reference/lago_api-logs_list.md @@ -1,10 +1,10 @@ ## lago api-logs list -List all api logs +List all API logs ### Synopsis -This endpoint retrieves all existing api logs that represent requests performed to Lago's API. +This endpoint retrieves all existing API logs, which represent the requests made to Lago's API. Logs older than the retention period of your organization are left out. The retention period is 30 days unless another one was set for your organization. ``` lago api-logs list [flags] @@ -20,16 +20,17 @@ lago api-logs list [flags] ``` --all Fetch every page - --api-version string Filter results by API version - --from-date string Filter api logs from a specific date. + --api-version string Filter results by API version. + --clients string Filter results by the client that issued the request, as reported by its user agent. + --from-date string Filter API logs logged at or after this date. -h, --help help for list - --http-methods string Filter results by HTTP methods - --http-statuses string Filter results by HTTP status or by generic request status + --http-methods string Filter results by HTTP methods. + --http-statuses string Filter results by HTTP status or by generic request status. When 'succeeded' or 'failed' is passed, the numeric values of the filter are ignored. --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. - --request-paths string Filter results by the path of the request - --to-date string Filter api logs up to a specific date. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. + --request-paths string Filter results by the path of the request. A value containing '*' is matched as a wildcard, otherwise the path must match exactly. + --to-date string Filter API logs logged at or before this date. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_billable-metrics_create.md b/docs/reference/lago_billable-metrics_create.md index 67894f7..f72ce8f 100644 --- a/docs/reference/lago_billable-metrics_create.md +++ b/docs/reference/lago_billable-metrics_create.md @@ -23,11 +23,12 @@ lago billable-metrics create [flags] --aggregation-type string Aggregation method used to compute usage for this billable metric.; one of: count_agg, sum_agg, max_agg, unique_count_agg, weighted_sum_agg, latest_agg --code string Unique code used to identify the billable metric associated with the API request. This code associates each event with the correct metric. --description string Internal description of the billable metric. - --expression string Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units. - Accepted function are 'ceil', 'concat' and 'round' as well as '+', '-', '\' and '*' operations. - Round is accepting an optional second parameter to specify the number of decimal. - --field-name string Property of the billable metric used for aggregating usage data. This field is not required for 'count_agg'. - --filters string API field (array) + --expression string Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units. + Event values are read with 'event.code', 'event.timestamp' and 'event.properties.'. + Accepted functions are 'ceil', 'concat', 'floor', 'greatest', 'least' and 'round' as well as '+', '-', '/' and '*' operations. + 'ceil', 'floor' and 'round' accept an optional second parameter to specify the number of decimals. + --field-name string Property of the billable metric used for aggregating usage data. It is required for every aggregation type except 'count_agg', which ignores it and stores 'null'. + --filters string List of filters of the billable metric. On update, this list replaces the existing filters: a filter that is not sent is deleted. -h, --help help for create --input string Complete JSON request body or @file.json --name string Name of the billable metric. @@ -36,9 +37,10 @@ lago billable-metrics create [flags] - If set to 'true': the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to 'false': the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is 'false'. - --rounding-function string Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are 'round', 'ceil' and 'floor'.; one of: ceil, floor, round, - --rounding-precision string Specifies the number of decimal places to which the 'rounding_function' will be rounded. It can be a positive or negative value. - --weighted-interval string Parameter exclusively utilized in conjunction with the 'weighted_sum' aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in 'seconds'.; one of: seconds, + - It cannot be set to 'true' when 'aggregation_type' is 'count_agg', 'max_agg' or 'latest_agg'. + --rounding-function string Rounding applied to the aggregated number of units. Possible values are 'round', 'ceil' and 'floor'. When it is not set, the units are not rounded.; one of: ceil, floor, round, + --rounding-precision string Number of decimal places kept when 'rounding_function' is applied. It can be a positive or negative value, and it defaults to 0. + --weighted-interval string Parameter exclusively utilized in conjunction with the 'weighted_sum_agg' aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. It is required when 'aggregation_type' is 'weighted_sum_agg', and 'seconds' is the only accepted value.; one of: seconds, ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_billable-metrics_evaluate-expression.md b/docs/reference/lago_billable-metrics_evaluate-expression.md index 8ba5c2b..8d22554 100644 --- a/docs/reference/lago_billable-metrics_evaluate-expression.md +++ b/docs/reference/lago_billable-metrics_evaluate-expression.md @@ -4,7 +4,7 @@ Evaluate an expression for a billable metric ### Synopsis -Evaluate an expression for a billable metric creation by providing the expression and test data +This endpoint evaluates an expression against a test event. Use it to check an expression before you set it on a billable metric. ``` lago billable-metrics evaluate-expression [flags] @@ -20,9 +20,10 @@ lago billable-metrics evaluate-expression [flags] ``` --code string The code that identifies a targeted billable metric. - --expression string Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units. - Accepted function are 'ceil', 'concat' and 'round' as well as '+', '-', '\' and '*' operations. - Round is accepting an optional second parameter to specify the number of decimal. + --expression string Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units. + Event values are read with 'event.code', 'event.timestamp' and 'event.properties.'. + Accepted functions are 'ceil', 'concat', 'floor', 'greatest', 'least' and 'round' as well as '+', '-', '/' and '*' operations. + 'ceil', 'floor' and 'round' accept an optional second parameter to specify the number of decimals. -h, --help help for evaluate-expression --input string Complete JSON request body or @file.json --properties string This field represents additional properties associated with the event. They can be used when evaluating the expression. diff --git a/docs/reference/lago_billable-metrics_list.md b/docs/reference/lago_billable-metrics_list.md index 0bedb30..64bc726 100644 --- a/docs/reference/lago_billable-metrics_list.md +++ b/docs/reference/lago_billable-metrics_list.md @@ -22,8 +22,8 @@ lago billable-metrics list [flags] --all Fetch every page -h, --help help for list --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_billable-metrics_update.md b/docs/reference/lago_billable-metrics_update.md index 07e58d0..59f99ea 100644 --- a/docs/reference/lago_billable-metrics_update.md +++ b/docs/reference/lago_billable-metrics_update.md @@ -6,6 +6,8 @@ Update a billable metric This endpoint updates an existing billable metric representing a pricing component of your application. +Once the billable metric is used by a plan charge, only `name`, `description` and `filters` are applied. The other fields are ignored. + ``` lago billable-metrics update [flags] ``` @@ -23,11 +25,12 @@ lago billable-metrics update [flags] --aggregation-type string Aggregation method used to compute usage for this billable metric.; one of: count_agg, sum_agg, max_agg, unique_count_agg, weighted_sum_agg, latest_agg --code string Unique code used to identify the billable metric associated with the API request. This code associates each event with the correct metric. --description string Internal description of the billable metric. - --expression string Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units. - Accepted function are 'ceil', 'concat' and 'round' as well as '+', '-', '\' and '*' operations. - Round is accepting an optional second parameter to specify the number of decimal. - --field-name string Property of the billable metric used for aggregating usage data. This field is not required for 'count_agg'. - --filters string API field (array) + --expression string Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units. + Event values are read with 'event.code', 'event.timestamp' and 'event.properties.'. + Accepted functions are 'ceil', 'concat', 'floor', 'greatest', 'least' and 'round' as well as '+', '-', '/' and '*' operations. + 'ceil', 'floor' and 'round' accept an optional second parameter to specify the number of decimals. + --field-name string Property of the billable metric used for aggregating usage data. It is required for every aggregation type except 'count_agg', which ignores it and stores 'null'. + --filters string List of filters of the billable metric. On update, this list replaces the existing filters: a filter that is not sent is deleted. -h, --help help for update --input string Complete JSON request body or @file.json --name string Name of the billable metric. @@ -36,9 +39,10 @@ lago billable-metrics update [flags] - If set to 'true': the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to 'false': the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is 'false'. - --rounding-function string Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are 'round', 'ceil' and 'floor'.; one of: ceil, floor, round, - --rounding-precision string Specifies the number of decimal places to which the 'rounding_function' will be rounded. It can be a positive or negative value. - --weighted-interval string Parameter exclusively utilized in conjunction with the 'weighted_sum' aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in 'seconds'.; one of: seconds, + - It cannot be set to 'true' when 'aggregation_type' is 'count_agg', 'max_agg' or 'latest_agg'. + --rounding-function string Rounding applied to the aggregated number of units. Possible values are 'round', 'ceil' and 'floor'. When it is not set, the units are not rounded.; one of: ceil, floor, round, + --rounding-precision string Number of decimal places kept when 'rounding_function' is applied. It can be a positive or negative value, and it defaults to 0. + --weighted-interval string Parameter exclusively utilized in conjunction with the 'weighted_sum_agg' aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. It is required when 'aggregation_type' is 'weighted_sum_agg', and 'seconds' is the only accepted value.; one of: seconds, ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_billing-entities_create.md b/docs/reference/lago_billing-entities_create.md index 442365a..41d1df0 100644 --- a/docs/reference/lago_billing-entities_create.md +++ b/docs/reference/lago_billing-entities_create.md @@ -22,35 +22,35 @@ lago billing-entities create [flags] ``` --address-line1 string The first line of the billing address --address-line2 string The second line of the billing address - --billing-configuration-document-locale string The language of the documents generated for this billing entity - --billing-configuration-invoice-footer string The footer text to be displayed on invoices for this billing entity - --billing-configuration-invoice-grace-period string The grace period (in days) for invoice finalization + --billing-configuration-document-locale string The language of the documents generated for this billing entity, in the ISO 639-1 format. + --billing-configuration-invoice-footer string The footer text to be displayed on invoices for this billing entity (600 characters max). + --billing-configuration-invoice-grace-period string The grace period (in days) for invoice finalization. This is a premium feature, the value is ignored without a premium license. --billing-configuration-subscription-invoice-issuing-date-adjustment string The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.; one of: align_with_finalization_date, keep_anchor --billing-configuration-subscription-invoice-issuing-date-anchor string Defines whether the issuing date follows the current billing period's end date or the next period starting date.; one of: current_period_end, next_period_start --city string The city of the billing address --code string The unique code of the billing entity --country string The country code of the billing address; one of: , AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW - --default-currency string The default currency of the billing entity; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW - --document-number-prefix string The prefix used in document numbers for this billing entity + --default-currency string The default currency of the billing entity; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --document-number-prefix string The prefix used in document numbers for this billing entity (1 to 10 characters). It is upper cased. When it is not provided, Lago builds one from the first three letters of the name and the last four characters of the identifier. --document-numbering string The type of document numbering for this billing entity: - 'per_customer': document numbers are unique per customer - 'per_billing_entity': document numbers are unique per billing entity; one of: per_customer, per_billing_entity - --einvoicing string Whether e-invoicing is enabled for this billing entity + --einvoicing string Whether e-invoicing is enabled for this billing entity. It can only be enabled when the billing entity country is 'FR' or 'DE'. --email string The email address of the billing entity - --email-settings string The email notification settings for this billing entity - --eu-tax-management string Whether EU tax management is enabled for this billing entity + --email-settings string The email notification settings for this billing entity. This is a premium feature, the value is ignored without a premium license. + --eu-tax-management string Whether EU tax management is enabled for this billing entity. It can only be enabled when the billing entity country is in the European Union. --finalize-zero-amount-invoice string Whether to finalize invoices with zero amount for this billing entity -h, --help help for create --input string Complete JSON request body or @file.json --legal-name string The legal name of the billing entity --legal-number string The legal registration number of the billing entity - --logo string The base64 encoded logo image for the billing entity + --logo string The base64 encoded logo image for the billing entity. Accepted formats are PNG, JPG and JPEG, up to 800 kB. --name string The name of the billing entity --net-payment-term string The net payment term (in days) for this billing entity --phone string The phone number of the billing entity --state string The state of the billing address --tax-identification-number string The tax identification number of the billing entity - --timezone string The timezone of the billing entity; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu + --timezone string The timezone of the billing entity. This is a premium feature, the value is ignored without a premium license.; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu --zipcode string The zipcode of the billing address ``` diff --git a/docs/reference/lago_billing-entities_update.md b/docs/reference/lago_billing-entities_update.md index 1759ce4..9f06ed3 100644 --- a/docs/reference/lago_billing-entities_update.md +++ b/docs/reference/lago_billing-entities_update.md @@ -22,36 +22,36 @@ lago billing-entities update [flags] ``` --address-line1 string The first line of the billing address --address-line2 string The second line of the billing address - --billing-configuration-document-locale string The language of the documents generated for this billing entity - --billing-configuration-invoice-footer string The footer text to be displayed on invoices for this billing entity - --billing-configuration-invoice-grace-period string The grace period (in days) for invoice finalization + --billing-configuration-document-locale string The language of the documents generated for this billing entity, in the ISO 639-1 format. + --billing-configuration-invoice-footer string The footer text to be displayed on invoices for this billing entity (600 characters max). + --billing-configuration-invoice-grace-period string The grace period (in days) for invoice finalization. This is a premium feature, the value is ignored without a premium license. --billing-configuration-subscription-invoice-issuing-date-adjustment string The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.; one of: align_with_finalization_date, keep_anchor --billing-configuration-subscription-invoice-issuing-date-anchor string Defines whether the issuing date follows the current billing period's end date or the next period starting date.; one of: current_period_end, next_period_start --city string The city of the billing address --country string The country code of the billing address; one of: , AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW - --default-currency string The default currency of the billing entity; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW - --document-number-prefix string The prefix used in document numbers for this billing entity + --default-currency string The default currency of the billing entity; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --document-number-prefix string The prefix used in document numbers for this billing entity (1 to 10 characters). It is upper cased. It cannot be removed once the billing entity exists, and sending 'null' returns a '422' error. --document-numbering string The type of document numbering for this billing entity: - 'per_customer': document numbers are unique per customer - 'per_billing_entity': document numbers are unique per billing entity; one of: per_customer, per_billing_entity - --einvoicing string Whether e-invoicing is enabled for this billing entity + --einvoicing string Whether e-invoicing is enabled for this billing entity. It can only be enabled when the billing entity country is 'FR' or 'DE'. --email string The email address of the billing entity - --email-settings string The email notification settings for this billing entity - --eu-tax-management string Whether EU tax management is enabled for this billing entity + --email-settings string The email notification settings for this billing entity. This is a premium feature, the value is ignored without a premium license. + --eu-tax-management string Whether EU tax management is enabled for this billing entity. It can only be enabled when the billing entity country is in the European Union. --finalize-zero-amount-invoice string Whether to finalize invoices with zero amount for this billing entity -h, --help help for update --input string Complete JSON request body or @file.json --invoice-custom-section-codes string The codes of the invoice custom section that should be associated with this billing entity --legal-name string The legal name of the billing entity --legal-number string The legal registration number of the billing entity - --logo string The base64 encoded logo image for the billing entity. Sending "null" will remove the logo, if any exist. + --logo string The base64 encoded logo image for the billing entity. Accepted formats are PNG, JPG and JPEG, up to 800 kB. Sending "null" removes the current logo. --name string The name of the billing entity --net-payment-term string The net payment term (in days) for this billing entity --phone string The phone number of the billing entity --state string The state of the billing address - --tax-codes string The tax codes that should be associated with this billing entity + --tax-codes string The tax codes that should be associated with this billing entity. Codes are matched without case sensitivity, and two codes that differ only by case count as one. An unknown code returns a '404' error. --tax-identification-number string The tax identification number of the billing entity - --timezone string The timezone of the billing entity; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu + --timezone string The timezone of the billing entity. This is a premium feature, the value is ignored without a premium license.; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu --zipcode string The zipcode of the billing address ``` diff --git a/docs/reference/lago_coupons_apply.md b/docs/reference/lago_coupons_apply.md index feb3512..aacf94c 100644 --- a/docs/reference/lago_coupons_apply.md +++ b/docs/reference/lago_coupons_apply.md @@ -20,19 +20,21 @@ lago coupons apply [flags] ### Options ``` - --amount-cents string The amount of the coupon in cents. This field is required only for coupon with 'fixed_amount' type. - --amount-currency string The currency of the coupon. This field is required only for coupon with 'fixed_amount' type.; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --amount-cents string The amount of the coupon in cents. If it is not set, the amount of the coupon is used. + --amount-currency string The currency of the coupon amount. If it is not set, the currency of the coupon is used.; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --coupon-code string Unique code used to identify the coupon. --external-customer-id string The customer external unique identifier (provided by your own application) --frequency string The type of frequency for the coupon. It can have three possible values: 'once', 'recurring' or 'forever'. - If set to 'once', the coupon is applicable only for a single use. - If set to 'recurring', the coupon can be used multiple times for recurring billing periods. - - If set to 'forever', the coupon has unlimited usage and can be applied indefinitely.; one of: once, recurring, forever, - --frequency-duration string Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a 'recurring' frequency type + - If set to 'forever', the coupon has unlimited usage and can be applied indefinitely. + + If it is not set, the frequency of the coupon is used.; one of: once, recurring, forever, + --frequency-duration string The number of billing periods to which the coupon applies. If it is not set, the frequency duration of the coupon is used. A 'recurring' applied coupon must end up with a frequency duration greater than 0. -h, --help help for apply --input string Complete JSON request body or @file.json - --percentage-rate string The percentage rate of the coupon. This field is required only for coupons with a 'percentage' coupon type. + --percentage-rate string The percentage rate of the coupon. Accepts a number or a decimal string. If it is not set, the percentage rate of the coupon is used. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_coupons_create.md b/docs/reference/lago_coupons_create.md index 7a1cb3e..918b49c 100644 --- a/docs/reference/lago_coupons_create.md +++ b/docs/reference/lago_coupons_create.md @@ -21,7 +21,7 @@ lago coupons create [flags] ``` --amount-cents string The amount of the coupon in cents. This field is required only for coupon with 'fixed_amount' type. - --amount-currency string The currency of the coupon. This field is required only for coupon with 'fixed_amount' type.; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --amount-currency string The currency of the coupon. This field is required only for coupon with 'fixed_amount' type.; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --applies-to-billable-metric-codes string An array of billable metric codes to which the coupon is applicable. By specifying the billable metric codes in this field, you can restrict the coupon's usage to specific metrics only. --applies-to-plan-codes string An array of plan codes to which the coupon is applicable. By specifying the plan codes in this field, you can restrict the coupon's usage to specific plans only. --code string Unique code used to identify the coupon. @@ -40,11 +40,11 @@ lago coupons create [flags] - If set to 'once', the coupon is applicable only for a single use. - If set to 'recurring', the coupon can be used multiple times for recurring billing periods. - If set to 'forever', the coupon has unlimited usage and can be applied indefinitely.; one of: once, recurring, forever - --frequency-duration string Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a 'recurring' frequency type + --frequency-duration string Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a 'recurring' frequency type. -h, --help help for create --input string Complete JSON request body or @file.json --name string The name of the coupon. - --percentage-rate string The percentage rate of the coupon. This field is required only for coupons with a 'percentage' coupon type. + --percentage-rate string The percentage rate of the coupon. Accepts a number or a decimal string. This field is required only for coupons with a 'percentage' coupon type. --reusable string Indicates whether the coupon can be reused or not. If set to 'true', the coupon is reusable, meaning it can be applied multiple times to the same customer. If set to 'false', the coupon can only be used once and is not reusable. If not specified, this field is set to 'true' by default. ``` diff --git a/docs/reference/lago_coupons_list-applied-coupons.md b/docs/reference/lago_coupons_list-applied-coupons.md index 435e690..6470fd0 100644 --- a/docs/reference/lago_coupons_list-applied-coupons.md +++ b/docs/reference/lago_coupons_list-applied-coupons.md @@ -24,8 +24,8 @@ lago coupons list-applied-coupons [flags] --external-customer-id string The customer external unique identifier (provided by your own application) -h, --help help for list-applied-coupons --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --status string The status of the coupon. Can be either 'active' or 'terminated'.; one of: active, terminated --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) diff --git a/docs/reference/lago_coupons_list.md b/docs/reference/lago_coupons_list.md index 0c328db..63bc053 100644 --- a/docs/reference/lago_coupons_list.md +++ b/docs/reference/lago_coupons_list.md @@ -22,8 +22,8 @@ lago coupons list [flags] --all Fetch every page -h, --help help for list --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_coupons_update.md b/docs/reference/lago_coupons_update.md index 2cd2496..d4868a6 100644 --- a/docs/reference/lago_coupons_update.md +++ b/docs/reference/lago_coupons_update.md @@ -6,6 +6,8 @@ Update a coupon This endpoint is used to update a coupon that can be then attached to a customer to create a discount. +Once the coupon has been applied to at least one customer, only `name`, `description`, `expiration` and `expiration_at` are updated. The other fields in the payload are ignored. + ``` lago coupons update [flags] ``` @@ -21,7 +23,7 @@ lago coupons update [flags] ``` --amount-cents string The amount of the coupon in cents. This field is required only for coupon with 'fixed_amount' type. - --amount-currency string The currency of the coupon. This field is required only for coupon with 'fixed_amount' type.; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --amount-currency string The currency of the coupon. This field is required only for coupon with 'fixed_amount' type.; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --applies-to-billable-metric-codes string An array of billable metric codes to which the coupon is applicable. By specifying the billable metric codes in this field, you can restrict the coupon's usage to specific metrics only. --applies-to-plan-codes string An array of plan codes to which the coupon is applicable. By specifying the plan codes in this field, you can restrict the coupon's usage to specific plans only. --code string Unique code used to identify the coupon. @@ -40,11 +42,11 @@ lago coupons update [flags] - If set to 'once', the coupon is applicable only for a single use. - If set to 'recurring', the coupon can be used multiple times for recurring billing periods. - If set to 'forever', the coupon has unlimited usage and can be applied indefinitely.; one of: once, recurring, forever - --frequency-duration string Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a 'recurring' frequency type + --frequency-duration string Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a 'recurring' frequency type. -h, --help help for update --input string Complete JSON request body or @file.json --name string The name of the coupon. - --percentage-rate string The percentage rate of the coupon. This field is required only for coupons with a 'percentage' coupon type. + --percentage-rate string The percentage rate of the coupon. Accepts a number or a decimal string. This field is required only for coupons with a 'percentage' coupon type. --reusable string Indicates whether the coupon can be reused or not. If set to 'true', the coupon is reusable, meaning it can be applied multiple times to the same customer. If set to 'false', the coupon can only be used once and is not reusable. If not specified, this field is set to 'true' by default. ``` diff --git a/docs/reference/lago_credit-notes_create.md b/docs/reference/lago_credit-notes_create.md index 2ca98b5..6d0827b 100644 --- a/docs/reference/lago_credit-notes_create.md +++ b/docs/reference/lago_credit-notes_create.md @@ -5,6 +5,8 @@ Create a credit note ### Synopsis This endpoint creates a new credit note. +This is a premium feature. +A credit note cannot be issued on an invoice in a `pending` or `failed` status. In that case the endpoint returns a `405` error with the `invalid_type_or_status` code. ``` lago credit-notes create [flags] diff --git a/docs/reference/lago_credit-notes_download.md b/docs/reference/lago_credit-notes_download.md index b57186e..813ab1b 100644 --- a/docs/reference/lago_credit-notes_download.md +++ b/docs/reference/lago_credit-notes_download.md @@ -4,7 +4,8 @@ Download a credit note PDF ### Synopsis -This endpoint downloads the PDF of an existing credit note. +This endpoint downloads the PDF of an existing credit note. Only `finalized` credit notes can be downloaded; any other credit note returns a `404` error. +When the PDF has already been generated, the credit note object is returned and its `file_url` points to the document. When it has not been generated yet, the response is a `200` with an empty body and the generation starts in the background. Call the endpoint again to get the credit note object with its `file_url`. ``` lago credit-notes download [flags] diff --git a/docs/reference/lago_credit-notes_estimate.md b/docs/reference/lago_credit-notes_estimate.md index babbf5f..cccf31b 100644 --- a/docs/reference/lago_credit-notes_estimate.md +++ b/docs/reference/lago_credit-notes_estimate.md @@ -5,6 +5,8 @@ Estimate amounts for a new credit note ### Synopsis This endpoint allows you to retrieve amounts for a new credit note creation. +This is a premium feature. +Amounts cannot be estimated on an invoice in a `pending` or `failed` status. In that case the endpoint returns a `405` error with the `invalid_type_or_status` code. ``` lago credit-notes estimate [flags] diff --git a/docs/reference/lago_credit-notes_list.md b/docs/reference/lago_credit-notes_list.md index c04b693..83e94da 100644 --- a/docs/reference/lago_credit-notes_list.md +++ b/docs/reference/lago_credit-notes_list.md @@ -4,7 +4,7 @@ List all credit notes ### Synopsis -This endpoint list all existing credit notes. +This endpoint lists all existing credit notes. ``` lago credit-notes list [flags] @@ -31,8 +31,8 @@ lago credit-notes list [flags] --issuing-date-from string Filter credit notes starting from a specific date. --issuing-date-to string Filter credit notes up to a specific date. --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --purchase-order-number string Filter by the invoice purchase order number. The match is exact but case-insensitive. --reason string Filter credit notes by reasons. Possible values are 'product_unsatisfactory', 'order_change', 'order_cancellation', 'fraudulent_charge', 'duplicated_charge' or 'other'.; one of: product_unsatisfactory, order_change, order_cancellation, fraudulent_charge, duplicated_charge, other --refund-status string Filter credit notes by refund status. Possible values are 'pending', 'succeeded' or 'failed'.; one of: pending, succeeded, failed diff --git a/docs/reference/lago_customers_applied-coupons.md b/docs/reference/lago_customers_applied-coupons.md index 330b68b..1c4ebc8 100644 --- a/docs/reference/lago_customers_applied-coupons.md +++ b/docs/reference/lago_customers_applied-coupons.md @@ -23,8 +23,8 @@ lago customers applied-coupons [flags] --coupon-code string The code of the coupon applied to the customer. Use it to filter applied coupons by their code. -h, --help help for applied-coupons --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --status string The status of the coupon. Can be either 'active' or 'terminated'.; one of: active, terminated --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) diff --git a/docs/reference/lago_customers_create.md b/docs/reference/lago_customers_create.md index 24bacdf..f32b785 100644 --- a/docs/reference/lago_customers_create.md +++ b/docs/reference/lago_customers_create.md @@ -4,7 +4,7 @@ Create a customer ### Synopsis -This endpoint creates a new customer. +This endpoint creates a customer. When a customer with the same `external_id` already exists, it is updated instead, and only the fields present in the payload are changed. ``` lago customers create [flags] @@ -24,13 +24,13 @@ lago customers create [flags] - 'customer': the account is a customer, default value. - 'partner': the account is a partner. - This field is only applied when revenue share is enabled on your organization; otherwise it is ignored.; one of: customer, partner - --address-line1 string The first line of the billing address - --address-line2 string The second line of the billing address + This field is only applied when revenue share is enabled on your organization and the customer has no subscription, invoice, add-on, fixed-amount coupon or wallet yet; otherwise it is ignored.; one of: customer, partner + --address-line1 string The first line of the billing address (500 characters max). + --address-line2 string The second line of the billing address (500 characters max). --billing-configuration-document-locale string The document locale, specified in the ISO 639-1 format. This field represents the language or locale used for the documents issued by Lago - --billing-configuration-invoice-grace-period string The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items + --billing-configuration-invoice-grace-period string The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items. It is null when the customer has no grace period of its own and falls back to the billing entity. This is a premium feature, the value is ignored without a premium license. --billing-configuration-payment-provider string The payment provider utilized to initiate payments for invoices issued by Lago. - Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'moneyhash' or null. This field is required if you intend to assign a 'provider_customer_id'.; one of: stripe, adyen, cashfree, flutterwave, gocardless, moneyhash + Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'moneyhash' or null. This field is required if you intend to assign a 'provider_customer_id'. Send null to detach the customer from its current payment provider.; one of: stripe, adyen, cashfree, flutterwave, gocardless, moneyhash, --billing-configuration-payment-provider-code string Unique code used to identify a payment provider connection. --billing-configuration-provider-customer-id string The customer ID within the payment provider's system. If this field is not provided, Lago has the option to create a new customer record within the payment provider's system on behalf of the customer --billing-configuration-provider-payment-methods string Specifies the available payment methods that can be used for this customer when 'payment_provider' is set to 'stripe'. The 'provider_payment_methods' field is an array that allows multiple payment options to be defined. If this field is not explicitly set, the payment methods will be set to 'card'. For now, possible values are 'card', 'sepa_debit', 'us_bank_account', 'bacs_debit', 'boleto', 'link', 'crypto' and 'customer_balance'. Note that when 'link' is selected, 'card' should also be provided in the array. When 'customer_balance' is selected, no other payment can be selected. @@ -39,9 +39,9 @@ lago customers create [flags] --billing-configuration-sync string Set this field to 'true' if you want to create the customer in the payment provider synchronously with the customer creation process in Lago. This option is applicable only when the 'provider_customer_id' is 'null' and the customer is automatically created in the payment provider through Lago. By default, the value is set to 'false' --billing-configuration-sync-with-provider string Set this field to 'true' if you want to create a customer record in the payment provider's system. This option is applicable only when the 'provider_customer_id' is null and the 'sync_with_provider' field is set to 'true'. By default, the value is set to 'false' --billing-entity-code string The unique code of the billing entity to associate with the customer. If not provided, the default billing entity will be used. - --city string The city of the customer's billing address + --city string The city of the customer's billing address (255 characters max). --country string Country code of the customer's billing address. Format must be ISO 3166 (alpha-2); one of: , AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW - --currency string Currency of the customer. Format must be ISO 4217; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --currency string Currency of the customer. Format must be ISO 4217; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --customer-type string The type of the customer. It can have one of the following values: - 'company': the customer is a company. - 'individual': the customer is an individual.; one of: company, individual, @@ -52,32 +52,32 @@ lago customers create [flags] - 'inherit': (Default) Follows the organization-level configuration. - 'finalize': Invoices are issued and finalized even if the total amount is zero. - 'skip': Invoices with a total amount of zero are not finalized.; one of: inherit, skip, finalize - --firstname string First name of the customer + --firstname string First name of the customer (255 characters max). -h, --help help for create --input string Complete JSON request body or @file.json - --integration-customers string API field (array) + --integration-customers string The integration customers to create or update for this customer. Only one entry per 'integration_type' is accepted; sending two entries with the same type returns a '422' error with 'invalid_count_per_integration_type' on 'integration_customers'. --invoice-custom-section-codes string List of unique codes identifying the invoice custom sections. - --lastname string Last name of the customer - --legal-name string The legal company name of the customer + --lastname string Last name of the customer (255 characters max). + --legal-name string The legal company name of the customer (255 characters max). --legal-number string The legal company number of the customer --logo-url string The logo URL of the customer - --metadata string Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format + --metadata string Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format. A customer can hold up to 5 key-value pairs. --name string The full name of the customer (255 characters max). --net-payment-term string The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized. --phone string The phone number of the customer - --shipping-address-address-line1 string The first line of the billing address - --shipping-address-address-line2 string The second line of the billing address - --shipping-address-city string The city of the customer's billing address - --shipping-address-country string Country code of the customer's billing address. Format must be ISO 3166 (alpha-2); one of: , AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW - --shipping-address-state string The state of the customer's billing address - --shipping-address-zipcode string The zipcode of the customer's billing address + --shipping-address-address-line1 string API field (string) + --shipping-address-address-line2 string API field (string) + --shipping-address-city string API field (string) + --shipping-address-country string Country code of the customer's shipping address. Format must be ISO 3166 (alpha-2); one of: , AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW + --shipping-address-state string API field (string) + --shipping-address-zipcode string API field (string) --skip-invoice-custom-sections string Set to 'true' to exclude all invoice custom sections from PDF generation for this customer only. False by default - --state string The state of the customer's billing address + --state string The state of the customer's billing address (255 characters max). --tax-codes string List of unique code used to identify the taxes. - --tax-identification-number string The tax identification number of the customer - --timezone string The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone; one of: , UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Godthab, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Rangoon, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kiev, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu + --tax-identification-number string The tax identification number of the customer (255 characters max). + --timezone string The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone. This is a premium feature, the value is ignored without a premium license.; one of: , UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Godthab, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Rangoon, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kiev, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu --url string The custom website URL of the customer - --zipcode string The zipcode of the customer's billing address + --zipcode string The zipcode of the customer's billing address (255 characters max). ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_customers_credit-notes.md b/docs/reference/lago_customers_credit-notes.md index 1dec482..3cbadce 100644 --- a/docs/reference/lago_customers_credit-notes.md +++ b/docs/reference/lago_customers_credit-notes.md @@ -4,7 +4,7 @@ List all customer's credit notes ### Synopsis -This endpoint list all existing credit notes for a customer. +This endpoint lists all existing credit notes for a customer. ``` lago customers credit-notes [flags] @@ -22,19 +22,22 @@ lago customers credit-notes [flags] --all Fetch every page --amount-from string Filter credit notes of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types. --amount-to string Filter credit notes up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types. - --credit-status string Filter credit notes by credit status. Possible values are 'available', 'consumed' or 'voided'.; one of: available, consumed, voided + --billing-entity-codes string Filter credit notes by billing entity codes. + --credit-status string Filter credit notes by credit status. Possible values are 'available', 'consumed' or 'voided'.; one of: available, consumed, voided + --currency string Filter credit notes by currency. Possible values ISO 4217 currency codes. -h, --help help for credit-notes --invoice-number string Filter credit notes by their related invoice number. --issuing-date-from string Filter credit notes starting from a specific date. --issuing-date-to string Filter credit notes up to a specific date. --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --purchase-order-number string Filter by the invoice purchase order number. The match is exact but case-insensitive. --reason string Filter credit notes by reasons. Possible values are 'product_unsatisfactory', 'order_change', 'order_cancellation', 'fraudulent_charge', 'duplicated_charge' or 'other'.; one of: product_unsatisfactory, order_change, order_cancellation, fraudulent_charge, duplicated_charge, other - --refund-status string Filter credit notes by refund status. Possible values are 'pending', 'succeeded' or 'failed'.; one of: pending, succeeded, failed + --refund-status string Filter credit notes by refund status. Possible values are 'pending', 'succeeded' or 'failed'.; one of: pending, succeeded, failed --search-term string Search credit notes by id, number, customer name, customer external_id or customer email. --self-billed string Filter credit notes belonging to a self billed invoice. Possible values are 'true' or 'false'. + --types string Filter credit notes by the kind of amount they carry. 'credit' matches credit notes with a credited amount, 'refund' those with a refunded amount and 'offset' those with an amount deducted from the invoice balance. A credit note can match several types. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_customers_current-usage.md b/docs/reference/lago_customers_current-usage.md index 0484c0e..5fdf1f0 100644 --- a/docs/reference/lago_customers_current-usage.md +++ b/docs/reference/lago_customers_current-usage.md @@ -28,7 +28,7 @@ lago customers current-usage [flags] --filter-by-charge-id string **Deprecated.** Filter usage to a specific charge by its Lago ID (UUID). --filter-by-group string **Deprecated.** Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. 'filter_by_group[cloud]=aws'. --filter-by-presentation string Filter 'presentation_breakdowns' by a JSON-encoded array of presentation group key values. Only breakdowns matching the provided values will be returned. Pass an empty array to disable 'presentation_breakdowns' entirely. - --full-usage string When 'true', returns usage since subscription start instead of the current billing period. Requires one of 'charge_id', 'charge_code', 'group' (or their deprecated 'filter_by_*' equivalents) to be set. + --full-usage string When 'true', returns usage since the subscription started instead of the current billing period. It requires the granular lifetime usage add-on, at least one of 'charge_id', 'charge_code', 'billable_metric_code' or 'group' (or their deprecated 'filter_by_*' equivalents), and a subscription without prorated charges. The request returns '405' when one of these conditions is not met. --group string Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. 'group[cloud]=aws'. Replaces deprecated 'filter_by_group'. -h, --help help for current-usage --watch Poll and re-render when the response changes diff --git a/docs/reference/lago_customers_export.md b/docs/reference/lago_customers_export.md index af1176c..bf6cece 100644 --- a/docs/reference/lago_customers_export.md +++ b/docs/reference/lago_customers_export.md @@ -31,8 +31,8 @@ lago customers export [flags] -h, --help help for export --limit string Results per page (1-1000) --metadata[key] string Filter customers by metadata. Replace 'key' with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for customers without given metadata key. For example, 'metadata[is_synced]=true&metadata[last_synced_at]='. - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --search-term string Filter customers by search term. This will filter all customers whose name, firstname, lastname, legal name, external id or email contain the search term. --states string Filter customers by states. --watch Poll and re-render when the response changes diff --git a/docs/reference/lago_customers_invoices.md b/docs/reference/lago_customers_invoices.md index b6486b8..2fb2c0a 100644 --- a/docs/reference/lago_customers_invoices.md +++ b/docs/reference/lago_customers_invoices.md @@ -22,21 +22,27 @@ lago customers invoices [flags] --all Fetch every page --amount-from string Filter invoices of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types. --amount-to string Filter invoices up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types. + --billing-entity-codes string Filter invoices by billing entity codes. Possible values are the billing entity codes you have created. + --currency string Filter invoices by currency. Possible values ISO 4217 currency codes. -h, --help help for invoices --invoice-type string Filter invoices by invoice type. Possible values are 'subscription', 'add_on', 'credit', 'one_off', 'advance_charges' or 'progressive_billing'.; one of: subscription, add_on, credit, one_off, advance_charges, progressive_billing --issuing-date-from string Filter invoices starting from a specific date. --issuing-date-to string Filter invoices up to a specific date. --limit string Results per page (1-1000) --metadata[key] string Filter invoices by metadata. Replace 'key' with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for invoice without given metadata key. For example, 'metadata[color]=blue'. - --page string Page number. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --partially-paid string Filter invoices that are partially paid. When 'true', only invoices with a non-zero amount paid that is below the total due are returned. When 'false', those invoices are excluded. --payment-dispute-lost string Filter invoices with a payment dispute lost. Possible values are 'true' or 'false'. --payment-overdue string Filter invoices by payment_overdue. Possible values are 'true' or 'false'. --payment-status string Filter invoices by payment status. Possible values are 'pending', 'failed' or 'succeeded'.; one of: pending, failed, succeeded - --per-page string Number of records per page. + --payment-statuses string Filter invoices by payment statuses. Possible values are 'pending', 'failed' or 'succeeded'. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --purchase-order-number string Filter by the invoice purchase order number. The match is exact but case-insensitive. - --search-term string Search invoices by id, number, customer name, customer external_id or customer email. + --search-term string Search the customer's invoices by id or number. Customer attributes are not searched here, because the list is already scoped to one customer. --self-billed string Filter invoices by self billed. Possible values are 'true' or 'false'. - --status string Filter invoices by status. Possible values are 'draft' or 'finalized'.; one of: draft, finalized + --settlements string Filter invoices settled by at least one of the given settlement types. 'payment' matches invoices settled by a payment, 'credit_note' matches invoices settled by a credit note. + --status string Filter invoices by status. Possible values are 'draft', 'failed', 'finalized', 'pending' and 'voided'.; one of: draft, finalized, failed, pending, voided + --statuses string Filter invoices by statuses. Possible values are 'draft', 'failed', 'finalized', 'pending' and 'voided'. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_customers_list.md b/docs/reference/lago_customers_list.md index 1b4c0ec..317fe9f 100644 --- a/docs/reference/lago_customers_list.md +++ b/docs/reference/lago_customers_list.md @@ -31,8 +31,8 @@ lago customers list [flags] -h, --help help for list --limit string Results per page (1-1000) --metadata[key] string Filter customers by metadata. Replace 'key' with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for customers without given metadata key. For example, 'metadata[is_synced]=true&metadata[last_synced_at]='. - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --search-term string Filter customers by search term. This will filter all customers whose name, firstname, lastname, legal name, external id or email contain the search term. --states string Filter customers by states. --watch Poll and re-render when the response changes diff --git a/docs/reference/lago_customers_past-usage.md b/docs/reference/lago_customers_past-usage.md index 7b5b066..f8cf8cc 100644 --- a/docs/reference/lago_customers_past-usage.md +++ b/docs/reference/lago_customers_past-usage.md @@ -24,9 +24,9 @@ lago customers past-usage [flags] --external-subscription-id string The unique identifier of the subscription within your application. -h, --help help for past-usage --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. - --periods-count string Number of past billing period to returns in the result + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. + --periods-count string Number of past billing periods to return in the result. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_customers_payment-requests.md b/docs/reference/lago_customers_payment-requests.md index 63c60a1..e598ce0 100644 --- a/docs/reference/lago_customers_payment-requests.md +++ b/docs/reference/lago_customers_payment-requests.md @@ -21,11 +21,12 @@ lago customers payment-requests [flags] ``` --all Fetch every page --billing-entity-codes string Filter payment requests by billing entity codes. + --currency string Filter the results by currency, expressed as an ISO 4217 code. -h, --help help for payment-requests --limit string Results per page (1-1000) - --page string Page number. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. --payment-status string Filter by payment status. Possible values are 'pending', 'failed' or 'succeeded'.; one of: pending, failed, succeeded - --per-page string Number of records per page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_customers_payments.md b/docs/reference/lago_customers_payments.md index f4e7375..de86b65 100644 --- a/docs/reference/lago_customers_payments.md +++ b/docs/reference/lago_customers_payments.md @@ -23,8 +23,8 @@ lago customers payments [flags] -h, --help help for payments --invoice-id string Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system. --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_customers_portal-url.md b/docs/reference/lago_customers_portal-url.md index 7ed4209..fdbfe09 100644 --- a/docs/reference/lago_customers_portal-url.md +++ b/docs/reference/lago_customers_portal-url.md @@ -6,7 +6,9 @@ Get a customer portal URL Retrieves an embeddable link for displaying a customer portal. -This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal +This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal. + +The portal lets the customer update their information and top up their wallets, so when API key permissions are enabled, the API key needs the `write` permission on `customer`. ``` lago customers portal-url [flags] diff --git a/docs/reference/lago_customers_projected-usage.md b/docs/reference/lago_customers_projected-usage.md index acbe1b0..1289831 100644 --- a/docs/reference/lago_customers_projected-usage.md +++ b/docs/reference/lago_customers_projected-usage.md @@ -20,7 +20,12 @@ lago customers projected-usage [flags] ``` --apply-taxes string Optional flag to determine if taxes should be applied. Defaults to 'true' if not provided or if null. + --billable-metric-code string Filter usage to a specific billable metric by its code. + --charge-code string Filter usage to a specific charge by its code. + --charge-id string Filter usage to a specific charge by its Lago ID (UUID). --external-subscription-id string The unique identifier of the subscription within your application. + --filter-by-presentation string Filter 'presentation_breakdowns' by a JSON-encoded array of presentation group key values. Only breakdowns matching the provided values will be returned. Pass an empty array to disable 'presentation_breakdowns' entirely. + --group string Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. 'group[cloud]=aws'. -h, --help help for projected-usage --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) diff --git a/docs/reference/lago_customers_subscriptions.md b/docs/reference/lago_customers_subscriptions.md index f511430..71209b2 100644 --- a/docs/reference/lago_customers_subscriptions.md +++ b/docs/reference/lago_customers_subscriptions.md @@ -21,12 +21,15 @@ lago customers subscriptions [flags] ``` --all Fetch every page --billing-entity-codes string Filter subscriptions by billing entity codes. + --currency string Filter the results by currency, expressed as an ISO 4217 code. + --external-id string The subscription external unique identifier (provided by your own application). -h, --help help for subscriptions --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --overridden string When set, filters subscriptions by whether their plan is an override of a parent plan. 'true' returns only subscriptions on overridden plans; 'false' returns only those on standard (non-overridden) plans. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --plan-code string The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans. - --status string If the field is not defined, Lago will return only 'active' subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: 'pending', 'canceled', 'terminated', 'active'. + --status string If the field is not defined, Lago will return only 'active' subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: 'pending', 'canceled', 'terminated', 'active', 'incomplete'. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_entitlements_create.md b/docs/reference/lago_entitlements_create.md index 34b0657..6d5b19f 100644 --- a/docs/reference/lago_entitlements_create.md +++ b/docs/reference/lago_entitlements_create.md @@ -4,7 +4,7 @@ Create an entitlement ### Synopsis -This endpoint creates new entitlements by adding features to a plan. Note that all existing entitlements will be deleted and replaced by the ones provided. To add a new entitlement without removing the existing ones, use PATCH. The feature must exist and all privileges must be valid for the feature. +This endpoint creates new entitlements by adding features to a plan. Note that all existing entitlements will be deleted and replaced by the ones provided. Sending an empty `entitlements` object, or omitting the key, therefore removes every entitlement of the plan. To add a new entitlement without removing the existing ones, use PATCH. The feature must exist and all privileges must be valid for the feature. ``` lago entitlements create [flags] diff --git a/docs/reference/lago_entitlements_destroy-subscription-entitlement-privilege.md b/docs/reference/lago_entitlements_destroy-subscription-entitlement-privilege.md index e082d01..ba32475 100644 --- a/docs/reference/lago_entitlements_destroy-subscription-entitlement-privilege.md +++ b/docs/reference/lago_entitlements_destroy-subscription-entitlement-privilege.md @@ -4,7 +4,7 @@ Remove a privilege from a subscription entitlement override ### Synopsis -This endpoint removes a specific privilege from a subscription entitlement. The privilege entitlement remains available from the plan. +This endpoint removes a specific privilege from a subscription entitlement. The plan keeps the privilege and other subscriptions are not affected, but this subscription stops getting it. It returns the full list of entitlements remaining on the subscription. ``` lago entitlements destroy-subscription-entitlement-privilege [flags] @@ -21,7 +21,7 @@ lago entitlements destroy-subscription-entitlement-privilege [flags] @@ -21,7 +21,7 @@ lago entitlements destroy-subscription-entitlement ``` -h, --help help for destroy-subscription-entitlement - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_entitlements_list-subscription-entitlements.md b/docs/reference/lago_entitlements_list-subscription-entitlements.md index 241aa51..5b47c9a 100644 --- a/docs/reference/lago_entitlements_list-subscription-entitlements.md +++ b/docs/reference/lago_entitlements_list-subscription-entitlements.md @@ -20,7 +20,7 @@ lago entitlements list-subscription-entitlements [flags] ``` -h, --help help for list-subscription-entitlements - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_entitlements_update-subscription-entitlements.md b/docs/reference/lago_entitlements_update-subscription-entitlements.md index 4a72293..2553a1f 100644 --- a/docs/reference/lago_entitlements_update-subscription-entitlements.md +++ b/docs/reference/lago_entitlements_update-subscription-entitlements.md @@ -4,7 +4,7 @@ Update subscription entitlements ### Synopsis -This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints. +This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints. ``` lago entitlements update-subscription-entitlements [flags] @@ -22,7 +22,7 @@ lago entitlements update-subscription-entitlements [flags] ``` -h, --help help for update-subscription-entitlements --input string Complete JSON request body or @file.json - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_entitlements_update.md b/docs/reference/lago_entitlements_update.md index 4c24176..0344502 100644 --- a/docs/reference/lago_entitlements_update.md +++ b/docs/reference/lago_entitlements_update.md @@ -4,7 +4,7 @@ Partial update of an entitlement ### Synopsis -This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints. +This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints. ``` lago entitlements update [flags] diff --git a/docs/reference/lago_events.md b/docs/reference/lago_events.md index 493d859..d3ea619 100644 --- a/docs/reference/lago_events.md +++ b/docs/reference/lago_events.md @@ -35,4 +35,4 @@ Manage Lago events * [lago events estimate-instant-fees](lago_events_estimate-instant-fees) - Estimate instant fees for a pay in advance charge * [lago events get](lago_events_get) - Retrieve a specific event * [lago events list](lago_events_list) - List all events -* [lago events send](lago_events_send) - Send usage events +* [lago events send](lago_events_send) - Send a usage event diff --git a/docs/reference/lago_events_estimate-fees.md b/docs/reference/lago_events_estimate-fees.md index 907e3b8..fe9c51f 100644 --- a/docs/reference/lago_events_estimate-fees.md +++ b/docs/reference/lago_events_estimate-fees.md @@ -19,11 +19,12 @@ lago events estimate-fees [flags] ### Options ``` - --code string The code that identifies a targeted billable metric. It is essential that this code matches the 'code' property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process. - --external-subscription-id string The unique identifier of the subscription within your application. - -h, --help help for estimate-fees - --input string Complete JSON request body or @file.json - --properties string This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a 'sum_agg', 'max_agg', or 'unique_count_agg' aggregation method. However, when using a simple 'count_agg', this object is not required. Any property of the targeted billable metric can be sent here, in addition to the documented fields below. + --code string The code that identifies a targeted billable metric. It is essential that this code matches the 'code' property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process. + --external-subscription-id string The unique identifier of the subscription within your application. + -h, --help help for estimate-fees + --input string Complete JSON request body or @file.json + --precise-total-amount-cents string The precise total amount in cents with precision used by the 'dynamic' pricing model to compute the estimated usage amount. Defaults to '0' when omitted. + --properties string This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a 'sum_agg', 'max_agg', or 'unique_count_agg' aggregation method. However, when using a simple 'count_agg', this object is not required. Any property of the targeted billable metric can be sent here, in addition to the documented fields below. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_events_get.md b/docs/reference/lago_events_get.md index a16533d..d256743 100644 --- a/docs/reference/lago_events_get.md +++ b/docs/reference/lago_events_get.md @@ -4,7 +4,7 @@ Retrieve a specific event ### Synopsis -This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription. +This endpoint is used for retrieving a specific usage measurement event that has been sent to a subscription. Note that transaction_id is unique per external_subscription_id so multiple subscriptions can share the same transaction_id. This endpoint will only return the first event found with the given transaction_id. diff --git a/docs/reference/lago_events_list.md b/docs/reference/lago_events_list.md index 27e5a5a..4bb5d44 100644 --- a/docs/reference/lago_events_list.md +++ b/docs/reference/lago_events_list.md @@ -20,14 +20,14 @@ lago events list [flags] ``` --all Fetch every page - --code string Filter events by its code. + --code string Filter events by code. --external-subscription-id string External subscription ID -h, --help help for list --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --timestamp-from string Filter events by timestamp starting from a specific date. - --timestamp-from-started-at string Requires 'external_subscription_id' to be set. Filter events by timestamp after the subscription started at datetime. + --timestamp-from-started-at string Requires 'external_subscription_id' to be set, and cannot be combined with 'timestamp_from'. Filter events by timestamp after the subscription started at datetime. --timestamp-to string Filter events by timestamp up to a specific date. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) diff --git a/docs/reference/lago_events_send.md b/docs/reference/lago_events_send.md index aa35c38..80760d5 100644 --- a/docs/reference/lago_events_send.md +++ b/docs/reference/lago_events_send.md @@ -1,10 +1,10 @@ ## lago events send -Send usage events +Send a usage event ### Synopsis -This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription. +This endpoint is used for transmitting a usage measurement event to a subscription. ``` lago events send [flags] @@ -29,7 +29,7 @@ lago events send [flags] --properties string This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a 'sum_agg', 'max_agg', or 'unique_count_agg' aggregation method. However, when using a simple 'count_agg', this object is not required. --timestamp string This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC). If this timestamp is not provided, the API will automatically set it to the time of event reception. - You can also provide miliseconds precision by appending decimals to the timestamp. + You can also provide milliseconds precision by appending decimals to the timestamp. --transaction-id string This field represents a unique identifier for the event. It is crucial for ensuring idempotency, meaning that each event can be uniquely identified and processed without causing any unintended side effects. diff --git a/docs/reference/lago_features.md b/docs/reference/lago_features.md index 4a48bd3..cc03e0e 100644 --- a/docs/reference/lago_features.md +++ b/docs/reference/lago_features.md @@ -31,7 +31,7 @@ Manage Lago features * [lago](lago) - The official CLI for Lago billing * [lago features create](lago_features_create) - Create a feature * [lago features delete](lago_features_delete) - Delete a feature -* [lago features delete-feature-privilege](lago_features_delete-feature-privilege) - Delete a privilege. Deleting a privilege removes it from all plans and subscriptions. +* [lago features delete-feature-privilege](lago_features_delete-feature-privilege) - Delete a privilege * [lago features get](lago_features_get) - Retrieve a feature * [lago features list](lago_features_list) - List all features * [lago features update](lago_features_update) - Update a feature diff --git a/docs/reference/lago_features_create.md b/docs/reference/lago_features_create.md index 8a85ef0..abe106d 100644 --- a/docs/reference/lago_features_create.md +++ b/docs/reference/lago_features_create.md @@ -20,12 +20,12 @@ lago features create [flags] ### Options ``` - --code string Unique code used to identify the feature. - --description string Internal description of the feature. + --code string Unique code used to identify the feature. Max 255 characters. + --description string Internal description of the feature. Max 600 characters. -h, --help help for create --input string Complete JSON request body or @file.json - --name string Name of the feature. - --privileges string Privileges associated with this feature. Can be empty. + --name string Name of the feature. Max 255 characters. + --privileges string Privileges associated with this feature. Can be empty. Each privilege code must appear only once in the list. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_features_delete-feature-privilege.md b/docs/reference/lago_features_delete-feature-privilege.md index ac6aee2..265e947 100644 --- a/docs/reference/lago_features_delete-feature-privilege.md +++ b/docs/reference/lago_features_delete-feature-privilege.md @@ -1,10 +1,10 @@ ## lago features delete-feature-privilege -Delete a privilege. Deleting a privilege removes it from all plans and subscriptions. +Delete a privilege ### Synopsis -Delete privilege from feature. Deleting a privilege removes it from all plans and subscriptions. +This endpoint deletes a privilege from a feature. Deleting a privilege removes it from all plans and subscriptions. ``` lago features delete-feature-privilege [flags] diff --git a/docs/reference/lago_features_list.md b/docs/reference/lago_features_list.md index 3aaff40..1a9c1e1 100644 --- a/docs/reference/lago_features_list.md +++ b/docs/reference/lago_features_list.md @@ -22,9 +22,9 @@ lago features list [flags] --all Fetch every page -h, --help help for list --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. - --search-term string Search in name, code and description. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. + --search-term string Filter features by search term. The term is matched against the name, the code and the description of the feature. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_features_update.md b/docs/reference/lago_features_update.md index 5b7b762..d0fda2a 100644 --- a/docs/reference/lago_features_update.md +++ b/docs/reference/lago_features_update.md @@ -4,7 +4,7 @@ Update a feature ### Synopsis -This endpoint updates an existing feature representing an entitlement component of your application. +This endpoint updates an existing feature representing an entitlement component of your application. Only the fields present in the payload are updated. Privileges are matched by their code, an unknown code adds a new privilege and a known one updates its name and adds the select options of the payload to the existing ones. The value type of an existing privilege cannot be changed. Privileges left out of the payload are kept, use the delete privilege endpoint to remove one. ``` lago features update [flags] @@ -20,11 +20,11 @@ lago features update [flags] ### Options ``` - --description string Internal description of the feature. + --description string Internal description of the feature. Max 600 characters. -h, --help help for update --input string Complete JSON request body or @file.json - --name string Name of the feature. - --privileges string Privileges associated with this feature. Can be empty. + --name string Name of the feature. Max 255 characters. + --privileges string Privileges associated with this feature. Can be empty. Each privilege code must appear only once in the list. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_fees_list.md b/docs/reference/lago_fees_list.md index 2e6cde9..f8fd84f 100644 --- a/docs/reference/lago_fees_list.md +++ b/docs/reference/lago_fees_list.md @@ -23,7 +23,7 @@ lago fees list [flags] --billable-metric-code string Filter results by the 'code' of the billable metric attached to the fee. Only applies to 'charge' types. --created-at-from string Filter results created at or after this date and time in UTC. --created-at-to string Filter results created at or before this date and time in UTC. - --currency string Filter results by the fee's currency.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --currency string Filter results by the fee's currency.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --event-transaction-id string Filter results by event transaction ID --external-customer-id string Unique identifier assigned to the customer in your application. --external-subscription-id string External subscription ID @@ -32,9 +32,9 @@ lago fees list [flags] --fee-type string The fee type. Possible values are 'add_on', 'charge', 'fixed_charge', 'credit', 'subscription' or 'commitment'.; one of: charge, fixed_charge, add_on, subscription, credit, commitment -h, --help help for list --limit string Results per page (1-1000) - --page string Page number. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. --payment-status string Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The possible values for this field are 'pending', 'succeeded', 'failed' and 'refunded'.; one of: pending, succeeded, failed, refunded - --per-page string Number of records per page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --refunded-at-from string Filter results with a payment refund at or after this date and time in UTC. --refunded-at-to string Filter results with a payment refund at or before this date and time in UTC. --succeeded-at-from string Filter results with a payment success at or after this date and time in UTC. diff --git a/docs/reference/lago_fees_update.md b/docs/reference/lago_fees_update.md index a67be67..9319ba7 100644 --- a/docs/reference/lago_fees_update.md +++ b/docs/reference/lago_fees_update.md @@ -4,7 +4,7 @@ Update a fee ### Synopsis -This endpoint is used for updating a specific fee that has been issued. +This endpoint is used for updating the payment status of a specific fee. Only a fee that is not attached to an invoice can be updated; once the fee is on an invoice, its payment status follows the invoice and the endpoint returns a `405` error. ``` lago fees update [flags] diff --git a/docs/reference/lago_invoices_create.md b/docs/reference/lago_invoices_create.md index ee117b0..6c57cd4 100644 --- a/docs/reference/lago_invoices_create.md +++ b/docs/reference/lago_invoices_create.md @@ -21,7 +21,7 @@ lago invoices create [flags] ``` --billing-entity-code string The code of the billing entity to issue the invoice from. If not provided, the customer's billing entity is used. - --currency string The currency of the invoice.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --currency string The currency of the invoice.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --external-customer-id string Unique identifier assigned to the customer in your application. --fees string API field (array) -h, --help help for create diff --git a/docs/reference/lago_invoices_download.md b/docs/reference/lago_invoices_download.md index b36192a..fda251c 100644 --- a/docs/reference/lago_invoices_download.md +++ b/docs/reference/lago_invoices_download.md @@ -4,7 +4,8 @@ Download an invoice PDF ### Synopsis -This endpoint is used for downloading a specific invoice PDF document. +This endpoint is used for downloading a specific invoice PDF document. Only `finalized` invoices can be downloaded; any other invoice returns a `404` error. +When the PDF has already been generated, the invoice object is returned and its `file_url` points to the document. When it has not been generated yet, the response is a `200` with an empty body and the generation starts in the background. Call the endpoint again to get the invoice object with its `file_url`. ``` lago invoices download [flags] diff --git a/docs/reference/lago_invoices_list.md b/docs/reference/lago_invoices_list.md index ccb7381..c2c3834 100644 --- a/docs/reference/lago_invoices_list.md +++ b/docs/reference/lago_invoices_list.md @@ -31,16 +31,18 @@ lago invoices list [flags] --issuing-date-to string Filter invoices up to a specific date. --limit string Results per page (1-1000) --metadata[key] string Filter invoices by metadata. Replace 'key' with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for invoice without given metadata key. For example, 'metadata[color]=blue'. - --page string Page number. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. --partially-paid string Filter invoices that are partially paid. When 'true', only invoices with a non-zero amount paid that is below the total due are returned. When 'false', those invoices are excluded. --payment-dispute-lost string Filter invoices with a payment dispute lost. Possible values are 'true' or 'false'. --payment-overdue string Filter invoices by payment_overdue. Possible values are 'true' or 'false'. + --payment-status string Filter invoices by payment status. Possible values are 'pending', 'failed' or 'succeeded'.; one of: pending, failed, succeeded --payment-statuses string Filter invoices by payment statuses. Possible values are 'pending', 'failed' or 'succeeded'. - --per-page string Number of records per page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --purchase-order-number string Filter by the invoice purchase order number. The match is exact but case-insensitive. - --search-term string Search invoices by id, number, customer name, customer external_id or customer email. + --search-term string Search invoices by id, number, purchase order number, or by the name, legal name, first name, last name, external_id or email of the customer. --self-billed string Filter invoices by self billed. Possible values are 'true' or 'false'. --settlements string Filter invoices settled by at least one of the given settlement types. 'payment' matches invoices settled by a payment, 'credit_note' matches invoices settled by a credit note. + --status string Filter invoices by status. Possible values are 'draft', 'failed', 'finalized', 'pending' and 'voided'.; one of: draft, finalized, failed, pending, voided --statuses string Filter invoices by statuses. Possible values are 'draft', 'failed', 'finalized', 'pending' and 'voided'. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) diff --git a/docs/reference/lago_invoices_preview.md b/docs/reference/lago_invoices_preview.md index cf1eada..ecc54fb 100644 --- a/docs/reference/lago_invoices_preview.md +++ b/docs/reference/lago_invoices_preview.md @@ -26,19 +26,19 @@ lago invoices preview [flags] --city string The city of the customer's billing address --country string Country code of the customer's billing address. Format must be ISO 3166 (alpha-2); one of: AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW --coupons string API field (array) - --currency string The currency of the invoice.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --currency string The currency of the invoice.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --external-id string Unique identifier assigned to the customer in your application. -h, --help help for preview --input string Complete JSON request body or @file.json --integration-customers string API field (array) --name string The full name of the customer --plan-code string The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance. - --shipping-address-address-line1 string The first line of the billing address - --shipping-address-address-line2 string The second line of the billing address - --shipping-address-city string The city of the customer's billing address - --shipping-address-country string Country code of the customer's billing address. Format must be ISO 3166 (alpha-2); one of: , AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW - --shipping-address-state string The state of the customer's billing address - --shipping-address-zipcode string The zipcode of the customer's billing address + --shipping-address-address-line1 string The first line of the shipping address + --shipping-address-address-line2 string The second line of the shipping address + --shipping-address-city string The city of the customer's shipping address + --shipping-address-country string Country code of the customer's shipping address. Format must be ISO 3166 (alpha-2); one of: , AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW + --shipping-address-state string The state of the customer's shipping address + --shipping-address-zipcode string The zipcode of the customer's shipping address --state string The state of the customer's billing address --subscription-at string The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with 'anniversary' billing time. The 'anniversary_date' should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). --subscriptions-external-ids string API field (array) @@ -46,6 +46,7 @@ lago invoices preview [flags] --subscriptions-terminated-at string The date and time when the subscription is terminated. It should defined in the future. --tax-identification-number string The tax identification number of the customer --timezone string The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu + --zipcode string The zipcode of the customer's billing address. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_order-forms_list.md b/docs/reference/lago_order-forms_list.md index 4747606..35acd9c 100644 --- a/docs/reference/lago_order-forms_list.md +++ b/docs/reference/lago_order-forms_list.md @@ -30,8 +30,8 @@ lago order-forms list [flags] --limit string Results per page (1-1000) --number string Filter order forms by their number, as assigned by Lago. --owner-id string Filter order forms by the Lago identifiers of the users owning the quote they come from. - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --quote-number string Filter order forms by the number of the quote they come from. --search-term string Search order forms by number. --status string Filter order forms by status. Possible values are 'generated', 'signed', 'expired' and 'voided'. diff --git a/docs/reference/lago_orders_list.md b/docs/reference/lago_orders_list.md index 5514eef..2e1203f 100644 --- a/docs/reference/lago_orders_list.md +++ b/docs/reference/lago_orders_list.md @@ -31,8 +31,8 @@ lago orders list [flags] --order-form-number string Filter orders by the number of the order form they come from. --order-type string Filter orders by the order type of the quote they come from. Possible values are 'subscription_creation', 'subscription_amendment' and 'one_off'. --owner-id string Filter orders by the Lago identifiers of the users owning the quote they come from. - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --quote-number string Filter orders by the number of the quote they come from. --search-term string Search orders by number. --status string Filter orders by status. Possible values are 'created', 'executed' and 'failed'. diff --git a/docs/reference/lago_organizations_update.md b/docs/reference/lago_organizations_update.md index 097c4a6..ba45b49 100644 --- a/docs/reference/lago_organizations_update.md +++ b/docs/reference/lago_organizations_update.md @@ -4,7 +4,7 @@ Update your organization ### Synopsis -This endpoint is used to update your own organization's settings. +This endpoint is used to update your own organization's settings. The same payload is also applied to the default billing entity of your organization. ``` lago organizations update [flags] @@ -23,12 +23,12 @@ lago organizations update [flags] --address-line1 string The first line of your organization's billing address. --address-line2 string The second line of your organization's billing address. --billing-configuration-document-locale string The locale of the billing documents, expressed in the ISO 639-1 format. This field indicates the language or regional variant used for the documents content issued or the embeddable customer portal. - --billing-configuration-invoice-footer string The customer invoice message that appears at the bottom of each billing documents. - --billing-configuration-invoice-grace-period string The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period. + --billing-configuration-invoice-footer string The customer invoice message that appears at the bottom of each billing documents. It accepts up to 600 characters. + --billing-configuration-invoice-grace-period string The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period. This is a premium feature, the value is ignored without a premium license. --city string The city of your organization's billing address. --country string The country of your organization.; one of: , AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW - --default-currency string The default currency of an organization.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW - --document-number-prefix string Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four digits of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago. + --default-currency string The default currency of an organization.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --document-number-prefix string Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four characters of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago. --document-numbering string This parameter configures the method of incrementing invoice numbers for your customers. - 'per_customer': Invoice numbers are incremented individually for each customer. This means every customer will have their own unique sequence of invoice numbers, separate from other customers. It ensures that each customer's invoice numbers follow a distinct and isolated numbering pattern. @@ -36,18 +36,18 @@ lago organizations update [flags] The default value for 'document_numbering' is set to 'per_customer', meaning that, unless changed, invoice numbers will increment uniquely for each customer.; one of: per_customer, per_organization --email string The email address of your organization used to bill your customers. - --email-settings string Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values are 'invoice.finalized', 'credit_note.created' and 'payment_receipt.created'. + --email-settings string Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values are 'invoice.finalized', 'credit_note.created' and 'payment_receipt.created'. This is a premium feature, the value is ignored without a premium license. --finalize-zero-amount-invoice string Determines whether invoices with a zero total amount should be finalized. If set to true, zero amount invoices will be finalized. If set to false, zero amount invoices will not be finalized. -h, --help help for update --input string Complete JSON request body or @file.json --legal-name string The legal name of your organization. --legal-number string The legal number of your organization. --net-payment-term string The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized. - --slug string A concise and unique identifier for your organization, used as a prefix in customer slugs. + --slug string A concise and unique identifier for your organization. It must contain between 3 and 40 characters, limited to lowercase letters, digits and hyphens, and it must start and end with a letter or a digit. Lago trims it and converts it to lowercase before saving it. A value already taken by another organization, or one of the names Lago reserves for its own routes, is rejected. --state string The state of your organization's billing address. --tax-identification-number string The tax identification number of your organization. - --timezone string Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu - --webhook-url string The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner. + --timezone string Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. This is a premium feature, the value is ignored without a premium license.; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu + --webhook-url string Sets the URL of the first webhook endpoint of your organization. This URL allows your organization to receive important messages, notifications, or data from the Lago system. When your organization has no webhook endpoint yet, this creates one. --zipcode string The zipcode of your organization's billing address. ``` diff --git a/docs/reference/lago_payment-methods_list-customers-payment-methods.md b/docs/reference/lago_payment-methods_list-customers-payment-methods.md index 733bf19..a42e2e6 100644 --- a/docs/reference/lago_payment-methods_list-customers-payment-methods.md +++ b/docs/reference/lago_payment-methods_list-customers-payment-methods.md @@ -4,7 +4,7 @@ List all customer payment methods ### Synopsis -This endpoint retrieves all payment methods of a Customer. +This endpoint retrieves all payment methods of a customer. ``` lago payment-methods list-customers-payment-methods [flags] @@ -22,8 +22,8 @@ lago payment-methods list-customers-payment-methods [flag --all Fetch every page -h, --help help for list-customers-payment-methods --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_payment-methods_payment-method-set-as-default.md b/docs/reference/lago_payment-methods_payment-method-set-as-default.md index beb1116..2b07870 100644 --- a/docs/reference/lago_payment-methods_payment-method-set-as-default.md +++ b/docs/reference/lago_payment-methods_payment-method-set-as-default.md @@ -4,7 +4,7 @@ Set the payment method as default ### Synopsis -Use the payment method as default when not selected a payment method +This endpoint sets a payment method as the customer's default one. It is the payment method Lago uses when a payment is triggered without an explicit one. Any other default payment method of the customer is unset. ``` lago payment-methods payment-method-set-as-default [flags] diff --git a/docs/reference/lago_payment-receipts_list.md b/docs/reference/lago_payment-receipts_list.md index c58c570..85c8042 100644 --- a/docs/reference/lago_payment-receipts_list.md +++ b/docs/reference/lago_payment-receipts_list.md @@ -21,10 +21,10 @@ lago payment-receipts list [flags] ``` --all Fetch every page -h, --help help for list - --invoice-id string Filter payment receipts by invoice id. + --invoice-id string Filter payment receipts by invoice. It returns the receipts of the payments made on this invoice, including the payments made through a payment request that covers it. --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_payment-requests_create.md b/docs/reference/lago_payment-requests_create.md index 2850dd3..a0483eb 100644 --- a/docs/reference/lago_payment-requests_create.md +++ b/docs/reference/lago_payment-requests_create.md @@ -4,7 +4,7 @@ Create a payment request ### Synopsis -This endpoint is used to create a payment request to collect payments of overdue invoices of a given customer +This endpoint is used to create a payment request to collect the payment of the overdue invoices of a customer. ``` lago payment-requests create [flags] @@ -20,11 +20,11 @@ lago payment-requests create [flags] ### Options ``` - --email string The customer's email address used for sending dunning notifications - --external-customer-id string The customer external unique identifier (provided by your own application) + --email string The email address used for sending dunning notifications. When omitted, the customer's own email address is used. + --external-customer-id string The customer external unique identifier (provided by your own application). -h, --help help for create --input string Complete JSON request body or @file.json - --lago-invoice-ids string A list of Lago IDs for the customer's overdue invoices to start the dunning process + --lago-invoice-ids string A list of Lago IDs for the customer's overdue invoices to start the dunning process. --payment-method-payment-method-id string The unique identifier of the payment method (required when using a specific provider payment method). --payment-method-payment-method-type string The type of payment method to use.; one of: provider, manual ``` diff --git a/docs/reference/lago_payment-requests_list.md b/docs/reference/lago_payment-requests_list.md index 4052ab8..d05d641 100644 --- a/docs/reference/lago_payment-requests_list.md +++ b/docs/reference/lago_payment-requests_list.md @@ -25,9 +25,9 @@ lago payment-requests list [flags] --external-customer-id string Unique identifier assigned to the customer in your application. -h, --help help for list --limit string Results per page (1-1000) - --page string Page number. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. --payment-status string Filter by payment status. Possible values are 'pending', 'failed' or 'succeeded'.; one of: pending, failed, succeeded - --per-page string Number of records per page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_payments_create.md b/docs/reference/lago_payments_create.md index 1541e1e..2754774 100644 --- a/docs/reference/lago_payments_create.md +++ b/docs/reference/lago_payments_create.md @@ -20,12 +20,12 @@ lago payments create [flags] ### Options ``` - --amount-cents string The payment amount in cents + --amount-cents string The payment amount in cents. It must be greater than zero. -h, --help help for create --input string Complete JSON request body or @file.json - --invoice-id string Unique identifier assigned to the invoice - --paid-at string The date the payment was made - --reference string Reference for the payment + --invoice-id string Unique identifier of the invoice the payment is recorded on, created by Lago. + --paid-at string The date the payment was made. It is returned as the payment's 'created_at'. When omitted, the date and time of the request is used. + --reference string Reference for the payment, such as the bank transfer or cheque number. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_payments_list.md b/docs/reference/lago_payments_list.md index 61d07df..8ac70d0 100644 --- a/docs/reference/lago_payments_list.md +++ b/docs/reference/lago_payments_list.md @@ -24,8 +24,8 @@ lago payments list [flags] -h, --help help for list --invoice-id string Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system. --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_plans_charges.md b/docs/reference/lago_plans_charges.md index bcd60cd..c4a5972 100644 --- a/docs/reference/lago_plans_charges.md +++ b/docs/reference/lago_plans_charges.md @@ -22,8 +22,8 @@ lago plans charges [flags] --all Fetch every page -h, --help help for charges --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_plans_create-plan-charge-filter.md b/docs/reference/lago_plans_create-plan-charge-filter.md index 954fa50..d3e649f 100644 --- a/docs/reference/lago_plans_create-plan-charge-filter.md +++ b/docs/reference/lago_plans_create-plan-charge-filter.md @@ -20,7 +20,7 @@ lago plans create-plan-charge-filter [flags] ### Options ``` - --cascade-updates string This field determines whether the creation of the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. + --cascade-updates string This field determines whether the creation of the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints. -h, --help help for create-plan-charge-filter --input string Complete JSON request body or @file.json --invoice-display-name string Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name. diff --git a/docs/reference/lago_plans_create.md b/docs/reference/lago_plans_create.md index e78aff7..d1f9090 100644 --- a/docs/reference/lago_plans_create.md +++ b/docs/reference/lago_plans_create.md @@ -21,7 +21,7 @@ lago plans create [flags] ``` --amount-cents string The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan. - --amount-currency string The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --amount-currency string The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --bill-charges-monthly string This field, when set to 'true', enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is 'yearly' or 'semiannual'. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is 'yearly' or 'semiannual'. --bill-fixed-charges-monthly string This field, when set to 'true', enables to invoice fixed charges on monthly basis, even if the cadence of the plan is 'yearly' or 'semiannual'. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is 'yearly' or 'semiannual'. --charges string Additional usage-based charges for this plan. diff --git a/docs/reference/lago_plans_filters.md b/docs/reference/lago_plans_filters.md index 64ad1c9..2a8fdc9 100644 --- a/docs/reference/lago_plans_filters.md +++ b/docs/reference/lago_plans_filters.md @@ -22,8 +22,8 @@ lago plans filters [flags] --all Fetch every page -h, --help help for filters --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_plans_fixed-charges.md b/docs/reference/lago_plans_fixed-charges.md index b70af89..16144c8 100644 --- a/docs/reference/lago_plans_fixed-charges.md +++ b/docs/reference/lago_plans_fixed-charges.md @@ -22,8 +22,8 @@ lago plans fixed-charges [flags] --all Fetch every page -h, --help help for fixed-charges --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_plans_list.md b/docs/reference/lago_plans_list.md index 4830d4a..7a34a1f 100644 --- a/docs/reference/lago_plans_list.md +++ b/docs/reference/lago_plans_list.md @@ -22,8 +22,8 @@ lago plans list [flags] --all Fetch every page -h, --help help for list --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_plans_update-plan-charge-filter.md b/docs/reference/lago_plans_update-plan-charge-filter.md index ef3fdd1..02f7f2c 100644 --- a/docs/reference/lago_plans_update-plan-charge-filter.md +++ b/docs/reference/lago_plans_update-plan-charge-filter.md @@ -20,7 +20,7 @@ lago plans update-plan-charge-filter [flags] ### Options ``` - --cascade-updates string This field determines whether the changes made to the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. + --cascade-updates string This field determines whether the changes made to the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints. -h, --help help for update-plan-charge-filter --input string Complete JSON request body or @file.json --invoice-display-name string Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name. diff --git a/docs/reference/lago_plans_update-plan-charge.md b/docs/reference/lago_plans_update-plan-charge.md index 3a16254..4403d5f 100644 --- a/docs/reference/lago_plans_update-plan-charge.md +++ b/docs/reference/lago_plans_update-plan-charge.md @@ -6,6 +6,10 @@ Update a charge This endpoint updates a specific charge for a plan. +The payload replaces the charge configuration: `charge_model` must be sent on every update, and `invoice_display_name` is cleared when it is left out. + +Once the plan is attached to a subscription, only `invoice_display_name`, `properties`, `filters`, `tax_codes`, `applied_pricing_unit` and `accepts_target_wallet` are applied. The other fields are ignored. + ``` lago plans update-plan-charge [flags] ``` diff --git a/docs/reference/lago_plans_update-plan-fixed-charge.md b/docs/reference/lago_plans_update-plan-fixed-charge.md index fc55972..b928437 100644 --- a/docs/reference/lago_plans_update-plan-fixed-charge.md +++ b/docs/reference/lago_plans_update-plan-fixed-charge.md @@ -6,6 +6,10 @@ Update a fixed charge This endpoint updates a specific fixed charge for a plan. +The payload replaces the fixed charge configuration: `units` and `charge_model` must be sent on every update, and `invoice_display_name` is cleared when it is left out. + +Once the plan is attached to a subscription, `code` and `charge_model` are ignored. + ``` lago plans update-plan-fixed-charge [flags] ``` diff --git a/docs/reference/lago_plans_update.md b/docs/reference/lago_plans_update.md index cdd55fd..72271df 100644 --- a/docs/reference/lago_plans_update.md +++ b/docs/reference/lago_plans_update.md @@ -21,7 +21,7 @@ lago plans update [flags] ``` --amount-cents string The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan. - --amount-currency string The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --amount-currency string The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --bill-charges-monthly string This field, when set to 'true', enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly or semiannual. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is 'yearly' or 'semiannual'. --bill-fixed-charges-monthly string This field, when set to 'true', enables to invoice fixed charges on monthly basis, even if the cadence of the plan is 'yearly' or 'semiannual'. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is 'yearly' or 'semiannual'. --cascade-updates string This field determines whether the changes made to the plan should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. diff --git a/docs/reference/lago_quotes_list.md b/docs/reference/lago_quotes_list.md index 3268440..1bcc9e4 100644 --- a/docs/reference/lago_quotes_list.md +++ b/docs/reference/lago_quotes_list.md @@ -29,8 +29,8 @@ lago quotes list [flags] --number string Filter quotes by their number, as assigned by Lago. --order-type string Filter quotes by order type. Possible values are 'subscription_creation', 'subscription_amendment' and 'one_off'. --owner-id string Filter quotes by the Lago identifiers of the users owning them. - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --status string Filter quotes by the status of their current version. Possible values are 'draft', 'approved' and 'voided'. --to-date string Filter quotes created up to a specific date. --watch Poll and re-render when the response changes diff --git a/docs/reference/lago_quotes_versions.md b/docs/reference/lago_quotes_versions.md index 603be02..e30d949 100644 --- a/docs/reference/lago_quotes_versions.md +++ b/docs/reference/lago_quotes_versions.md @@ -24,8 +24,8 @@ lago quotes versions [flags] --all Fetch every page -h, --help help for versions --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_subscriptions_alerts.md b/docs/reference/lago_subscriptions_alerts.md index 8e20dfa..1c9cc67 100644 --- a/docs/reference/lago_subscriptions_alerts.md +++ b/docs/reference/lago_subscriptions_alerts.md @@ -19,8 +19,12 @@ lago subscriptions alerts [flags] ### Options ``` + --all Fetch every page -h, --help help for alerts - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --limit string Results per page (1-1000) + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_subscriptions_charges.md b/docs/reference/lago_subscriptions_charges.md index e745ee1..b0b40b7 100644 --- a/docs/reference/lago_subscriptions_charges.md +++ b/docs/reference/lago_subscriptions_charges.md @@ -23,9 +23,9 @@ lago subscriptions charges [flags] --all Fetch every page -h, --help help for charges --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_subscriptions_create-subscription-alert.md b/docs/reference/lago_subscriptions_create-subscription-alert.md index cb3ee8e..4dfb9d6 100644 --- a/docs/reference/lago_subscriptions_create-subscription-alert.md +++ b/docs/reference/lago_subscriptions_create-subscription-alert.md @@ -22,7 +22,7 @@ lago subscriptions create-subscription-alert [flags] ``` -h, --help help for create-subscription-alert --input string Complete JSON request body or @file.json - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_subscriptions_create-subscription-charge-filter.md b/docs/reference/lago_subscriptions_create-subscription-charge-filter.md index 0cda415..203702e 100644 --- a/docs/reference/lago_subscriptions_create-subscription-charge-filter.md +++ b/docs/reference/lago_subscriptions_create-subscription-charge-filter.md @@ -20,7 +20,7 @@ lago subscriptions create-subscription-charge-filter ### Options ``` - --cascade-updates string This field determines whether the creation of the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. + --cascade-updates string This field determines whether the creation of the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints. -h, --help help for create-subscription-charge-filter --input string Complete JSON request body or @file.json --invoice-display-name string Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name. @@ -40,7 +40,7 @@ lago subscriptions create-subscription-charge-filter --properties-pricing-group-keys string The list of event properties that are used to group the events on the invoice. --properties-rate string The percentage rate that is applied to the amount of each transaction for a 'percentage' charge model. It is expressed as a decimal value. --properties-volume-ranges string Volume ranges, sorted from bottom to top tiers, used for a 'volume' charge model. - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete --values string List of possible filter values. The key and values must match one of the billable metric filters. ``` diff --git a/docs/reference/lago_subscriptions_create.md b/docs/reference/lago_subscriptions_create.md index 63cb978..7a2188c 100644 --- a/docs/reference/lago_subscriptions_create.md +++ b/docs/reference/lago_subscriptions_create.md @@ -41,12 +41,11 @@ lago subscriptions create [flags] --payment-method-payment-method-type string The type of payment method to use.; one of: provider, manual --plan-code string The unique code representing the plan to be attached to the customer. This code must correspond to the 'code' property of one of the active plans. --plan-overrides-amount-cents string The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan. - --plan-overrides-amount-currency string The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --plan-overrides-amount-currency string The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --plan-overrides-charges string Additional usage-based charges for this plan. --plan-overrides-description string The description on the plan. --plan-overrides-fixed-charges string Fixed charge overrides for the subscription. When 'plan_overrides' contains only 'fixed_charges' and every entry contains only 'id', 'units', and optionally 'apply_units_immediately', the units are recorded as a per-subscription override without creating a plan override, and subscription-scoped reads return these units. If any entry carries other fields, or 'plan_overrides' contains any other key, the request is applied as a full plan override for the subscription instead. --plan-overrides-invoice-display-name string Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name. - --plan-overrides-metadata string Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. --plan-overrides-minimum-commitment-amount-cents string The amount of the minimum commitment in cents. --plan-overrides-minimum-commitment-invoice-display-name string Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name. --plan-overrides-minimum-commitment-tax-codes string List of unique code used to identify the taxes. diff --git a/docs/reference/lago_subscriptions_delete-all-subscription-alerts.md b/docs/reference/lago_subscriptions_delete-all-subscription-alerts.md index e4caa42..a19aba9 100644 --- a/docs/reference/lago_subscriptions_delete-all-subscription-alerts.md +++ b/docs/reference/lago_subscriptions_delete-all-subscription-alerts.md @@ -21,7 +21,7 @@ lago subscriptions delete-all-subscription-alerts [flags] ``` -h, --help help for delete-all-subscription-alerts - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_subscriptions_delete-subscription-alert.md b/docs/reference/lago_subscriptions_delete-subscription-alert.md index 12f1034..98f2dba 100644 --- a/docs/reference/lago_subscriptions_delete-subscription-alert.md +++ b/docs/reference/lago_subscriptions_delete-subscription-alert.md @@ -21,7 +21,7 @@ lago subscriptions delete-subscription-alert [flags] ``` -h, --help help for delete-subscription-alert - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_subscriptions_destroy-subscription-charge-filter.md b/docs/reference/lago_subscriptions_destroy-subscription-charge-filter.md index 7c6f772..f8b2c12 100644 --- a/docs/reference/lago_subscriptions_destroy-subscription-charge-filter.md +++ b/docs/reference/lago_subscriptions_destroy-subscription-charge-filter.md @@ -21,7 +21,7 @@ lago subscriptions destroy-subscription-charge-filter [flags] --all Fetch every page -h, --help help for filters --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_subscriptions_fixed-charges.md b/docs/reference/lago_subscriptions_fixed-charges.md index 76ddd7f..dc14a16 100644 --- a/docs/reference/lago_subscriptions_fixed-charges.md +++ b/docs/reference/lago_subscriptions_fixed-charges.md @@ -23,9 +23,9 @@ lago subscriptions fixed-charges [flags] --all Fetch every page -h, --help help for fixed-charges --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_subscriptions_get-subscription-alert.md b/docs/reference/lago_subscriptions_get-subscription-alert.md index 5fb09c6..f3e1add 100644 --- a/docs/reference/lago_subscriptions_get-subscription-alert.md +++ b/docs/reference/lago_subscriptions_get-subscription-alert.md @@ -20,7 +20,7 @@ lago subscriptions get-subscription-alert [flags] ``` -h, --help help for get-subscription-alert - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_subscriptions_get-subscription-charge-filter.md b/docs/reference/lago_subscriptions_get-subscription-charge-filter.md index 23d9523..f15b154 100644 --- a/docs/reference/lago_subscriptions_get-subscription-charge-filter.md +++ b/docs/reference/lago_subscriptions_get-subscription-charge-filter.md @@ -20,7 +20,7 @@ lago subscriptions get-subscription-charge-filter [flags] ``` -h, --help help for get-subscription-charge - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_subscriptions_get-subscription-fixed-charge.md b/docs/reference/lago_subscriptions_get-subscription-fixed-charge.md index f48637d..dade005 100644 --- a/docs/reference/lago_subscriptions_get-subscription-fixed-charge.md +++ b/docs/reference/lago_subscriptions_get-subscription-fixed-charge.md @@ -21,7 +21,7 @@ lago subscriptions get-subscription-fixed-charge [flags] ``` -h, --help help for get - --status string By default, this endpoint only return 'active' subscriptions. If you want to retrieve a subscription with a different 'status', you can specify it here. + --status string By default, this endpoint only returns 'active' subscriptions. If you want to retrieve a subscription with a different 'status', you can specify it here. - _Note: As there may exists multiple 'canceled' or 'terminated' subscribtions for the same 'external_id', it is recommended to use the "List all subscriptions" endpoint to retrieve those subscriptions._; one of: active, terminated, pending, canceled + _Note: As there may exist multiple 'canceled' or 'terminated' subscriptions for the same 'external_id', it is recommended to use the "List all subscriptions" endpoint to retrieve those subscriptions._; one of: active, terminated, pending, canceled, incomplete --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_subscriptions_list.md b/docs/reference/lago_subscriptions_list.md index 9952dca..a6bb5cd 100644 --- a/docs/reference/lago_subscriptions_list.md +++ b/docs/reference/lago_subscriptions_list.md @@ -20,17 +20,17 @@ lago subscriptions list [flags] ``` --all Fetch every page - --billing-entity-codes string Filter subscriptions by billing entity codes. + --billing-entity-codes string Filter subscriptions by billing entity codes. A code that does not match a billing entity of the organization returns a '404' error. --currency string Filter the results by currency, expressed as an ISO 4217 code. --external-customer-id string The customer external unique identifier (provided by your own application) --external-id string Filter subscriptions by their external unique identifier (provided by your own application). -h, --help help for list --limit string Results per page (1-1000) --overridden string When set, filters subscriptions by whether their plan is an override of a parent plan. 'true' returns only subscriptions on overridden plans; 'false' returns only those on standard (non-overridden) plans. - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --plan-code string The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans. - --status string If the field is not defined, Lago will return only 'active' subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: 'pending', 'canceled', 'terminated', 'active'. + --status string If the field is not defined, Lago will return only 'active' subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: 'pending', 'canceled', 'terminated', 'active', 'incomplete'. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_subscriptions_override-subscription-charge.md b/docs/reference/lago_subscriptions_override-subscription-charge.md index 0aa5d49..cec5424 100644 --- a/docs/reference/lago_subscriptions_override-subscription-charge.md +++ b/docs/reference/lago_subscriptions_override-subscription-charge.md @@ -49,7 +49,7 @@ lago subscriptions override-subscription-charge [fla --properties-pricing-group-keys string The list of event properties that are used to group the events on the invoice. --properties-rate string The percentage rate that is applied to the amount of each transaction for a 'percentage' charge model. It is expressed as a decimal value. --properties-volume-ranges string Volume ranges, sorted from bottom to top tiers, used for a 'volume' charge model. - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete --tax-codes string List of unique code used to identify the taxes. ``` diff --git a/docs/reference/lago_subscriptions_override-subscription-fixed-charge.md b/docs/reference/lago_subscriptions_override-subscription-fixed-charge.md index 51f98c5..f6301f5 100644 --- a/docs/reference/lago_subscriptions_override-subscription-fixed-charge.md +++ b/docs/reference/lago_subscriptions_override-subscription-fixed-charge.md @@ -43,7 +43,7 @@ lago subscriptions override-subscription-fixed-charge [flags] - 'credit': A credit note is generated for the unused subscription time. The unused amount is credited back to the customer. - 'refund': A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer. + - 'offset': A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due. - 'skip': No credit note is generated for the unused subscription time. - _Note: This field is only applicable to pay-in-advance plans and is ignored for pay-in-arrears plans._; one of: credit, refund, skip + _Note: This field is only applicable to pay-in-advance plans and is ignored for pay-in-arrears plans._; one of: credit, refund, offset, skip --on-termination-invoice string When a subscription is terminated before the end of its billing period, we generate an invoice for the unbilled usage. This field allows you to control the behavior of the invoice generation: diff --git a/docs/reference/lago_subscriptions_update-subscription-alert.md b/docs/reference/lago_subscriptions_update-subscription-alert.md index ee5a435..ffb607b 100644 --- a/docs/reference/lago_subscriptions_update-subscription-alert.md +++ b/docs/reference/lago_subscriptions_update-subscription-alert.md @@ -4,7 +4,7 @@ Update a subscription alert ### Synopsis -This endpoint allows you to update an existing alert for a subscription. +This endpoint allows you to update an existing alert for a subscription. A non-empty `thresholds` array replaces the whole set of thresholds on the alert. When `thresholds` is left out, or sent as an empty array, the thresholds already on the alert are kept. A threshold sent with a `code` it already had, and without `notify_on`, keeps the `notify_on` it had. ``` lago subscriptions update-subscription-alert [flags] @@ -25,8 +25,8 @@ lago subscriptions update-subscription-alert [flags] -h, --help help for update-subscription-alert --input string Complete JSON request body or @file.json --name string The name of the alert. - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled - --thresholds string Array of thresholds associated with the alert. + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete + --thresholds string Array of thresholds associated with the alert. An alert accepts at most 20 thresholds, and a larger array returns a '422' error with 'too_many_thresholds' on 'thresholds'. Two thresholds cannot share the same value and the same 'recurring' flag. The value of a recurring threshold must be positive. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_subscriptions_update-subscription-charge-filter.md b/docs/reference/lago_subscriptions_update-subscription-charge-filter.md index 7d4e15e..015cd29 100644 --- a/docs/reference/lago_subscriptions_update-subscription-charge-filter.md +++ b/docs/reference/lago_subscriptions_update-subscription-charge-filter.md @@ -20,7 +20,7 @@ lago subscriptions update-subscription-charge-filter ### Options ``` - --cascade-updates string This field determines whether the changes made to the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. + --cascade-updates string This field determines whether the changes made to the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints. -h, --help help for update-subscription-charge-filter --input string Complete JSON request body or @file.json --invoice-display-name string Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name. @@ -40,7 +40,7 @@ lago subscriptions update-subscription-charge-filter --properties-pricing-group-keys string The list of event properties that are used to group the events on the invoice. --properties-rate string The percentage rate that is applied to the amount of each transaction for a 'percentage' charge model. It is expressed as a decimal value. --properties-volume-ranges string Volume ranges, sorted from bottom to top tiers, used for a 'volume' charge model. - --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + --subscription-status string Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete --values string List of possible filter values. The key and values must match one of the billable metric filters. ``` diff --git a/docs/reference/lago_subscriptions_update.md b/docs/reference/lago_subscriptions_update.md index bbf8be6..9b989de 100644 --- a/docs/reference/lago_subscriptions_update.md +++ b/docs/reference/lago_subscriptions_update.md @@ -32,15 +32,26 @@ lago subscriptions update [flags] --invoice-custom-section-invoice-custom-section-codes string List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level. --invoice-custom-section-skip-invoice-custom-sections string Set to 'true' to exclude all invoice custom sections from PDF generation for invoices related to this resource. When 'true', 'invoice_custom_section_codes' is ignored. --name string The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan. + --on-termination-credit-note string Sets the default credit note behaviour applied when this subscription is later terminated before the end of its billing period: + + - 'credit': a credit note is generated for the unused subscription time. The unused amount is credited back to the customer. + - 'refund': a credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer. + - 'offset': a credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due. + - 'skip': no credit note is generated for the unused subscription time. + + _Note: This field is only applied to pay-in-advance plans and is ignored for pay-in-arrears plans._; one of: credit, refund, offset, skip + --on-termination-invoice string Sets the default invoice behaviour applied when this subscription is later terminated before the end of its billing period: + + - 'generate': an invoice is generated for the unbilled usage. + - 'skip': no invoice is generated for the unbilled usage.; one of: generate, skip --payment-method-payment-method-id string The unique identifier of the payment method (required when using a specific provider payment method). --payment-method-payment-method-type string The type of payment method to use.; one of: provider, manual --plan-overrides-amount-cents string The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan. - --plan-overrides-amount-currency string The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --plan-overrides-amount-currency string The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --plan-overrides-charges string Additional usage-based charges for this plan. --plan-overrides-description string The description on the plan. --plan-overrides-fixed-charges string Fixed charge overrides for the subscription. When 'plan_overrides' contains only 'fixed_charges' and every entry contains only 'id', 'units', and optionally 'apply_units_immediately', the units are recorded as a per-subscription override without creating a plan override, and subscription-scoped reads return these units. If any entry carries other fields, or 'plan_overrides' contains any other key, the request is applied as a full plan override for the subscription instead. --plan-overrides-invoice-display-name string Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name. - --plan-overrides-metadata string Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. --plan-overrides-minimum-commitment-amount-cents string The amount of the minimum commitment in cents. --plan-overrides-minimum-commitment-invoice-display-name string Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name. --plan-overrides-minimum-commitment-tax-codes string List of unique code used to identify the taxes. @@ -52,7 +63,7 @@ lago subscriptions update [flags] Set to 'true' to switch progressive billing off for this subscription specifically. This is the recommended way to stop progressive billing on a subscription that inherits thresholds from its plan, since clearing 'usage_thresholds' only removes subscription-level thresholds and does not remove those defined on (or inherited from) the plan. --purchase-order-number string The purchase order number associated with the subscription. It will be added to invoices generated for this subscription. - --status string By default, this endpoint only return 'active' subscriptions. If you want to update a subscription with a different 'status', you can specify it here.; one of: active, pending + --status string By default, this endpoint only updates 'active' subscriptions. If you want to update a subscription with a different 'status', you can specify it here.; one of: active, pending --subscription-at string The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). --usage-thresholds string Usage thresholds managed directly on the subscription. This is the recommended way to set progressive billing thresholds per subscription; when present, they take precedence over the thresholds defined on the plan. diff --git a/docs/reference/lago_taxes.md b/docs/reference/lago_taxes.md index cfae190..8daa283 100644 --- a/docs/reference/lago_taxes.md +++ b/docs/reference/lago_taxes.md @@ -31,6 +31,6 @@ Manage Lago taxes * [lago](lago) - The official CLI for Lago billing * [lago taxes create](lago_taxes_create) - Create a tax * [lago taxes delete](lago_taxes_delete) - Delete a tax -* [lago taxes get](lago_taxes_get) - Retrieve a Tax +* [lago taxes get](lago_taxes_get) - Retrieve a tax * [lago taxes list](lago_taxes_list) - List all taxes * [lago taxes update](lago_taxes_update) - Update a tax diff --git a/docs/reference/lago_taxes_create.md b/docs/reference/lago_taxes_create.md index 2ff87d8..a8d2d8e 100644 --- a/docs/reference/lago_taxes_create.md +++ b/docs/reference/lago_taxes_create.md @@ -4,7 +4,7 @@ Create a tax ### Synopsis -This endpoint creates a new tax representing a customizable tax rate applicable to either the organization or a specific customer. +This endpoint creates a new tax representing a customizable tax rate applicable to either a billing entity or a specific customer. ``` lago taxes create [flags] @@ -20,13 +20,13 @@ lago taxes create [flags] ### Options ``` - --applied-to-organization string **Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the 'PUT /billing_entities/:code' endpoint instead. + --applied-to-organization string **Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. When set to false on an update, it removes the tax from the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the 'PUT /billing_entities/:code' endpoint instead. --code string Unique code used to identify the tax associated with the API request. - --description string Internal description of the tax + --description string Internal description of the tax. -h, --help help for create --input string Complete JSON request body or @file.json --name string Name of the tax. - --rate string The percentage rate of the tax + --rate string The percentage rate of the tax. Accepts a number or a decimal string. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_taxes_get.md b/docs/reference/lago_taxes_get.md index de123b5..d6b0d4a 100644 --- a/docs/reference/lago_taxes_get.md +++ b/docs/reference/lago_taxes_get.md @@ -1,10 +1,10 @@ ## lago taxes get -Retrieve a Tax +Retrieve a tax ### Synopsis -This endpoint retrieves an existing tax representing a customizable tax rate applicable to either the organization or a specific customer. The tax is identified by its unique code. +This endpoint retrieves an existing tax representing a customizable tax rate applicable to either a billing entity or a specific customer. The tax is identified by its unique code. ``` lago taxes get [flags] diff --git a/docs/reference/lago_taxes_list.md b/docs/reference/lago_taxes_list.md index c20542a..4db5c28 100644 --- a/docs/reference/lago_taxes_list.md +++ b/docs/reference/lago_taxes_list.md @@ -4,7 +4,7 @@ List all taxes ### Synopsis -This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either the organization or a specific customer. +This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either a billing entity or a specific customer. ``` lago taxes list [flags] @@ -22,8 +22,8 @@ lago taxes list [flags] --all Fetch every page -h, --help help for list --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_taxes_update.md b/docs/reference/lago_taxes_update.md index c506c90..56968c2 100644 --- a/docs/reference/lago_taxes_update.md +++ b/docs/reference/lago_taxes_update.md @@ -4,7 +4,7 @@ Update a tax ### Synopsis -This endpoint updates an existing tax representing a customizable tax rate applicable to either the organization or a specific customer. +This endpoint updates an existing tax representing a customizable tax rate applicable to either a billing entity or a specific customer. ``` lago taxes update [flags] @@ -20,13 +20,13 @@ lago taxes update [flags] ### Options ``` - --applied-to-organization string **Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the 'PUT /billing_entities/:code' endpoint instead. + --applied-to-organization string **Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. When set to false on an update, it removes the tax from the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the 'PUT /billing_entities/:code' endpoint instead. --code string Unique code used to identify the tax associated with the API request. - --description string Internal description of the tax + --description string Internal description of the tax. -h, --help help for update --input string Complete JSON request body or @file.json --name string Name of the tax. - --rate string The percentage rate of the tax + --rate string The percentage rate of the tax. Accepts a number or a decimal string. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_wallets_create-customer-wallet.md b/docs/reference/lago_wallets_create-customer-wallet.md index 1235e4a..17746fc 100644 --- a/docs/reference/lago_wallets_create-customer-wallet.md +++ b/docs/reference/lago_wallets_create-customer-wallet.md @@ -24,7 +24,7 @@ lago wallets create-customer-wallet [flags] --applies-to-fee-types string An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only. --billing-entity-code string The code of the billing entity associated with the wallet. If not provided, the customer's billing entity is used. --code string The code of the wallet. - --currency string The currency of the wallet.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --currency string The currency of the wallet. Required when the customer has no currency yet. When omitted, the wallet uses the customer's currency. When provided on a customer without a currency, it also sets the customer's currency.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --expiration-at string The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC). --external-customer-id string The customer external unique identifier (provided by your own application) --granted-credits string The number of free granted credits. Required only if there is no paid credits. @@ -37,16 +37,17 @@ lago wallets create-customer-wallet [flags] --metadata string Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. --name string The name of the wallet. --paid-credits string The number of paid credits. Required only if there is no granted credits. - --paid-top-up-max-amount-cents string Maximum amount of cents that can be top-up with a single paid transaction. - --paid-top-up-min-amount-cents string Minimum amount of cents that can be top-up with a single paid transaction. + --paid-top-up-max-amount-cents string The maximum amount, in cents, of a single paid top-up transaction. + --paid-top-up-min-amount-cents string The minimum amount, in cents, of a single paid top-up transaction. --payment-method-payment-method-id string The unique identifier of the payment method (required when using a specific provider payment method). --payment-method-payment-method-type string The type of payment method to use.; one of: provider, manual - --priority string Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. + --priority string Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first. --purchase-order-number string The purchase order number associated with the wallet. It will be added to invoices generated for wallet top-ups, unless a more specific purchase order number is set on the wallet transaction or recurring transaction rule that triggered the top-up. --rate-amount string The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction. - --recurring-transaction-rules string List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. + --recurring-transaction-rules string List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license. --transaction-metadata string This optional field allows you to store a list of key-value pairs that provide additional information or custom attributes. These key-value pairs will be included in the metadata of wallet transactions generated during the wallet creation process. --transaction-name string The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either 'Prepaid credits - {{wallet_name}}' if the wallet name is set, or 'Prepaid credits'. + --transaction-priority string The priority of the wallet transactions triggered when creating the wallet. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_wallets_create-wallet-transaction.md b/docs/reference/lago_wallets_create-wallet-transaction.md index 4145515..d9d282f 100644 --- a/docs/reference/lago_wallets_create-wallet-transaction.md +++ b/docs/reference/lago_wallets_create-wallet-transaction.md @@ -34,8 +34,10 @@ lago wallets create-wallet-transaction [flags] --paid-credits string The number of paid credits. --payment-method-payment-method-id string The unique identifier of the payment method (required when using a specific provider payment method). --payment-method-payment-method-type string The type of payment method to use.; one of: provider, manual + --priority string The priority of the wallet transaction. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. --purchase-order-number string The purchase order number associated with this wallet transaction. It will be added to invoices generated for the resulting wallet top-up. If not set, falls back to the wallet's 'purchase_order_number'. --voided-credits string The number of voided credits. + --voided-transaction-id string Unique identifier of the inbound wallet transaction to void. Only available on traceable wallets, and the target transaction must still have a remaining amount. --wallet-id string Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system. ``` diff --git a/docs/reference/lago_wallets_create.md b/docs/reference/lago_wallets_create.md index 96f20b1..2ad9be1 100644 --- a/docs/reference/lago_wallets_create.md +++ b/docs/reference/lago_wallets_create.md @@ -24,7 +24,7 @@ lago wallets create [flags] --applies-to-fee-types string An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only. --billing-entity-code string The code of the billing entity associated with the wallet. If not provided, the customer's billing entity is used. --code string The code of the wallet. - --currency string The currency of the wallet.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + --currency string The currency of the wallet. Required when the customer has no currency yet. When omitted, the wallet uses the customer's currency. When provided on a customer without a currency, it also sets the customer's currency.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW --expiration-at string The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC). --external-customer-id string The customer external unique identifier (provided by your own application) --granted-credits string The number of free granted credits. Required only if there is no paid credits. @@ -37,16 +37,17 @@ lago wallets create [flags] --metadata string Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. --name string The name of the wallet. --paid-credits string The number of paid credits. Required only if there is no granted credits. - --paid-top-up-max-amount-cents string Maximum amount of cents that can be top-up with a single paid transaction. - --paid-top-up-min-amount-cents string Minimum amount of cents that can be top-up with a single paid transaction. + --paid-top-up-max-amount-cents string The maximum amount, in cents, of a single paid top-up transaction. + --paid-top-up-min-amount-cents string The minimum amount, in cents, of a single paid top-up transaction. --payment-method-payment-method-id string The unique identifier of the payment method (required when using a specific provider payment method). --payment-method-payment-method-type string The type of payment method to use.; one of: provider, manual - --priority string Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. + --priority string Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first. --purchase-order-number string The purchase order number associated with the wallet. It will be added to invoices generated for wallet top-ups, unless a more specific purchase order number is set on the wallet transaction or recurring transaction rule that triggered the top-up. --rate-amount string The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction. - --recurring-transaction-rules string List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. + --recurring-transaction-rules string List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license. --transaction-metadata string This optional field allows you to store a list of key-value pairs that provide additional information or custom attributes. These key-value pairs will be included in the metadata of wallet transactions generated during the wallet creation process. --transaction-name string The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either 'Prepaid credits - {{wallet_name}}' if the wallet name is set, or 'Prepaid credits'. + --transaction-priority string The priority of the wallet transactions triggered when creating the wallet. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_wallets_get-customer-wallet-alerts.md b/docs/reference/lago_wallets_get-customer-wallet-alerts.md index 60ae790..f3c8721 100644 --- a/docs/reference/lago_wallets_get-customer-wallet-alerts.md +++ b/docs/reference/lago_wallets_get-customer-wallet-alerts.md @@ -19,7 +19,11 @@ lago wallets get-customer-wallet-alerts [fl ### Options ``` + --all Fetch every page -h, --help help for get-customer-wallet-alerts + --limit string Results per page (1-1000) + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_wallets_get-wallet-transaction.md b/docs/reference/lago_wallets_get-wallet-transaction.md index 05034b5..8898400 100644 --- a/docs/reference/lago_wallets_get-wallet-transaction.md +++ b/docs/reference/lago_wallets_get-wallet-transaction.md @@ -4,7 +4,7 @@ Retrieve a wallet transaction ### Synopsis -This endpoint is used to retrieve a specific wallet transactions. +This endpoint is used to retrieve a specific wallet transaction. ``` lago wallets get-wallet-transaction [flags] diff --git a/docs/reference/lago_wallets_list-customer-wallets.md b/docs/reference/lago_wallets_list-customer-wallets.md index f309e89..46b73b1 100644 --- a/docs/reference/lago_wallets_list-customer-wallets.md +++ b/docs/reference/lago_wallets_list-customer-wallets.md @@ -4,7 +4,7 @@ List all customer's wallets ### Synopsis -This endpoint is used to list all wallets with prepaid credits of a customer +This endpoint is used to list all wallets with prepaid credits of a customer. ``` lago wallets list-customer-wallets [flags] @@ -21,10 +21,11 @@ lago wallets list-customer-wallets [flags] ``` --all Fetch every page --billing-entity-codes string Filter wallets by billing entity codes. + --currency string Filter the results by currency, expressed as an ISO 4217 code. -h, --help help for list-customer-wallets --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_wallets_list-wallet-transaction-consumptions.md b/docs/reference/lago_wallets_list-wallet-transaction-consumptions.md index a359031..f067373 100644 --- a/docs/reference/lago_wallets_list-wallet-transaction-consumptions.md +++ b/docs/reference/lago_wallets_list-wallet-transaction-consumptions.md @@ -22,8 +22,8 @@ lago wallets list-wallet-transaction-consumptions [flags] --all Fetch every page -h, --help help for list-wallet-transaction-consumptions --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_wallets_list-wallet-transaction-fundings.md b/docs/reference/lago_wallets_list-wallet-transaction-fundings.md index eaa91d9..1f7f892 100644 --- a/docs/reference/lago_wallets_list-wallet-transaction-fundings.md +++ b/docs/reference/lago_wallets_list-wallet-transaction-fundings.md @@ -22,8 +22,8 @@ lago wallets list-wallet-transaction-fundings [flags] --all Fetch every page -h, --help help for list-wallet-transaction-fundings --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_wallets_list.md b/docs/reference/lago_wallets_list.md index 6acc777..54ab8d8 100644 --- a/docs/reference/lago_wallets_list.md +++ b/docs/reference/lago_wallets_list.md @@ -25,8 +25,8 @@ lago wallets list [flags] --external-customer-id string Filter wallets by customer external unique identifier (provided by your own application). When omitted, all wallets for the organization are returned. -h, --help help for list --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_wallets_update-customer-wallet-alert.md b/docs/reference/lago_wallets_update-customer-wallet-alert.md index da7ff00..d79fbee 100644 --- a/docs/reference/lago_wallets_update-customer-wallet-alert.md +++ b/docs/reference/lago_wallets_update-customer-wallet-alert.md @@ -4,7 +4,7 @@ Update a wallet alert ### Synopsis -This endpoint allows you to update an existing alert for a wallet. +This endpoint allows you to update an existing alert for a wallet. A non-empty `thresholds` array replaces the whole set of thresholds on the alert. When `thresholds` is left out, or sent as an empty array, the thresholds already on the alert are kept. A threshold sent with a `code` it already had, and without `notify_on`, keeps the `notify_on` it had. ``` lago wallets update-customer-wallet-alert [flags] @@ -24,7 +24,7 @@ lago wallets update-customer-wallet-alert < -h, --help help for update-customer-wallet-alert --input string Complete JSON request body or @file.json --name string The name of the alert. - --thresholds string Array of thresholds associated with the alert. + --thresholds string Array of thresholds associated with the alert. An alert accepts at most 20 thresholds, and a larger array returns a '422' error with 'too_many_thresholds' on 'thresholds'. Two thresholds cannot share the same value and the same 'recurring' flag. The value of a recurring threshold must be positive. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_wallets_update-customer-wallet.md b/docs/reference/lago_wallets_update-customer-wallet.md index 2f661d9..0c341db 100644 --- a/docs/reference/lago_wallets_update-customer-wallet.md +++ b/docs/reference/lago_wallets_update-customer-wallet.md @@ -32,11 +32,13 @@ lago wallets update-customer-wallet [flags] --invoice-requires-successful-payment string A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false. --metadata string Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. --name string The name of the wallet. + --paid-top-up-max-amount-cents string The maximum amount, in cents, of a single paid top-up transaction. + --paid-top-up-min-amount-cents string The minimum amount, in cents, of a single paid top-up transaction. --payment-method-payment-method-id string The unique identifier of the payment method (required when using a specific provider payment method). --payment-method-payment-method-type string The type of payment method to use.; one of: provider, manual - --priority string Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. + --priority string Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first. --purchase-order-number string The purchase order number associated with the wallet. It will be added to invoices generated for wallet top-ups, unless a more specific purchase order number is set on the wallet transaction or recurring transaction rule that triggered the top-up. - --recurring-transaction-rules string List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. + --recurring-transaction-rules string List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_wallets_update.md b/docs/reference/lago_wallets_update.md index 572003b..67acb40 100644 --- a/docs/reference/lago_wallets_update.md +++ b/docs/reference/lago_wallets_update.md @@ -32,11 +32,13 @@ lago wallets update [flags] --invoice-requires-successful-payment string A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false. --metadata string Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. --name string The name of the wallet. + --paid-top-up-max-amount-cents string The maximum amount, in cents, of a single paid top-up transaction. + --paid-top-up-min-amount-cents string The minimum amount, in cents, of a single paid top-up transaction. --payment-method-payment-method-id string The unique identifier of the payment method (required when using a specific provider payment method). --payment-method-payment-method-type string The type of payment method to use.; one of: provider, manual - --priority string Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. + --priority string Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first. --purchase-order-number string The purchase order number associated with the wallet. It will be added to invoices generated for wallet top-ups, unless a more specific purchase order number is set on the wallet transaction or recurring transaction rule that triggered the top-up. - --recurring-transaction-rules string List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. + --recurring-transaction-rules string List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_wallets_wallet-transactions.md b/docs/reference/lago_wallets_wallet-transactions.md index b67536c..ad1badd 100644 --- a/docs/reference/lago_wallets_wallet-transactions.md +++ b/docs/reference/lago_wallets_wallet-transactions.md @@ -22,9 +22,10 @@ lago wallets wallet-transactions [flags] --all Fetch every page -h, --help help for wallet-transactions --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. - --status string The status of the wallet transaction. Possible values are 'pending' or 'settled'. + --metadata[key] string Filter wallet transactions by metadata. Replace 'key' with the actual metadata key you want to match, and provide the corresponding value. For example, 'metadata[color]=blue'. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. + --status string The status of the wallet transaction. Possible values are 'pending', 'settled' or 'failed'. --transaction-status string The transaction status of the wallet transaction. Possible values are 'purchased' (with pending or settled status), 'granted' (without invoice_id), 'voided' or 'invoiced'. --transaction-type string The transaction type of the wallet transaction. Possible values are 'inbound' (increasing the wallet balance) or 'outbound' (decreasing the wallet balance). --watch Poll and re-render when the response changes diff --git a/docs/reference/lago_webhook-endpoints.md b/docs/reference/lago_webhook-endpoints.md index a3f0972..73b1fb9 100644 --- a/docs/reference/lago_webhook-endpoints.md +++ b/docs/reference/lago_webhook-endpoints.md @@ -29,7 +29,7 @@ Manage Lago webhook endpoints ### SEE ALSO * [lago](lago) - The official CLI for Lago billing -* [lago webhook-endpoints create](lago_webhook-endpoints_create) - Create a webhook_endpoint +* [lago webhook-endpoints create](lago_webhook-endpoints_create) - Create a webhook endpoint * [lago webhook-endpoints delete](lago_webhook-endpoints_delete) - Delete a webhook endpoint * [lago webhook-endpoints get](lago_webhook-endpoints_get) - Retrieve a webhook endpoint * [lago webhook-endpoints list](lago_webhook-endpoints_list) - List all webhook endpoints diff --git a/docs/reference/lago_webhook-endpoints_create.md b/docs/reference/lago_webhook-endpoints_create.md index e9e7e95..f827f70 100644 --- a/docs/reference/lago_webhook-endpoints_create.md +++ b/docs/reference/lago_webhook-endpoints_create.md @@ -1,10 +1,10 @@ ## lago webhook-endpoints create -Create a webhook_endpoint +Create a webhook endpoint ### Synopsis -This endpoint is used to create a webhook endpoint. +This endpoint is used to create a webhook endpoint. An organization can have at most 10 webhook endpoints. ``` lago webhook-endpoints create [flags] @@ -20,12 +20,12 @@ lago webhook-endpoints create [flags] ### Options ``` - --event-types string A list of event types that will trigger the webhook. Passing null means that all event types will be sent. + --event-types string The list of event types sent to this webhook endpoint. Pass 'null' or '["*"]' to receive every event type. An empty array stops every delivery. -h, --help help for create --input string Complete JSON request body or @file.json - --name string The name of the webhook. - --signature-algo string The signature used for the webhook. If no value is passed,; one of: jwt, hmac, - --webhook-url string The URL of the webhook endpoint. + --name string The name of the webhook endpoint. + --signature-algo string The algorithm used to sign the webhook payload. Defaults to 'jwt' when no value is passed.; one of: jwt, hmac, + --webhook-url string The URL of the webhook endpoint. It must be unique within the organization. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_webhook-endpoints_list.md b/docs/reference/lago_webhook-endpoints_list.md index 160087c..db5e101 100644 --- a/docs/reference/lago_webhook-endpoints_list.md +++ b/docs/reference/lago_webhook-endpoints_list.md @@ -22,8 +22,8 @@ lago webhook-endpoints list [flags] --all Fetch every page -h, --help help for list --limit string Results per page (1-1000) - --page string Page number. - --per-page string Number of records per page. + --page string Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + --per-page string Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. --watch Poll and re-render when the response changes --watch-interval duration Polling interval used with --watch (default 2s) ``` diff --git a/docs/reference/lago_webhook-endpoints_update.md b/docs/reference/lago_webhook-endpoints_update.md index 8c54a06..9880383 100644 --- a/docs/reference/lago_webhook-endpoints_update.md +++ b/docs/reference/lago_webhook-endpoints_update.md @@ -20,12 +20,12 @@ lago webhook-endpoints update [flags] ### Options ``` - --event-types string A list of event types that will trigger the webhook. Passing null means that all event types will be sent. + --event-types string The list of event types sent to this webhook endpoint. Pass 'null' or '["*"]' to receive every event type. An empty array stops every delivery. -h, --help help for update --input string Complete JSON request body or @file.json - --name string The name of the webhook. - --signature-algo string The signature used for the webhook. If no value is passed,; one of: jwt, hmac, - --webhook-url string The URL of the webhook endpoint. + --name string The name of the webhook endpoint. + --signature-algo string The algorithm used to sign the webhook payload. When the field is omitted, the current value is kept.; one of: jwt, hmac, + --webhook-url string The URL of the webhook endpoint. It must be unique within the organization. ``` ### Options inherited from parent commands diff --git a/docs/reference/lago_webhooks_json-public-key.md b/docs/reference/lago_webhooks_json-public-key.md index 913a0fa..39e726b 100644 --- a/docs/reference/lago_webhooks_json-public-key.md +++ b/docs/reference/lago_webhooks_json-public-key.md @@ -4,7 +4,7 @@ Retrieve webhook public key (JSON) ### Synopsis -This endpoint is used to retrieve the public key used to verify the webhooks signature, wrapped in a JSON object. Prefer this endpoint over the deprecated GET /webhooks/public_key. +This endpoint is used to retrieve the public key used to verify the webhook signature, wrapped in a JSON object. Prefer this endpoint over the deprecated `GET /webhooks/public_key`. ``` lago webhooks json-public-key [flags] diff --git a/docs/reference/lago_webhooks_public-key.md b/docs/reference/lago_webhooks_public-key.md index f5033c6..9de2a75 100644 --- a/docs/reference/lago_webhooks_public-key.md +++ b/docs/reference/lago_webhooks_public-key.md @@ -4,7 +4,7 @@ Retrieve webhook public key ### Synopsis -This endpoint is used to retrieve the public key used to verify the webhooks signature +**Deprecated.** Use `GET /webhooks/json_public_key` instead. This endpoint is used to retrieve the public key used to verify the webhook signature. ``` lago webhooks public-key [flags] diff --git a/internal/generated/spec_gen.go b/internal/generated/spec_gen.go index f3e760e..2fd6426 100644 --- a/internal/generated/spec_gen.go +++ b/internal/generated/spec_gen.go @@ -4,8 +4,8 @@ package generated import "encoding/json" -const SpecVersion = "1.52.1" -const SpecSHA256 = "ce82ac3701caa4ab59bb35557a4e592adb0b81ce69fa37549fde391fc241aa1a" +const SpecVersion = "1.57.0" +const SpecSHA256 = "0548d030b8384508d3638203c453f704565a7df954f4db9e42deadd554b5069e" var Operations []Operation @@ -15,4 +15,4 @@ func init() { } } -const operationsJSON = "[{\"resource\":\"activity-logs\",\"action\":\"get\",\"operation_id\":\"findActivityLog\",\"method\":\"GET\",\"path\":\"/activity_logs/{activity_id}\",\"summary\":\"Retrieve an activity log\",\"description\":\"This endpoint retrieves an existing activity log that represents an action performed on some resource. The activity log is identified by its unique activity_id.\",\"docs_url\":\"https://getlago.com/docs/api-reference/audit-logs/activity-logs-object\",\"parameters\":[{\"name\":\"activity_id\",\"flag\":\"activity-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The Activity Id of the existing activity log.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"activity-logs\",\"action\":\"list\",\"operation_id\":\"findAllActivityLogs\",\"method\":\"GET\",\"path\":\"/activity_logs\",\"summary\":\"List all activity logs\",\"description\":\"This endpoint retrieves all existing activity logs that represent actions performed on application resources.\",\"docs_url\":\"https://getlago.com/docs/api-reference/audit-logs/activity-logs-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"from_date\",\"flag\":\"from-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter activity logs from a specific date.\"},{\"name\":\"to_date\",\"flag\":\"to-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter activity logs up to a specific date.\"},{\"name\":\"activity_types[]\",\"flag\":\"activity-types\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by activity types\"},{\"name\":\"activity_sources[]\",\"flag\":\"activity-sources\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by activity sources\"},{\"name\":\"user_emails[]\",\"flag\":\"user-emails\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by user emails\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"External subscription ID\"},{\"name\":\"resource_ids[]\",\"flag\":\"resource-ids\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by resources unique identifiers\"},{\"name\":\"resource_types[]\",\"flag\":\"resource-types\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by resource class types\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"add-ons\",\"action\":\"create\",\"operation_id\":\"createAddOn\",\"method\":\"POST\",\"path\":\"/add_ons\",\"summary\":\"Create an add-on\",\"description\":\"This endpoint is used to create an add-on that can be then attached to a one-off invoice.\",\"docs_url\":\"https://getlago.com/docs/api-reference/add-ons/add-on-object\",\"body\":{\"wrapper\":\"add_on\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":true,\"complex\":false,\"description\":\"The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The currency of the add-on.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code used to identify the add-on.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The description of the add-on.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The name of the add-on.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"add-ons\",\"action\":\"delete\",\"operation_id\":\"destroyAddOn\",\"method\":\"DELETE\",\"path\":\"/add_ons/{code}\",\"summary\":\"Delete an add-on\",\"description\":\"This endpoint is used to delete an existing add-on.\",\"docs_url\":\"https://getlago.com/docs/api-reference/add-ons/add-on-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code used to identify the add-on.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"add-ons\",\"action\":\"get\",\"operation_id\":\"findAddOn\",\"method\":\"GET\",\"path\":\"/add_ons/{code}\",\"summary\":\"Retrieve an add-on\",\"description\":\"This endpoint is used to retrieve a specific add-on.\",\"docs_url\":\"https://getlago.com/docs/api-reference/add-ons/add-on-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code used to identify the add-on.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"add-ons\",\"action\":\"list\",\"operation_id\":\"findAllAddOns\",\"method\":\"GET\",\"path\":\"/add_ons\",\"summary\":\"List all add-ons\",\"description\":\"This endpoint is used to list all existing add-ons.\",\"docs_url\":\"https://getlago.com/docs/api-reference/add-ons/add-on-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"add-ons\",\"action\":\"update\",\"operation_id\":\"updateAddOn\",\"method\":\"PUT\",\"path\":\"/add_ons/{code}\",\"summary\":\"Update an add-on\",\"description\":\"This endpoint is used to update an existing add-on.\",\"docs_url\":\"https://getlago.com/docs/api-reference/add-ons/add-on-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code used to identify the add-on.\"}],\"body\":{\"wrapper\":\"add_on\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the add-on.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code used to identify the add-on.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The description of the add-on.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The name of the add-on.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"analytics\",\"action\":\"gross-revenue\",\"operation_id\":\"findAllGrossRevenues\",\"method\":\"GET\",\"path\":\"/analytics/gross_revenue\",\"summary\":\"List gross revenue\",\"description\":\"Gross revenue is the sum of monthly `finalized` invoice payments and fees paid in advance that are not invoiceable. This total is calculated after deducting taxes and discounts.\",\"parameters\":[{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Currency of revenue analytics. Format must be ISO 4217.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.\"},{\"name\":\"months\",\"flag\":\"months\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Show data only for given number of months.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"analytics\",\"action\":\"invoice-collection\",\"operation_id\":\"findAllInvoiceCollections\",\"method\":\"GET\",\"path\":\"/analytics/invoice_collection\",\"summary\":\"List of finalized invoices\",\"description\":\"Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`.\",\"parameters\":[{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The currency of revenue analytics. Format must be ISO 4217.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"months\",\"flag\":\"months\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Show data only for given number of months.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"analytics\",\"action\":\"invoiced-usage\",\"operation_id\":\"findAllInvoicedUsages\",\"method\":\"GET\",\"path\":\"/analytics/invoiced_usage\",\"summary\":\"List usage revenue\",\"description\":\"Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts.\",\"parameters\":[{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The currency of invoiced usage analytics. Format must be ISO 4217.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"months\",\"flag\":\"months\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Show data only for given number of months.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"analytics\",\"action\":\"mrr\",\"operation_id\":\"findAllMrrs\",\"method\":\"GET\",\"path\":\"/analytics/mrr\",\"summary\":\"List MRR\",\"description\":\"This endpoint is used to list MRR.\",\"parameters\":[{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle:\\n\\n- Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued.\\n- Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing).\\n- Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).\\n- Revenue from `semiannual` subscription invoices is distributed evenly over six months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).\\n- Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"months\",\"flag\":\"months\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Show data only for given number of months.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"analytics\",\"action\":\"overdue-balance\",\"operation_id\":\"findAllOverdueBalances\",\"method\":\"GET\",\"path\":\"/analytics/overdue_balance\",\"summary\":\"List overdue balance\",\"description\":\"Overdue balance is the total amount associated with overdue invoices (invoices with pending or failed payments which are past their due dates).\",\"parameters\":[{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Currency of revenue analytics. Format must be ISO 4217.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.\"},{\"name\":\"months\",\"flag\":\"months\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Show data only for given number of months.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"analytics\",\"action\":\"usage\",\"operation_id\":\"findAllUsages\",\"method\":\"GET\",\"path\":\"/analytics/usage\",\"summary\":\"List usage\",\"description\":\"Returns usages.\",\"parameters\":[{\"name\":\"time_granularity\",\"flag\":\"time-granularity\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The time granularity of usage analytics. Possible values are 'daily', 'weekly', 'monthly', 'yearly'.\",\"enum\":[\"daily\",\"weekly\",\"monthly\"]},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The currency of usage analytics. Format must be ISO 4217.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"from_date\",\"flag\":\"from-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The start date of the period for which the usage analytics is calculated.\"},{\"name\":\"to_date\",\"flag\":\"to-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The end date of the period for which the usage analytics is calculated.\"},{\"name\":\"customer_type\",\"flag\":\"customer-type\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The type of customer for which the usage analytics is calculated. Possible values are 'individual', 'company'.\",\"enum\":[\"individual\",\"company\"]},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The external identifier of the customer for which the usage analytics is calculated.\"},{\"name\":\"customer_country\",\"flag\":\"customer-country\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The country of the customer for which the usage analytics is calculated.\",\"enum\":[\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The external identifier of the subscription for which the usage analytics is calculated.\"},{\"name\":\"is_billable_metric_recurring\",\"flag\":\"is-billable-metric-recurring\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Indicates whether the billable metric associated with the usage is recurring.\"},{\"name\":\"plan_code\",\"flag\":\"plan-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The code of the plan for which the usage analytics is calculated.\"},{\"name\":\"billable_metric_code\",\"flag\":\"billable-metric-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The code of the usage-based billable metrics for which the usage analytics is calculated.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"api-logs\",\"action\":\"get\",\"operation_id\":\"findApiLog\",\"method\":\"GET\",\"path\":\"/api_logs/{request_id}\",\"summary\":\"Retrieve an api log\",\"description\":\"This endpoint retrieves an existing api log that represents a request made to the API. The api log is identified by its unique request_id.\",\"docs_url\":\"https://getlago.com/docs/api-reference/audit-logs/api-logs-object\",\"parameters\":[{\"name\":\"request_id\",\"flag\":\"request-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The Request Id of the existing api log.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"api-logs\",\"action\":\"list\",\"operation_id\":\"findAllApiLogs\",\"method\":\"GET\",\"path\":\"/api_logs\",\"summary\":\"List all api logs\",\"description\":\"This endpoint retrieves all existing api logs that represent requests performed to Lago's API.\",\"docs_url\":\"https://getlago.com/docs/api-reference/audit-logs/api-logs-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"from_date\",\"flag\":\"from-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter api logs from a specific date.\"},{\"name\":\"to_date\",\"flag\":\"to-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter api logs up to a specific date.\"},{\"name\":\"http_methods[]\",\"flag\":\"http-methods\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by HTTP methods\"},{\"name\":\"http_statuses[]\",\"flag\":\"http-statuses\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by HTTP status or by generic request status\"},{\"name\":\"api_version\",\"flag\":\"api-version\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results by API version\"},{\"name\":\"request_paths\",\"flag\":\"request-paths\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results by the path of the request\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"billable-metrics\",\"action\":\"create\",\"operation_id\":\"createBillableMetric\",\"method\":\"POST\",\"path\":\"/billable_metrics\",\"summary\":\"Create a billable metric\",\"description\":\"This endpoint creates a new billable metric representing a pricing component of your application.\",\"docs_url\":\"https://getlago.com/docs/api-reference/billable-metrics/object\",\"body\":{\"wrapper\":\"billable_metric\",\"fields\":[{\"path\":[\"aggregation_type\"],\"flag\":\"aggregation-type\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Aggregation method used to compute usage for this billable metric.\",\"enum\":[\"count_agg\",\"sum_agg\",\"max_agg\",\"unique_count_agg\",\"weighted_sum_agg\",\"latest_agg\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code used to identify the billable metric associated with the API request. This code associates each event with the correct metric.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Internal description of the billable metric.\"},{\"path\":[\"expression\"],\"flag\":\"expression\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.\\nAccepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\\\\` and `*` operations.\\nRound is accepting an optional second parameter to specify the number of decimal.\\n\"},{\"path\":[\"field_name\"],\"flag\":\"field-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`.\"},{\"path\":[\"filters\"],\"flag\":\"filters\",\"type\":\"array\",\"required\":false,\"complex\":true},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Name of the billable metric.\"},{\"path\":[\"recurring\"],\"flag\":\"recurring\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Defines if the billable metric is persisted billing period over billing period.\\n\\n- If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.\\n- If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.\\n- If not defined in the request, default value is `false`.\"},{\"path\":[\"rounding_function\"],\"flag\":\"rounding-function\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are `round`, `ceil` and `floor`.\",\"enum\":[\"ceil\",\"floor\",\"round\",\"\"]},{\"path\":[\"rounding_precision\"],\"flag\":\"rounding-precision\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the number of decimal places to which the `rounding_function` will be rounded. It can be a positive or negative value.\"},{\"path\":[\"weighted_interval\"],\"flag\":\"weighted-interval\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`.\",\"enum\":[\"seconds\",\"\"]}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"billable-metrics\",\"action\":\"delete\",\"operation_id\":\"destroyBillableMetric\",\"method\":\"DELETE\",\"path\":\"/billable_metrics/{code}\",\"summary\":\"Delete a billable metric\",\"description\":\"This endpoint deletes an existing billable metric representing a pricing component of your application.\",\"docs_url\":\"https://getlago.com/docs/api-reference/billable-metrics/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing billable metric.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"billable-metrics\",\"action\":\"evaluate-expression\",\"operation_id\":\"evaluateBillableMetricExpression\",\"method\":\"POST\",\"path\":\"/billable_metrics/evaluate_expression\",\"summary\":\"Evaluate an expression for a billable metric\",\"description\":\"Evaluate an expression for a billable metric creation by providing the expression and test data\",\"docs_url\":\"https://getlago.com/docs/api-reference/billable-metrics/object\",\"body\":{\"fields\":[{\"path\":[\"event\",\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The code that identifies a targeted billable metric.\"},{\"path\":[\"event\",\"properties\"],\"flag\":\"properties\",\"type\":\"object\",\"required\":true,\"complex\":true,\"description\":\"This field represents additional properties associated with the event. They can be used when evaluating the expression.\"},{\"path\":[\"event\",\"timestamp\"],\"flag\":\"timestamp\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).\\nIf this timestamp is not provided, the API will automatically set it to the time of event reception.\\n\"},{\"path\":[\"expression\"],\"flag\":\"expression\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.\\nAccepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\\\\` and `*` operations.\\nRound is accepting an optional second parameter to specify the number of decimal.\\n\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"billable-metrics\",\"action\":\"get\",\"operation_id\":\"findBillableMetric\",\"method\":\"GET\",\"path\":\"/billable_metrics/{code}\",\"summary\":\"Retrieve a billable metric\",\"description\":\"This endpoint retrieves an existing billable metric that represents a pricing component of your application. The billable metric is identified by its unique code.\",\"docs_url\":\"https://getlago.com/docs/api-reference/billable-metrics/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing billable metric.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"billable-metrics\",\"action\":\"list\",\"operation_id\":\"findAllBillableMetrics\",\"method\":\"GET\",\"path\":\"/billable_metrics\",\"summary\":\"List all billable metrics\",\"description\":\"This endpoint retrieves all existing billable metrics that represent pricing components of your application.\",\"docs_url\":\"https://getlago.com/docs/api-reference/billable-metrics/object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"billable-metrics\",\"action\":\"update\",\"operation_id\":\"updateBillableMetric\",\"method\":\"PUT\",\"path\":\"/billable_metrics/{code}\",\"summary\":\"Update a billable metric\",\"description\":\"This endpoint updates an existing billable metric representing a pricing component of your application.\",\"docs_url\":\"https://getlago.com/docs/api-reference/billable-metrics/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing billable metric.\"}],\"body\":{\"wrapper\":\"billable_metric\",\"fields\":[{\"path\":[\"aggregation_type\"],\"flag\":\"aggregation-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Aggregation method used to compute usage for this billable metric.\",\"enum\":[\"count_agg\",\"sum_agg\",\"max_agg\",\"unique_count_agg\",\"weighted_sum_agg\",\"latest_agg\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code used to identify the billable metric associated with the API request. This code associates each event with the correct metric.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Internal description of the billable metric.\"},{\"path\":[\"expression\"],\"flag\":\"expression\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.\\nAccepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\\\\` and `*` operations.\\nRound is accepting an optional second parameter to specify the number of decimal.\\n\"},{\"path\":[\"field_name\"],\"flag\":\"field-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`.\"},{\"path\":[\"filters\"],\"flag\":\"filters\",\"type\":\"array\",\"required\":false,\"complex\":true},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Name of the billable metric.\"},{\"path\":[\"recurring\"],\"flag\":\"recurring\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Defines if the billable metric is persisted billing period over billing period.\\n\\n- If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.\\n- If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.\\n- If not defined in the request, default value is `false`.\"},{\"path\":[\"rounding_function\"],\"flag\":\"rounding-function\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are `round`, `ceil` and `floor`.\",\"enum\":[\"ceil\",\"floor\",\"round\",\"\"]},{\"path\":[\"rounding_precision\"],\"flag\":\"rounding-precision\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the number of decimal places to which the `rounding_function` will be rounded. It can be a positive or negative value.\"},{\"path\":[\"weighted_interval\"],\"flag\":\"weighted-interval\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`.\",\"enum\":[\"seconds\",\"\"]}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"billing-entities\",\"action\":\"create\",\"operation_id\":\"createBillingEntity\",\"method\":\"POST\",\"path\":\"/billing_entities\",\"summary\":\"Create a billing entity\",\"description\":\"This endpoint is used to create a new billing entity\",\"docs_url\":\"https://getlago.com/docs/api-reference/billing-entities/object\",\"body\":{\"wrapper\":\"billing_entity\",\"fields\":[{\"path\":[\"address_line1\"],\"flag\":\"address-line1\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The first line of the billing address\"},{\"path\":[\"address_line2\"],\"flag\":\"address-line2\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The second line of the billing address\"},{\"path\":[\"billing_configuration\",\"document_locale\"],\"flag\":\"billing-configuration-document-locale\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The language of the documents generated for this billing entity\"},{\"path\":[\"billing_configuration\",\"invoice_footer\"],\"flag\":\"billing-configuration-invoice-footer\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The footer text to be displayed on invoices for this billing entity\"},{\"path\":[\"billing_configuration\",\"invoice_grace_period\"],\"flag\":\"billing-configuration-invoice-grace-period\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The grace period (in days) for invoice finalization\"},{\"path\":[\"billing_configuration\",\"subscription_invoice_issuing_date_adjustment\"],\"flag\":\"billing-configuration-subscription-invoice-issuing-date-adjustment\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.\",\"enum\":[\"align_with_finalization_date\",\"keep_anchor\"]},{\"path\":[\"billing_configuration\",\"subscription_invoice_issuing_date_anchor\"],\"flag\":\"billing-configuration-subscription-invoice-issuing-date-anchor\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Defines whether the issuing date follows the current billing period's end date or the next period starting date.\",\"enum\":[\"current_period_end\",\"next_period_start\"]},{\"path\":[\"city\"],\"flag\":\"city\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The city of the billing address\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The unique code of the billing entity\"},{\"path\":[\"country\"],\"flag\":\"country\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The country code of the billing address\",\"enum\":[\"\",\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"default_currency\"],\"flag\":\"default-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The default currency of the billing entity\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"document_number_prefix\"],\"flag\":\"document-number-prefix\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The prefix used in document numbers for this billing entity\"},{\"path\":[\"document_numbering\"],\"flag\":\"document-numbering\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of document numbering for this billing entity:\\n- `per_customer`: document numbers are unique per customer\\n- `per_billing_entity`: document numbers are unique per billing entity\",\"enum\":[\"per_customer\",\"per_billing_entity\"]},{\"path\":[\"einvoicing\"],\"flag\":\"einvoicing\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Whether e-invoicing is enabled for this billing entity\"},{\"path\":[\"email\"],\"flag\":\"email\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The email address of the billing entity\"},{\"path\":[\"email_settings\"],\"flag\":\"email-settings\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The email notification settings for this billing entity\"},{\"path\":[\"eu_tax_management\"],\"flag\":\"eu-tax-management\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Whether EU tax management is enabled for this billing entity\"},{\"path\":[\"finalize_zero_amount_invoice\"],\"flag\":\"finalize-zero-amount-invoice\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Whether to finalize invoices with zero amount for this billing entity\"},{\"path\":[\"legal_name\"],\"flag\":\"legal-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal name of the billing entity\"},{\"path\":[\"legal_number\"],\"flag\":\"legal-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal registration number of the billing entity\"},{\"path\":[\"logo\"],\"flag\":\"logo\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The base64 encoded logo image for the billing entity\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The name of the billing entity\"},{\"path\":[\"net_payment_term\"],\"flag\":\"net-payment-term\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The net payment term (in days) for this billing entity\"},{\"path\":[\"phone\"],\"flag\":\"phone\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The phone number of the billing entity\"},{\"path\":[\"state\"],\"flag\":\"state\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The state of the billing address\"},{\"path\":[\"tax_identification_number\"],\"flag\":\"tax-identification-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The tax identification number of the billing entity\"},{\"path\":[\"timezone\"],\"flag\":\"timezone\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The timezone of the billing entity\",\"enum\":[\"UTC\",\"Africa/Algiers\",\"Africa/Cairo\",\"Africa/Casablanca\",\"Africa/Harare\",\"Africa/Johannesburg\",\"Africa/Monrovia\",\"Africa/Nairobi\",\"America/Argentina/Buenos_Aires\",\"America/Bogota\",\"America/Caracas\",\"America/Chicago\",\"America/Chihuahua\",\"America/Denver\",\"America/Guatemala\",\"America/Guyana\",\"America/Halifax\",\"America/Indiana/Indianapolis\",\"America/Juneau\",\"America/La_Paz\",\"America/Lima\",\"America/Los_Angeles\",\"America/Mazatlan\",\"America/Mexico_City\",\"America/Monterrey\",\"America/Montevideo\",\"America/New_York\",\"America/Nuuk\",\"America/Phoenix\",\"America/Puerto_Rico\",\"America/Regina\",\"America/Santiago\",\"America/Sao_Paulo\",\"America/St_Johns\",\"America/Tijuana\",\"Asia/Almaty\",\"Asia/Baghdad\",\"Asia/Baku\",\"Asia/Bangkok\",\"Asia/Chongqing\",\"Asia/Colombo\",\"Asia/Dhaka\",\"Asia/Hong_Kong\",\"Asia/Irkutsk\",\"Asia/Jakarta\",\"Asia/Jerusalem\",\"Asia/Kabul\",\"Asia/Kamchatka\",\"Asia/Karachi\",\"Asia/Kathmandu\",\"Asia/Kolkata\",\"Asia/Krasnoyarsk\",\"Asia/Kuala_Lumpur\",\"Asia/Kuwait\",\"Asia/Magadan\",\"Asia/Muscat\",\"Asia/Novosibirsk\",\"Asia/Riyadh\",\"Asia/Seoul\",\"Asia/Shanghai\",\"Asia/Singapore\",\"Asia/Srednekolymsk\",\"Asia/Taipei\",\"Asia/Tashkent\",\"Asia/Tbilisi\",\"Asia/Tehran\",\"Asia/Tokyo\",\"Asia/Ulaanbaatar\",\"Asia/Urumqi\",\"Asia/Vladivostok\",\"Asia/Yakutsk\",\"Asia/Yangon\",\"Asia/Yekaterinburg\",\"Asia/Yerevan\",\"Atlantic/Azores\",\"Atlantic/Cape_Verde\",\"Atlantic/South_Georgia\",\"Australia/Adelaide\",\"Australia/Brisbane\",\"Australia/Darwin\",\"Australia/Hobart\",\"Australia/Melbourne\",\"Australia/Perth\",\"Australia/Sydney\",\"Europe/Amsterdam\",\"Europe/Athens\",\"Europe/Belgrade\",\"Europe/Berlin\",\"Europe/Bratislava\",\"Europe/Brussels\",\"Europe/Bucharest\",\"Europe/Budapest\",\"Europe/Copenhagen\",\"Europe/Dublin\",\"Europe/Helsinki\",\"Europe/Istanbul\",\"Europe/Kaliningrad\",\"Europe/Kyiv\",\"Europe/Lisbon\",\"Europe/Ljubljana\",\"Europe/London\",\"Europe/Madrid\",\"Europe/Minsk\",\"Europe/Moscow\",\"Europe/Paris\",\"Europe/Prague\",\"Europe/Riga\",\"Europe/Rome\",\"Europe/Samara\",\"Europe/Sarajevo\",\"Europe/Skopje\",\"Europe/Sofia\",\"Europe/Stockholm\",\"Europe/Tallinn\",\"Europe/Vienna\",\"Europe/Vilnius\",\"Europe/Volgograd\",\"Europe/Warsaw\",\"Europe/Zagreb\",\"Europe/Zurich\",\"GMT+12\",\"Pacific/Apia\",\"Pacific/Auckland\",\"Pacific/Chatham\",\"Pacific/Fakaofo\",\"Pacific/Fiji\",\"Pacific/Guadalcanal\",\"Pacific/Guam\",\"Pacific/Honolulu\",\"Pacific/Majuro\",\"Pacific/Midway\",\"Pacific/Noumea\",\"Pacific/Pago_Pago\",\"Pacific/Port_Moresby\",\"Pacific/Tongatapu\"]},{\"path\":[\"zipcode\"],\"flag\":\"zipcode\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The zipcode of the billing address\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"billing-entities\",\"action\":\"get\",\"operation_id\":\"getBillingEntity\",\"method\":\"GET\",\"path\":\"/billing_entities/{code}\",\"summary\":\"Retrieve a billing entity\",\"description\":\"This endpoint returns a specific billing entity by its code\",\"docs_url\":\"https://getlago.com/docs/api-reference/billing-entities/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The unique code of the billing entity\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"billing-entities\",\"action\":\"list\",\"operation_id\":\"listBillingEntities\",\"method\":\"GET\",\"path\":\"/billing_entities\",\"summary\":\"List all billing entities\",\"description\":\"This endpoint returns a list of all billing entities in the organization\",\"docs_url\":\"https://getlago.com/docs/api-reference/billing-entities/object\",\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"billing-entities\",\"action\":\"update\",\"operation_id\":\"updateBillingEntity\",\"method\":\"PUT\",\"path\":\"/billing_entities/{code}\",\"summary\":\"Update a billing entity\",\"description\":\"This endpoint is used to update an existing billing entity\",\"docs_url\":\"https://getlago.com/docs/api-reference/billing-entities/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The unique code of the billing entity\"}],\"body\":{\"wrapper\":\"billing_entity\",\"fields\":[{\"path\":[\"address_line1\"],\"flag\":\"address-line1\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The first line of the billing address\"},{\"path\":[\"address_line2\"],\"flag\":\"address-line2\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The second line of the billing address\"},{\"path\":[\"billing_configuration\",\"document_locale\"],\"flag\":\"billing-configuration-document-locale\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The language of the documents generated for this billing entity\"},{\"path\":[\"billing_configuration\",\"invoice_footer\"],\"flag\":\"billing-configuration-invoice-footer\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The footer text to be displayed on invoices for this billing entity\"},{\"path\":[\"billing_configuration\",\"invoice_grace_period\"],\"flag\":\"billing-configuration-invoice-grace-period\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The grace period (in days) for invoice finalization\"},{\"path\":[\"billing_configuration\",\"subscription_invoice_issuing_date_adjustment\"],\"flag\":\"billing-configuration-subscription-invoice-issuing-date-adjustment\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.\",\"enum\":[\"align_with_finalization_date\",\"keep_anchor\"]},{\"path\":[\"billing_configuration\",\"subscription_invoice_issuing_date_anchor\"],\"flag\":\"billing-configuration-subscription-invoice-issuing-date-anchor\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Defines whether the issuing date follows the current billing period's end date or the next period starting date.\",\"enum\":[\"current_period_end\",\"next_period_start\"]},{\"path\":[\"city\"],\"flag\":\"city\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The city of the billing address\"},{\"path\":[\"country\"],\"flag\":\"country\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The country code of the billing address\",\"enum\":[\"\",\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"default_currency\"],\"flag\":\"default-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The default currency of the billing entity\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"document_number_prefix\"],\"flag\":\"document-number-prefix\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The prefix used in document numbers for this billing entity\"},{\"path\":[\"document_numbering\"],\"flag\":\"document-numbering\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of document numbering for this billing entity:\\n- `per_customer`: document numbers are unique per customer\\n- `per_billing_entity`: document numbers are unique per billing entity\",\"enum\":[\"per_customer\",\"per_billing_entity\"]},{\"path\":[\"einvoicing\"],\"flag\":\"einvoicing\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Whether e-invoicing is enabled for this billing entity\"},{\"path\":[\"email\"],\"flag\":\"email\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The email address of the billing entity\"},{\"path\":[\"email_settings\"],\"flag\":\"email-settings\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The email notification settings for this billing entity\"},{\"path\":[\"eu_tax_management\"],\"flag\":\"eu-tax-management\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Whether EU tax management is enabled for this billing entity\"},{\"path\":[\"finalize_zero_amount_invoice\"],\"flag\":\"finalize-zero-amount-invoice\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Whether to finalize invoices with zero amount for this billing entity\"},{\"path\":[\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The codes of the invoice custom section that should be associated with this billing entity\"},{\"path\":[\"legal_name\"],\"flag\":\"legal-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal name of the billing entity\"},{\"path\":[\"legal_number\"],\"flag\":\"legal-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal registration number of the billing entity\"},{\"path\":[\"logo\"],\"flag\":\"logo\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The base64 encoded logo image for the billing entity. Sending \\\"null\\\" will remove the logo, if any exist.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The name of the billing entity\"},{\"path\":[\"net_payment_term\"],\"flag\":\"net-payment-term\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The net payment term (in days) for this billing entity\"},{\"path\":[\"phone\"],\"flag\":\"phone\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The phone number of the billing entity\"},{\"path\":[\"state\"],\"flag\":\"state\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The state of the billing address\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The tax codes that should be associated with this billing entity\"},{\"path\":[\"tax_identification_number\"],\"flag\":\"tax-identification-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The tax identification number of the billing entity\"},{\"path\":[\"timezone\"],\"flag\":\"timezone\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The timezone of the billing entity\",\"enum\":[\"UTC\",\"Africa/Algiers\",\"Africa/Cairo\",\"Africa/Casablanca\",\"Africa/Harare\",\"Africa/Johannesburg\",\"Africa/Monrovia\",\"Africa/Nairobi\",\"America/Argentina/Buenos_Aires\",\"America/Bogota\",\"America/Caracas\",\"America/Chicago\",\"America/Chihuahua\",\"America/Denver\",\"America/Guatemala\",\"America/Guyana\",\"America/Halifax\",\"America/Indiana/Indianapolis\",\"America/Juneau\",\"America/La_Paz\",\"America/Lima\",\"America/Los_Angeles\",\"America/Mazatlan\",\"America/Mexico_City\",\"America/Monterrey\",\"America/Montevideo\",\"America/New_York\",\"America/Nuuk\",\"America/Phoenix\",\"America/Puerto_Rico\",\"America/Regina\",\"America/Santiago\",\"America/Sao_Paulo\",\"America/St_Johns\",\"America/Tijuana\",\"Asia/Almaty\",\"Asia/Baghdad\",\"Asia/Baku\",\"Asia/Bangkok\",\"Asia/Chongqing\",\"Asia/Colombo\",\"Asia/Dhaka\",\"Asia/Hong_Kong\",\"Asia/Irkutsk\",\"Asia/Jakarta\",\"Asia/Jerusalem\",\"Asia/Kabul\",\"Asia/Kamchatka\",\"Asia/Karachi\",\"Asia/Kathmandu\",\"Asia/Kolkata\",\"Asia/Krasnoyarsk\",\"Asia/Kuala_Lumpur\",\"Asia/Kuwait\",\"Asia/Magadan\",\"Asia/Muscat\",\"Asia/Novosibirsk\",\"Asia/Riyadh\",\"Asia/Seoul\",\"Asia/Shanghai\",\"Asia/Singapore\",\"Asia/Srednekolymsk\",\"Asia/Taipei\",\"Asia/Tashkent\",\"Asia/Tbilisi\",\"Asia/Tehran\",\"Asia/Tokyo\",\"Asia/Ulaanbaatar\",\"Asia/Urumqi\",\"Asia/Vladivostok\",\"Asia/Yakutsk\",\"Asia/Yangon\",\"Asia/Yekaterinburg\",\"Asia/Yerevan\",\"Atlantic/Azores\",\"Atlantic/Cape_Verde\",\"Atlantic/South_Georgia\",\"Australia/Adelaide\",\"Australia/Brisbane\",\"Australia/Darwin\",\"Australia/Hobart\",\"Australia/Melbourne\",\"Australia/Perth\",\"Australia/Sydney\",\"Europe/Amsterdam\",\"Europe/Athens\",\"Europe/Belgrade\",\"Europe/Berlin\",\"Europe/Bratislava\",\"Europe/Brussels\",\"Europe/Bucharest\",\"Europe/Budapest\",\"Europe/Copenhagen\",\"Europe/Dublin\",\"Europe/Helsinki\",\"Europe/Istanbul\",\"Europe/Kaliningrad\",\"Europe/Kyiv\",\"Europe/Lisbon\",\"Europe/Ljubljana\",\"Europe/London\",\"Europe/Madrid\",\"Europe/Minsk\",\"Europe/Moscow\",\"Europe/Paris\",\"Europe/Prague\",\"Europe/Riga\",\"Europe/Rome\",\"Europe/Samara\",\"Europe/Sarajevo\",\"Europe/Skopje\",\"Europe/Sofia\",\"Europe/Stockholm\",\"Europe/Tallinn\",\"Europe/Vienna\",\"Europe/Vilnius\",\"Europe/Volgograd\",\"Europe/Warsaw\",\"Europe/Zagreb\",\"Europe/Zurich\",\"GMT+12\",\"Pacific/Apia\",\"Pacific/Auckland\",\"Pacific/Chatham\",\"Pacific/Fakaofo\",\"Pacific/Fiji\",\"Pacific/Guadalcanal\",\"Pacific/Guam\",\"Pacific/Honolulu\",\"Pacific/Majuro\",\"Pacific/Midway\",\"Pacific/Noumea\",\"Pacific/Pago_Pago\",\"Pacific/Port_Moresby\",\"Pacific/Tongatapu\"]},{\"path\":[\"zipcode\"],\"flag\":\"zipcode\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The zipcode of the billing address\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"coupons\",\"action\":\"apply\",\"operation_id\":\"applyCoupon\",\"method\":\"POST\",\"path\":\"/applied_coupons\",\"summary\":\"Apply a coupon to a customer\",\"description\":\"This endpoint is used to apply a specific coupon to a customer, before or during a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"body\":{\"wrapper\":\"applied_coupon\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The currency of the coupon. This field is required only for coupon with `fixed_amount` type.\",\"enum\":[\"\",\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"coupon_code\"],\"flag\":\"coupon-code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code used to identify the coupon.\"},{\"path\":[\"external_customer_id\"],\"flag\":\"external-customer-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"path\":[\"frequency\"],\"flag\":\"frequency\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.\\n\\n- If set to `once`, the coupon is applicable only for a single use.\\n- If set to `recurring`, the coupon can be used multiple times for recurring billing periods.\\n- If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.\",\"enum\":[\"once\",\"recurring\",\"forever\",\"\"]},{\"path\":[\"frequency_duration\"],\"flag\":\"frequency-duration\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type\"},{\"path\":[\"percentage_rate\"],\"flag\":\"percentage-rate\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"coupons\",\"action\":\"create\",\"operation_id\":\"createCoupon\",\"method\":\"POST\",\"path\":\"/coupons\",\"summary\":\"Create a coupon\",\"description\":\"This endpoint is used to create a coupon that can be then attached to a customer to create a discount.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"body\":{\"wrapper\":\"coupon\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The currency of the coupon. This field is required only for coupon with `fixed_amount` type.\",\"enum\":[\"\",\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"applies_to\",\"billable_metric_codes\"],\"flag\":\"applies-to-billable-metric-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of billable metric codes to which the coupon is applicable. By specifying the billable metric codes in this field, you can restrict the coupon's usage to specific metrics only.\"},{\"path\":[\"applies_to\",\"plan_codes\"],\"flag\":\"applies-to-plan-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of plan codes to which the coupon is applicable. By specifying the plan codes in this field, you can restrict the coupon's usage to specific plans only.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code used to identify the coupon.\"},{\"path\":[\"coupon_type\"],\"flag\":\"coupon-type\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The type of the coupon. It can have two possible values: `fixed_amount` or `percentage`.\\n\\n- If set to `fixed_amount`, the coupon represents a fixed amount discount.\\n- If set to `percentage`, the coupon represents a percentage-based discount.\",\"enum\":[\"fixed_amount\",\"percentage\"]},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Description of the coupon.\"},{\"path\":[\"expiration\"],\"flag\":\"expiration\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Specifies the type of expiration for the coupon. It can have two possible values: `time_limit` or `no_expiration`.\\n\\n- If set to `time_limit`, the coupon has an expiration based on a specified time limit.\\n- If set to `no_expiration`, the coupon does not have an expiration date and remains valid indefinitely.\",\"enum\":[\"no_expiration\",\"time_limit\"]},{\"path\":[\"expiration_at\"],\"flag\":\"expiration-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The expiration date and time of the coupon. This field is required only for coupons with `expiration` set to `time_limit`. The expiration date and time should be specified in UTC format according to the ISO 8601 datetime standard. It indicates the exact moment when the coupon will expire and is no longer valid.\"},{\"path\":[\"frequency\"],\"flag\":\"frequency\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.\\n\\n- If set to `once`, the coupon is applicable only for a single use.\\n- If set to `recurring`, the coupon can be used multiple times for recurring billing periods.\\n- If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.\",\"enum\":[\"once\",\"recurring\",\"forever\"]},{\"path\":[\"frequency_duration\"],\"flag\":\"frequency-duration\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The name of the coupon.\"},{\"path\":[\"percentage_rate\"],\"flag\":\"percentage-rate\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.\"},{\"path\":[\"reusable\"],\"flag\":\"reusable\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Indicates whether the coupon can be reused or not. If set to `true`, the coupon is reusable, meaning it can be applied multiple times to the same customer. If set to `false`, the coupon can only be used once and is not reusable. If not specified, this field is set to `true` by default.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"coupons\",\"action\":\"delete\",\"operation_id\":\"destroyCoupon\",\"method\":\"DELETE\",\"path\":\"/coupons/{code}\",\"summary\":\"Delete a coupon\",\"description\":\"This endpoint is used to delete a coupon.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code used to identify the coupon.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"coupons\",\"action\":\"delete-applied-coupon\",\"operation_id\":\"deleteAppliedCoupon\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/applied_coupons/{applied_coupon_id}\",\"summary\":\"Delete an applied coupon\",\"description\":\"This endpoint is used to delete a specific coupon that has been applied to a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"applied_coupon_id\",\"flag\":\"applied-coupon-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the applied coupon, created by Lago.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"coupons\",\"action\":\"get\",\"operation_id\":\"findCoupon\",\"method\":\"GET\",\"path\":\"/coupons/{code}\",\"summary\":\"Retrieve a coupon\",\"description\":\"This endpoint is used to retrieve a specific coupon.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code used to identify the coupon.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"coupons\",\"action\":\"list\",\"operation_id\":\"findAllCoupons\",\"method\":\"GET\",\"path\":\"/coupons\",\"summary\":\"List all coupons\",\"description\":\"This endpoint is used to list all existing coupons.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"coupons\",\"action\":\"list-applied-coupons\",\"operation_id\":\"findAllAppliedCoupons\",\"method\":\"GET\",\"path\":\"/applied_coupons\",\"summary\":\"List all applied coupons\",\"description\":\"This endpoint is used to list all applied coupons. You can filter by coupon status and by customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The status of the coupon. Can be either `active` or `terminated`.\",\"enum\":[\"active\",\"terminated\"]},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"coupon_code[]\",\"flag\":\"coupon-code\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"The code of the coupon applied to the customer. Use it to filter applied coupons by their code.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"coupons\",\"action\":\"update\",\"operation_id\":\"updateCoupon\",\"method\":\"PUT\",\"path\":\"/coupons/{code}\",\"summary\":\"Update a coupon\",\"description\":\"This endpoint is used to update a coupon that can be then attached to a customer to create a discount.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code used to identify the coupon.\"}],\"body\":{\"wrapper\":\"coupon\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The currency of the coupon. This field is required only for coupon with `fixed_amount` type.\",\"enum\":[\"\",\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"applies_to\",\"billable_metric_codes\"],\"flag\":\"applies-to-billable-metric-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of billable metric codes to which the coupon is applicable. By specifying the billable metric codes in this field, you can restrict the coupon's usage to specific metrics only.\"},{\"path\":[\"applies_to\",\"plan_codes\"],\"flag\":\"applies-to-plan-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of plan codes to which the coupon is applicable. By specifying the plan codes in this field, you can restrict the coupon's usage to specific plans only.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code used to identify the coupon.\"},{\"path\":[\"coupon_type\"],\"flag\":\"coupon-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of the coupon. It can have two possible values: `fixed_amount` or `percentage`.\\n\\n- If set to `fixed_amount`, the coupon represents a fixed amount discount.\\n- If set to `percentage`, the coupon represents a percentage-based discount.\",\"enum\":[\"fixed_amount\",\"percentage\"]},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Description of the coupon.\"},{\"path\":[\"expiration\"],\"flag\":\"expiration\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the type of expiration for the coupon. It can have two possible values: `time_limit` or `no_expiration`.\\n\\n- If set to `time_limit`, the coupon has an expiration based on a specified time limit.\\n- If set to `no_expiration`, the coupon does not have an expiration date and remains valid indefinitely.\",\"enum\":[\"no_expiration\",\"time_limit\"]},{\"path\":[\"expiration_at\"],\"flag\":\"expiration-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The expiration date and time of the coupon. This field is required only for coupons with `expiration` set to `time_limit`. The expiration date and time should be specified in UTC format according to the ISO 8601 datetime standard. It indicates the exact moment when the coupon will expire and is no longer valid.\"},{\"path\":[\"frequency\"],\"flag\":\"frequency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.\\n\\n- If set to `once`, the coupon is applicable only for a single use.\\n- If set to `recurring`, the coupon can be used multiple times for recurring billing periods.\\n- If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.\",\"enum\":[\"once\",\"recurring\",\"forever\"]},{\"path\":[\"frequency_duration\"],\"flag\":\"frequency-duration\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The name of the coupon.\"},{\"path\":[\"percentage_rate\"],\"flag\":\"percentage-rate\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.\"},{\"path\":[\"reusable\"],\"flag\":\"reusable\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Indicates whether the coupon can be reused or not. If set to `true`, the coupon is reusable, meaning it can be applied multiple times to the same customer. If set to `false`, the coupon can only be used once and is not reusable. If not specified, this field is set to `true` by default.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"create\",\"operation_id\":\"createCreditNote\",\"method\":\"POST\",\"path\":\"/credit_notes\",\"summary\":\"Create a credit note\",\"description\":\"This endpoint creates a new credit note.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"body\":{\"wrapper\":\"credit_note\",\"fields\":[{\"path\":[\"credit_amount_cents\"],\"flag\":\"credit-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The total amount to be credited to the customer balance for discounts on future invoices. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice's total fees.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The description of the credit note.\"},{\"path\":[\"invoice_id\"],\"flag\":\"invoice-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The invoice unique identifier, created by Lago.\"},{\"path\":[\"items\"],\"flag\":\"items\",\"type\":\"array\",\"required\":true,\"complex\":true,\"description\":\"The list of credit note's items.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"offset_amount_cents\"],\"flag\":\"offset-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The total amount to be immediately deducted from the invoice balance. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice's total fees.\"},{\"path\":[\"reason\"],\"flag\":\"reason\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The reason of the credit note creation.\\nPossible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.\",\"enum\":[\"duplicated_charge\",\"product_unsatisfactory\",\"order_change\",\"order_cancellation\",\"fraudulent_charge\",\"other\",\"\"]},{\"path\":[\"refund_amount_cents\"],\"flag\":\"refund-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The total amount to be refunded immediately to the payment method used by the customer. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice's total fees.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"delete-all-credit-note-metadata\",\"operation_id\":\"deleteAllCreditNoteMetadata\",\"method\":\"DELETE\",\"path\":\"/credit_notes/{lago_id}/metadata\",\"summary\":\"Delete all credit note metadata\",\"description\":\"This endpoint removes all metadata from a credit note.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"delete-credit-note-metadata-key\",\"operation_id\":\"deleteCreditNoteMetadataKey\",\"method\":\"DELETE\",\"path\":\"/credit_notes/{lago_id}/metadata/{key}\",\"summary\":\"Delete a metadata key\",\"description\":\"This endpoint removes a single metadata key from a credit note.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"},{\"name\":\"key\",\"flag\":\"key\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The metadata key to delete.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"download\",\"operation_id\":\"downloadCreditNote\",\"method\":\"POST\",\"path\":\"/credit_notes/{lago_id}/download\",\"summary\":\"Download a credit note PDF\",\"description\":\"This endpoint downloads the PDF of an existing credit note.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"credit-notes\",\"action\":\"estimate\",\"operation_id\":\"estimateCreditNote\",\"method\":\"POST\",\"path\":\"/credit_notes/estimate\",\"summary\":\"Estimate amounts for a new credit note\",\"description\":\"This endpoint allows you to retrieve amounts for a new credit note creation.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"body\":{\"wrapper\":\"credit_note\",\"fields\":[{\"path\":[\"invoice_id\"],\"flag\":\"invoice-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The invoice unique identifier, created by Lago.\"},{\"path\":[\"items\"],\"flag\":\"items\",\"type\":\"array\",\"required\":true,\"complex\":true,\"description\":\"The list of credit note's items.\"}],\"required\":false},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"credit-notes\",\"action\":\"get\",\"operation_id\":\"findCreditNote\",\"method\":\"GET\",\"path\":\"/credit_notes/{lago_id}\",\"summary\":\"Retrieve a credit note\",\"description\":\"This endpoint retrieves an existing credit note.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"credit-notes\",\"action\":\"list\",\"operation_id\":\"findAllCreditNotes\",\"method\":\"GET\",\"path\":\"/credit_notes\",\"summary\":\"List all credit notes\",\"description\":\"This endpoint list all existing credit notes.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"name\":\"issuing_date_from\",\"flag\":\"issuing-date-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes starting from a specific date.\"},{\"name\":\"issuing_date_to\",\"flag\":\"issuing-date-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes up to a specific date.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Search credit notes by id, number, customer name, customer external_id or customer email.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by currency. Possible values ISO 4217 currency codes.\"},{\"name\":\"reason\",\"flag\":\"reason\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by reasons. Possible values are `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge`, `duplicated_charge` or `other`.\",\"enum\":[\"product_unsatisfactory\",\"order_change\",\"order_cancellation\",\"fraudulent_charge\",\"duplicated_charge\",\"other\"]},{\"name\":\"credit_status\",\"flag\":\"credit-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by credit status. Possible values are `available`, `consumed` or `voided`.\",\"enum\":[\"available\",\"consumed\",\"voided\"]},{\"name\":\"refund_status\",\"flag\":\"refund-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by refund status. Possible values are `pending`, `succeeded` or `failed`.\",\"enum\":[\"pending\",\"succeeded\",\"failed\"]},{\"name\":\"invoice_number\",\"flag\":\"invoice-number\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by their related invoice number.\"},{\"name\":\"purchase_order_number\",\"flag\":\"purchase-order-number\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by the invoice purchase order number. The match is exact but case-insensitive.\"},{\"name\":\"amount_from\",\"flag\":\"amount-from\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter credit notes of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"amount_to\",\"flag\":\"amount-to\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter credit notes up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"types[]\",\"flag\":\"types\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter credit notes by the kind of amount they carry. `credit` matches credit notes with a credited amount, `refund` those with a refunded amount and `offset` those with an amount deducted from the invoice balance. A credit note can match several types.\"},{\"name\":\"self_billed\",\"flag\":\"self-billed\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter credit notes belonging to a self billed invoice. Possible values are `true` or `false`.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter credit notes by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"credit-notes\",\"action\":\"merge-credit-note-metadata\",\"operation_id\":\"mergeCreditNoteMetadata\",\"method\":\"PATCH\",\"path\":\"/credit_notes/{lago_id}/metadata\",\"summary\":\"Merge credit note metadata\",\"description\":\"This endpoint merges the provided metadata with existing metadata on the credit note.\\nExisting keys not in the request are preserved. New keys are added, existing keys are updated.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"metadata\",\"operation_id\":\"replaceCreditNoteMetadata\",\"method\":\"POST\",\"path\":\"/credit_notes/{lago_id}/metadata\",\"summary\":\"Replace credit note metadata\",\"description\":\"This endpoint replaces all existing metadata on a credit note with the provided key-value pairs.\\nAny existing metadata keys not included in the request will be removed.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"update\",\"operation_id\":\"updateCreditNote\",\"method\":\"PUT\",\"path\":\"/credit_notes/{lago_id}\",\"summary\":\"Update a credit note\",\"description\":\"This endpoint updates an existing credit note.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"body\":{\"wrapper\":\"credit_note\",\"fields\":[{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"refund_status\"],\"flag\":\"refund-status\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:\\n\\n- `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.\\n- `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.\\n- `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.\",\"enum\":[\"pending\",\"succeeded\",\"failed\"]}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"void\",\"operation_id\":\"voidCreditNote\",\"method\":\"PUT\",\"path\":\"/credit_notes/{lago_id}/void\",\"summary\":\"Void available credit\",\"description\":\"This endpoint voids the available credit linked to a specific credit note.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"customers\",\"action\":\"applied-coupons\",\"operation_id\":\"findAllCustomerAppliedCoupons\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/applied_coupons\",\"summary\":\"List all customer's applied coupons\",\"description\":\"This endpoint is used to list all applied coupons for a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The status of the coupon. Can be either `active` or `terminated`.\",\"enum\":[\"active\",\"terminated\"]},{\"name\":\"coupon_code[]\",\"flag\":\"coupon-code\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"The code of the coupon applied to the customer. Use it to filter applied coupons by their code.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"checkout-url\",\"operation_id\":\"generateCustomerCheckoutURL\",\"method\":\"POST\",\"path\":\"/customers/{external_customer_id}/checkout_url\",\"summary\":\"Generate a Customer Payment Provider Checkout URL\",\"description\":\"This endpoint regenerates the Payment Provider Checkout URL of a Customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application).\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"create\",\"operation_id\":\"createCustomer\",\"method\":\"POST\",\"path\":\"/customers\",\"summary\":\"Create a customer\",\"description\":\"This endpoint creates a new customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"body\":{\"wrapper\":\"customer\",\"fields\":[{\"path\":[\"account_type\"],\"flag\":\"account-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of the account. It can have one of the following values:\\n- `customer`: the account is a customer, default value.\\n- `partner`: the account is a partner.\\n\\nThis field is only applied when revenue share is enabled on your organization; otherwise it is ignored.\",\"enum\":[\"customer\",\"partner\"]},{\"path\":[\"address_line1\"],\"flag\":\"address-line1\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The first line of the billing address\"},{\"path\":[\"address_line2\"],\"flag\":\"address-line2\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The second line of the billing address\"},{\"path\":[\"billing_configuration\",\"document_locale\"],\"flag\":\"billing-configuration-document-locale\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The document locale, specified in the ISO 639-1 format. This field represents the language or locale used for the documents issued by Lago\"},{\"path\":[\"billing_configuration\",\"invoice_grace_period\"],\"flag\":\"billing-configuration-invoice-grace-period\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items\"},{\"path\":[\"billing_configuration\",\"payment_provider\"],\"flag\":\"billing-configuration-payment-provider\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The payment provider utilized to initiate payments for invoices issued by Lago.\\nAccepted values: `stripe`, `adyen`, `cashfree`, `flutterwave`, `gocardless`, `moneyhash` or null. This field is required if you intend to assign a `provider_customer_id`.\",\"enum\":[\"stripe\",\"adyen\",\"cashfree\",\"flutterwave\",\"gocardless\",\"moneyhash\"]},{\"path\":[\"billing_configuration\",\"payment_provider_code\"],\"flag\":\"billing-configuration-payment-provider-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code used to identify a payment provider connection.\"},{\"path\":[\"billing_configuration\",\"provider_customer_id\"],\"flag\":\"billing-configuration-provider-customer-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The customer ID within the payment provider's system. If this field is not provided, Lago has the option to create a new customer record within the payment provider's system on behalf of the customer\"},{\"path\":[\"billing_configuration\",\"provider_payment_methods\"],\"flag\":\"billing-configuration-provider-payment-methods\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set, the payment methods will be set to `card`. For now, possible values are `card`, `sepa_debit`, `us_bank_account`, `bacs_debit`, `boleto`, `link`, `crypto` and `customer_balance`. Note that when `link` is selected, `card` should also be provided in the array. When `customer_balance` is selected, no other payment can be selected.\"},{\"path\":[\"billing_configuration\",\"subscription_invoice_issuing_date_adjustment\"],\"flag\":\"billing-configuration-subscription-invoice-issuing-date-adjustment\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.\",\"enum\":[\"align_with_finalization_date\",\"keep_anchor\",\"\"]},{\"path\":[\"billing_configuration\",\"subscription_invoice_issuing_date_anchor\"],\"flag\":\"billing-configuration-subscription-invoice-issuing-date-anchor\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Defines whether the issuing date follows the current billing period's end date or the next period starting date.\",\"enum\":[\"current_period_end\",\"next_period_start\",\"\"]},{\"path\":[\"billing_configuration\",\"sync\"],\"flag\":\"billing-configuration-sync\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set this field to `true` if you want to create the customer in the payment provider synchronously with the customer creation process in Lago. This option is applicable only when the `provider_customer_id` is `null` and the customer is automatically created in the payment provider through Lago. By default, the value is set to `false`\"},{\"path\":[\"billing_configuration\",\"sync_with_provider\"],\"flag\":\"billing-configuration-sync-with-provider\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set this field to `true` if you want to create a customer record in the payment provider's system. This option is applicable only when the `provider_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`\"},{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The unique code of the billing entity to associate with the customer. If not provided, the default billing entity will be used.\"},{\"path\":[\"city\"],\"flag\":\"city\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The city of the customer's billing address\"},{\"path\":[\"country\"],\"flag\":\"country\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)\",\"enum\":[\"\",\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"currency\"],\"flag\":\"currency\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Currency of the customer. Format must be ISO 4217\",\"enum\":[\"\",\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"customer_type\"],\"flag\":\"customer-type\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The type of the customer. It can have one of the following values:\\n- `company`: the customer is a company.\\n- `individual`: the customer is an individual.\",\"enum\":[\"company\",\"individual\",\"\"]},{\"path\":[\"email\"],\"flag\":\"email\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The email of the customer\"},{\"path\":[\"external_id\"],\"flag\":\"external-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"path\":[\"external_salesforce_id\"],\"flag\":\"external-salesforce-id\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The customer ID within the Salesforce system\"},{\"path\":[\"finalize_zero_amount_invoice\"],\"flag\":\"finalize-zero-amount-invoice\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies how invoices with a zero total amount should be handled:\\n- `inherit`: (Default) Follows the organization-level configuration.\\n- `finalize`: Invoices are issued and finalized even if the total amount is zero.\\n- `skip`: Invoices with a total amount of zero are not finalized.\",\"enum\":[\"inherit\",\"skip\",\"finalize\"]},{\"path\":[\"firstname\"],\"flag\":\"firstname\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"First name of the customer\"},{\"path\":[\"integration_customers\"],\"flag\":\"integration-customers\",\"type\":\"array\",\"required\":false,\"complex\":true},{\"path\":[\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections.\"},{\"path\":[\"lastname\"],\"flag\":\"lastname\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Last name of the customer\"},{\"path\":[\"legal_name\"],\"flag\":\"legal-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal company name of the customer\"},{\"path\":[\"legal_number\"],\"flag\":\"legal-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal company number of the customer\"},{\"path\":[\"logo_url\"],\"flag\":\"logo-url\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The logo URL of the customer\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The full name of the customer (255 characters max).\"},{\"path\":[\"net_payment_term\"],\"flag\":\"net-payment-term\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.\"},{\"path\":[\"phone\"],\"flag\":\"phone\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The phone number of the customer\"},{\"path\":[\"shipping_address\",\"address_line1\"],\"flag\":\"shipping-address-address-line1\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The first line of the billing address\"},{\"path\":[\"shipping_address\",\"address_line2\"],\"flag\":\"shipping-address-address-line2\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The second line of the billing address\"},{\"path\":[\"shipping_address\",\"city\"],\"flag\":\"shipping-address-city\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The city of the customer's billing address\"},{\"path\":[\"shipping_address\",\"country\"],\"flag\":\"shipping-address-country\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)\",\"enum\":[\"\",\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"shipping_address\",\"state\"],\"flag\":\"shipping-address-state\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The state of the customer's billing address\"},{\"path\":[\"shipping_address\",\"zipcode\"],\"flag\":\"shipping-address-zipcode\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The zipcode of the customer's billing address\"},{\"path\":[\"skip_invoice_custom_sections\"],\"flag\":\"skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for this customer only. False by default\"},{\"path\":[\"state\"],\"flag\":\"state\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The state of the customer's billing address\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"tax_identification_number\"],\"flag\":\"tax-identification-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The tax identification number of the customer\"},{\"path\":[\"timezone\"],\"flag\":\"timezone\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone\",\"enum\":[\"\",\"UTC\",\"Africa/Algiers\",\"Africa/Cairo\",\"Africa/Casablanca\",\"Africa/Harare\",\"Africa/Johannesburg\",\"Africa/Monrovia\",\"Africa/Nairobi\",\"America/Argentina/Buenos_Aires\",\"America/Bogota\",\"America/Caracas\",\"America/Chicago\",\"America/Chihuahua\",\"America/Denver\",\"America/Godthab\",\"America/Guatemala\",\"America/Guyana\",\"America/Halifax\",\"America/Indiana/Indianapolis\",\"America/Juneau\",\"America/La_Paz\",\"America/Lima\",\"America/Los_Angeles\",\"America/Mazatlan\",\"America/Mexico_City\",\"America/Monterrey\",\"America/Montevideo\",\"America/New_York\",\"America/Phoenix\",\"America/Puerto_Rico\",\"America/Regina\",\"America/Santiago\",\"America/Sao_Paulo\",\"America/St_Johns\",\"America/Tijuana\",\"Asia/Almaty\",\"Asia/Baghdad\",\"Asia/Baku\",\"Asia/Bangkok\",\"Asia/Chongqing\",\"Asia/Colombo\",\"Asia/Dhaka\",\"Asia/Hong_Kong\",\"Asia/Irkutsk\",\"Asia/Jakarta\",\"Asia/Jerusalem\",\"Asia/Kabul\",\"Asia/Kamchatka\",\"Asia/Karachi\",\"Asia/Kathmandu\",\"Asia/Kolkata\",\"Asia/Krasnoyarsk\",\"Asia/Kuala_Lumpur\",\"Asia/Kuwait\",\"Asia/Magadan\",\"Asia/Muscat\",\"Asia/Novosibirsk\",\"Asia/Rangoon\",\"Asia/Riyadh\",\"Asia/Seoul\",\"Asia/Shanghai\",\"Asia/Singapore\",\"Asia/Srednekolymsk\",\"Asia/Taipei\",\"Asia/Tashkent\",\"Asia/Tbilisi\",\"Asia/Tehran\",\"Asia/Tokyo\",\"Asia/Ulaanbaatar\",\"Asia/Urumqi\",\"Asia/Vladivostok\",\"Asia/Yakutsk\",\"Asia/Yekaterinburg\",\"Asia/Yerevan\",\"Atlantic/Azores\",\"Atlantic/Cape_Verde\",\"Atlantic/South_Georgia\",\"Australia/Adelaide\",\"Australia/Brisbane\",\"Australia/Darwin\",\"Australia/Hobart\",\"Australia/Melbourne\",\"Australia/Perth\",\"Australia/Sydney\",\"Europe/Amsterdam\",\"Europe/Athens\",\"Europe/Belgrade\",\"Europe/Berlin\",\"Europe/Bratislava\",\"Europe/Brussels\",\"Europe/Bucharest\",\"Europe/Budapest\",\"Europe/Copenhagen\",\"Europe/Dublin\",\"Europe/Helsinki\",\"Europe/Istanbul\",\"Europe/Kaliningrad\",\"Europe/Kiev\",\"Europe/Lisbon\",\"Europe/Ljubljana\",\"Europe/London\",\"Europe/Madrid\",\"Europe/Minsk\",\"Europe/Moscow\",\"Europe/Paris\",\"Europe/Prague\",\"Europe/Riga\",\"Europe/Rome\",\"Europe/Samara\",\"Europe/Sarajevo\",\"Europe/Skopje\",\"Europe/Sofia\",\"Europe/Stockholm\",\"Europe/Tallinn\",\"Europe/Vienna\",\"Europe/Vilnius\",\"Europe/Volgograd\",\"Europe/Warsaw\",\"Europe/Zagreb\",\"Europe/Zurich\",\"GMT+12\",\"Pacific/Apia\",\"Pacific/Auckland\",\"Pacific/Chatham\",\"Pacific/Fakaofo\",\"Pacific/Fiji\",\"Pacific/Guadalcanal\",\"Pacific/Guam\",\"Pacific/Honolulu\",\"Pacific/Majuro\",\"Pacific/Midway\",\"Pacific/Noumea\",\"Pacific/Pago_Pago\",\"Pacific/Port_Moresby\",\"Pacific/Tongatapu\"]},{\"path\":[\"url\"],\"flag\":\"url\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The custom website URL of the customer\"},{\"path\":[\"zipcode\"],\"flag\":\"zipcode\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The zipcode of the customer's billing address\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"customers\",\"action\":\"credit-notes\",\"operation_id\":\"findAllCustomerCreditNotes\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/credit_notes\",\"summary\":\"List all customer's credit notes\",\"description\":\"This endpoint list all existing credit notes for a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"issuing_date_from\",\"flag\":\"issuing-date-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes starting from a specific date.\"},{\"name\":\"issuing_date_to\",\"flag\":\"issuing-date-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes up to a specific date.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Search credit notes by id, number, customer name, customer external_id or customer email.\"},{\"name\":\"reason\",\"flag\":\"reason\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by reasons. Possible values are `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge`, `duplicated_charge` or `other`.\",\"enum\":[\"product_unsatisfactory\",\"order_change\",\"order_cancellation\",\"fraudulent_charge\",\"duplicated_charge\",\"other\"]},{\"name\":\"credit_status\",\"flag\":\"credit-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by credit status. Possible values are `available`, `consumed` or `voided`.\",\"enum\":[\"available\",\"consumed\",\"voided\"]},{\"name\":\"refund_status\",\"flag\":\"refund-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by refund status. Possible values are `pending`, `succeeded` or `failed`.\",\"enum\":[\"pending\",\"succeeded\",\"failed\"]},{\"name\":\"invoice_number\",\"flag\":\"invoice-number\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by their related invoice number.\"},{\"name\":\"purchase_order_number\",\"flag\":\"purchase-order-number\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by the invoice purchase order number. The match is exact but case-insensitive.\"},{\"name\":\"amount_from\",\"flag\":\"amount-from\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter credit notes of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"amount_to\",\"flag\":\"amount-to\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter credit notes up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"self_billed\",\"flag\":\"self-billed\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter credit notes belonging to a self billed invoice. Possible values are `true` or `false`.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"current-usage\",\"operation_id\":\"findCustomerCurrentUsage\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/current_usage\",\"summary\":\"Retrieve customer current usage\",\"description\":\"This endpoint enables the retrieval of the usage-based billing data for a customer within the current period.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application).\"},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":true,\"description\":\"The unique identifier of the subscription within your application.\"},{\"name\":\"apply_taxes\",\"flag\":\"apply-taxes\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Optional flag to determine if taxes should be applied. Defaults to `true` if not provided or if null.\\n\"},{\"name\":\"charge_id\",\"flag\":\"charge-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter usage to a specific charge by its Lago ID (UUID). Replaces deprecated `filter_by_charge_id`.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter usage to a specific charge by its code. Replaces deprecated `filter_by_charge_code`.\"},{\"name\":\"billable_metric_code\",\"flag\":\"billable-metric-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter usage to a specific billable metric by its code.\"},{\"name\":\"group\",\"flag\":\"group\",\"in\":\"query\",\"type\":\"object\",\"required\":false,\"description\":\"Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `group[cloud]=aws`. Replaces deprecated `filter_by_group`.\\n\"},{\"name\":\"filter_by_charge_id\",\"flag\":\"filter-by-charge-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"**Deprecated.** Filter usage to a specific charge by its Lago ID (UUID).\"},{\"name\":\"filter_by_charge_code\",\"flag\":\"filter-by-charge-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"**Deprecated.** Filter usage to a specific charge by its code.\"},{\"name\":\"filter_by_group\",\"flag\":\"filter-by-group\",\"in\":\"query\",\"type\":\"object\",\"required\":false,\"description\":\"**Deprecated.** Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `filter_by_group[cloud]=aws`.\\n\"},{\"name\":\"full_usage\",\"flag\":\"full-usage\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"When `true`, returns usage since subscription start instead of the current billing period. Requires one of `charge_id`, `charge_code`, `group` (or their deprecated `filter_by_*` equivalents) to be set.\\n\"},{\"name\":\"filter_by_presentation\",\"flag\":\"filter-by-presentation\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter `presentation_breakdowns` by a JSON-encoded array of presentation group key values. Only breakdowns matching the provided values will be returned. Pass an empty array to disable `presentation_breakdowns` entirely.\\n\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"delete\",\"operation_id\":\"destroyCustomer\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}\",\"summary\":\"Delete a customer\",\"description\":\"This endpoint deletes an existing customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"customers\",\"action\":\"get\",\"operation_id\":\"findCustomer\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}\",\"summary\":\"Retrieve a customer\",\"description\":\"This endpoint retrieves an existing customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"invoices\",\"operation_id\":\"findAllCustomerInvoices\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/invoices\",\"summary\":\"List all customer's invoices\",\"description\":\"This endpoint is used for retrieving all invoices of a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"amount_from\",\"flag\":\"amount-from\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter invoices of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"amount_to\",\"flag\":\"amount-to\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter invoices up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"issuing_date_from\",\"flag\":\"issuing-date-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices starting from a specific date.\"},{\"name\":\"issuing_date_to\",\"flag\":\"issuing-date-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices up to a specific date.\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by status. Possible values are `draft` or `finalized`.\",\"enum\":[\"draft\",\"finalized\"]},{\"name\":\"payment_status\",\"flag\":\"payment-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by payment status. Possible values are `pending`, `failed` or `succeeded`.\",\"enum\":[\"pending\",\"failed\",\"succeeded\"]},{\"name\":\"payment_overdue\",\"flag\":\"payment-overdue\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices by payment_overdue. Possible values are `true` or `false`.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Search invoices by id, number, customer name, customer external_id or customer email.\"},{\"name\":\"payment_dispute_lost\",\"flag\":\"payment-dispute-lost\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices with a payment dispute lost. Possible values are `true` or `false`.\"},{\"name\":\"invoice_type\",\"flag\":\"invoice-type\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off`, `advance_charges` or `progressive_billing`.\",\"enum\":[\"subscription\",\"add_on\",\"credit\",\"one_off\",\"advance_charges\",\"progressive_billing\"]},{\"name\":\"self_billed\",\"flag\":\"self-billed\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices by self billed. Possible values are `true` or `false`.\"},{\"name\":\"metadata[key]\",\"flag\":\"metadata[key]\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for invoice without given metadata key. For example, `metadata[color]=blue`.\"},{\"name\":\"purchase_order_number\",\"flag\":\"purchase-order-number\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by the invoice purchase order number. The match is exact but case-insensitive.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"list\",\"operation_id\":\"findAllCustomers\",\"method\":\"GET\",\"path\":\"/customers\",\"summary\":\"List all customers\",\"description\":\"This endpoint retrieves all existing customers.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter customers by external ID.\"},{\"name\":\"account_type[]\",\"flag\":\"account-type\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter customers by account type.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter customers by billing entity codes.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter customers by search term. This will filter all customers whose name, firstname, lastname, legal name, external id or email contain the search term.\"},{\"name\":\"countries[]\",\"flag\":\"countries\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter customers by countries. Possible values are the ISO 3166-1 alpha-2 codes.\"},{\"name\":\"states[]\",\"flag\":\"states\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter customers by states.\"},{\"name\":\"zipcodes[]\",\"flag\":\"zipcodes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter customers by zipcodes.\"},{\"name\":\"currencies[]\",\"flag\":\"currencies\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter customers by currencies.\"},{\"name\":\"has_tax_identification_number\",\"flag\":\"has-tax-identification-number\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter customers by whether they have a tax identification number or not.\"},{\"name\":\"metadata[key]\",\"flag\":\"metadata[key]\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter customers by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for customers without given metadata key. For example, `metadata[is_synced]=true\\u0026metadata[last_synced_at]=`.\"},{\"name\":\"customer_type\",\"flag\":\"customer-type\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter customers by customer type.\",\"enum\":[\"company\",\"individual\"]},{\"name\":\"has_customer_type\",\"flag\":\"has-customer-type\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter customers by whether they have a customer type or not.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"past-usage\",\"operation_id\":\"findAllCustomerPastUsage\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/past_usage\",\"summary\":\"Retrieve customer past usage\",\"description\":\"This endpoint enables the retrieval of the usage-based billing data for a customer within past periods.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application).\"},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":true,\"description\":\"The unique identifier of the subscription within your application.\"},{\"name\":\"billable_metric_code\",\"flag\":\"billable-metric-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Billable metric code filter to apply to the charge usage\"},{\"name\":\"periods_count\",\"flag\":\"periods-count\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of past billing period to returns in the result\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"payment-requests\",\"operation_id\":\"findAllCustomerPaymentRequests\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/payment_requests\",\"summary\":\"List all customer's payment requests\",\"description\":\"This endpoint is used to list all existing payment requests of a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"payment_status\",\"flag\":\"payment-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by payment status. Possible values are `pending`, `failed` or `succeeded`.\",\"enum\":[\"pending\",\"failed\",\"succeeded\"]},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter payment requests by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"payments\",\"operation_id\":\"findAllCustomerPayments\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/payments\",\"summary\":\"List all customer's payments\",\"description\":\"This endpoint is used to list all payments of a customer\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"invoice_id\",\"flag\":\"invoice-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"portal-url\",\"operation_id\":\"getCustomerPortalUrl\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/portal_url\",\"summary\":\"Get a customer portal URL\",\"description\":\"Retrieves an embeddable link for displaying a customer portal.\\n\\nThis endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing customer\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"projected-usage\",\"operation_id\":\"findCustomerProjectedUsage\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/projected_usage\",\"summary\":\"Retrieve customer current and projected usage\",\"description\":\"This endpoint enables the retrieval of the usage-based billing data for a customer within the current period. It also returns the projected usage for the current period based on the current usage.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application).\"},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":true,\"description\":\"The unique identifier of the subscription within your application.\"},{\"name\":\"apply_taxes\",\"flag\":\"apply-taxes\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Optional flag to determine if taxes should be applied. Defaults to `true` if not provided or if null.\\n\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"subscriptions\",\"operation_id\":\"findAllCustomerSubscriptions\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/subscriptions\",\"summary\":\"List all customer's subscriptions\",\"description\":\"This endpoint retrieves all active subscriptions for a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"plan_code\",\"flag\":\"plan-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans.\"},{\"name\":\"status[]\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter subscriptions by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"entitlements\",\"action\":\"create\",\"operation_id\":\"createEntitlement\",\"method\":\"POST\",\"path\":\"/plans/{code}/entitlements\",\"summary\":\"Create an entitlement\",\"description\":\"This endpoint creates new entitlements by adding features to a plan. Note that all existing entitlements will be deleted and replaced by the ones provided. To add a new entitlement without removing the existing ones, use PATCH. The feature must exist and all privileges must be valid for the feature.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"}],\"body\":{\"wrapper\":\"entitlements\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"entitlements\",\"action\":\"destroy\",\"operation_id\":\"destroyEntitlement\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/entitlements/{feature_code}\",\"summary\":\"Delete an entitlement\",\"description\":\"This endpoint deletes an existing entitlement by removing the feature from the plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"feature_code\",\"flag\":\"feature-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"entitlements\",\"action\":\"destroy-subscription-entitlement\",\"operation_id\":\"destroySubscriptionEntitlement\",\"method\":\"DELETE\",\"path\":\"/subscriptions/{external_id}/entitlements/{feature_code}\",\"summary\":\"Remove an entitlement from a subscription\",\"description\":\"This endpoint removes a specific feature entitlement from a subscription. The entitlement remains available from the plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"feature_code\",\"flag\":\"feature-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"entitlements\",\"action\":\"destroy-subscription-entitlement-privilege\",\"operation_id\":\"destroySubscriptionEntitlementPrivilege\",\"method\":\"DELETE\",\"path\":\"/subscriptions/{external_id}/entitlements/{feature_code}/privileges/{privilege_code}\",\"summary\":\"Remove a privilege from a subscription entitlement override\",\"description\":\"This endpoint removes a specific privilege from a subscription entitlement. The privilege entitlement remains available from the plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"feature_code\",\"flag\":\"feature-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"},{\"name\":\"privilege_code\",\"flag\":\"privilege-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the privilege to remove from the subscription entitlement override.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"entitlements\",\"action\":\"get\",\"operation_id\":\"findEntitlement\",\"method\":\"GET\",\"path\":\"/plans/{code}/entitlements/{feature_code}\",\"summary\":\"Retrieve an entitlement\",\"description\":\"This endpoint retrieves a specific entitlement for a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"feature_code\",\"flag\":\"feature-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"entitlements\",\"action\":\"list\",\"operation_id\":\"findAllEntitlements\",\"method\":\"GET\",\"path\":\"/plans/{code}/entitlements\",\"summary\":\"List all entitlements\",\"description\":\"This endpoint retrieves all entitlements for a specific plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"entitlements\",\"action\":\"list-subscription-entitlements\",\"operation_id\":\"findAllSubscriptionEntitlements\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/entitlements\",\"summary\":\"List all subscription entitlements\",\"description\":\"This endpoint retrieves all entitlements for a specific subscription, including both plan entitlements and any subscription-specific overrides.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"entitlements\",\"action\":\"remove-entitlement-privilege\",\"operation_id\":\"removeEntitlementPrivilege\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/entitlements/{feature_code}/privileges/{privilege_code}\",\"summary\":\"Remove a privilege from an entitlement\",\"description\":\"This endpoint removes a specific privilege and its value from an entitlement. The privilege remains untouched on the original feature.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"feature_code\",\"flag\":\"feature-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"},{\"name\":\"privilege_code\",\"flag\":\"privilege-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the privilege to remove from the entitlement.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"entitlements\",\"action\":\"update\",\"operation_id\":\"updateEntitlement\",\"method\":\"PATCH\",\"path\":\"/plans/{code}/entitlements\",\"summary\":\"Partial update of an entitlement\",\"description\":\"This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"}],\"body\":{\"wrapper\":\"entitlements\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"entitlements\",\"action\":\"update-subscription-entitlements\",\"operation_id\":\"updateSubscriptionEntitlements\",\"method\":\"PATCH\",\"path\":\"/subscriptions/{external_id}/entitlements\",\"summary\":\"Update subscription entitlements\",\"description\":\"This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"body\":{\"wrapper\":\"entitlements\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"events\",\"action\":\"batch\",\"operation_id\":\"createBatchEvents\",\"method\":\"POST\",\"path\":\"/events/batch\",\"summary\":\"Batch multiple events\",\"description\":\"This endpoint can be used to send a batch of usage records. Each request may include up to 100 events.\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"body\":{\"fields\":[{\"path\":[\"events\"],\"flag\":\"events\",\"type\":\"array\",\"required\":true,\"complex\":true}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"events\",\"action\":\"batch-estimate-instant-fees\",\"operation_id\":\"eventBatchEstimateInstantFees\",\"method\":\"POST\",\"path\":\"/events/batch_estimate_instant_fees\",\"summary\":\"Batch estimate instant fees for a pay in advance charge\",\"description\":\"Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance standard or percentage charges\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"body\":{\"fields\":[{\"path\":[\"events\"],\"flag\":\"events\",\"type\":\"array\",\"required\":true,\"complex\":true}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"events\",\"action\":\"estimate-fees\",\"operation_id\":\"eventEstimateFees\",\"method\":\"POST\",\"path\":\"/events/estimate_fees\",\"summary\":\"Estimate fees for a pay in advance charge\",\"description\":\"Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance charges\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"body\":{\"wrapper\":\"event\",\"fields\":[{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.\"},{\"path\":[\"external_subscription_id\"],\"flag\":\"external-subscription-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The unique identifier of the subscription within your application.\"},{\"path\":[\"properties\"],\"flag\":\"properties\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. Any property of the targeted billable metric can be sent here, in addition to the documented fields below.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"events\",\"action\":\"estimate-instant-fees\",\"operation_id\":\"eventEstimateInstantFees\",\"method\":\"POST\",\"path\":\"/events/estimate_instant_fees\",\"summary\":\"Estimate instant fees for a pay in advance charge\",\"description\":\"Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance standard or percentage charges\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"body\":{\"wrapper\":\"event\",\"fields\":[{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.\"},{\"path\":[\"external_subscription_id\"],\"flag\":\"external-subscription-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The unique identifier of the subscription within your application.\"},{\"path\":[\"properties\"],\"flag\":\"properties\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.\"},{\"path\":[\"transaction_id\"],\"flag\":\"transaction-id\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This field represents a unique identifier for the event.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"events\",\"action\":\"get\",\"operation_id\":\"findEvent\",\"method\":\"GET\",\"path\":\"/events/{transaction_id}\",\"summary\":\"Retrieve a specific event\",\"description\":\"This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription.\\n\\nNote that transaction_id is unique per external_subscription_id so multiple subscriptions can share the same transaction_id. This endpoint will only return the first event found with the given transaction_id.\\n\\nWARNING: If your Lago organization is configured to use the Clickhouse-based event pipeline, multiple events can share the same `transaction_id` (with different timestamps). This endpoint will only return the first event found.\\n\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"parameters\":[{\"name\":\"transaction_id\",\"flag\":\"transaction-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"This field represents the unique identifier sent for this specific event (must be URL encoded).\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"events\",\"action\":\"list\",\"operation_id\":\"findAllEvents\",\"method\":\"GET\",\"path\":\"/events\",\"summary\":\"List all events\",\"description\":\"This endpoint is used for retrieving all events.\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"External subscription ID\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter events by its code.\"},{\"name\":\"timestamp_from_started_at\",\"flag\":\"timestamp-from-started-at\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Requires `external_subscription_id` to be set. Filter events by timestamp after the subscription started at datetime.\"},{\"name\":\"timestamp_from\",\"flag\":\"timestamp-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter events by timestamp starting from a specific date.\"},{\"name\":\"timestamp_to\",\"flag\":\"timestamp-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter events by timestamp up to a specific date.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"events\",\"action\":\"send\",\"operation_id\":\"createEvent\",\"method\":\"POST\",\"path\":\"/events\",\"summary\":\"Send usage events\",\"description\":\"This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"body\":{\"wrapper\":\"event\",\"fields\":[{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.\"},{\"path\":[\"external_subscription_id\"],\"flag\":\"external-subscription-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The unique identifier of the subscription in your application. This field is mandatory in order to link events to the correct customer subscription.\"},{\"path\":[\"precise_total_amount_cents\"],\"flag\":\"precise-total-amount-cents\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The precise total amount in cents with precision used by the `dynamic` pricing model to compute the usage amount.\"},{\"path\":[\"properties\"],\"flag\":\"properties\",\"type\":\"object\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.\"},{\"path\":[\"timestamp\"],\"flag\":\"timestamp\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).\\nIf this timestamp is not provided, the API will automatically set it to the time of event reception.\\nYou can also provide miliseconds precision by appending decimals to the timestamp.\\n\"},{\"path\":[\"transaction_id\"],\"flag\":\"transaction-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"This field represents a unique identifier for the event.\\nIt is crucial for ensuring idempotency, meaning that each event can be uniquely identified and processed without causing any unintended side effects.\\n\\nWARNING: If the Lago organization is configured to use the new Clickhouse-based event pipeline (designed for high-volume processing), the idempotency logic is handled differently.\\nEvent uniqueness is maintained with both `transaction_id` and `timestamp` fields.\\nIf a new event arrives with identical values for these two fields as an existing event, the new one will overwrite the previous event rather than being rejected.\\n\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"features\",\"action\":\"create\",\"operation_id\":\"createFeature\",\"method\":\"POST\",\"path\":\"/features\",\"summary\":\"Create a feature\",\"description\":\"This endpoint creates a new feature representing an entitlement component of your application.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/features/feature-object\",\"body\":{\"wrapper\":\"feature\",\"fields\":[{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code used to identify the feature.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Internal description of the feature.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Name of the feature.\"},{\"path\":[\"privileges\"],\"flag\":\"privileges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Privileges associated with this feature. Can be empty.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"features\",\"action\":\"delete\",\"operation_id\":\"destroyFeature\",\"method\":\"DELETE\",\"path\":\"/features/{code}\",\"summary\":\"Delete a feature\",\"description\":\"This endpoint deletes an existing feature representing an entitlement component of your application. Deleting a feature will remove it from all plans and subscriptions.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/features/feature-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"features\",\"action\":\"delete-feature-privilege\",\"operation_id\":\"deleteFeaturePrivilege\",\"method\":\"DELETE\",\"path\":\"/features/{code}/privileges/{privilege_code}\",\"summary\":\"Delete a privilege. Deleting a privilege removes it from all plans and subscriptions.\",\"description\":\"Delete privilege from feature. Deleting a privilege removes it from all plans and subscriptions.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/features/feature-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"},{\"name\":\"privilege_code\",\"flag\":\"privilege-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing privilege.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"features\",\"action\":\"get\",\"operation_id\":\"findFeature\",\"method\":\"GET\",\"path\":\"/features/{code}\",\"summary\":\"Retrieve a feature\",\"description\":\"This endpoint retrieves an existing feature that represents an entitlement component of your application. The feature is identified by its unique code.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/features/feature-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"features\",\"action\":\"list\",\"operation_id\":\"findAllFeatures\",\"method\":\"GET\",\"path\":\"/features\",\"summary\":\"List all features\",\"description\":\"This endpoint retrieves all existing features that represent entitlement components of your application.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/features/feature-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Search in name, code and description.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"features\",\"action\":\"update\",\"operation_id\":\"updateFeature\",\"method\":\"PUT\",\"path\":\"/features/{code}\",\"summary\":\"Update a feature\",\"description\":\"This endpoint updates an existing feature representing an entitlement component of your application.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/features/feature-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"}],\"body\":{\"wrapper\":\"feature\",\"fields\":[{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Internal description of the feature.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Name of the feature.\"},{\"path\":[\"privileges\"],\"flag\":\"privileges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Privileges associated with this feature. Can be empty.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"fees\",\"action\":\"delete\",\"operation_id\":\"deleteFee\",\"method\":\"DELETE\",\"path\":\"/fees/{lago_id}\",\"summary\":\"Delete a fee\",\"description\":\"This endpoint is used for deleting a specific fee that has not yet been invoiced\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object#fee-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"fees\",\"action\":\"get\",\"operation_id\":\"findFee\",\"method\":\"GET\",\"path\":\"/fees/{lago_id}\",\"summary\":\"Retrieve a specific fee\",\"description\":\"This endpoint is used for retrieving a specific fee that has been issued.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object#fee-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"fees\",\"action\":\"list\",\"operation_id\":\"findAllFees\",\"method\":\"GET\",\"path\":\"/fees\",\"summary\":\"List all fees\",\"description\":\"This endpoint is used for retrieving all fees that have been issued.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object#fee-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"External subscription ID\"},{\"name\":\"event_transaction_id\",\"flag\":\"event-transaction-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results by event transaction ID\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results by the fee's currency.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"fee_type\",\"flag\":\"fee-type\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The fee type. Possible values are `add_on`, `charge`, `fixed_charge`, `credit`, `subscription` or `commitment`.\",\"enum\":[\"charge\",\"fixed_charge\",\"add_on\",\"subscription\",\"credit\",\"commitment\"]},{\"name\":\"billable_metric_code\",\"flag\":\"billable-metric-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results by the `code` of the billable metric attached to the fee. Only applies to `charge` types.\"},{\"name\":\"payment_status\",\"flag\":\"payment-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The possible values for this field are `pending`, `succeeded`, `failed` and `refunded`.\",\"enum\":[\"pending\",\"succeeded\",\"failed\",\"refunded\"]},{\"name\":\"created_at_from\",\"flag\":\"created-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results created at or after this date and time in UTC.\"},{\"name\":\"created_at_to\",\"flag\":\"created-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results created at or before this date and time in UTC.\"},{\"name\":\"succeeded_at_from\",\"flag\":\"succeeded-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results with a payment success at or after this date and time in UTC.\"},{\"name\":\"succeeded_at_to\",\"flag\":\"succeeded-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results with a payment success at or before this date and time in UTC.\"},{\"name\":\"failed_at_from\",\"flag\":\"failed-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results with a payment failure at or after this date and time in UTC.\"},{\"name\":\"failed_at_to\",\"flag\":\"failed-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results with a payment failure at or before this date and time in UTC.\"},{\"name\":\"refunded_at_from\",\"flag\":\"refunded-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results with a payment refund at or after this date and time in UTC.\"},{\"name\":\"refunded_at_to\",\"flag\":\"refunded-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results with a payment refund at or before this date and time in UTC.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"fees\",\"action\":\"update\",\"operation_id\":\"updateFee\",\"method\":\"PUT\",\"path\":\"/fees/{lago_id}\",\"summary\":\"Update a fee\",\"description\":\"This endpoint is used for updating a specific fee that has been issued.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object#fee-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.\"}],\"body\":{\"wrapper\":\"fee\",\"fields\":[{\"path\":[\"payment_status\"],\"flag\":\"payment-status\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The payment status of the fee. Possible values are `pending`, `succeeded`, `failed` or `refunded`.\",\"enum\":[\"pending\",\"succeeded\",\"failed\",\"refunded\"]}],\"required\":false},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"create\",\"operation_id\":\"createInvoice\",\"method\":\"POST\",\"path\":\"/invoices\",\"summary\":\"Create a one-off invoice\",\"description\":\"This endpoint is used for issuing a one-off invoice.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"body\":{\"wrapper\":\"invoice\",\"fields\":[{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity to issue the invoice from. If not provided, the customer's billing entity is used.\"},{\"path\":[\"currency\"],\"flag\":\"currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the invoice.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"external_customer_id\"],\"flag\":\"external-customer-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"path\":[\"fees\"],\"flag\":\"fees\",\"type\":\"array\",\"required\":true,\"complex\":true},{\"path\":[\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number to associate with the invoice.\"},{\"path\":[\"skip_psp\"],\"flag\":\"skip-psp\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"If true, the invoice will be created but not sent to the payment provider.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"delete\",\"operation_id\":\"deleteInvoice\",\"method\":\"DELETE\",\"path\":\"/invoices/{lago_id}\",\"summary\":\"Delete a draft invoice\",\"description\":\"This endpoint is used for permanently deleting a `draft` invoice. Deleting a draft invoice removes it entirely: it never becomes accounts receivable, consumes no invoice number, and disappears from every list, export, and analytics surface. Only invoices in the `draft` status can be deleted; for a `finalized` invoice, void it instead.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"download\",\"operation_id\":\"downloadInvoice\",\"method\":\"POST\",\"path\":\"/invoices/{lago_id}/download\",\"summary\":\"Download an invoice PDF\",\"description\":\"This endpoint is used for downloading a specific invoice PDF document.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"invoices\",\"action\":\"finalize\",\"operation_id\":\"finalizeInvoice\",\"method\":\"PUT\",\"path\":\"/invoices/{lago_id}/finalize\",\"summary\":\"Finalize a draft invoice\",\"description\":\"This endpoint is used for finalizing a draft invoice.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"get\",\"operation_id\":\"findInvoice\",\"method\":\"GET\",\"path\":\"/invoices/{lago_id}\",\"summary\":\"Retrieve an invoice\",\"description\":\"This endpoint is used for retrieving a specific invoice that has been issued.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"invoices\",\"action\":\"list\",\"operation_id\":\"findAllInvoices\",\"method\":\"GET\",\"path\":\"/invoices\",\"summary\":\"List all invoices\",\"description\":\"This endpoint is used for retrieving all invoices.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"name\":\"amount_from\",\"flag\":\"amount-from\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter invoices of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"amount_to\",\"flag\":\"amount-to\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter invoices up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"issuing_date_from\",\"flag\":\"issuing-date-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices starting from a specific date.\"},{\"name\":\"issuing_date_to\",\"flag\":\"issuing-date-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices up to a specific date.\"},{\"name\":\"statuses[]\",\"flag\":\"statuses\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter invoices by statuses. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`.\"},{\"name\":\"payment_statuses[]\",\"flag\":\"payment-statuses\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter invoices by payment statuses. Possible values are `pending`, `failed` or `succeeded`.\"},{\"name\":\"payment_overdue\",\"flag\":\"payment-overdue\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices by payment_overdue. Possible values are `true` or `false`.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Search invoices by id, number, customer name, customer external_id or customer email.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by currency. Possible values ISO 4217 currency codes.\"},{\"name\":\"payment_dispute_lost\",\"flag\":\"payment-dispute-lost\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices with a payment dispute lost. Possible values are `true` or `false`.\"},{\"name\":\"partially_paid\",\"flag\":\"partially-paid\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices that are partially paid. When `true`, only invoices with a non-zero amount paid that is below the total due are returned. When `false`, those invoices are excluded.\"},{\"name\":\"settlements[]\",\"flag\":\"settlements\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter invoices settled by at least one of the given settlement types. `payment` matches invoices settled by a payment, `credit_note` matches invoices settled by a credit note.\"},{\"name\":\"invoice_type\",\"flag\":\"invoice-type\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off`, `advance_charges` or `progressive_billing`.\",\"enum\":[\"subscription\",\"add_on\",\"credit\",\"one_off\",\"advance_charges\",\"progressive_billing\"]},{\"name\":\"self_billed\",\"flag\":\"self-billed\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices by self billed. Possible values are `true` or `false`.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter invoices by billing entity codes. Possible values are the billing entity codes you have created.\"},{\"name\":\"metadata[key]\",\"flag\":\"metadata[key]\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for invoice without given metadata key. For example, `metadata[color]=blue`.\"},{\"name\":\"purchase_order_number\",\"flag\":\"purchase-order-number\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by the invoice purchase order number. The match is exact but case-insensitive.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"invoices\",\"action\":\"lose-dispute\",\"operation_id\":\"loseDisputeInvoice\",\"method\":\"POST\",\"path\":\"/invoices/{lago_id}/lose_dispute\",\"summary\":\"Mark an invoice payment dispute as lost\",\"description\":\"This endpoint is used for setting invoice's payment dispute as lost.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"payment-url\",\"operation_id\":\"invoicePaymentUrl\",\"method\":\"POST\",\"path\":\"/invoices/{lago_id}/payment_url\",\"summary\":\"Generate a payment URL\",\"description\":\"This endpoint generates a checkout link for a specific invoice.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"invoices\",\"action\":\"preview\",\"operation_id\":\"invoicePreview\",\"method\":\"POST\",\"path\":\"/invoices/preview\",\"summary\":\"Create an invoice preview\",\"description\":\"This endpoint is used for generating invoice preview.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"body\":{\"fields\":[{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity to which will be associated a customer if the external_id is not provided. If billing_entity_code is not provided, default billing_entity of organization will be used.\"},{\"path\":[\"billing_time\"],\"flag\":\"billing-time\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).\",\"enum\":[\"calendar\",\"anniversary\"]},{\"path\":[\"coupons\"],\"flag\":\"coupons\",\"type\":\"array\",\"required\":false,\"complex\":true},{\"path\":[\"customer\",\"address_line1\"],\"flag\":\"address-line1\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The first line of the billing address\"},{\"path\":[\"customer\",\"address_line2\"],\"flag\":\"address-line2\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The second line of the billing address\"},{\"path\":[\"customer\",\"city\"],\"flag\":\"city\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The city of the customer's billing address\"},{\"path\":[\"customer\",\"country\"],\"flag\":\"country\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)\",\"enum\":[\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"customer\",\"currency\"],\"flag\":\"currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the invoice.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"customer\",\"external_id\"],\"flag\":\"external-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"path\":[\"customer\",\"integration_customers\"],\"flag\":\"integration-customers\",\"type\":\"array\",\"required\":false,\"complex\":true},{\"path\":[\"customer\",\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The full name of the customer\"},{\"path\":[\"customer\",\"shipping_address\",\"address_line1\"],\"flag\":\"shipping-address-address-line1\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The first line of the billing address\"},{\"path\":[\"customer\",\"shipping_address\",\"address_line2\"],\"flag\":\"shipping-address-address-line2\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The second line of the billing address\"},{\"path\":[\"customer\",\"shipping_address\",\"city\"],\"flag\":\"shipping-address-city\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The city of the customer's billing address\"},{\"path\":[\"customer\",\"shipping_address\",\"country\"],\"flag\":\"shipping-address-country\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)\",\"enum\":[\"\",\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"customer\",\"shipping_address\",\"state\"],\"flag\":\"shipping-address-state\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The state of the customer's billing address\"},{\"path\":[\"customer\",\"shipping_address\",\"zipcode\"],\"flag\":\"shipping-address-zipcode\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The zipcode of the customer's billing address\"},{\"path\":[\"customer\",\"state\"],\"flag\":\"state\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The state of the customer's billing address\"},{\"path\":[\"customer\",\"tax_identification_number\"],\"flag\":\"tax-identification-number\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The tax identification number of the customer\"},{\"path\":[\"customer\",\"timezone\"],\"flag\":\"timezone\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone\",\"enum\":[\"UTC\",\"Africa/Algiers\",\"Africa/Cairo\",\"Africa/Casablanca\",\"Africa/Harare\",\"Africa/Johannesburg\",\"Africa/Monrovia\",\"Africa/Nairobi\",\"America/Argentina/Buenos_Aires\",\"America/Bogota\",\"America/Caracas\",\"America/Chicago\",\"America/Chihuahua\",\"America/Denver\",\"America/Guatemala\",\"America/Guyana\",\"America/Halifax\",\"America/Indiana/Indianapolis\",\"America/Juneau\",\"America/La_Paz\",\"America/Lima\",\"America/Los_Angeles\",\"America/Mazatlan\",\"America/Mexico_City\",\"America/Monterrey\",\"America/Montevideo\",\"America/New_York\",\"America/Nuuk\",\"America/Phoenix\",\"America/Puerto_Rico\",\"America/Regina\",\"America/Santiago\",\"America/Sao_Paulo\",\"America/St_Johns\",\"America/Tijuana\",\"Asia/Almaty\",\"Asia/Baghdad\",\"Asia/Baku\",\"Asia/Bangkok\",\"Asia/Chongqing\",\"Asia/Colombo\",\"Asia/Dhaka\",\"Asia/Hong_Kong\",\"Asia/Irkutsk\",\"Asia/Jakarta\",\"Asia/Jerusalem\",\"Asia/Kabul\",\"Asia/Kamchatka\",\"Asia/Karachi\",\"Asia/Kathmandu\",\"Asia/Kolkata\",\"Asia/Krasnoyarsk\",\"Asia/Kuala_Lumpur\",\"Asia/Kuwait\",\"Asia/Magadan\",\"Asia/Muscat\",\"Asia/Novosibirsk\",\"Asia/Riyadh\",\"Asia/Seoul\",\"Asia/Shanghai\",\"Asia/Singapore\",\"Asia/Srednekolymsk\",\"Asia/Taipei\",\"Asia/Tashkent\",\"Asia/Tbilisi\",\"Asia/Tehran\",\"Asia/Tokyo\",\"Asia/Ulaanbaatar\",\"Asia/Urumqi\",\"Asia/Vladivostok\",\"Asia/Yakutsk\",\"Asia/Yangon\",\"Asia/Yekaterinburg\",\"Asia/Yerevan\",\"Atlantic/Azores\",\"Atlantic/Cape_Verde\",\"Atlantic/South_Georgia\",\"Australia/Adelaide\",\"Australia/Brisbane\",\"Australia/Darwin\",\"Australia/Hobart\",\"Australia/Melbourne\",\"Australia/Perth\",\"Australia/Sydney\",\"Europe/Amsterdam\",\"Europe/Athens\",\"Europe/Belgrade\",\"Europe/Berlin\",\"Europe/Bratislava\",\"Europe/Brussels\",\"Europe/Bucharest\",\"Europe/Budapest\",\"Europe/Copenhagen\",\"Europe/Dublin\",\"Europe/Helsinki\",\"Europe/Istanbul\",\"Europe/Kaliningrad\",\"Europe/Kyiv\",\"Europe/Lisbon\",\"Europe/Ljubljana\",\"Europe/London\",\"Europe/Madrid\",\"Europe/Minsk\",\"Europe/Moscow\",\"Europe/Paris\",\"Europe/Prague\",\"Europe/Riga\",\"Europe/Rome\",\"Europe/Samara\",\"Europe/Sarajevo\",\"Europe/Skopje\",\"Europe/Sofia\",\"Europe/Stockholm\",\"Europe/Tallinn\",\"Europe/Vienna\",\"Europe/Vilnius\",\"Europe/Volgograd\",\"Europe/Warsaw\",\"Europe/Zagreb\",\"Europe/Zurich\",\"GMT+12\",\"Pacific/Apia\",\"Pacific/Auckland\",\"Pacific/Chatham\",\"Pacific/Fakaofo\",\"Pacific/Fiji\",\"Pacific/Guadalcanal\",\"Pacific/Guam\",\"Pacific/Honolulu\",\"Pacific/Majuro\",\"Pacific/Midway\",\"Pacific/Noumea\",\"Pacific/Pago_Pago\",\"Pacific/Port_Moresby\",\"Pacific/Tongatapu\"]},{\"path\":[\"plan_code\"],\"flag\":\"plan-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.\"},{\"path\":[\"subscription_at\"],\"flag\":\"subscription-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"subscriptions\",\"external_ids\"],\"flag\":\"subscriptions-external-ids\",\"type\":\"array\",\"required\":false,\"complex\":true},{\"path\":[\"subscriptions\",\"plan_code\"],\"flag\":\"subscriptions-plan-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the plan. It serves as a unique identifier associated with the new plan to which the customer is upgrading or downgrading.\"},{\"path\":[\"subscriptions\",\"terminated_at\"],\"flag\":\"subscriptions-terminated-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The date and time when the subscription is terminated. It should defined in the future.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"invoices\",\"action\":\"refresh\",\"operation_id\":\"refreshInvoice\",\"method\":\"PUT\",\"path\":\"/invoices/{lago_id}/refresh\",\"summary\":\"Refresh a draft invoice\",\"description\":\"This endpoint is used for refreshing a draft invoice.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"retry\",\"operation_id\":\"retryInvoice\",\"method\":\"POST\",\"path\":\"/invoices/{lago_id}/retry\",\"summary\":\"Retry generation of a failed invoice\",\"description\":\"This endpoint is used for retrying to generate a failed invoice.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"retry-payment\",\"operation_id\":\"retryPayment\",\"method\":\"POST\",\"path\":\"/invoices/{lago_id}/retry_payment\",\"summary\":\"Retry an invoice payment\",\"description\":\"This endpoint resends an invoice for collection and retry a payment.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"body\":{\"wrapper\":\"payment_method\",\"fields\":[{\"path\":[\"payment_method_id\"],\"flag\":\"payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method_type\"],\"flag\":\"payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]}],\"required\":false},\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"update\",\"operation_id\":\"updateInvoice\",\"method\":\"PUT\",\"path\":\"/invoices/{lago_id}\",\"summary\":\"Update an invoice\",\"description\":\"This endpoint is used for updating an existing invoice. A voided invoice cannot be updated and returns a `405` error.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"body\":{\"wrapper\":\"invoice\",\"fields\":[{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"array\",\"required\":false,\"complex\":true},{\"path\":[\"payment_status\"],\"flag\":\"payment-status\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The payment status of the invoice. Possible values are `pending`, `failed` or `succeeded`.\",\"enum\":[\"pending\",\"succeeded\",\"failed\"]}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"void\",\"operation_id\":\"voidInvoice\",\"method\":\"POST\",\"path\":\"/invoices/{lago_id}/void\",\"summary\":\"Void an invoice\",\"description\":\"This endpoint is used for voiding an invoice.\\n• When no body parameters are provided, the invoice can be voided only if it is in a `finalized` status and its payment status is NOT `succeeded`.\\n• When `generate_credit_note` is provided (optionally with `refund_amount` and/or `credit_amount`), this validation is bypassed: the invoice is forcibly voided and a credit note is generated. If the specified refund/credit amounts do not cover the full invoice total, the remainder is issued on a second credit note that is created and immediately voided.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"body\":{\"fields\":[{\"path\":[\"credit_amount\"],\"flag\":\"credit-amount\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"Portion of the invoice amount (in cents) to be credited to the customer's balance in the generated credit note.\"},{\"path\":[\"generate_credit_note\"],\"flag\":\"generate-credit-note\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to force voiding the invoice and generate a credit note.\"},{\"path\":[\"refund_amount\"],\"flag\":\"refund-amount\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"Portion of the invoice amount (in cents) to be refunded to the customer in the generated credit note.\"}],\"required\":false},\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"order-forms\",\"action\":\"get\",\"operation_id\":\"findOrderForm\",\"method\":\"GET\",\"path\":\"/order_forms/{lago_id}\",\"summary\":\"Retrieve an order form\",\"description\":\"This endpoint retrieves a specific order form.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the order form within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the order form's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"order-forms\",\"action\":\"list\",\"operation_id\":\"findAllOrderForms\",\"method\":\"GET\",\"path\":\"/order_forms\",\"summary\":\"List all order forms\",\"description\":\"This endpoint is used to list all existing order forms.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"status[]\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter order forms by status. Possible values are `generated`, `signed`, `expired` and `voided`.\"},{\"name\":\"customer_id[]\",\"flag\":\"customer-id\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter order forms by the Lago identifiers of their customers.\"},{\"name\":\"number[]\",\"flag\":\"number\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter order forms by their number, as assigned by Lago.\"},{\"name\":\"quote_number[]\",\"flag\":\"quote-number\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter order forms by the number of the quote they come from.\"},{\"name\":\"owner_id[]\",\"flag\":\"owner-id\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter order forms by the Lago identifiers of the users owning the quote they come from.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Search order forms by number.\"},{\"name\":\"created_at_from\",\"flag\":\"created-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter order forms created from a specific date and time, in UTC (ISO 8601).\"},{\"name\":\"created_at_to\",\"flag\":\"created-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter order forms created up to a specific date and time, in UTC (ISO 8601).\"},{\"name\":\"expires_at_from\",\"flag\":\"expires-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter order forms expiring from a specific date and time, in UTC (ISO 8601). Order forms that never expire are excluded.\"},{\"name\":\"expires_at_to\",\"flag\":\"expires-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter order forms expiring up to a specific date and time, in UTC (ISO 8601). Order forms that never expire are excluded.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"order-forms\",\"action\":\"mark-as-signed\",\"operation_id\":\"markOrderFormAsSigned\",\"method\":\"POST\",\"path\":\"/order_forms/{lago_id}/mark_as_signed\",\"summary\":\"Mark an order form as signed\",\"description\":\"This endpoint records the customer's signature on an order form, and creates the order that carries the quoted deal out.\\nOnly a `generated` order form can be signed, so a `422` is returned once the order form has been signed, has expired or has been voided.\\nAn `execute_at` landing on or after the day the quoted deal stops being executable is rejected as well, so the order can never be scheduled past the term it bills.\\nA concurrent write on the same quote is reported as a `422` rather than retried, so a duplicated call can fail while the first one is still in flight.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the order form within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the order form's record within the Lago system.\"}],\"body\":{\"wrapper\":\"order_form\",\"fields\":[{\"path\":[\"execute_at\"],\"flag\":\"execute-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The date and time in UTC (ISO 8601) when Lago executes the order created from the order form. It must be in the future, requires `execution_mode` to be set, and must fall strictly before the day the quoted deal stops being executable, otherwise signing is rejected with a `422`. When it is omitted, the order is created but not scheduled, and waits to be executed on demand.\"},{\"path\":[\"execution_mode\"],\"flag\":\"execution-mode\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"How the order created from the order form is carried out. It becomes mandatory as soon as `execute_at` is provided.\",\"enum\":[\"execute_in_lago\",\"order_only\"]},{\"path\":[\"signed_document\"],\"flag\":\"signed-document\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The document signed by the customer, as a base64 data URI (`data:\\u003ccontent_type\\u003e;base64,\\u003cdata\\u003e`). Accepted content types are `application/pdf`, `image/jpeg` and `image/png`, for a maximum of 10 MB. Once attached, it is exposed as `signed_document_url` on the order form.\"}],\"required\":false},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"order-forms\",\"action\":\"void\",\"operation_id\":\"voidOrderForm\",\"method\":\"POST\",\"path\":\"/order_forms/{lago_id}/void\",\"summary\":\"Void an order form\",\"description\":\"This endpoint voids an order form, with the `manual` reason, and cascades to the quote version it was generated from, which is voided with the `cascade_of_voided` reason.\\nOnly a `generated` order form can be voided, so a `422` is returned once the order form has been signed, has expired or has already been voided.\\nA concurrent write on the same quote is reported as a `422` rather than retried, so a duplicated call can fail while the first one is still in flight.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the order form within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the order form's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"orders\",\"action\":\"execute\",\"operation_id\":\"executeOrder\",\"method\":\"POST\",\"path\":\"/orders/{lago_id}/execute\",\"summary\":\"Execute an order\",\"description\":\"This endpoint carries out an order on demand, without waiting for its `execute_at` schedule. It runs synchronously, so the response carries the resulting status and, when the execution fails, the reason it failed.\\nAn `execute_in_lago` order applies the quoted deal, creating the subscriptions, coupons, wallets or one-off invoice it describes; an `order_only` order is simply marked as executed. What the execution produced is listed in `execution_record`.\\nExecuting is idempotent: an order that has already been executed is returned untouched. An order whose previous execution failed is executed again, and a `422` is returned when the order carries no execution mode and none is provided in the body.\\nRestating an `execution_mode` that differs from the one stored on the order updates it first, which only succeeds while the order is still `created`: a `failed` order can be retried, but not switched to another mode. That update also re-validates the order's own `execute_at` against the day the quoted deal stops being executable, so a `422` is possible even though no date was sent. An order carrying no `execute_at` is not bounded that way, and a deal whose term has passed then only fails when the execution runs.\\nA `404` is not limited to an unknown order: when the execution cannot find a catalog record the quote pinned, such as a deleted plan, charge, coupon or the subscription being amended, the missing resource is reported as a `404` and the order is left `failed`.\\nConcurrency is reported two ways. A mode change losing the race on the quote comes back as a `422` validation error, while the execution itself losing it comes back as a `422` carrying a lock code, because a scheduled execution relies on that error to be retried.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the order within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the order's record within the Lago system.\"}],\"body\":{\"wrapper\":\"order\",\"fields\":[{\"path\":[\"execution_mode\"],\"flag\":\"execution-mode\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"How the order is carried out. It is only persisted when it differs from the mode already stored on the order, so restating the current mode never fails. Changing the mode of an order that has already been executed is rejected.\",\"enum\":[\"execute_in_lago\",\"order_only\"]}],\"required\":false},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"orders\",\"action\":\"get\",\"operation_id\":\"findOrder\",\"method\":\"GET\",\"path\":\"/orders/{lago_id}\",\"summary\":\"Retrieve an order\",\"description\":\"This endpoint retrieves a specific order, along with the `billing_snapshot` its execution applies and the `execution_record` of what it produced.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the order within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the order's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"orders\",\"action\":\"list\",\"operation_id\":\"findAllOrders\",\"method\":\"GET\",\"path\":\"/orders\",\"summary\":\"List all orders\",\"description\":\"This endpoint is used to list all existing orders.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"status[]\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by status. Possible values are `created`, `executed` and `failed`.\"},{\"name\":\"order_type[]\",\"flag\":\"order-type\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by the order type of the quote they come from. Possible values are `subscription_creation`, `subscription_amendment` and `one_off`.\"},{\"name\":\"execution_mode[]\",\"flag\":\"execution-mode\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by execution mode. Possible values are `execute_in_lago` and `order_only`.\"},{\"name\":\"customer_id[]\",\"flag\":\"customer-id\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by the Lago identifiers of their customers.\"},{\"name\":\"number[]\",\"flag\":\"number\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by their number, as assigned by Lago.\"},{\"name\":\"order_form_number[]\",\"flag\":\"order-form-number\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by the number of the order form they come from.\"},{\"name\":\"quote_number[]\",\"flag\":\"quote-number\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by the number of the quote they come from.\"},{\"name\":\"owner_id[]\",\"flag\":\"owner-id\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by the Lago identifiers of the users owning the quote they come from.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Search orders by number.\"},{\"name\":\"executed_at_from\",\"flag\":\"executed-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter orders executed from a specific date and time, in UTC (ISO 8601). Orders that have not been executed are excluded.\"},{\"name\":\"executed_at_to\",\"flag\":\"executed-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter orders executed up to a specific date and time, in UTC (ISO 8601). Orders that have not been executed are excluded.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"organizations\",\"action\":\"get\",\"operation_id\":\"findOrganization\",\"method\":\"GET\",\"path\":\"/organizations\",\"summary\":\"Retrieve your organization\",\"description\":\"This endpoint retrieves your own organization's settings.\",\"docs_url\":\"https://getlago.com/docs/api-reference/organizations/organization-object\",\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"organizations\",\"action\":\"update\",\"operation_id\":\"updateOrganization\",\"method\":\"PUT\",\"path\":\"/organizations\",\"summary\":\"Update your organization\",\"description\":\"This endpoint is used to update your own organization's settings.\",\"docs_url\":\"https://getlago.com/docs/api-reference/organizations/organization-object\",\"body\":{\"wrapper\":\"organization\",\"fields\":[{\"path\":[\"address_line1\"],\"flag\":\"address-line1\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The first line of your organization's billing address.\"},{\"path\":[\"address_line2\"],\"flag\":\"address-line2\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The second line of your organization's billing address.\"},{\"path\":[\"billing_configuration\",\"document_locale\"],\"flag\":\"billing-configuration-document-locale\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The locale of the billing documents, expressed in the ISO 639-1 format. This field indicates the language or regional variant used for the documents content issued or the embeddable customer portal.\"},{\"path\":[\"billing_configuration\",\"invoice_footer\"],\"flag\":\"billing-configuration-invoice-footer\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The customer invoice message that appears at the bottom of each billing documents.\"},{\"path\":[\"billing_configuration\",\"invoice_grace_period\"],\"flag\":\"billing-configuration-invoice-grace-period\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period.\"},{\"path\":[\"city\"],\"flag\":\"city\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The city of your organization's billing address.\"},{\"path\":[\"country\"],\"flag\":\"country\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The country of your organization.\",\"enum\":[\"\",\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"default_currency\"],\"flag\":\"default-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The default currency of an organization.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"document_number_prefix\"],\"flag\":\"document-number-prefix\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four digits of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago.\"},{\"path\":[\"document_numbering\"],\"flag\":\"document-numbering\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"This parameter configures the method of incrementing invoice numbers for your customers.\\n\\n- `per_customer`: Invoice numbers are incremented individually for each customer. This means every customer will have their own unique sequence of invoice numbers, separate from other customers. It ensures that each customer's invoice numbers follow a distinct and isolated numbering pattern.\\n- `per_organization`: Invoice number incrementation is made across your entire organization. Rather than individual sequences for each customer, all invoices within the organization follow a single, unified numbering system. This creates a continuous and organization-wide sequence for all invoice numbers. Invoices are incremented per month (dynamic value used is YYYYMM), and invoice numbers are reset at the end of each month.\\n\\nThe default value for `document_numbering` is set to `per_customer`, meaning that, unless changed, invoice numbers will increment uniquely for each customer.\",\"enum\":[\"per_customer\",\"per_organization\"]},{\"path\":[\"email\"],\"flag\":\"email\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The email address of your organization used to bill your customers.\"},{\"path\":[\"email_settings\"],\"flag\":\"email-settings\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values are `invoice.finalized`, `credit_note.created` and `payment_receipt.created`.\"},{\"path\":[\"finalize_zero_amount_invoice\"],\"flag\":\"finalize-zero-amount-invoice\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Determines whether invoices with a zero total amount should be finalized. If set to true, zero amount invoices will be finalized. If set to false, zero amount invoices will not be finalized.\"},{\"path\":[\"legal_name\"],\"flag\":\"legal-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal name of your organization.\"},{\"path\":[\"legal_number\"],\"flag\":\"legal-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal number of your organization.\"},{\"path\":[\"net_payment_term\"],\"flag\":\"net-payment-term\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.\"},{\"path\":[\"slug\"],\"flag\":\"slug\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"A concise and unique identifier for your organization, used as a prefix in customer slugs.\"},{\"path\":[\"state\"],\"flag\":\"state\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The state of your organization's billing address.\"},{\"path\":[\"tax_identification_number\"],\"flag\":\"tax-identification-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The tax identification number of your organization.\"},{\"path\":[\"timezone\"],\"flag\":\"timezone\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.\",\"enum\":[\"UTC\",\"Africa/Algiers\",\"Africa/Cairo\",\"Africa/Casablanca\",\"Africa/Harare\",\"Africa/Johannesburg\",\"Africa/Monrovia\",\"Africa/Nairobi\",\"America/Argentina/Buenos_Aires\",\"America/Bogota\",\"America/Caracas\",\"America/Chicago\",\"America/Chihuahua\",\"America/Denver\",\"America/Guatemala\",\"America/Guyana\",\"America/Halifax\",\"America/Indiana/Indianapolis\",\"America/Juneau\",\"America/La_Paz\",\"America/Lima\",\"America/Los_Angeles\",\"America/Mazatlan\",\"America/Mexico_City\",\"America/Monterrey\",\"America/Montevideo\",\"America/New_York\",\"America/Nuuk\",\"America/Phoenix\",\"America/Puerto_Rico\",\"America/Regina\",\"America/Santiago\",\"America/Sao_Paulo\",\"America/St_Johns\",\"America/Tijuana\",\"Asia/Almaty\",\"Asia/Baghdad\",\"Asia/Baku\",\"Asia/Bangkok\",\"Asia/Chongqing\",\"Asia/Colombo\",\"Asia/Dhaka\",\"Asia/Hong_Kong\",\"Asia/Irkutsk\",\"Asia/Jakarta\",\"Asia/Jerusalem\",\"Asia/Kabul\",\"Asia/Kamchatka\",\"Asia/Karachi\",\"Asia/Kathmandu\",\"Asia/Kolkata\",\"Asia/Krasnoyarsk\",\"Asia/Kuala_Lumpur\",\"Asia/Kuwait\",\"Asia/Magadan\",\"Asia/Muscat\",\"Asia/Novosibirsk\",\"Asia/Riyadh\",\"Asia/Seoul\",\"Asia/Shanghai\",\"Asia/Singapore\",\"Asia/Srednekolymsk\",\"Asia/Taipei\",\"Asia/Tashkent\",\"Asia/Tbilisi\",\"Asia/Tehran\",\"Asia/Tokyo\",\"Asia/Ulaanbaatar\",\"Asia/Urumqi\",\"Asia/Vladivostok\",\"Asia/Yakutsk\",\"Asia/Yangon\",\"Asia/Yekaterinburg\",\"Asia/Yerevan\",\"Atlantic/Azores\",\"Atlantic/Cape_Verde\",\"Atlantic/South_Georgia\",\"Australia/Adelaide\",\"Australia/Brisbane\",\"Australia/Darwin\",\"Australia/Hobart\",\"Australia/Melbourne\",\"Australia/Perth\",\"Australia/Sydney\",\"Europe/Amsterdam\",\"Europe/Athens\",\"Europe/Belgrade\",\"Europe/Berlin\",\"Europe/Bratislava\",\"Europe/Brussels\",\"Europe/Bucharest\",\"Europe/Budapest\",\"Europe/Copenhagen\",\"Europe/Dublin\",\"Europe/Helsinki\",\"Europe/Istanbul\",\"Europe/Kaliningrad\",\"Europe/Kyiv\",\"Europe/Lisbon\",\"Europe/Ljubljana\",\"Europe/London\",\"Europe/Madrid\",\"Europe/Minsk\",\"Europe/Moscow\",\"Europe/Paris\",\"Europe/Prague\",\"Europe/Riga\",\"Europe/Rome\",\"Europe/Samara\",\"Europe/Sarajevo\",\"Europe/Skopje\",\"Europe/Sofia\",\"Europe/Stockholm\",\"Europe/Tallinn\",\"Europe/Vienna\",\"Europe/Vilnius\",\"Europe/Volgograd\",\"Europe/Warsaw\",\"Europe/Zagreb\",\"Europe/Zurich\",\"GMT+12\",\"Pacific/Apia\",\"Pacific/Auckland\",\"Pacific/Chatham\",\"Pacific/Fakaofo\",\"Pacific/Fiji\",\"Pacific/Guadalcanal\",\"Pacific/Guam\",\"Pacific/Honolulu\",\"Pacific/Majuro\",\"Pacific/Midway\",\"Pacific/Noumea\",\"Pacific/Pago_Pago\",\"Pacific/Port_Moresby\",\"Pacific/Tongatapu\"]},{\"path\":[\"webhook_url\"],\"flag\":\"webhook-url\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner.\"},{\"path\":[\"zipcode\"],\"flag\":\"zipcode\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The zipcode of your organization's billing address.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"payment-methods\",\"action\":\"destroy\",\"operation_id\":\"destroyPaymentMethod\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/payment_methods/{lago_id}\",\"summary\":\"Delete a payment method\",\"description\":\"This endpoint deletes a specific payment method for a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-methods/payment-method-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The payment method unique identifier, created by Lago.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"payment-methods\",\"action\":\"list-customers-payment-methods\",\"operation_id\":\"findAllCustomersPaymentMethods\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/payment_methods\",\"summary\":\"List all customer payment methods\",\"description\":\"This endpoint retrieves all payment methods of a Customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-methods/payment-method-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"payment-methods\",\"action\":\"payment-method-set-as-default\",\"operation_id\":\"paymentMethodSetAsDefault\",\"method\":\"PUT\",\"path\":\"/customers/{external_customer_id}/payment_methods/{lago_id}/set_as_default\",\"summary\":\"Set the payment method as default\",\"description\":\"Use the payment method as default when not selected a payment method\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-methods/payment-method-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The payment method unique identifier, created by Lago.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"payment-receipts\",\"action\":\"get\",\"operation_id\":\"findPaymentReceipt\",\"method\":\"GET\",\"path\":\"/payment_receipts/{lago_id}\",\"summary\":\"Retrieve a payment receipt\",\"description\":\"This endpoint retrieves a specific payment receipt.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-receipts/payment-receipt-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Payment receipt ID\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"payment-receipts\",\"action\":\"list\",\"operation_id\":\"findAllPaymentReceipts\",\"method\":\"GET\",\"path\":\"/payment_receipts\",\"summary\":\"List all payment receipts\",\"description\":\"This endpoint is used to list all existing payment receipts.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-receipts/payment-receipt-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"invoice_id\",\"flag\":\"invoice-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter payment receipts by invoice id.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"payment-requests\",\"action\":\"create\",\"operation_id\":\"createPaymentRequest\",\"method\":\"POST\",\"path\":\"/payment_requests\",\"summary\":\"Create a payment request\",\"description\":\"This endpoint is used to create a payment request to collect payments of overdue invoices of a given customer\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-requests/payment-request-object\",\"body\":{\"wrapper\":\"payment_request\",\"fields\":[{\"path\":[\"email\"],\"flag\":\"email\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The customer's email address used for sending dunning notifications\"},{\"path\":[\"external_customer_id\"],\"flag\":\"external-customer-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"path\":[\"lago_invoice_ids\"],\"flag\":\"lago-invoice-ids\",\"type\":\"array\",\"required\":true,\"complex\":true,\"description\":\"A list of Lago IDs for the customer's overdue invoices to start the dunning process\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"payment-requests\",\"action\":\"get\",\"operation_id\":\"findPaymentRequest\",\"method\":\"GET\",\"path\":\"/payment_requests/{lago_id}\",\"summary\":\"Retrieve a payment request\",\"description\":\"This endpoint retrieves a specific payment request by its ID.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-requests/payment-request-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the payment request.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"payment-requests\",\"action\":\"list\",\"operation_id\":\"findAllPaymentRequests\",\"method\":\"GET\",\"path\":\"/payment_requests\",\"summary\":\"List all payment requests\",\"description\":\"This endpoint is used to list all existing payment requests.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-requests/payment-request-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter the results by currency, expressed as an ISO 4217 code.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"name\":\"payment_status\",\"flag\":\"payment-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by payment status. Possible values are `pending`, `failed` or `succeeded`.\",\"enum\":[\"pending\",\"failed\",\"succeeded\"]},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter payment requests by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"payments\",\"action\":\"create\",\"operation_id\":\"createPayment\",\"method\":\"POST\",\"path\":\"/payments\",\"summary\":\"Create a payment\",\"description\":\"This endpoint is used to create a manual payment\",\"docs_url\":\"https://getlago.com/docs/api-reference/payments/payment-object\",\"body\":{\"wrapper\":\"payment\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":true,\"complex\":false,\"description\":\"The payment amount in cents\"},{\"path\":[\"invoice_id\"],\"flag\":\"invoice-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique identifier assigned to the invoice\"},{\"path\":[\"paid_at\"],\"flag\":\"paid-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The date the payment was made\"},{\"path\":[\"reference\"],\"flag\":\"reference\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Reference for the payment\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"payments\",\"action\":\"get\",\"operation_id\":\"findPayment\",\"method\":\"GET\",\"path\":\"/payments/{lago_id}\",\"summary\":\"Retrieve a payment\",\"description\":\"This endpoint retrieves a specific payment by its ID.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payments/payment-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the payment.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"payments\",\"action\":\"list\",\"operation_id\":\"findAllPayments\",\"method\":\"GET\",\"path\":\"/payments\",\"summary\":\"List all payments\",\"description\":\"This endpoint is used to list all payments\",\"docs_url\":\"https://getlago.com/docs/api-reference/payments/payment-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"name\":\"invoice_id\",\"flag\":\"invoice-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"charges\",\"operation_id\":\"findAllPlanCharges\",\"method\":\"GET\",\"path\":\"/plans/{code}/charges\",\"summary\":\"List all charges for a plan\",\"description\":\"This endpoint retrieves all charges for a specific plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"create\",\"operation_id\":\"createPlan\",\"method\":\"POST\",\"path\":\"/plans\",\"summary\":\"Create a plan\",\"description\":\"This endpoint creates a plan with subscription and usage-based charges. It supports flexible billing cadence (in-advance or in-arrears) and allows for both recurring and metered charges.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"body\":{\"wrapper\":\"plan\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":true,\"complex\":false,\"description\":\"The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"bill_charges_monthly\"],\"flag\":\"bill-charges-monthly\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is `yearly` or `semiannual`. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.\"},{\"path\":[\"bill_fixed_charges_monthly\"],\"flag\":\"bill-fixed-charges-monthly\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This field, when set to `true`, enables to invoice fixed charges on monthly basis, even if the cadence of the plan is `yearly` or `semiannual`. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.\"},{\"path\":[\"charges\"],\"flag\":\"charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Additional usage-based charges for this plan.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The description on the plan.\"},{\"path\":[\"fixed_charges\"],\"flag\":\"fixed-charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Additional fixed charges for this plan.\"},{\"path\":[\"interval\"],\"flag\":\"interval\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `semiannual`, `quarterly`, `monthly`, or `weekly`.\",\"enum\":[\"weekly\",\"monthly\",\"quarterly\",\"semiannual\",\"yearly\"]},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"minimum_commitment\",\"amount_cents\"],\"flag\":\"minimum-commitment-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The amount of the minimum commitment in cents.\"},{\"path\":[\"minimum_commitment\",\"invoice_display_name\"],\"flag\":\"minimum-commitment-invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.\"},{\"path\":[\"minimum_commitment\",\"tax_codes\"],\"flag\":\"minimum-commitment-tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The name of the plan.\"},{\"path\":[\"pay_in_advance\"],\"flag\":\"pay-in-advance\",\"type\":\"boolean\",\"required\":true,\"complex\":false,\"description\":\"This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"trial_period\"],\"flag\":\"trial-period\",\"type\":\"number\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The duration in days during which the base cost of the plan is offered for free.\"},{\"path\":[\"usage_thresholds\"],\"flag\":\"usage-thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of usage thresholds to apply to the plan.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"create-plan-charge\",\"operation_id\":\"createPlanCharge\",\"method\":\"POST\",\"path\":\"/plans/{code}/charges\",\"summary\":\"Create a charge\",\"description\":\"This endpoint creates a new charge for a specific plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"}],\"body\":{\"wrapper\":\"charge\",\"fields\":[{\"path\":[\"accepts_target_wallet\"],\"flag\":\"accepts-target-wallet\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies whether the charge accepts a target wallet for prepaid credits deduction.\\nWhen set to `true`, events may include a `target_wallet_code` in their `properties` to direct credit deduction to a specific wallet.\\nIf no `target_wallet_code` is provided on the event, the standard wallet selection logic is applied.\\nIf the `target_wallet_code` does not match an existing wallet, no credits will be applied for that event.\\n\\nThis field requires a premium integration.\"},{\"path\":[\"applied_pricing_unit\",\"code\"],\"flag\":\"applied-pricing-unit-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the pricing unit.\"},{\"path\":[\"applied_pricing_unit\",\"conversion_rate\"],\"flag\":\"applied-pricing-unit-conversion-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The conversion rate from pricing units to the plan's currency.\\nThis rate determines how many currency units (in the plan's base currency) equal one pricing unit.\\nFor example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50.\"},{\"path\":[\"billable_metric_id\"],\"flag\":\"billable-metric-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique identifier of the billable metric created by Lago.\"},{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the creation of the charge should be cascaded to the children plans. When set to `true`, the charge will be created in children plans. Conversely, when set to `false`, the charge will only be created in the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"charge_model\"],\"flag\":\"charge-model\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:\\n - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)\\n - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)\\n - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)\\n - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)\\n - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)\\n - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)\\n - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)\\n\",\"enum\":[\"dynamic\",\"graduated\",\"graduated_percentage\",\"package\",\"percentage\",\"standard\",\"volume\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code identifying the charge within the plan.\"},{\"path\":[\"filters\"],\"flag\":\"filters\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of filters used to apply differentiated pricing based on additional event properties.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.\"},{\"path\":[\"invoiceable\"],\"flag\":\"invoiceable\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.\"},{\"path\":[\"min_amount_cents\"],\"flag\":\"min-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.\"},{\"path\":[\"pay_in_advance\"],\"flag\":\"pay-in-advance\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"presentation_group_keys\"],\"flag\":\"properties-presentation-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Groups usage into sub-items on invoices for display only, without affecting pricing or aggregation.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"prorated\"],\"flag\":\"prorated\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.\\n\\n- If set to `true`, the charge is prorated based on the remaining days in the current billing period.\\n- If set to `false`, the charge is billed in full.\\n- If not defined in the request, default value is `false`.\"},{\"path\":[\"regroup_paid_fees\"],\"flag\":\"regroup-paid-fees\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.\\nThis field determines whether and when the charge fee should be included in\\nthe invoice. If `null`, no invoice will be issued for this charge fee.\\nIf `invoice`, an invoice will be generated at the end of the period,\\nconsolidating all charge fees with a succeeded payment status.\",\"enum\":[\"\",\"invoice\"]},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"create-plan-charge-filter\",\"operation_id\":\"createPlanChargeFilter\",\"method\":\"POST\",\"path\":\"/plans/{code}/charges/{charge_code}/filters\",\"summary\":\"Create a charge filter\",\"description\":\"This endpoint creates a new filter for a specific charge.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"}],\"body\":{\"wrapper\":\"filter\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the creation of the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"values\"],\"flag\":\"values\",\"type\":\"object\",\"required\":true,\"complex\":true,\"description\":\"List of possible filter values. The key and values must match one of the billable metric filters.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"create-plan-fixed-charge\",\"operation_id\":\"createPlanFixedCharge\",\"method\":\"POST\",\"path\":\"/plans/{code}/fixed_charges\",\"summary\":\"Create a fixed charge\",\"description\":\"This endpoint creates a new fixed charge for a specific plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"}],\"body\":{\"wrapper\":\"fixed_charge\",\"fields\":[{\"path\":[\"add_on_code\"],\"flag\":\"add-on-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code identifying an add-on. Either add_on_id or add_on_code is required.\"},{\"path\":[\"add_on_id\"],\"flag\":\"add-on-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique identifier of the add-on. Either add_on_id or add_on_code is required.\"},{\"path\":[\"apply_units_immediately\"],\"flag\":\"apply-units-immediately\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When set to `true`, the fixed charge units are applied immediately for active subscriptions. When set to `false`, the units are applied at the next billing period.\"},{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the creation of the fixed charge should be cascaded to the children plans. When set to `true`, the fixed charge will be created in children plans. Conversely, when set to `false`, the fixed charge will only be created in the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"charge_model\"],\"flag\":\"charge-model\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the pricing model used for the calculation of the fixed charge fee. It can be any of the following values:\\n - `standard`\\n - `graduated`\\n - `volume`\\n\",\"enum\":[\"standard\",\"graduated\",\"volume\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code identifying the fixed charge within the plan.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name.\"},{\"path\":[\"pay_in_advance\"],\"flag\":\"pay-in-advance\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines the billing timing for this fixed charge. When set to `true`, the charge is due and invoiced immediately at the beginning of the billing period. When set to `false`, the charge is due and invoiced at the end of the billing period.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"prorated\"],\"flag\":\"prorated\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.\\n\\n- If set to `true`, the charge is prorated based on the remaining days in the current billing period.\\n- If set to `false`, the charge is billed in full.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"units\"],\"flag\":\"units\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units for the fixed charge.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"delete\",\"operation_id\":\"destroyPlan\",\"method\":\"DELETE\",\"path\":\"/plans/{code}\",\"summary\":\"Delete a plan\",\"description\":\"This endpoint deletes a specific plan. Note that this plan could be associated with active subscriptions.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"delete-all-plan-metadata\",\"operation_id\":\"deleteAllPlanMetadata\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/metadata\",\"summary\":\"Delete all plan metadata\",\"description\":\"This endpoint removes all metadata from a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"delete-plan-metadata-key\",\"operation_id\":\"deletePlanMetadataKey\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/metadata/{key}\",\"summary\":\"Delete a metadata key\",\"description\":\"This endpoint removes a single metadata key from a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan.\"},{\"name\":\"key\",\"flag\":\"key\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The metadata key to delete.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"destroy-plan-charge\",\"operation_id\":\"destroyPlanCharge\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/charges/{charge_code}\",\"summary\":\"Delete a charge\",\"description\":\"This endpoint deletes a specific charge from a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"}],\"body\":{\"wrapper\":\"charge\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When set to `true`, the deletion will be cascaded to the children plans.\"}],\"required\":false},\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"destroy-plan-charge-filter\",\"operation_id\":\"destroyPlanChargeFilter\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/charges/{charge_code}/filters/{filter_id}\",\"summary\":\"Delete a charge filter\",\"description\":\"This endpoint deletes a specific filter from a charge.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"filter_id\",\"flag\":\"filter-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the charge filter.\"}],\"body\":{\"wrapper\":\"filter\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When set to `true`, the deletion will be cascaded to the children plans.\"}],\"required\":false},\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"destroy-plan-fixed-charge\",\"operation_id\":\"destroyPlanFixedCharge\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/fixed_charges/{fixed_charge_code}\",\"summary\":\"Delete a fixed charge\",\"description\":\"This endpoint deletes a specific fixed charge from a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"fixed_charge_code\",\"flag\":\"fixed-charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing fixed charge.\"}],\"body\":{\"wrapper\":\"fixed_charge\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When set to `true`, the deletion will be cascaded to the children plans.\"}],\"required\":false},\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"filters\",\"operation_id\":\"findAllPlanChargeFilters\",\"method\":\"GET\",\"path\":\"/plans/{code}/charges/{charge_code}/filters\",\"summary\":\"List all filters for a charge\",\"description\":\"This endpoint retrieves all filters for a specific charge.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"fixed-charges\",\"operation_id\":\"findAllPlanFixedCharges\",\"method\":\"GET\",\"path\":\"/plans/{code}/fixed_charges\",\"summary\":\"List all fixed charges for a plan\",\"description\":\"This endpoint retrieves all fixed charges for a specific plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"get\",\"operation_id\":\"findPlan\",\"method\":\"GET\",\"path\":\"/plans/{code}\",\"summary\":\"Retrieve a plan\",\"description\":\"This endpoint retrieves a specific plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"get-plan-charge\",\"operation_id\":\"findPlanCharge\",\"method\":\"GET\",\"path\":\"/plans/{code}/charges/{charge_code}\",\"summary\":\"Retrieve a charge\",\"description\":\"This endpoint retrieves a specific charge for a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"get-plan-charge-filter\",\"operation_id\":\"findPlanChargeFilter\",\"method\":\"GET\",\"path\":\"/plans/{code}/charges/{charge_code}/filters/{filter_id}\",\"summary\":\"Retrieve a charge filter\",\"description\":\"This endpoint retrieves a specific filter for a charge.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"filter_id\",\"flag\":\"filter-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the charge filter.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"get-plan-fixed-charge\",\"operation_id\":\"findPlanFixedCharge\",\"method\":\"GET\",\"path\":\"/plans/{code}/fixed_charges/{fixed_charge_code}\",\"summary\":\"Retrieve a fixed charge\",\"description\":\"This endpoint retrieves a specific fixed charge for a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"fixed_charge_code\",\"flag\":\"fixed-charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing fixed charge.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"list\",\"operation_id\":\"findAllPlans\",\"method\":\"GET\",\"path\":\"/plans\",\"summary\":\"List all plans\",\"description\":\"This endpoint retrieves all existing plans.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"merge-plan-metadata\",\"operation_id\":\"mergePlanMetadata\",\"method\":\"PATCH\",\"path\":\"/plans/{code}/metadata\",\"summary\":\"Merge plan metadata\",\"description\":\"This endpoint merges the provided metadata with existing metadata on the plan.\\nExisting keys not in the request are preserved. New keys are added, existing keys are updated.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"metadata\",\"operation_id\":\"replacePlanMetadata\",\"method\":\"POST\",\"path\":\"/plans/{code}/metadata\",\"summary\":\"Replace plan metadata\",\"description\":\"This endpoint replaces all existing metadata on a plan with the provided key-value pairs.\\nAny existing metadata keys not included in the request will be removed.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"update\",\"operation_id\":\"updatePlan\",\"method\":\"PUT\",\"path\":\"/plans/{code}\",\"summary\":\"Update a plan\",\"description\":\"This endpoint updates a specific plan with subscription and usage-based charges. It supports flexible billing cadence (in-advance or in-arrears) and allows for both recurring and metered charges.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.\"}],\"body\":{\"wrapper\":\"plan\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"bill_charges_monthly\"],\"flag\":\"bill-charges-monthly\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly or semiannual. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.\"},{\"path\":[\"bill_fixed_charges_monthly\"],\"flag\":\"bill-fixed-charges-monthly\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This field, when set to `true`, enables to invoice fixed charges on monthly basis, even if the cadence of the plan is `yearly` or `semiannual`. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.\"},{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the changes made to the plan should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"charges\"],\"flag\":\"charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Additional usage-based charges for this plan.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The description on the plan.\"},{\"path\":[\"fixed_charges\"],\"flag\":\"fixed-charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Additional fixed charges for this plan.\"},{\"path\":[\"interval\"],\"flag\":\"interval\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `semiannual`, `quarterly`, `monthly`, or `weekly`.\",\"enum\":[\"weekly\",\"monthly\",\"quarterly\",\"semiannual\",\"yearly\"]},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"minimum_commitment\",\"amount_cents\"],\"flag\":\"minimum-commitment-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The amount of the minimum commitment in cents.\"},{\"path\":[\"minimum_commitment\",\"invoice_display_name\"],\"flag\":\"minimum-commitment-invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.\"},{\"path\":[\"minimum_commitment\",\"tax_codes\"],\"flag\":\"minimum-commitment-tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The name of the plan.\"},{\"path\":[\"pay_in_advance\"],\"flag\":\"pay-in-advance\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"trial_period\"],\"flag\":\"trial-period\",\"type\":\"number\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The duration in days during which the base cost of the plan is offered for free.\"},{\"path\":[\"usage_thresholds\"],\"flag\":\"usage-thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of usage thresholds to apply to the plan.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"update-plan-charge\",\"operation_id\":\"updatePlanCharge\",\"method\":\"PUT\",\"path\":\"/plans/{code}/charges/{charge_code}\",\"summary\":\"Update a charge\",\"description\":\"This endpoint updates a specific charge for a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"}],\"body\":{\"wrapper\":\"charge\",\"fields\":[{\"path\":[\"accepts_target_wallet\"],\"flag\":\"accepts-target-wallet\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies whether the charge accepts a target wallet for prepaid credits deduction.\\nWhen set to `true`, events may include a `target_wallet_code` in their `properties` to direct credit deduction to a specific wallet.\\nIf no `target_wallet_code` is provided on the event, the standard wallet selection logic is applied.\\nIf the `target_wallet_code` does not match an existing wallet, no credits will be applied for that event.\\n\\nThis field requires a premium integration.\"},{\"path\":[\"applied_pricing_unit\",\"code\"],\"flag\":\"applied-pricing-unit-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the pricing unit.\"},{\"path\":[\"applied_pricing_unit\",\"conversion_rate\"],\"flag\":\"applied-pricing-unit-conversion-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The conversion rate from pricing units to the plan's currency.\\nThis rate determines how many currency units (in the plan's base currency) equal one pricing unit.\\nFor example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50.\"},{\"path\":[\"billable_metric_id\"],\"flag\":\"billable-metric-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique identifier of the billable metric created by Lago.\"},{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the changes made to the charge should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"charge_model\"],\"flag\":\"charge-model\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:\\n - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)\\n - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)\\n - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)\\n - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)\\n - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)\\n - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)\\n - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)\\n\",\"enum\":[\"dynamic\",\"graduated\",\"graduated_percentage\",\"package\",\"percentage\",\"standard\",\"volume\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code identifying the charge within the plan.\"},{\"path\":[\"filters\"],\"flag\":\"filters\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of filters used to apply differentiated pricing based on additional event properties.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.\"},{\"path\":[\"invoiceable\"],\"flag\":\"invoiceable\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.\"},{\"path\":[\"min_amount_cents\"],\"flag\":\"min-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.\"},{\"path\":[\"pay_in_advance\"],\"flag\":\"pay-in-advance\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"presentation_group_keys\"],\"flag\":\"properties-presentation-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Groups usage into sub-items on invoices for display only, without affecting pricing or aggregation.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"prorated\"],\"flag\":\"prorated\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.\\n\\n- If set to `true`, the charge is prorated based on the remaining days in the current billing period.\\n- If set to `false`, the charge is billed in full.\\n- If not defined in the request, default value is `false`.\"},{\"path\":[\"regroup_paid_fees\"],\"flag\":\"regroup-paid-fees\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.\\nThis field determines whether and when the charge fee should be included in\\nthe invoice. If `null`, no invoice will be issued for this charge fee.\\nIf `invoice`, an invoice will be generated at the end of the period,\\nconsolidating all charge fees with a succeeded payment status.\",\"enum\":[\"\",\"invoice\"]},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"update-plan-charge-filter\",\"operation_id\":\"updatePlanChargeFilter\",\"method\":\"PUT\",\"path\":\"/plans/{code}/charges/{charge_code}/filters/{filter_id}\",\"summary\":\"Update a charge filter\",\"description\":\"This endpoint updates a specific filter for a charge.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"filter_id\",\"flag\":\"filter-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the charge filter.\"}],\"body\":{\"wrapper\":\"filter\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the changes made to the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"values\"],\"flag\":\"values\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"List of possible filter values. The key and values must match one of the billable metric filters.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"update-plan-fixed-charge\",\"operation_id\":\"updatePlanFixedCharge\",\"method\":\"PUT\",\"path\":\"/plans/{code}/fixed_charges/{fixed_charge_code}\",\"summary\":\"Update a fixed charge\",\"description\":\"This endpoint updates a specific fixed charge for a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"fixed_charge_code\",\"flag\":\"fixed-charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing fixed charge.\"}],\"body\":{\"wrapper\":\"fixed_charge\",\"fields\":[{\"path\":[\"add_on_code\"],\"flag\":\"add-on-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code identifying an add-on. Either add_on_id or add_on_code is required.\"},{\"path\":[\"add_on_id\"],\"flag\":\"add-on-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique identifier of the add-on. Either add_on_id or add_on_code is required.\"},{\"path\":[\"apply_units_immediately\"],\"flag\":\"apply-units-immediately\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When set to `true`, the fixed charge units are applied immediately for active subscriptions. When set to `false`, the units are applied at the next billing period.\"},{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the changes made to the fixed charge should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"charge_model\"],\"flag\":\"charge-model\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the pricing model used for the calculation of the fixed charge fee. It can be any of the following values:\\n - `standard`\\n - `graduated`\\n - `volume`\\n\",\"enum\":[\"standard\",\"graduated\",\"volume\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code identifying the fixed charge within the plan.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name.\"},{\"path\":[\"pay_in_advance\"],\"flag\":\"pay-in-advance\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines the billing timing for this fixed charge. When set to `true`, the charge is due and invoiced immediately at the beginning of the billing period. When set to `false`, the charge is due and invoiced at the end of the billing period.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"prorated\"],\"flag\":\"prorated\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.\\n\\n- If set to `true`, the charge is prorated based on the remaining days in the current billing period.\\n- If set to `false`, the charge is billed in full.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"units\"],\"flag\":\"units\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units for the fixed charge.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"quotes\",\"action\":\"approve-quote-version\",\"operation_id\":\"approveQuoteVersion\",\"method\":\"POST\",\"path\":\"/quote_versions/{lago_id}/approve\",\"summary\":\"Approve a quote version\",\"description\":\"This endpoint approves a quote version and generates the order form to send to the customer for signature.\\nOnly a `draft` version can be approved, and its `billing_items` must be complete: approval validates them against the catalog and against the customer, and returns a `422` when the deal cannot be executed as quoted.\\nThe `expires_at` of the generated order form is bounded by the deal's own term, so a signing window reaching beyond the day the deal stops being executable is rejected.\\nA concurrent write on the same quote is reported as a `422` rather than retried, so a duplicated call can fail while the first one is still in flight.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the quote version within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the quote version's record within the Lago system.\"}],\"body\":{\"fields\":[{\"path\":[\"expires_at\"],\"flag\":\"expires-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The date and time in UTC (ISO 8601) when the order form generated by the approval expires. It must be in the future, and must fall strictly before the day the quoted deal stops being executable, otherwise the approval is rejected with a `422`. That boundary is the earliest of the `endDate` of any quoted plan and the `expirationAt` of any quoted wallet credit or recurring top-up rule. A `one_off` quote carries none of them, so its signing window is never bounded. When `expires_at` is omitted, the order form never expires.\"}],\"required\":false},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"quotes\",\"action\":\"clone-quote-version\",\"operation_id\":\"cloneQuoteVersion\",\"method\":\"POST\",\"path\":\"/quote_versions/{lago_id}/clone\",\"summary\":\"Clone a quote version\",\"description\":\"This endpoint copies a quote version into a new `draft` version of the same quote, so that the deal can be renegotiated.\\nAny version of the quote can be cloned, but a quote can only carry one active version: the draft the quote currently holds, if any, is voided with the `superseded` reason. Cloning is therefore rejected with a `422` once a version of the quote has been approved.\\nA concurrent write on the same quote is reported as a `422` rather than retried, so a duplicated call can fail while the first one is still in flight.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the quote version within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the quote version's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"quotes\",\"action\":\"get\",\"operation_id\":\"findQuote\",\"method\":\"GET\",\"path\":\"/quotes/{lago_id}\",\"summary\":\"Retrieve a quote\",\"description\":\"This endpoint retrieves a specific quote, along with its owners and its current version.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the quote within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the quote's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"quotes\",\"action\":\"get-quote-version\",\"operation_id\":\"findQuoteVersion\",\"method\":\"GET\",\"path\":\"/quote_versions/{lago_id}\",\"summary\":\"Retrieve a quote version\",\"description\":\"This endpoint retrieves a specific quote version, along with its document `content` and its `billing_items`.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the quote version within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the quote version's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"quotes\",\"action\":\"list\",\"operation_id\":\"findAllQuotes\",\"method\":\"GET\",\"path\":\"/quotes\",\"summary\":\"List all quotes\",\"description\":\"This endpoint is used to list all existing quotes.\\nQuotes are ordered by creation date, from the most recent to the oldest.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"status[]\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter quotes by the status of their current version. Possible values are `draft`, `approved` and `voided`.\"},{\"name\":\"order_type[]\",\"flag\":\"order-type\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter quotes by order type. Possible values are `subscription_creation`, `subscription_amendment` and `one_off`.\"},{\"name\":\"number[]\",\"flag\":\"number\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter quotes by their number, as assigned by Lago.\"},{\"name\":\"owner_id[]\",\"flag\":\"owner-id\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter quotes by the Lago identifiers of the users owning them.\"},{\"name\":\"external_customer_id[]\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter quotes by the external unique identifiers of their customers (provided by your own application).\"},{\"name\":\"from_date\",\"flag\":\"from-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter quotes created from a specific date.\"},{\"name\":\"to_date\",\"flag\":\"to-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter quotes created up to a specific date.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"quotes\",\"action\":\"versions\",\"operation_id\":\"findAllQuoteVersions\",\"method\":\"GET\",\"path\":\"/quotes/{lago_id}/versions\",\"summary\":\"List all versions of a quote\",\"description\":\"This endpoint is used to list all the versions of a specific quote, from the most recent to the oldest.\\nThe `content` and `billing_items` of each version are omitted; retrieve a version to get them.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the quote within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the quote's record within the Lago system.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"quotes\",\"action\":\"void-quote-version\",\"operation_id\":\"voidQuoteVersion\",\"method\":\"POST\",\"path\":\"/quote_versions/{lago_id}/void\",\"summary\":\"Void a quote version\",\"description\":\"This endpoint voids a quote version, which makes it definitive: a voided version can neither be edited nor approved again.\\nOnly a `draft` version can be voided through this endpoint, and the resulting `void_reason` is `manual`. An `approved` version is voided by Lago itself, through the order form generated from it.\\nA concurrent write on the same quote is reported as a `422` rather than retried, so a duplicated call can fail while the first one is still in flight.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the quote version within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the quote version's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"alerts\",\"operation_id\":\"getSubscriptionAlerts\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/alerts\",\"summary\":\"List subscription alerts\",\"description\":\"This endpoint enables the retrieval of all alerts for a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"charges\",\"operation_id\":\"findAllSubscriptionCharges\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/charges\",\"summary\":\"List all charges for a subscription\",\"description\":\"This endpoint retrieves all effective charges for a specific subscription.\\nIf the subscription has plan overrides with charge overrides, the overridden charges are returned.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"create\",\"operation_id\":\"createSubscription\",\"method\":\"POST\",\"path\":\"/subscriptions\",\"summary\":\"Assign a plan to a customer\",\"description\":\"This endpoint assigns a plan to a customer, creating or modifying a subscription. Ideal for initial subscriptions or plan changes (upgrades/downgrades).\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"body\":{\"fields\":[{\"path\":[\"authorization\",\"amount_cents\"],\"flag\":\"authorization-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The amount of the authorization in cents.\"},{\"path\":[\"authorization\",\"amount_currency\"],\"flag\":\"authorization-amount-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the authorization.\"},{\"path\":[\"subscription\",\"activation_rules\"],\"flag\":\"activation-rules\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Optional list of activation rules that gate the subscription activation. When a `payment` rule is provided and the plan is paid in advance (and the subscription is not in a trial), the subscription is created in the `incomplete` state and is only activated once the gating payment succeeds. If the payment fails or the rule's `timeout_hours` elapses, the subscription is canceled.\\n\"},{\"path\":[\"subscription\",\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity to be used for the subscription. If not provided, the default billing entity will be used.\"},{\"path\":[\"subscription\",\"billing_time\"],\"flag\":\"billing-time\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).\",\"enum\":[\"calendar\",\"anniversary\"]},{\"path\":[\"subscription\",\"consolidate_invoice\"],\"flag\":\"consolidate-invoice\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Defines whether this subscription should be grouped with other subscriptions of the same customer when generating recurring invoices.\\n\\n- `true` (default): the subscription is included in the customer's standard invoice grouping (by billing entity, currency and payment method).\\n- `false`: the subscription is excluded from consolidation and always billed on its own dedicated invoice.\\n\"},{\"path\":[\"subscription\",\"ending_at\"],\"flag\":\"ending-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).\"},{\"path\":[\"subscription\",\"external_customer_id\"],\"flag\":\"external-customer-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"path\":[\"subscription\",\"external_id\"],\"flag\":\"external-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The unique external identifier for the subscription. This identifier serves as an idempotency key, ensuring that each subscription is unique.\"},{\"path\":[\"subscription\",\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"subscription\",\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"subscription\",\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.\"},{\"path\":[\"subscription\",\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"subscription\",\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"subscription\",\"plan_code\"],\"flag\":\"plan-code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The unique code representing the plan to be attached to the customer. This code must correspond to the `code` property of one of the active plans.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"amount_cents\"],\"flag\":\"plan-overrides-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"amount_currency\"],\"flag\":\"plan-overrides-amount-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"subscription\",\"plan_overrides\",\"charges\"],\"flag\":\"plan-overrides-charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Additional usage-based charges for this plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"description\"],\"flag\":\"plan-overrides-description\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The description on the plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"fixed_charges\"],\"flag\":\"plan-overrides-fixed-charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Fixed charge overrides for the subscription. When `plan_overrides` contains only `fixed_charges` and every entry contains only `id`, `units`, and optionally `apply_units_immediately`, the units are recorded as a per-subscription override without creating a plan override, and subscription-scoped reads return these units. If any entry carries other fields, or `plan_overrides` contains any other key, the request is applied as a full plan override for the subscription instead.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"invoice_display_name\"],\"flag\":\"plan-overrides-invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"metadata\"],\"flag\":\"plan-overrides-metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"minimum_commitment\",\"amount_cents\"],\"flag\":\"plan-overrides-minimum-commitment-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The amount of the minimum commitment in cents.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"minimum_commitment\",\"invoice_display_name\"],\"flag\":\"plan-overrides-minimum-commitment-invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"minimum_commitment\",\"tax_codes\"],\"flag\":\"plan-overrides-minimum-commitment-tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"name\"],\"flag\":\"plan-overrides-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The name of the plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"tax_codes\"],\"flag\":\"plan-overrides-tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"trial_period\"],\"flag\":\"plan-overrides-trial-period\",\"type\":\"number\",\"required\":false,\"complex\":false,\"description\":\"The duration in days during which the base cost of the plan is offered for free.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"usage_thresholds\"],\"flag\":\"plan-overrides-usage-thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Managing usage thresholds through `plan_overrides` is deprecated and its behavior is inconsistent: an empty array does not reliably clear thresholds (it is ignored the first time a subscription is overridden), and it never affects thresholds inherited from a parent plan. Use the top-level `usage_thresholds` array on the subscription instead, or `progressive_billing_disabled` to switch progressive billing off.\\n\"},{\"path\":[\"subscription\",\"progressive_billing_disabled\"],\"flag\":\"progressive-billing-disabled\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Disables progressive billing for this subscription, regardless of any usage thresholds defined on the plan (including thresholds inherited from a parent plan when the subscription runs on a plan override).\\n\\nSet to `true` to switch progressive billing off for this subscription specifically, without changing the plan's thresholds.\\n\"},{\"path\":[\"subscription\",\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with the subscription. It will be added to invoices generated for this subscription.\"},{\"path\":[\"subscription\",\"subscription_at\"],\"flag\":\"subscription-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The start date for the subscription, allowing for the creation of subscriptions that can begin in the past or future. Please note that it cannot be used to update the start date of a pending subscription or schedule an upgrade/downgrade. The start_date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"subscription\",\"usage_thresholds\"],\"flag\":\"usage-thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Usage thresholds managed directly on the subscription. This is the recommended way to set progressive billing thresholds per subscription; when present, they take precedence over the thresholds defined on the plan.\\n\\nThis field cannot be combined with `plan_overrides.usage_thresholds` in the same request.\\n\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"create-subscription-alert\",\"operation_id\":\"createSubscriptionAlert\",\"method\":\"POST\",\"path\":\"/subscriptions/{external_id}/alerts\",\"summary\":\"Create subscription alert(s)\",\"description\":\"This endpoint allows you to create alerts for a subscription. Send a single alert object wrapped in `alert` key to create one alert, or an array of alert objects wrapped in `alerts` key to create multiple alerts atomically.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"body\":{\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"create-subscription-charge-filter\",\"operation_id\":\"createSubscriptionChargeFilter\",\"method\":\"POST\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}/filters\",\"summary\":\"Create a charge filter\",\"description\":\"This endpoint creates a new filter for a specific charge on a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"body\":{\"wrapper\":\"filter\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the creation of the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"values\"],\"flag\":\"values\",\"type\":\"object\",\"required\":true,\"complex\":true,\"description\":\"List of possible filter values. The key and values must match one of the billable metric filters.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"delete-all-subscription-alerts\",\"operation_id\":\"deleteAllSubscriptionAlerts\",\"method\":\"DELETE\",\"path\":\"/subscriptions/{external_id}/alerts\",\"summary\":\"Delete all subscription alerts\",\"description\":\"This endpoint allows you to delete all alerts for a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"delete-subscription-alert\",\"operation_id\":\"deleteSubscriptionAlert\",\"method\":\"DELETE\",\"path\":\"/subscriptions/{external_id}/alerts/{code}\",\"summary\":\"Delete a subscription alert\",\"description\":\"This endpoint allows you to delete an existing alert for a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code of the alert\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"destroy-subscription-charge-filter\",\"operation_id\":\"destroySubscriptionChargeFilter\",\"method\":\"DELETE\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}\",\"summary\":\"Delete a charge filter\",\"description\":\"This endpoint deletes a specific filter from a charge on a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"filter_id\",\"flag\":\"filter-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the charge filter.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"filters\",\"operation_id\":\"findAllSubscriptionChargeFilters\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}/filters\",\"summary\":\"List all filters for a charge\",\"description\":\"This endpoint retrieves all filters for a specific charge on a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"fixed-charges\",\"operation_id\":\"findAllSubscriptionFixedCharges\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/fixed_charges\",\"summary\":\"List all fixed charges for a subscription\",\"description\":\"This endpoint retrieves all effective fixed charges for a specific subscription.\\nThe `units` of each fixed charge reflect any per-subscription unit override applied to the subscription; when no override exists, the plan-level units are returned.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"get\",\"operation_id\":\"findSubscription\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}\",\"summary\":\"Retrieve a subscription\",\"description\":\"This endpoint retrieves a specific subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"By default, this endpoint only return `active` subscriptions. If you want to retrieve a subscription with a different `status`, you can specify it here.\\n\\n_Note: As there may exists multiple `canceled` or `terminated` subscribtions for the same `external_id`, it is recommended to use the \\\"List all subscriptions\\\" endpoint to retrieve those subscriptions._\\n\",\"enum\":[\"active\",\"terminated\",\"pending\",\"canceled\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"get-subscription-alert\",\"operation_id\":\"getSubscriptionAlert\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/alerts/{code}\",\"summary\":\"Retrieve a subscription alert\",\"description\":\"This endpoint enables the retrieval of a specific alert for a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code of the alert\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"get-subscription-charge\",\"operation_id\":\"findSubscriptionCharge\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}\",\"summary\":\"Retrieve a charge for a subscription\",\"description\":\"This endpoint retrieves a specific effective charge for a subscription.\\nIf the subscription has a plan override with a charge override, the overridden charge is returned.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"get-subscription-charge-filter\",\"operation_id\":\"findSubscriptionChargeFilter\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}\",\"summary\":\"Retrieve a charge filter\",\"description\":\"This endpoint retrieves a specific filter for a charge on a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"filter_id\",\"flag\":\"filter-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the charge filter.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"get-subscription-fixed-charge\",\"operation_id\":\"findSubscriptionFixedCharge\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/fixed_charges/{fixed_charge_code}\",\"summary\":\"Retrieve a fixed charge for a subscription\",\"description\":\"This endpoint retrieves a specific effective fixed charge for a subscription.\\nThe `units` reflect any per-subscription unit override applied to the subscription; when no override exists, the plan-level units are returned.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"fixed_charge_code\",\"flag\":\"fixed-charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing fixed charge.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"lifetime-usage\",\"operation_id\":\"getSubscriptionLifetimeUsage\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/lifetime_usage\",\"summary\":\"Retrieve subscription lifetime usage\",\"description\":\"This endpoint enables the retrieval of the lifetime usage of a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"list\",\"operation_id\":\"findAllSubscriptions\",\"method\":\"GET\",\"path\":\"/subscriptions\",\"summary\":\"List all subscriptions\",\"description\":\"This endpoint retrieves all active subscriptions.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter the results by currency, expressed as an ISO 4217 code.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter subscriptions by their external unique identifier (provided by your own application).\"},{\"name\":\"plan_code\",\"flag\":\"plan-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans.\"},{\"name\":\"overridden\",\"flag\":\"overridden\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"When set, filters subscriptions by whether their plan is an override of a parent plan. `true` returns only subscriptions on overridden plans; `false` returns only those on standard (non-overridden) plans.\"},{\"name\":\"status[]\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter subscriptions by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"override-subscription-charge\",\"operation_id\":\"overrideSubscriptionCharge\",\"method\":\"PUT\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}\",\"summary\":\"Override a charge for a subscription\",\"description\":\"This endpoint creates or updates a charge override for a specific subscription.\\nIf the subscription does not have a plan override yet, one will be created automatically.\\nThe charge override allows customizing specific charge properties (invoice_display_name, min_amount_cents, properties, filters, taxes, applied_pricing_unit) without affecting the original plan charge.\\nThis is a premium feature.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"body\":{\"wrapper\":\"charge\",\"fields\":[{\"path\":[\"applied_pricing_unit\",\"code\"],\"flag\":\"applied-pricing-unit-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the pricing unit.\"},{\"path\":[\"applied_pricing_unit\",\"conversion_rate\"],\"flag\":\"applied-pricing-unit-conversion-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The conversion rate from pricing units to the plan's currency.\\nThis rate determines how many currency units (in the plan's base currency) equal one pricing unit.\\nFor example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50.\"},{\"path\":[\"filters\"],\"flag\":\"filters\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of filters used to apply differentiated pricing based on additional event properties.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.\"},{\"path\":[\"min_amount_cents\"],\"flag\":\"min-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"presentation_group_keys\"],\"flag\":\"properties-presentation-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Groups usage into sub-items on invoices for display only, without affecting pricing or aggregation.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"override-subscription-fixed-charge\",\"operation_id\":\"overrideSubscriptionFixedCharge\",\"method\":\"PUT\",\"path\":\"/subscriptions/{external_id}/fixed_charges/{fixed_charge_code}\",\"summary\":\"Override a fixed charge for a subscription\",\"description\":\"This endpoint creates or updates a fixed charge override for a subscription, without affecting the original plan fixed charge.\\nWhen the body contains only `units` (and optionally `apply_units_immediately`), the change is recorded as a per-subscription unit override. When the body also sets `invoice_display_name`, `properties`, or `tax_codes`, it is applied as a full plan override for the subscription instead.\\nWith `apply_units_immediately: true` on a pay-in-advance fixed charge the change is billed mid-period; otherwise it takes effect at the next billing period.\\nThis is a premium feature.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"fixed_charge_code\",\"flag\":\"fixed-charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing fixed charge.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"body\":{\"wrapper\":\"fixed_charge\",\"fields\":[{\"path\":[\"apply_units_immediately\"],\"flag\":\"apply-units-immediately\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When set to `true`, the fixed charge units are applied immediately for active subscriptions. When set to `false`, the units are applied at the next billing period.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"units\"],\"flag\":\"units\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units for the fixed charge.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"terminate\",\"operation_id\":\"destroySubscription\",\"method\":\"DELETE\",\"path\":\"/subscriptions/{external_id}\",\"summary\":\"Terminate a subscription\",\"description\":\"This endpoint allows you to terminate a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Selects which subscription to terminate for the given `external_id`, based on its status. If the field is not defined, Lago targets only `active` subscriptions.\\n\\n- `pending`: cancel a subscription scheduled for a future activation (include `status=pending`).\\n- `incomplete`: cancel a payment-gated subscription that is still awaiting its activation payment (include `status=incomplete`). The subscription is canceled with `cancellation_reason: manual`, its invoice is closed and nothing is billed, and any pending payment is canceled on a best-effort basis with the payment provider (some provider statuses cannot be canceled). Applied coupons, credit notes and wallet credits are recredited. Termination behaviours (`on_termination_credit_note`, `on_termination_invoice`) are ignored, as an incomplete subscription has never been billed.\\n\"},{\"name\":\"on_termination_credit_note\",\"flag\":\"on-termination-credit-note\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"When a pay-in-advance subscription is terminated before the end of its billing period, we generate a credit note for the unused subscription time by default.\\nThis field allows you to control the behavior of the credit note generation:\\n\\n- `credit`: A credit note is generated for the unused subscription time. The unused amount is credited back to the customer.\\n- `refund`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.\\n- `skip`: No credit note is generated for the unused subscription time.\\n\\n_Note: This field is only applicable to pay-in-advance plans and is ignored for pay-in-arrears plans._\\n\",\"enum\":[\"credit\",\"refund\",\"skip\"]},{\"name\":\"on_termination_invoice\",\"flag\":\"on-termination-invoice\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"When a subscription is terminated before the end of its billing period, we generate an invoice for the unbilled usage.\\nThis field allows you to control the behavior of the invoice generation:\\n\\n- `generate`: An invoice is generated for the unbilled usage.\\n- `skip`: No invoice is generated for the unbilled usage.\\n\",\"enum\":[\"generate\",\"skip\"]}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"update\",\"operation_id\":\"updateSubscription\",\"method\":\"PUT\",\"path\":\"/subscriptions/{external_id}\",\"summary\":\"Update a subscription\",\"description\":\"This endpoint allows you to update a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"By default, this endpoint only return `active` subscriptions. If you want to update a subscription with a different `status`, you can specify it here.\\n\",\"enum\":[\"active\",\"pending\"]}],\"body\":{\"fields\":[{\"path\":[\"status\"],\"flag\":\"status\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"If the field is not defined and multiple `active` and `pending` subscriptions exists, Lago will update the `active` subscription. However, if you wish to update a `pending` subscription, please ensure that you include the `status` attribute with the `pending` value in your request body.\",\"enum\":[\"active\",\"pending\"]},{\"path\":[\"subscription\",\"activation_rules\"],\"flag\":\"activation-rules\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Optional list of activation rules that gate the subscription activation. Activation rules can only be set or modified while the subscription is `pending` (future-dated and not yet activated); the request is rejected for `incomplete`, `active`, or `terminated` subscriptions.\\n\"},{\"path\":[\"subscription\",\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity associated with the subscription. Updates take effect on future invoices only.\"},{\"path\":[\"subscription\",\"consolidate_invoice\"],\"flag\":\"consolidate-invoice\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Defines whether this subscription should be grouped with other subscriptions of the same customer when generating recurring invoices.\\n\\n- `true`: the subscription is included in the customer's standard invoice grouping (by billing entity, currency and payment method).\\n- `false`: the subscription is excluded from consolidation and always billed on its own dedicated invoice.\\n\"},{\"path\":[\"subscription\",\"ending_at\"],\"flag\":\"ending-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).\"},{\"path\":[\"subscription\",\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"subscription\",\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"subscription\",\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.\"},{\"path\":[\"subscription\",\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"subscription\",\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"subscription\",\"plan_overrides\",\"amount_cents\"],\"flag\":\"plan-overrides-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"amount_currency\"],\"flag\":\"plan-overrides-amount-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"subscription\",\"plan_overrides\",\"charges\"],\"flag\":\"plan-overrides-charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Additional usage-based charges for this plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"description\"],\"flag\":\"plan-overrides-description\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The description on the plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"fixed_charges\"],\"flag\":\"plan-overrides-fixed-charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Fixed charge overrides for the subscription. When `plan_overrides` contains only `fixed_charges` and every entry contains only `id`, `units`, and optionally `apply_units_immediately`, the units are recorded as a per-subscription override without creating a plan override, and subscription-scoped reads return these units. If any entry carries other fields, or `plan_overrides` contains any other key, the request is applied as a full plan override for the subscription instead.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"invoice_display_name\"],\"flag\":\"plan-overrides-invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"metadata\"],\"flag\":\"plan-overrides-metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"minimum_commitment\",\"amount_cents\"],\"flag\":\"plan-overrides-minimum-commitment-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The amount of the minimum commitment in cents.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"minimum_commitment\",\"invoice_display_name\"],\"flag\":\"plan-overrides-minimum-commitment-invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"minimum_commitment\",\"tax_codes\"],\"flag\":\"plan-overrides-minimum-commitment-tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"name\"],\"flag\":\"plan-overrides-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The name of the plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"tax_codes\"],\"flag\":\"plan-overrides-tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"trial_period\"],\"flag\":\"plan-overrides-trial-period\",\"type\":\"number\",\"required\":false,\"complex\":false,\"description\":\"The duration in days during which the base cost of the plan is offered for free.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"usage_thresholds\"],\"flag\":\"plan-overrides-usage-thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Managing usage thresholds through `plan_overrides` is deprecated and its behavior is inconsistent: an empty array does not reliably clear thresholds (it is ignored the first time a subscription is overridden), and it never affects thresholds inherited from a parent plan. Use the top-level `usage_thresholds` array on the subscription instead, or `progressive_billing_disabled` to switch progressive billing off.\\n\"},{\"path\":[\"subscription\",\"progressive_billing_disabled\"],\"flag\":\"progressive-billing-disabled\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Disables progressive billing for this subscription, regardless of any usage thresholds defined on the plan (including thresholds inherited from a parent plan when the subscription runs on a plan override).\\n\\nSet to `true` to switch progressive billing off for this subscription specifically. This is the recommended way to stop progressive billing on a subscription that inherits thresholds from its plan, since clearing `usage_thresholds` only removes subscription-level thresholds and does not remove those defined on (or inherited from) the plan.\\n\"},{\"path\":[\"subscription\",\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with the subscription. It will be added to invoices generated for this subscription.\"},{\"path\":[\"subscription\",\"subscription_at\"],\"flag\":\"subscription-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"subscription\",\"usage_thresholds\"],\"flag\":\"usage-thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Usage thresholds managed directly on the subscription. This is the recommended way to set progressive billing thresholds per subscription; when present, they take precedence over the thresholds defined on the plan.\\n\\nSending an empty array removes all subscription-level thresholds. This field cannot be combined with `plan_overrides.usage_thresholds` in the same request. To fully disable progressive billing on a subscription that inherits thresholds from its plan, use `progressive_billing_disabled` instead.\\n\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"update-subscription-alert\",\"operation_id\":\"updateSubscriptionAlert\",\"method\":\"PUT\",\"path\":\"/subscriptions/{external_id}/alerts/{code}\",\"summary\":\"Update a subscription alert\",\"description\":\"This endpoint allows you to update an existing alert for a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code of the alert\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"body\":{\"wrapper\":\"alert\",\"fields\":[{\"path\":[\"billable_metric_code\"],\"flag\":\"billable-metric-code\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The code of the billable metric associated with the alert. Only for alerts based on a billable metric.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code used to identify the alert.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the alert.\"},{\"path\":[\"thresholds\"],\"flag\":\"thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Array of thresholds associated with the alert.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"update-subscription-charge-filter\",\"operation_id\":\"updateSubscriptionChargeFilter\",\"method\":\"PUT\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}\",\"summary\":\"Update a charge filter\",\"description\":\"This endpoint updates a specific filter for a charge on a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"filter_id\",\"flag\":\"filter-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the charge filter.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\"]}],\"body\":{\"wrapper\":\"filter\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the changes made to the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"values\"],\"flag\":\"values\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"List of possible filter values. The key and values must match one of the billable metric filters.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"update-subscription-lifetime-usage\",\"operation_id\":\"updateSubscriptionLifetimeUsage\",\"method\":\"PUT\",\"path\":\"/subscriptions/{external_id}/lifetime_usage\",\"summary\":\"Update a subscription lifetime usage\",\"description\":\"This endpoint allows you to update the lifetime usage of a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"}],\"body\":{\"wrapper\":\"lifetime_usage\",\"fields\":[{\"path\":[\"external_historical_usage_amount_cents\"],\"flag\":\"external-historical-usage-amount-cents\",\"type\":\"integer\",\"required\":true,\"complex\":false,\"description\":\"The historical usage amount in cents for the subscription (provided by your own application).\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"taxes\",\"action\":\"create\",\"operation_id\":\"createTax\",\"method\":\"POST\",\"path\":\"/taxes\",\"summary\":\"Create a tax\",\"description\":\"This endpoint creates a new tax representing a customizable tax rate applicable to either the organization or a specific customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/taxes/tax-object\",\"body\":{\"wrapper\":\"tax\",\"fields\":[{\"path\":[\"applied_to_organization\"],\"flag\":\"applied-to-organization\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code used to identify the tax associated with the API request.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Internal description of the tax\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Name of the tax.\"},{\"path\":[\"rate\"],\"flag\":\"rate\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The percentage rate of the tax\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"taxes\",\"action\":\"delete\",\"operation_id\":\"destroyTax\",\"method\":\"DELETE\",\"path\":\"/taxes/{code}\",\"summary\":\"Delete a tax\",\"description\":\"This endpoint is used to delete a tax.\",\"docs_url\":\"https://getlago.com/docs/api-reference/taxes/tax-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the tax. It serves as a unique identifier associated with a particular tax. The code is typically used for internal or system-level identification purposes.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"taxes\",\"action\":\"get\",\"operation_id\":\"findTax\",\"method\":\"GET\",\"path\":\"/taxes/{code}\",\"summary\":\"Retrieve a Tax\",\"description\":\"This endpoint retrieves an existing tax representing a customizable tax rate applicable to either the organization or a specific customer. The tax is identified by its unique code.\",\"docs_url\":\"https://getlago.com/docs/api-reference/taxes/tax-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the tax. It serves as a unique identifier associated with a particular tax. The code is typically used for internal or system-level identification purposes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"taxes\",\"action\":\"list\",\"operation_id\":\"findAllTaxes\",\"method\":\"GET\",\"path\":\"/taxes\",\"summary\":\"List all taxes\",\"description\":\"This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either the organization or a specific customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/taxes/tax-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"taxes\",\"action\":\"update\",\"operation_id\":\"updateTax\",\"method\":\"PUT\",\"path\":\"/taxes/{code}\",\"summary\":\"Update a tax\",\"description\":\"This endpoint updates an existing tax representing a customizable tax rate applicable to either the organization or a specific customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/taxes/tax-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the tax. It serves as a unique identifier associated with a particular tax. The code is typically used for internal or system-level identification purposes.\"}],\"body\":{\"wrapper\":\"tax\",\"fields\":[{\"path\":[\"applied_to_organization\"],\"flag\":\"applied-to-organization\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code used to identify the tax associated with the API request.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Internal description of the tax\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Name of the tax.\"},{\"path\":[\"rate\"],\"flag\":\"rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate of the tax\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"create\",\"operation_id\":\"createWallet\",\"method\":\"POST\",\"path\":\"/wallets\",\"summary\":\"Create a wallet\",\"description\":\"This endpoint is used to create a wallet with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"body\":{\"wrapper\":\"wallet\",\"fields\":[{\"path\":[\"applies_to\",\"billable_metric_codes\"],\"flag\":\"applies-to-billable-metric-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.\"},{\"path\":[\"applies_to\",\"fee_types\"],\"flag\":\"applies-to-fee-types\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.\"},{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity associated with the wallet. If not provided, the customer's billing entity is used.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The code of the wallet.\"},{\"path\":[\"currency\"],\"flag\":\"currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the wallet.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"expiration_at\"],\"flag\":\"expiration-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"external_customer_id\"],\"flag\":\"external-customer-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"path\":[\"granted_credits\"],\"flag\":\"granted-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of free granted credits. Required only if there is no paid credits.\"},{\"path\":[\"ignore_paid_top_up_limits_on_creation\"],\"flag\":\"ignore-paid-top-up-limits-on-creation\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"If set to true, the wallet will ignore paid top-up limits on creation.\"},{\"path\":[\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"invoice_requires_successful_payment\"],\"flag\":\"invoice-requires-successful-payment\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet.\"},{\"path\":[\"paid_credits\"],\"flag\":\"paid-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of paid credits. Required only if there is no granted credits.\"},{\"path\":[\"paid_top_up_max_amount_cents\"],\"flag\":\"paid-top-up-max-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Maximum amount of cents that can be top-up with a single paid transaction.\"},{\"path\":[\"paid_top_up_min_amount_cents\"],\"flag\":\"paid-top-up-min-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Minimum amount of cents that can be top-up with a single paid transaction.\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"priority\"],\"flag\":\"priority\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.\"},{\"path\":[\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with the wallet. It will be added to invoices generated for wallet top-ups, unless a more specific purchase order number is set on the wallet transaction or recurring transaction rule that triggered the top-up.\"},{\"path\":[\"rate_amount\"],\"flag\":\"rate-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.\"},{\"path\":[\"recurring_transaction_rules\"],\"flag\":\"recurring-transaction-rules\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"List of recurring transaction rules. Currently, we only allow one recurring rule per wallet.\"},{\"path\":[\"transaction_metadata\"],\"flag\":\"transaction-metadata\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"This optional field allows you to store a list of key-value pairs that provide additional information or custom attributes. These key-value pairs will be included in the metadata of wallet transactions generated during the wallet creation process.\"},{\"path\":[\"transaction_name\"],\"flag\":\"transaction-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"create-customer-wallet\",\"operation_id\":\"createCustomerWallet\",\"method\":\"POST\",\"path\":\"/customers/{external_customer_id}/wallets\",\"summary\":\"Create a wallet\",\"description\":\"This endpoint is used to create a wallet with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"}],\"body\":{\"wrapper\":\"wallet\",\"fields\":[{\"path\":[\"applies_to\",\"billable_metric_codes\"],\"flag\":\"applies-to-billable-metric-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.\"},{\"path\":[\"applies_to\",\"fee_types\"],\"flag\":\"applies-to-fee-types\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.\"},{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity associated with the wallet. If not provided, the customer's billing entity is used.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The code of the wallet.\"},{\"path\":[\"currency\"],\"flag\":\"currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the wallet.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SZL\",\"THB\",\"TJS\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"expiration_at\"],\"flag\":\"expiration-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"external_customer_id\"],\"flag\":\"external-customer-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"path\":[\"granted_credits\"],\"flag\":\"granted-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of free granted credits. Required only if there is no paid credits.\"},{\"path\":[\"ignore_paid_top_up_limits_on_creation\"],\"flag\":\"ignore-paid-top-up-limits-on-creation\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"If set to true, the wallet will ignore paid top-up limits on creation.\"},{\"path\":[\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"invoice_requires_successful_payment\"],\"flag\":\"invoice-requires-successful-payment\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet.\"},{\"path\":[\"paid_credits\"],\"flag\":\"paid-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of paid credits. Required only if there is no granted credits.\"},{\"path\":[\"paid_top_up_max_amount_cents\"],\"flag\":\"paid-top-up-max-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Maximum amount of cents that can be top-up with a single paid transaction.\"},{\"path\":[\"paid_top_up_min_amount_cents\"],\"flag\":\"paid-top-up-min-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Minimum amount of cents that can be top-up with a single paid transaction.\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"priority\"],\"flag\":\"priority\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.\"},{\"path\":[\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with the wallet. It will be added to invoices generated for wallet top-ups, unless a more specific purchase order number is set on the wallet transaction or recurring transaction rule that triggered the top-up.\"},{\"path\":[\"rate_amount\"],\"flag\":\"rate-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.\"},{\"path\":[\"recurring_transaction_rules\"],\"flag\":\"recurring-transaction-rules\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"List of recurring transaction rules. Currently, we only allow one recurring rule per wallet.\"},{\"path\":[\"transaction_metadata\"],\"flag\":\"transaction-metadata\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"This optional field allows you to store a list of key-value pairs that provide additional information or custom attributes. These key-value pairs will be included in the metadata of wallet transactions generated during the wallet creation process.\"},{\"path\":[\"transaction_name\"],\"flag\":\"transaction-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"create-customer-wallet-alert\",\"operation_id\":\"createCustomerWalletAlert\",\"method\":\"POST\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/alerts\",\"summary\":\"Create wallet alert(s)\",\"description\":\"This endpoint allows you to create new alerts for a wallet. Send a single alert object wrapped in `alert` key to create one alert, or an array of alert objects wrapped in `alerts` key to create multiple alerts atomically.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"body\":{\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"create-wallet-transaction\",\"operation_id\":\"createWalletTransaction\",\"method\":\"POST\",\"path\":\"/wallet_transactions\",\"summary\":\"Top up a wallet\",\"description\":\"This endpoint is used to top-up an active wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"body\":{\"wrapper\":\"wallet_transaction\",\"fields\":[{\"path\":[\"granted_credits\"],\"flag\":\"granted-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of free granted credits.\"},{\"path\":[\"ignore_paid_top_up_limits\"],\"flag\":\"ignore-paid-top-up-limits\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When true, allows topping up the wallet with transactions that exceed the paid top-up limits. Defaults to false.\"},{\"path\":[\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"invoice_requires_successful_payment\"],\"flag\":\"invoice-requires-successful-payment\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"This optional field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet transaction. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.\\n\\nNote that this name will apply to all transactions (`paid_credits`, `granted_credits` and `voided_credits`) created by this action.\\n\"},{\"path\":[\"paid_credits\"],\"flag\":\"paid-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of paid credits.\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with this wallet transaction. It will be added to invoices generated for the resulting wallet top-up. If not set, falls back to the wallet's `purchase_order_number`.\"},{\"path\":[\"voided_credits\"],\"flag\":\"voided-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of voided credits.\"},{\"path\":[\"wallet_id\"],\"flag\":\"wallet-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"delete-all-customer-wallet-alerts\",\"operation_id\":\"deleteAllCustomerWalletAlerts\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/alerts\",\"summary\":\"Delete all wallet alerts\",\"description\":\"This endpoint allows you to delete all alerts for a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"delete-all-customer-wallet-metadata\",\"operation_id\":\"deleteAllCustomerWalletMetadata\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/metadata\",\"summary\":\"Delete all wallet metadata\",\"description\":\"This endpoint removes all metadata from a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"delete-all-wallet-metadata\",\"operation_id\":\"deleteAllWalletMetadata\",\"method\":\"DELETE\",\"path\":\"/wallets/{lago_id}/metadata\",\"summary\":\"Delete all wallet metadata\",\"description\":\"This endpoint removes all metadata from a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"delete-customer-wallet-alert\",\"operation_id\":\"deleteCustomerWalletAlert\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}\",\"summary\":\"Delete a wallet alert\",\"description\":\"This endpoint allows you to delete an existing alert for a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code of the alert\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"delete-customer-wallet-metadata-key\",\"operation_id\":\"deleteCustomerWalletMetadataKey\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/metadata/{key}\",\"summary\":\"Delete a metadata key\",\"description\":\"This endpoint removes a single metadata key from a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"},{\"name\":\"key\",\"flag\":\"key\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The metadata key to delete.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"delete-wallet-metadata-key\",\"operation_id\":\"deleteWalletMetadataKey\",\"method\":\"DELETE\",\"path\":\"/wallets/{lago_id}/metadata/{key}\",\"summary\":\"Delete a metadata key\",\"description\":\"This endpoint removes a single metadata key from a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application.\"},{\"name\":\"key\",\"flag\":\"key\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The metadata key to delete.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"destroy-customer-wallet\",\"operation_id\":\"destroyCustomerWallet\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/wallets/{code}\",\"summary\":\"Terminate a wallet\",\"description\":\"This endpoint is used to terminate an existing wallet with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"get\",\"operation_id\":\"findWallet\",\"method\":\"GET\",\"path\":\"/wallets/{lago_id}\",\"summary\":\"Retrieve a wallet\",\"description\":\"This endpoint is used to retrieve an existing wallet with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"get-customer-wallet\",\"operation_id\":\"findCustomerWallet\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/wallets/{code}\",\"summary\":\"Retrieve a wallet\",\"description\":\"This endpoint is used to retrieve an existing wallet with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"get-customer-wallet-alert\",\"operation_id\":\"getCustomerWalletAlert\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}\",\"summary\":\"Retrieve a wallet alert\",\"description\":\"This endpoint enables the retrieval of a specific alert for a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code of the alert\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"get-customer-wallet-alerts\",\"operation_id\":\"getCustomerWalletAlerts\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/alerts\",\"summary\":\"List wallet alerts\",\"description\":\"This endpoint enables the retrieval of all alerts for a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"get-wallet-transaction\",\"operation_id\":\"findWalletTransaction\",\"method\":\"GET\",\"path\":\"/wallet_transactions/{lago_id}\",\"summary\":\"Retrieve a wallet transaction\",\"description\":\"This endpoint is used to retrieve a specific wallet transactions.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"list\",\"operation_id\":\"findAllWallets\",\"method\":\"GET\",\"path\":\"/wallets\",\"summary\":\"List all wallets\",\"description\":\"This endpoint is used to list all wallets with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter the results by currency, expressed as an ISO 4217 code.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter wallets by customer external unique identifier (provided by your own application). When omitted, all wallets for the organization are returned.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter wallets by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"list-customer-wallets\",\"operation_id\":\"findAllCustomerWallets\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/wallets\",\"summary\":\"List all customer's wallets\",\"description\":\"This endpoint is used to list all wallets with prepaid credits of a customer\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter wallets by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"list-wallet-transaction-consumptions\",\"operation_id\":\"findAllWalletTransactionConsumptions\",\"method\":\"GET\",\"path\":\"/wallet_transactions/{lago_id}/consumptions\",\"summary\":\"List all consumptions for a wallet transaction\",\"description\":\"This endpoint is used to list all consumption records for an inbound wallet transaction. It shows how the credits from this inbound transaction were consumed by outbound transactions. Only available for traceable wallets.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet transaction within the Lago application. Must be an inbound wallet transaction.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"list-wallet-transaction-fundings\",\"operation_id\":\"findAllWalletTransactionFundings\",\"method\":\"GET\",\"path\":\"/wallet_transactions/{lago_id}/fundings\",\"summary\":\"List all fundings for a wallet transaction\",\"description\":\"This endpoint is used to list all funding records for an outbound wallet transaction. It shows which inbound transactions funded this outbound transaction. Only available for traceable wallets.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet transaction within the Lago application. Must be an outbound wallet transaction.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"merge-customer-wallet-metadata\",\"operation_id\":\"mergeCustomerWalletMetadata\",\"method\":\"PATCH\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/metadata\",\"summary\":\"Merge wallet metadata\",\"description\":\"This endpoint merges the provided metadata with existing metadata on the wallet.\\nExisting keys not in the request are preserved. New keys are added, existing keys are updated.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"merge-wallet-metadata\",\"operation_id\":\"mergeWalletMetadata\",\"method\":\"PATCH\",\"path\":\"/wallets/{lago_id}/metadata\",\"summary\":\"Merge wallet metadata\",\"description\":\"This endpoint merges the provided metadata with existing metadata on the wallet.\\nExisting keys not in the request are preserved. New keys are added, existing keys are updated.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"metadata\",\"operation_id\":\"replaceWalletMetadata\",\"method\":\"POST\",\"path\":\"/wallets/{lago_id}/metadata\",\"summary\":\"Replace wallet metadata\",\"description\":\"This endpoint replaces all existing metadata on a wallet with the provided key-value pairs.\\nAny existing metadata keys not included in the request will be removed.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"replace-customer-wallet-metadata\",\"operation_id\":\"replaceCustomerWalletMetadata\",\"method\":\"POST\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/metadata\",\"summary\":\"Replace wallet metadata\",\"description\":\"This endpoint replaces all existing metadata on a wallet with the provided key-value pairs.\\nAny existing metadata keys not included in the request will be removed.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"terminate\",\"operation_id\":\"destroyWallet\",\"method\":\"DELETE\",\"path\":\"/wallets/{lago_id}\",\"summary\":\"Terminate a wallet\",\"description\":\"This endpoint is used to terminate an existing wallet with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"update\",\"operation_id\":\"updateWallet\",\"method\":\"PUT\",\"path\":\"/wallets/{lago_id}\",\"summary\":\"Update a wallet\",\"description\":\"This endpoint is used to update an existing wallet with prepaid credits. A terminated wallet cannot be updated and returns a `422` error.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.\"}],\"body\":{\"wrapper\":\"wallet\",\"fields\":[{\"path\":[\"applies_to\",\"billable_metric_codes\"],\"flag\":\"applies-to-billable-metric-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.\"},{\"path\":[\"applies_to\",\"fee_types\"],\"flag\":\"applies-to-fee-types\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.\"},{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity associated with the wallet.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The code of the wallet.\"},{\"path\":[\"expiration_at\"],\"flag\":\"expiration-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"invoice_requires_successful_payment\"],\"flag\":\"invoice-requires-successful-payment\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet.\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"priority\"],\"flag\":\"priority\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.\"},{\"path\":[\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with the wallet. It will be added to invoices generated for wallet top-ups, unless a more specific purchase order number is set on the wallet transaction or recurring transaction rule that triggered the top-up.\"},{\"path\":[\"recurring_transaction_rules\"],\"flag\":\"recurring-transaction-rules\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of recurring transaction rules. Currently, we only allow one recurring rule per wallet.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"update-customer-wallet\",\"operation_id\":\"updateCustomerWallet\",\"method\":\"PUT\",\"path\":\"/customers/{external_customer_id}/wallets/{code}\",\"summary\":\"Update a wallet\",\"description\":\"This endpoint is used to update an existing wallet with prepaid credits. A terminated wallet cannot be updated and returns a `422` error.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"body\":{\"wrapper\":\"wallet\",\"fields\":[{\"path\":[\"applies_to\",\"billable_metric_codes\"],\"flag\":\"applies-to-billable-metric-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.\"},{\"path\":[\"applies_to\",\"fee_types\"],\"flag\":\"applies-to-fee-types\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.\"},{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity associated with the wallet.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The code of the wallet.\"},{\"path\":[\"expiration_at\"],\"flag\":\"expiration-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"invoice_requires_successful_payment\"],\"flag\":\"invoice-requires-successful-payment\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet.\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"priority\"],\"flag\":\"priority\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.\"},{\"path\":[\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with the wallet. It will be added to invoices generated for wallet top-ups, unless a more specific purchase order number is set on the wallet transaction or recurring transaction rule that triggered the top-up.\"},{\"path\":[\"recurring_transaction_rules\"],\"flag\":\"recurring-transaction-rules\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of recurring transaction rules. Currently, we only allow one recurring rule per wallet.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"update-customer-wallet-alert\",\"operation_id\":\"updateCustomerWalletAlert\",\"method\":\"PUT\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}\",\"summary\":\"Update a wallet alert\",\"description\":\"This endpoint allows you to update an existing alert for a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code of the alert\"}],\"body\":{\"wrapper\":\"alert\",\"fields\":[{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code used to identify the alert.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the alert.\"},{\"path\":[\"thresholds\"],\"flag\":\"thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Array of thresholds associated with the alert.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"wallet-transaction-payment-url\",\"operation_id\":\"walletTransactionPaymentUrl\",\"method\":\"POST\",\"path\":\"/wallet_transactions/{lago_id}/payment_url\",\"summary\":\"Generate a payment URL\",\"description\":\"This endpoint generates a checkout link for a specific wallet transaction.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"ID of the wallet transaction.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"wallet-transactions\",\"operation_id\":\"findAllWalletTransactions\",\"method\":\"GET\",\"path\":\"/wallets/{lago_id}/wallet_transactions\",\"summary\":\"List all wallet transactions\",\"description\":\"This endpoint is used to list all wallet transactions.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The status of the wallet transaction. Possible values are `pending` or `settled`.\"},{\"name\":\"transaction_status\",\"flag\":\"transaction-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.\"},{\"name\":\"transaction_type\",\"flag\":\"transaction-type\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The transaction type of the wallet transaction. Possible values are `inbound` (increasing the wallet balance) or `outbound` (decreasing the wallet balance).\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"webhook-endpoints\",\"action\":\"create\",\"operation_id\":\"createWebhookEndpoint\",\"method\":\"POST\",\"path\":\"/webhook_endpoints\",\"summary\":\"Create a webhook_endpoint\",\"description\":\"This endpoint is used to create a webhook endpoint.\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object\",\"body\":{\"wrapper\":\"webhook_endpoint\",\"fields\":[{\"path\":[\"event_types\"],\"flag\":\"event-types\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"A list of event types that will trigger the webhook. Passing null means that all event types will be sent.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the webhook.\"},{\"path\":[\"signature_algo\"],\"flag\":\"signature-algo\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The signature used for the webhook. If no value is passed,\",\"enum\":[\"jwt\",\"hmac\",\"\"]},{\"path\":[\"webhook_url\"],\"flag\":\"webhook-url\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The URL of the webhook endpoint.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"webhook-endpoints\",\"action\":\"delete\",\"operation_id\":\"destroyWebhookEndpoint\",\"method\":\"DELETE\",\"path\":\"/webhook_endpoints/{lago_id}\",\"summary\":\"Delete a webhook endpoint\",\"description\":\"This endpoint is used to delete an existing webhook endpoint.\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"webhook-endpoints\",\"action\":\"get\",\"operation_id\":\"findWebhookEndpoint\",\"method\":\"GET\",\"path\":\"/webhook_endpoints/{lago_id}\",\"summary\":\"Retrieve a webhook endpoint\",\"description\":\"This endpoint is used to retrieve an existing webhook endpoint.\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"webhook-endpoints\",\"action\":\"list\",\"operation_id\":\"findAllWebhookEndpoints\",\"method\":\"GET\",\"path\":\"/webhook_endpoints\",\"summary\":\"List all webhook endpoints\",\"description\":\"This endpoint is used to list all webhook endpoints.\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"webhook-endpoints\",\"action\":\"update\",\"operation_id\":\"updateWebhookEndpoint\",\"method\":\"PUT\",\"path\":\"/webhook_endpoints/{lago_id}\",\"summary\":\"Update a webhook endpoint\",\"description\":\"This endpoint is used to update an existing webhook endpoint.\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.\"}],\"body\":{\"wrapper\":\"webhook_endpoint\",\"fields\":[{\"path\":[\"event_types\"],\"flag\":\"event-types\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"A list of event types that will trigger the webhook. Passing null means that all event types will be sent.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the webhook.\"},{\"path\":[\"signature_algo\"],\"flag\":\"signature-algo\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The signature used for the webhook. If no value is passed,\",\"enum\":[\"jwt\",\"hmac\",\"\"]},{\"path\":[\"webhook_url\"],\"flag\":\"webhook-url\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The URL of the webhook endpoint.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"webhooks\",\"action\":\"json-public-key\",\"operation_id\":\"fetchJsonPublicKey\",\"method\":\"GET\",\"path\":\"/webhooks/json_public_key\",\"summary\":\"Retrieve webhook public key (JSON)\",\"description\":\"This endpoint is used to retrieve the public key used to verify the webhooks signature, wrapped in a JSON object. Prefer this endpoint over the deprecated GET /webhooks/public_key.\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhooks/format---signature#1-retrieve-the-public-key\",\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"webhooks\",\"action\":\"public-key\",\"operation_id\":\"fetchPublicKey\",\"method\":\"GET\",\"path\":\"/webhooks/public_key\",\"summary\":\"Retrieve webhook public key\",\"description\":\"This endpoint is used to retrieve the public key used to verify the webhooks signature\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhooks/format---signature#1-retrieve-the-public-key\",\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false}]" +const operationsJSON = "[{\"resource\":\"activity-logs\",\"action\":\"get\",\"operation_id\":\"findActivityLog\",\"method\":\"GET\",\"path\":\"/activity_logs/{activity_id}\",\"summary\":\"Retrieve an activity log\",\"description\":\"This endpoint retrieves an existing activity log that represents an action performed on some resource. The activity log is identified by its unique activity_id.\",\"docs_url\":\"https://getlago.com/docs/api-reference/audit-logs/activity-logs-object\",\"parameters\":[{\"name\":\"activity_id\",\"flag\":\"activity-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The unique identifier of the activity log, created by Lago.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"activity-logs\",\"action\":\"list\",\"operation_id\":\"findAllActivityLogs\",\"method\":\"GET\",\"path\":\"/activity_logs\",\"summary\":\"List all activity logs\",\"description\":\"This endpoint retrieves all existing activity logs that represent actions performed on application resources. Logs are returned from the most recent to the oldest.\",\"docs_url\":\"https://getlago.com/docs/api-reference/audit-logs/activity-logs-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"from_date\",\"flag\":\"from-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter activity logs logged at or after this date. A date or a full ISO 8601 datetime is accepted.\"},{\"name\":\"to_date\",\"flag\":\"to-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter activity logs logged at or before this date. A date or a full ISO 8601 datetime is accepted.\"},{\"name\":\"activity_types[]\",\"flag\":\"activity-types\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by activity types.\"},{\"name\":\"activity_sources[]\",\"flag\":\"activity-sources\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by activity sources.\"},{\"name\":\"user_emails[]\",\"flag\":\"user-emails\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by the email of the user who performed the activity.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"External subscription ID\"},{\"name\":\"resource_ids[]\",\"flag\":\"resource-ids\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by the unique identifiers of the resources the actions were applied to.\"},{\"name\":\"resource_types[]\",\"flag\":\"resource-types\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by resource types.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"add-ons\",\"action\":\"create\",\"operation_id\":\"createAddOn\",\"method\":\"POST\",\"path\":\"/add_ons\",\"summary\":\"Create an add-on\",\"description\":\"This endpoint is used to create an add-on that can be then attached to a one-off invoice.\",\"docs_url\":\"https://getlago.com/docs/api-reference/add-ons/add-on-object\",\"body\":{\"wrapper\":\"add_on\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":true,\"complex\":false,\"description\":\"The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. It must be greater than zero. By creating a one-off invoice, you will be able to override this value.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The currency of the add-on.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code used to identify the add-on.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The description of the add-on.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The name of the add-on.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"add-ons\",\"action\":\"delete\",\"operation_id\":\"destroyAddOn\",\"method\":\"DELETE\",\"path\":\"/add_ons/{code}\",\"summary\":\"Delete an add-on\",\"description\":\"This endpoint is used to delete an existing add-on. The fixed charges that use this add-on are deleted too.\",\"docs_url\":\"https://getlago.com/docs/api-reference/add-ons/add-on-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code used to identify the add-on.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"add-ons\",\"action\":\"get\",\"operation_id\":\"findAddOn\",\"method\":\"GET\",\"path\":\"/add_ons/{code}\",\"summary\":\"Retrieve an add-on\",\"description\":\"This endpoint is used to retrieve a specific add-on.\",\"docs_url\":\"https://getlago.com/docs/api-reference/add-ons/add-on-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code used to identify the add-on.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"add-ons\",\"action\":\"list\",\"operation_id\":\"findAllAddOns\",\"method\":\"GET\",\"path\":\"/add_ons\",\"summary\":\"List all add-ons\",\"description\":\"This endpoint is used to list all existing add-ons.\",\"docs_url\":\"https://getlago.com/docs/api-reference/add-ons/add-on-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"add-ons\",\"action\":\"update\",\"operation_id\":\"updateAddOn\",\"method\":\"PUT\",\"path\":\"/add_ons/{code}\",\"summary\":\"Update an add-on\",\"description\":\"This endpoint is used to update an existing add-on.\",\"docs_url\":\"https://getlago.com/docs/api-reference/add-ons/add-on-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code used to identify the add-on.\"}],\"body\":{\"wrapper\":\"add_on\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. It must be greater than zero. By creating a one-off invoice, you will be able to override this value.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the add-on.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code used to identify the add-on.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The description of the add-on.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The name of the add-on.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"analytics\",\"action\":\"gross-revenue\",\"operation_id\":\"findAllGrossRevenues\",\"method\":\"GET\",\"path\":\"/analytics/gross_revenue\",\"summary\":\"List gross revenue\",\"description\":\"Gross revenue is the monthly sum of the totals of `finalized` invoices and of the amounts of the fees paid in advance that are not attached to an invoice. Invoice totals include taxes, are net of coupons, and are reduced by the amounts refunded through credit notes. Self-billed invoices and invoices with a lost payment dispute are excluded.\",\"parameters\":[{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Currency of revenue analytics. Format must be ISO 4217.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.\"},{\"name\":\"billing_entity_code\",\"flag\":\"billing-entity-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization.\"},{\"name\":\"months\",\"flag\":\"months\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Show data only for given number of months.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"analytics\",\"action\":\"invoice-collection\",\"operation_id\":\"findAllInvoiceCollections\",\"method\":\"GET\",\"path\":\"/analytics/invoice_collection\",\"summary\":\"List of finalized invoices\",\"description\":\"Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`. Self-billed invoices and invoices with a lost payment dispute are excluded.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The currency of revenue analytics. Format must be ISO 4217.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"billing_entity_code\",\"flag\":\"billing-entity-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization.\"},{\"name\":\"months\",\"flag\":\"months\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Show data only for given number of months.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"analytics\",\"action\":\"invoiced-usage\",\"operation_id\":\"findAllInvoicedUsages\",\"method\":\"GET\",\"path\":\"/analytics/invoiced_usage\",\"summary\":\"List usage revenue\",\"description\":\"Reports the monthly revenue generated by usage-based fees, broken down by billable metric. It only counts usage that has already been invoiced, so the usage of the current billing period is not included. Amounts exclude taxes and are net of coupons. Fees on self-billed invoices and on invoices with a lost payment dispute are left out.\",\"parameters\":[{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The currency of invoiced usage analytics. Format must be ISO 4217.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"billing_entity_code\",\"flag\":\"billing-entity-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization.\"},{\"name\":\"months\",\"flag\":\"months\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Show data only for given number of months.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"analytics\",\"action\":\"mrr\",\"operation_id\":\"findAllMrrs\",\"method\":\"GET\",\"path\":\"/analytics/mrr\",\"summary\":\"List MRR\",\"description\":\"Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle:\\n\\n- Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued.\\n- Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing).\\n- Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).\\n- Revenue from `semiannual` subscription invoices is distributed evenly over six months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).\\n- Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.\",\"parameters\":[{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The currency of MRR analytics. Format must be ISO 4217.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"billing_entity_code\",\"flag\":\"billing-entity-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization.\"},{\"name\":\"months\",\"flag\":\"months\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Show data only for given number of months.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"analytics\",\"action\":\"overdue-balance\",\"operation_id\":\"findAllOverdueBalances\",\"method\":\"GET\",\"path\":\"/analytics/overdue_balance\",\"summary\":\"List overdue balance\",\"description\":\"Overdue balance is the amount still due on invoices that are past their payment due date. Each entry covers one month of payment due dates and sums the invoice totals minus the amounts already paid and minus the credits applied by finalized credit notes. Self-billed invoices are excluded.\",\"parameters\":[{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter the overdue balances by the currency of the invoices. Format must be ISO 4217.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The customer external unique identifier (provided by your own application). Use it to restrict the overdue balances to a single customer.\"},{\"name\":\"billing_entity_code\",\"flag\":\"billing-entity-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization.\"},{\"name\":\"months\",\"flag\":\"months\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Show data only for given number of months.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"analytics\",\"action\":\"usage\",\"operation_id\":\"findAllUsages\",\"method\":\"GET\",\"path\":\"/analytics/usage\",\"summary\":\"List usage\",\"description\":\"Returns the usage billed by each billable metric, aggregated over the requested period and time granularity.\\nThis is a premium feature. On a non-premium license the response always covers the last 30 days with a daily granularity, and only the `billable_metric_code` filter is applied.\",\"parameters\":[{\"name\":\"time_granularity\",\"flag\":\"time-granularity\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The time granularity of usage analytics. Possible values are 'daily', 'weekly' and 'monthly'. Defaults to 'daily'.\",\"enum\":[\"daily\",\"weekly\",\"monthly\"]},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The currency of usage analytics. Format must be ISO 4217.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"from_date\",\"flag\":\"from-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The start date of the period for which the usage analytics is calculated.\"},{\"name\":\"to_date\",\"flag\":\"to-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The end date of the period for which the usage analytics is calculated.\"},{\"name\":\"customer_type\",\"flag\":\"customer-type\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The type of customer for which the usage analytics is calculated. Possible values are 'individual', 'company'.\",\"enum\":[\"individual\",\"company\"]},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The external identifier of the customer for which the usage analytics is calculated.\"},{\"name\":\"customer_country\",\"flag\":\"customer-country\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The country of the customer for which the usage analytics is calculated.\",\"enum\":[\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The external identifier of the subscription for which the usage analytics is calculated.\"},{\"name\":\"is_billable_metric_recurring\",\"flag\":\"is-billable-metric-recurring\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Indicates whether the billable metric associated with the usage is recurring.\"},{\"name\":\"plan_code\",\"flag\":\"plan-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The code of the plan for which the usage analytics is calculated.\"},{\"name\":\"billable_metric_code\",\"flag\":\"billable-metric-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The code of the usage-based billable metrics for which the usage analytics is calculated.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"api-logs\",\"action\":\"get\",\"operation_id\":\"findApiLog\",\"method\":\"GET\",\"path\":\"/api_logs/{request_id}\",\"summary\":\"Retrieve an API log\",\"description\":\"This endpoint retrieves an existing API log, which represents a request made to Lago's API. The API log is identified by its request id.\",\"docs_url\":\"https://getlago.com/docs/api-reference/audit-logs/api-logs-object\",\"parameters\":[{\"name\":\"request_id\",\"flag\":\"request-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The unique identifier of the API log, which is the identifier of the request.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"api-logs\",\"action\":\"list\",\"operation_id\":\"findAllApiLogs\",\"method\":\"GET\",\"path\":\"/api_logs\",\"summary\":\"List all API logs\",\"description\":\"This endpoint retrieves all existing API logs, which represent the requests made to Lago's API. Logs older than the retention period of your organization are left out. The retention period is 30 days unless another one was set for your organization.\",\"docs_url\":\"https://getlago.com/docs/api-reference/audit-logs/api-logs-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"from_date\",\"flag\":\"from-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter API logs logged at or after this date.\"},{\"name\":\"to_date\",\"flag\":\"to-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter API logs logged at or before this date.\"},{\"name\":\"http_methods[]\",\"flag\":\"http-methods\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by HTTP methods.\"},{\"name\":\"http_statuses[]\",\"flag\":\"http-statuses\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by HTTP status or by generic request status. When `succeeded` or `failed` is passed, the numeric values of the filter are ignored.\"},{\"name\":\"api_version\",\"flag\":\"api-version\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results by API version.\"},{\"name\":\"request_paths[]\",\"flag\":\"request-paths\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by the path of the request. A value containing `*` is matched as a wildcard, otherwise the path must match exactly.\"},{\"name\":\"clients[]\",\"flag\":\"clients\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter results by the client that issued the request, as reported by its user agent.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"billable-metrics\",\"action\":\"create\",\"operation_id\":\"createBillableMetric\",\"method\":\"POST\",\"path\":\"/billable_metrics\",\"summary\":\"Create a billable metric\",\"description\":\"This endpoint creates a new billable metric representing a pricing component of your application.\",\"docs_url\":\"https://getlago.com/docs/api-reference/billable-metrics/object\",\"body\":{\"wrapper\":\"billable_metric\",\"fields\":[{\"path\":[\"aggregation_type\"],\"flag\":\"aggregation-type\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Aggregation method used to compute usage for this billable metric.\",\"enum\":[\"count_agg\",\"sum_agg\",\"max_agg\",\"unique_count_agg\",\"weighted_sum_agg\",\"latest_agg\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code used to identify the billable metric associated with the API request. This code associates each event with the correct metric.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Internal description of the billable metric.\"},{\"path\":[\"expression\"],\"flag\":\"expression\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units.\\nEvent values are read with `event.code`, `event.timestamp` and `event.properties.\\u003cname\\u003e`.\\nAccepted functions are `ceil`, `concat`, `floor`, `greatest`, `least` and `round` as well as `+`, `-`, `/` and `*` operations.\\n`ceil`, `floor` and `round` accept an optional second parameter to specify the number of decimals.\\n\"},{\"path\":[\"field_name\"],\"flag\":\"field-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Property of the billable metric used for aggregating usage data. It is required for every aggregation type except `count_agg`, which ignores it and stores `null`.\"},{\"path\":[\"filters\"],\"flag\":\"filters\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of filters of the billable metric. On update, this list replaces the existing filters: a filter that is not sent is deleted.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Name of the billable metric.\"},{\"path\":[\"recurring\"],\"flag\":\"recurring\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Defines if the billable metric is persisted billing period over billing period.\\n\\n- If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.\\n- If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.\\n- If not defined in the request, default value is `false`.\\n- It cannot be set to `true` when `aggregation_type` is `count_agg`, `max_agg` or `latest_agg`.\"},{\"path\":[\"rounding_function\"],\"flag\":\"rounding-function\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Rounding applied to the aggregated number of units. Possible values are `round`, `ceil` and `floor`. When it is not set, the units are not rounded.\",\"enum\":[\"ceil\",\"floor\",\"round\",\"\"]},{\"path\":[\"rounding_precision\"],\"flag\":\"rounding-precision\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Number of decimal places kept when `rounding_function` is applied. It can be a positive or negative value, and it defaults to 0.\"},{\"path\":[\"weighted_interval\"],\"flag\":\"weighted-interval\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Parameter exclusively utilized in conjunction with the `weighted_sum_agg` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. It is required when `aggregation_type` is `weighted_sum_agg`, and `seconds` is the only accepted value.\",\"enum\":[\"seconds\",\"\"]}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"billable-metrics\",\"action\":\"delete\",\"operation_id\":\"destroyBillableMetric\",\"method\":\"DELETE\",\"path\":\"/billable_metrics/{code}\",\"summary\":\"Delete a billable metric\",\"description\":\"This endpoint deletes an existing billable metric representing a pricing component of your application.\",\"docs_url\":\"https://getlago.com/docs/api-reference/billable-metrics/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing billable metric.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"billable-metrics\",\"action\":\"evaluate-expression\",\"operation_id\":\"evaluateBillableMetricExpression\",\"method\":\"POST\",\"path\":\"/billable_metrics/evaluate_expression\",\"summary\":\"Evaluate an expression for a billable metric\",\"description\":\"This endpoint evaluates an expression against a test event. Use it to check an expression before you set it on a billable metric.\",\"docs_url\":\"https://getlago.com/docs/api-reference/billable-metrics/object\",\"body\":{\"fields\":[{\"path\":[\"event\",\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code that identifies a targeted billable metric.\"},{\"path\":[\"event\",\"properties\"],\"flag\":\"properties\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"This field represents additional properties associated with the event. They can be used when evaluating the expression.\"},{\"path\":[\"event\",\"timestamp\"],\"flag\":\"timestamp\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).\\nIf this timestamp is not provided, the API will automatically set it to the time of event reception.\\n\"},{\"path\":[\"expression\"],\"flag\":\"expression\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units.\\nEvent values are read with `event.code`, `event.timestamp` and `event.properties.\\u003cname\\u003e`.\\nAccepted functions are `ceil`, `concat`, `floor`, `greatest`, `least` and `round` as well as `+`, `-`, `/` and `*` operations.\\n`ceil`, `floor` and `round` accept an optional second parameter to specify the number of decimals.\\n\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"billable-metrics\",\"action\":\"get\",\"operation_id\":\"findBillableMetric\",\"method\":\"GET\",\"path\":\"/billable_metrics/{code}\",\"summary\":\"Retrieve a billable metric\",\"description\":\"This endpoint retrieves an existing billable metric that represents a pricing component of your application. The billable metric is identified by its unique code.\",\"docs_url\":\"https://getlago.com/docs/api-reference/billable-metrics/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing billable metric.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"billable-metrics\",\"action\":\"list\",\"operation_id\":\"findAllBillableMetrics\",\"method\":\"GET\",\"path\":\"/billable_metrics\",\"summary\":\"List all billable metrics\",\"description\":\"This endpoint retrieves all existing billable metrics that represent pricing components of your application.\",\"docs_url\":\"https://getlago.com/docs/api-reference/billable-metrics/object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"billable-metrics\",\"action\":\"update\",\"operation_id\":\"updateBillableMetric\",\"method\":\"PUT\",\"path\":\"/billable_metrics/{code}\",\"summary\":\"Update a billable metric\",\"description\":\"This endpoint updates an existing billable metric representing a pricing component of your application.\\n\\nOnce the billable metric is used by a plan charge, only `name`, `description` and `filters` are applied. The other fields are ignored.\",\"docs_url\":\"https://getlago.com/docs/api-reference/billable-metrics/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing billable metric.\"}],\"body\":{\"wrapper\":\"billable_metric\",\"fields\":[{\"path\":[\"aggregation_type\"],\"flag\":\"aggregation-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Aggregation method used to compute usage for this billable metric.\",\"enum\":[\"count_agg\",\"sum_agg\",\"max_agg\",\"unique_count_agg\",\"weighted_sum_agg\",\"latest_agg\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code used to identify the billable metric associated with the API request. This code associates each event with the correct metric.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Internal description of the billable metric.\"},{\"path\":[\"expression\"],\"flag\":\"expression\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units.\\nEvent values are read with `event.code`, `event.timestamp` and `event.properties.\\u003cname\\u003e`.\\nAccepted functions are `ceil`, `concat`, `floor`, `greatest`, `least` and `round` as well as `+`, `-`, `/` and `*` operations.\\n`ceil`, `floor` and `round` accept an optional second parameter to specify the number of decimals.\\n\"},{\"path\":[\"field_name\"],\"flag\":\"field-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Property of the billable metric used for aggregating usage data. It is required for every aggregation type except `count_agg`, which ignores it and stores `null`.\"},{\"path\":[\"filters\"],\"flag\":\"filters\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of filters of the billable metric. On update, this list replaces the existing filters: a filter that is not sent is deleted.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Name of the billable metric.\"},{\"path\":[\"recurring\"],\"flag\":\"recurring\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Defines if the billable metric is persisted billing period over billing period.\\n\\n- If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.\\n- If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.\\n- If not defined in the request, default value is `false`.\\n- It cannot be set to `true` when `aggregation_type` is `count_agg`, `max_agg` or `latest_agg`.\"},{\"path\":[\"rounding_function\"],\"flag\":\"rounding-function\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Rounding applied to the aggregated number of units. Possible values are `round`, `ceil` and `floor`. When it is not set, the units are not rounded.\",\"enum\":[\"ceil\",\"floor\",\"round\",\"\"]},{\"path\":[\"rounding_precision\"],\"flag\":\"rounding-precision\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Number of decimal places kept when `rounding_function` is applied. It can be a positive or negative value, and it defaults to 0.\"},{\"path\":[\"weighted_interval\"],\"flag\":\"weighted-interval\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Parameter exclusively utilized in conjunction with the `weighted_sum_agg` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. It is required when `aggregation_type` is `weighted_sum_agg`, and `seconds` is the only accepted value.\",\"enum\":[\"seconds\",\"\"]}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"billing-entities\",\"action\":\"create\",\"operation_id\":\"createBillingEntity\",\"method\":\"POST\",\"path\":\"/billing_entities\",\"summary\":\"Create a billing entity\",\"description\":\"This endpoint is used to create a new billing entity\",\"docs_url\":\"https://getlago.com/docs/api-reference/billing-entities/object\",\"body\":{\"wrapper\":\"billing_entity\",\"fields\":[{\"path\":[\"address_line1\"],\"flag\":\"address-line1\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The first line of the billing address\"},{\"path\":[\"address_line2\"],\"flag\":\"address-line2\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The second line of the billing address\"},{\"path\":[\"billing_configuration\",\"document_locale\"],\"flag\":\"billing-configuration-document-locale\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The language of the documents generated for this billing entity, in the ISO 639-1 format.\"},{\"path\":[\"billing_configuration\",\"invoice_footer\"],\"flag\":\"billing-configuration-invoice-footer\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The footer text to be displayed on invoices for this billing entity (600 characters max).\"},{\"path\":[\"billing_configuration\",\"invoice_grace_period\"],\"flag\":\"billing-configuration-invoice-grace-period\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The grace period (in days) for invoice finalization. This is a premium feature, the value is ignored without a premium license.\"},{\"path\":[\"billing_configuration\",\"subscription_invoice_issuing_date_adjustment\"],\"flag\":\"billing-configuration-subscription-invoice-issuing-date-adjustment\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.\",\"enum\":[\"align_with_finalization_date\",\"keep_anchor\"]},{\"path\":[\"billing_configuration\",\"subscription_invoice_issuing_date_anchor\"],\"flag\":\"billing-configuration-subscription-invoice-issuing-date-anchor\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Defines whether the issuing date follows the current billing period's end date or the next period starting date.\",\"enum\":[\"current_period_end\",\"next_period_start\"]},{\"path\":[\"city\"],\"flag\":\"city\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The city of the billing address\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The unique code of the billing entity\"},{\"path\":[\"country\"],\"flag\":\"country\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The country code of the billing address\",\"enum\":[\"\",\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"default_currency\"],\"flag\":\"default-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The default currency of the billing entity\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"document_number_prefix\"],\"flag\":\"document-number-prefix\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The prefix used in document numbers for this billing entity (1 to 10 characters). It is upper cased. When it is not provided, Lago builds one from the first three letters of the name and the last four characters of the identifier.\"},{\"path\":[\"document_numbering\"],\"flag\":\"document-numbering\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of document numbering for this billing entity:\\n- `per_customer`: document numbers are unique per customer\\n- `per_billing_entity`: document numbers are unique per billing entity\",\"enum\":[\"per_customer\",\"per_billing_entity\"]},{\"path\":[\"einvoicing\"],\"flag\":\"einvoicing\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Whether e-invoicing is enabled for this billing entity. It can only be enabled when the billing entity country is `FR` or `DE`.\"},{\"path\":[\"email\"],\"flag\":\"email\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The email address of the billing entity\"},{\"path\":[\"email_settings\"],\"flag\":\"email-settings\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The email notification settings for this billing entity. This is a premium feature, the value is ignored without a premium license.\"},{\"path\":[\"eu_tax_management\"],\"flag\":\"eu-tax-management\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Whether EU tax management is enabled for this billing entity. It can only be enabled when the billing entity country is in the European Union.\"},{\"path\":[\"finalize_zero_amount_invoice\"],\"flag\":\"finalize-zero-amount-invoice\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Whether to finalize invoices with zero amount for this billing entity\"},{\"path\":[\"legal_name\"],\"flag\":\"legal-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal name of the billing entity\"},{\"path\":[\"legal_number\"],\"flag\":\"legal-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal registration number of the billing entity\"},{\"path\":[\"logo\"],\"flag\":\"logo\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The base64 encoded logo image for the billing entity. Accepted formats are PNG, JPG and JPEG, up to 800 kB.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The name of the billing entity\"},{\"path\":[\"net_payment_term\"],\"flag\":\"net-payment-term\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The net payment term (in days) for this billing entity\"},{\"path\":[\"phone\"],\"flag\":\"phone\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The phone number of the billing entity\"},{\"path\":[\"state\"],\"flag\":\"state\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The state of the billing address\"},{\"path\":[\"tax_identification_number\"],\"flag\":\"tax-identification-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The tax identification number of the billing entity\"},{\"path\":[\"timezone\"],\"flag\":\"timezone\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The timezone of the billing entity. This is a premium feature, the value is ignored without a premium license.\",\"enum\":[\"UTC\",\"Africa/Algiers\",\"Africa/Cairo\",\"Africa/Casablanca\",\"Africa/Harare\",\"Africa/Johannesburg\",\"Africa/Monrovia\",\"Africa/Nairobi\",\"America/Argentina/Buenos_Aires\",\"America/Bogota\",\"America/Caracas\",\"America/Chicago\",\"America/Chihuahua\",\"America/Denver\",\"America/Guatemala\",\"America/Guyana\",\"America/Halifax\",\"America/Indiana/Indianapolis\",\"America/Juneau\",\"America/La_Paz\",\"America/Lima\",\"America/Los_Angeles\",\"America/Mazatlan\",\"America/Mexico_City\",\"America/Monterrey\",\"America/Montevideo\",\"America/New_York\",\"America/Nuuk\",\"America/Phoenix\",\"America/Puerto_Rico\",\"America/Regina\",\"America/Santiago\",\"America/Sao_Paulo\",\"America/St_Johns\",\"America/Tijuana\",\"Asia/Almaty\",\"Asia/Baghdad\",\"Asia/Baku\",\"Asia/Bangkok\",\"Asia/Chongqing\",\"Asia/Colombo\",\"Asia/Dhaka\",\"Asia/Hong_Kong\",\"Asia/Irkutsk\",\"Asia/Jakarta\",\"Asia/Jerusalem\",\"Asia/Kabul\",\"Asia/Kamchatka\",\"Asia/Karachi\",\"Asia/Kathmandu\",\"Asia/Kolkata\",\"Asia/Krasnoyarsk\",\"Asia/Kuala_Lumpur\",\"Asia/Kuwait\",\"Asia/Magadan\",\"Asia/Muscat\",\"Asia/Novosibirsk\",\"Asia/Riyadh\",\"Asia/Seoul\",\"Asia/Shanghai\",\"Asia/Singapore\",\"Asia/Srednekolymsk\",\"Asia/Taipei\",\"Asia/Tashkent\",\"Asia/Tbilisi\",\"Asia/Tehran\",\"Asia/Tokyo\",\"Asia/Ulaanbaatar\",\"Asia/Urumqi\",\"Asia/Vladivostok\",\"Asia/Yakutsk\",\"Asia/Yangon\",\"Asia/Yekaterinburg\",\"Asia/Yerevan\",\"Atlantic/Azores\",\"Atlantic/Cape_Verde\",\"Atlantic/South_Georgia\",\"Australia/Adelaide\",\"Australia/Brisbane\",\"Australia/Darwin\",\"Australia/Hobart\",\"Australia/Melbourne\",\"Australia/Perth\",\"Australia/Sydney\",\"Europe/Amsterdam\",\"Europe/Athens\",\"Europe/Belgrade\",\"Europe/Berlin\",\"Europe/Bratislava\",\"Europe/Brussels\",\"Europe/Bucharest\",\"Europe/Budapest\",\"Europe/Copenhagen\",\"Europe/Dublin\",\"Europe/Helsinki\",\"Europe/Istanbul\",\"Europe/Kaliningrad\",\"Europe/Kyiv\",\"Europe/Lisbon\",\"Europe/Ljubljana\",\"Europe/London\",\"Europe/Madrid\",\"Europe/Minsk\",\"Europe/Moscow\",\"Europe/Paris\",\"Europe/Prague\",\"Europe/Riga\",\"Europe/Rome\",\"Europe/Samara\",\"Europe/Sarajevo\",\"Europe/Skopje\",\"Europe/Sofia\",\"Europe/Stockholm\",\"Europe/Tallinn\",\"Europe/Vienna\",\"Europe/Vilnius\",\"Europe/Volgograd\",\"Europe/Warsaw\",\"Europe/Zagreb\",\"Europe/Zurich\",\"GMT+12\",\"Pacific/Apia\",\"Pacific/Auckland\",\"Pacific/Chatham\",\"Pacific/Fakaofo\",\"Pacific/Fiji\",\"Pacific/Guadalcanal\",\"Pacific/Guam\",\"Pacific/Honolulu\",\"Pacific/Majuro\",\"Pacific/Midway\",\"Pacific/Noumea\",\"Pacific/Pago_Pago\",\"Pacific/Port_Moresby\",\"Pacific/Tongatapu\"]},{\"path\":[\"zipcode\"],\"flag\":\"zipcode\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The zipcode of the billing address\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"billing-entities\",\"action\":\"get\",\"operation_id\":\"getBillingEntity\",\"method\":\"GET\",\"path\":\"/billing_entities/{code}\",\"summary\":\"Retrieve a billing entity\",\"description\":\"This endpoint returns a specific billing entity by its code\",\"docs_url\":\"https://getlago.com/docs/api-reference/billing-entities/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The unique code of the billing entity\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"billing-entities\",\"action\":\"list\",\"operation_id\":\"listBillingEntities\",\"method\":\"GET\",\"path\":\"/billing_entities\",\"summary\":\"List all billing entities\",\"description\":\"This endpoint returns a list of all billing entities in the organization\",\"docs_url\":\"https://getlago.com/docs/api-reference/billing-entities/object\",\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"billing-entities\",\"action\":\"update\",\"operation_id\":\"updateBillingEntity\",\"method\":\"PUT\",\"path\":\"/billing_entities/{code}\",\"summary\":\"Update a billing entity\",\"description\":\"This endpoint is used to update an existing billing entity\",\"docs_url\":\"https://getlago.com/docs/api-reference/billing-entities/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The unique code of the billing entity\"}],\"body\":{\"wrapper\":\"billing_entity\",\"fields\":[{\"path\":[\"address_line1\"],\"flag\":\"address-line1\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The first line of the billing address\"},{\"path\":[\"address_line2\"],\"flag\":\"address-line2\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The second line of the billing address\"},{\"path\":[\"billing_configuration\",\"document_locale\"],\"flag\":\"billing-configuration-document-locale\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The language of the documents generated for this billing entity, in the ISO 639-1 format.\"},{\"path\":[\"billing_configuration\",\"invoice_footer\"],\"flag\":\"billing-configuration-invoice-footer\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The footer text to be displayed on invoices for this billing entity (600 characters max).\"},{\"path\":[\"billing_configuration\",\"invoice_grace_period\"],\"flag\":\"billing-configuration-invoice-grace-period\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The grace period (in days) for invoice finalization. This is a premium feature, the value is ignored without a premium license.\"},{\"path\":[\"billing_configuration\",\"subscription_invoice_issuing_date_adjustment\"],\"flag\":\"billing-configuration-subscription-invoice-issuing-date-adjustment\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.\",\"enum\":[\"align_with_finalization_date\",\"keep_anchor\"]},{\"path\":[\"billing_configuration\",\"subscription_invoice_issuing_date_anchor\"],\"flag\":\"billing-configuration-subscription-invoice-issuing-date-anchor\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Defines whether the issuing date follows the current billing period's end date or the next period starting date.\",\"enum\":[\"current_period_end\",\"next_period_start\"]},{\"path\":[\"city\"],\"flag\":\"city\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The city of the billing address\"},{\"path\":[\"country\"],\"flag\":\"country\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The country code of the billing address\",\"enum\":[\"\",\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"default_currency\"],\"flag\":\"default-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The default currency of the billing entity\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"document_number_prefix\"],\"flag\":\"document-number-prefix\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The prefix used in document numbers for this billing entity (1 to 10 characters). It is upper cased. It cannot be removed once the billing entity exists, and sending `null` returns a `422` error.\"},{\"path\":[\"document_numbering\"],\"flag\":\"document-numbering\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of document numbering for this billing entity:\\n- `per_customer`: document numbers are unique per customer\\n- `per_billing_entity`: document numbers are unique per billing entity\",\"enum\":[\"per_customer\",\"per_billing_entity\"]},{\"path\":[\"einvoicing\"],\"flag\":\"einvoicing\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Whether e-invoicing is enabled for this billing entity. It can only be enabled when the billing entity country is `FR` or `DE`.\"},{\"path\":[\"email\"],\"flag\":\"email\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The email address of the billing entity\"},{\"path\":[\"email_settings\"],\"flag\":\"email-settings\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The email notification settings for this billing entity. This is a premium feature, the value is ignored without a premium license.\"},{\"path\":[\"eu_tax_management\"],\"flag\":\"eu-tax-management\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Whether EU tax management is enabled for this billing entity. It can only be enabled when the billing entity country is in the European Union.\"},{\"path\":[\"finalize_zero_amount_invoice\"],\"flag\":\"finalize-zero-amount-invoice\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Whether to finalize invoices with zero amount for this billing entity\"},{\"path\":[\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The codes of the invoice custom section that should be associated with this billing entity\"},{\"path\":[\"legal_name\"],\"flag\":\"legal-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal name of the billing entity\"},{\"path\":[\"legal_number\"],\"flag\":\"legal-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal registration number of the billing entity\"},{\"path\":[\"logo\"],\"flag\":\"logo\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The base64 encoded logo image for the billing entity. Accepted formats are PNG, JPG and JPEG, up to 800 kB. Sending \\\"null\\\" removes the current logo.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The name of the billing entity\"},{\"path\":[\"net_payment_term\"],\"flag\":\"net-payment-term\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The net payment term (in days) for this billing entity\"},{\"path\":[\"phone\"],\"flag\":\"phone\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The phone number of the billing entity\"},{\"path\":[\"state\"],\"flag\":\"state\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The state of the billing address\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The tax codes that should be associated with this billing entity. Codes are matched without case sensitivity, and two codes that differ only by case count as one. An unknown code returns a `404` error.\"},{\"path\":[\"tax_identification_number\"],\"flag\":\"tax-identification-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The tax identification number of the billing entity\"},{\"path\":[\"timezone\"],\"flag\":\"timezone\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The timezone of the billing entity. This is a premium feature, the value is ignored without a premium license.\",\"enum\":[\"UTC\",\"Africa/Algiers\",\"Africa/Cairo\",\"Africa/Casablanca\",\"Africa/Harare\",\"Africa/Johannesburg\",\"Africa/Monrovia\",\"Africa/Nairobi\",\"America/Argentina/Buenos_Aires\",\"America/Bogota\",\"America/Caracas\",\"America/Chicago\",\"America/Chihuahua\",\"America/Denver\",\"America/Guatemala\",\"America/Guyana\",\"America/Halifax\",\"America/Indiana/Indianapolis\",\"America/Juneau\",\"America/La_Paz\",\"America/Lima\",\"America/Los_Angeles\",\"America/Mazatlan\",\"America/Mexico_City\",\"America/Monterrey\",\"America/Montevideo\",\"America/New_York\",\"America/Nuuk\",\"America/Phoenix\",\"America/Puerto_Rico\",\"America/Regina\",\"America/Santiago\",\"America/Sao_Paulo\",\"America/St_Johns\",\"America/Tijuana\",\"Asia/Almaty\",\"Asia/Baghdad\",\"Asia/Baku\",\"Asia/Bangkok\",\"Asia/Chongqing\",\"Asia/Colombo\",\"Asia/Dhaka\",\"Asia/Hong_Kong\",\"Asia/Irkutsk\",\"Asia/Jakarta\",\"Asia/Jerusalem\",\"Asia/Kabul\",\"Asia/Kamchatka\",\"Asia/Karachi\",\"Asia/Kathmandu\",\"Asia/Kolkata\",\"Asia/Krasnoyarsk\",\"Asia/Kuala_Lumpur\",\"Asia/Kuwait\",\"Asia/Magadan\",\"Asia/Muscat\",\"Asia/Novosibirsk\",\"Asia/Riyadh\",\"Asia/Seoul\",\"Asia/Shanghai\",\"Asia/Singapore\",\"Asia/Srednekolymsk\",\"Asia/Taipei\",\"Asia/Tashkent\",\"Asia/Tbilisi\",\"Asia/Tehran\",\"Asia/Tokyo\",\"Asia/Ulaanbaatar\",\"Asia/Urumqi\",\"Asia/Vladivostok\",\"Asia/Yakutsk\",\"Asia/Yangon\",\"Asia/Yekaterinburg\",\"Asia/Yerevan\",\"Atlantic/Azores\",\"Atlantic/Cape_Verde\",\"Atlantic/South_Georgia\",\"Australia/Adelaide\",\"Australia/Brisbane\",\"Australia/Darwin\",\"Australia/Hobart\",\"Australia/Melbourne\",\"Australia/Perth\",\"Australia/Sydney\",\"Europe/Amsterdam\",\"Europe/Athens\",\"Europe/Belgrade\",\"Europe/Berlin\",\"Europe/Bratislava\",\"Europe/Brussels\",\"Europe/Bucharest\",\"Europe/Budapest\",\"Europe/Copenhagen\",\"Europe/Dublin\",\"Europe/Helsinki\",\"Europe/Istanbul\",\"Europe/Kaliningrad\",\"Europe/Kyiv\",\"Europe/Lisbon\",\"Europe/Ljubljana\",\"Europe/London\",\"Europe/Madrid\",\"Europe/Minsk\",\"Europe/Moscow\",\"Europe/Paris\",\"Europe/Prague\",\"Europe/Riga\",\"Europe/Rome\",\"Europe/Samara\",\"Europe/Sarajevo\",\"Europe/Skopje\",\"Europe/Sofia\",\"Europe/Stockholm\",\"Europe/Tallinn\",\"Europe/Vienna\",\"Europe/Vilnius\",\"Europe/Volgograd\",\"Europe/Warsaw\",\"Europe/Zagreb\",\"Europe/Zurich\",\"GMT+12\",\"Pacific/Apia\",\"Pacific/Auckland\",\"Pacific/Chatham\",\"Pacific/Fakaofo\",\"Pacific/Fiji\",\"Pacific/Guadalcanal\",\"Pacific/Guam\",\"Pacific/Honolulu\",\"Pacific/Majuro\",\"Pacific/Midway\",\"Pacific/Noumea\",\"Pacific/Pago_Pago\",\"Pacific/Port_Moresby\",\"Pacific/Tongatapu\"]},{\"path\":[\"zipcode\"],\"flag\":\"zipcode\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The zipcode of the billing address\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"coupons\",\"action\":\"apply\",\"operation_id\":\"applyCoupon\",\"method\":\"POST\",\"path\":\"/applied_coupons\",\"summary\":\"Apply a coupon to a customer\",\"description\":\"This endpoint is used to apply a specific coupon to a customer, before or during a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"body\":{\"wrapper\":\"applied_coupon\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The amount of the coupon in cents. If it is not set, the amount of the coupon is used.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The currency of the coupon amount. If it is not set, the currency of the coupon is used.\",\"enum\":[\"\",\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"coupon_code\"],\"flag\":\"coupon-code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code used to identify the coupon.\"},{\"path\":[\"external_customer_id\"],\"flag\":\"external-customer-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"path\":[\"frequency\"],\"flag\":\"frequency\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.\\n\\n- If set to `once`, the coupon is applicable only for a single use.\\n- If set to `recurring`, the coupon can be used multiple times for recurring billing periods.\\n- If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.\\n\\nIf it is not set, the frequency of the coupon is used.\",\"enum\":[\"once\",\"recurring\",\"forever\",\"\"]},{\"path\":[\"frequency_duration\"],\"flag\":\"frequency-duration\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of billing periods to which the coupon applies. If it is not set, the frequency duration of the coupon is used. A `recurring` applied coupon must end up with a frequency duration greater than 0.\"},{\"path\":[\"percentage_rate\"],\"flag\":\"percentage-rate\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The percentage rate of the coupon. Accepts a number or a decimal string. If it is not set, the percentage rate of the coupon is used.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"coupons\",\"action\":\"create\",\"operation_id\":\"createCoupon\",\"method\":\"POST\",\"path\":\"/coupons\",\"summary\":\"Create a coupon\",\"description\":\"This endpoint is used to create a coupon that can be then attached to a customer to create a discount.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"body\":{\"wrapper\":\"coupon\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The currency of the coupon. This field is required only for coupon with `fixed_amount` type.\",\"enum\":[\"\",\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"applies_to\",\"billable_metric_codes\"],\"flag\":\"applies-to-billable-metric-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of billable metric codes to which the coupon is applicable. By specifying the billable metric codes in this field, you can restrict the coupon's usage to specific metrics only.\"},{\"path\":[\"applies_to\",\"plan_codes\"],\"flag\":\"applies-to-plan-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of plan codes to which the coupon is applicable. By specifying the plan codes in this field, you can restrict the coupon's usage to specific plans only.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code used to identify the coupon.\"},{\"path\":[\"coupon_type\"],\"flag\":\"coupon-type\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The type of the coupon. It can have two possible values: `fixed_amount` or `percentage`.\\n\\n- If set to `fixed_amount`, the coupon represents a fixed amount discount.\\n- If set to `percentage`, the coupon represents a percentage-based discount.\",\"enum\":[\"fixed_amount\",\"percentage\"]},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Description of the coupon.\"},{\"path\":[\"expiration\"],\"flag\":\"expiration\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Specifies the type of expiration for the coupon. It can have two possible values: `time_limit` or `no_expiration`.\\n\\n- If set to `time_limit`, the coupon has an expiration based on a specified time limit.\\n- If set to `no_expiration`, the coupon does not have an expiration date and remains valid indefinitely.\",\"enum\":[\"no_expiration\",\"time_limit\"]},{\"path\":[\"expiration_at\"],\"flag\":\"expiration-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The expiration date and time of the coupon. This field is required only for coupons with `expiration` set to `time_limit`. The expiration date and time should be specified in UTC format according to the ISO 8601 datetime standard. It indicates the exact moment when the coupon will expire and is no longer valid.\"},{\"path\":[\"frequency\"],\"flag\":\"frequency\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.\\n\\n- If set to `once`, the coupon is applicable only for a single use.\\n- If set to `recurring`, the coupon can be used multiple times for recurring billing periods.\\n- If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.\",\"enum\":[\"once\",\"recurring\",\"forever\"]},{\"path\":[\"frequency_duration\"],\"flag\":\"frequency-duration\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The name of the coupon.\"},{\"path\":[\"percentage_rate\"],\"flag\":\"percentage-rate\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The percentage rate of the coupon. Accepts a number or a decimal string. This field is required only for coupons with a `percentage` coupon type.\"},{\"path\":[\"reusable\"],\"flag\":\"reusable\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Indicates whether the coupon can be reused or not. If set to `true`, the coupon is reusable, meaning it can be applied multiple times to the same customer. If set to `false`, the coupon can only be used once and is not reusable. If not specified, this field is set to `true` by default.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"coupons\",\"action\":\"delete\",\"operation_id\":\"destroyCoupon\",\"method\":\"DELETE\",\"path\":\"/coupons/{code}\",\"summary\":\"Delete a coupon\",\"description\":\"This endpoint is used to delete a coupon.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code used to identify the coupon.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"coupons\",\"action\":\"delete-applied-coupon\",\"operation_id\":\"deleteAppliedCoupon\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/applied_coupons/{applied_coupon_id}\",\"summary\":\"Delete an applied coupon\",\"description\":\"This endpoint is used to delete a specific coupon that has been applied to a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"applied_coupon_id\",\"flag\":\"applied-coupon-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the applied coupon, created by Lago.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"coupons\",\"action\":\"get\",\"operation_id\":\"findCoupon\",\"method\":\"GET\",\"path\":\"/coupons/{code}\",\"summary\":\"Retrieve a coupon\",\"description\":\"This endpoint is used to retrieve a specific coupon.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code used to identify the coupon.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"coupons\",\"action\":\"list\",\"operation_id\":\"findAllCoupons\",\"method\":\"GET\",\"path\":\"/coupons\",\"summary\":\"List all coupons\",\"description\":\"This endpoint is used to list all existing coupons.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"coupons\",\"action\":\"list-applied-coupons\",\"operation_id\":\"findAllAppliedCoupons\",\"method\":\"GET\",\"path\":\"/applied_coupons\",\"summary\":\"List all applied coupons\",\"description\":\"This endpoint is used to list all applied coupons. You can filter by coupon status and by customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The status of the coupon. Can be either `active` or `terminated`.\",\"enum\":[\"active\",\"terminated\"]},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"coupon_code[]\",\"flag\":\"coupon-code\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"The code of the coupon applied to the customer. Use it to filter applied coupons by their code.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"coupons\",\"action\":\"update\",\"operation_id\":\"updateCoupon\",\"method\":\"PUT\",\"path\":\"/coupons/{code}\",\"summary\":\"Update a coupon\",\"description\":\"This endpoint is used to update a coupon that can be then attached to a customer to create a discount.\\n\\nOnce the coupon has been applied to at least one customer, only `name`, `description`, `expiration` and `expiration_at` are updated. The other fields in the payload are ignored.\",\"docs_url\":\"https://getlago.com/docs/api-reference/coupons/coupon-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code used to identify the coupon.\"}],\"body\":{\"wrapper\":\"coupon\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The currency of the coupon. This field is required only for coupon with `fixed_amount` type.\",\"enum\":[\"\",\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"applies_to\",\"billable_metric_codes\"],\"flag\":\"applies-to-billable-metric-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of billable metric codes to which the coupon is applicable. By specifying the billable metric codes in this field, you can restrict the coupon's usage to specific metrics only.\"},{\"path\":[\"applies_to\",\"plan_codes\"],\"flag\":\"applies-to-plan-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of plan codes to which the coupon is applicable. By specifying the plan codes in this field, you can restrict the coupon's usage to specific plans only.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code used to identify the coupon.\"},{\"path\":[\"coupon_type\"],\"flag\":\"coupon-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of the coupon. It can have two possible values: `fixed_amount` or `percentage`.\\n\\n- If set to `fixed_amount`, the coupon represents a fixed amount discount.\\n- If set to `percentage`, the coupon represents a percentage-based discount.\",\"enum\":[\"fixed_amount\",\"percentage\"]},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Description of the coupon.\"},{\"path\":[\"expiration\"],\"flag\":\"expiration\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the type of expiration for the coupon. It can have two possible values: `time_limit` or `no_expiration`.\\n\\n- If set to `time_limit`, the coupon has an expiration based on a specified time limit.\\n- If set to `no_expiration`, the coupon does not have an expiration date and remains valid indefinitely.\",\"enum\":[\"no_expiration\",\"time_limit\"]},{\"path\":[\"expiration_at\"],\"flag\":\"expiration-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The expiration date and time of the coupon. This field is required only for coupons with `expiration` set to `time_limit`. The expiration date and time should be specified in UTC format according to the ISO 8601 datetime standard. It indicates the exact moment when the coupon will expire and is no longer valid.\"},{\"path\":[\"frequency\"],\"flag\":\"frequency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.\\n\\n- If set to `once`, the coupon is applicable only for a single use.\\n- If set to `recurring`, the coupon can be used multiple times for recurring billing periods.\\n- If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.\",\"enum\":[\"once\",\"recurring\",\"forever\"]},{\"path\":[\"frequency_duration\"],\"flag\":\"frequency-duration\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The name of the coupon.\"},{\"path\":[\"percentage_rate\"],\"flag\":\"percentage-rate\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The percentage rate of the coupon. Accepts a number or a decimal string. This field is required only for coupons with a `percentage` coupon type.\"},{\"path\":[\"reusable\"],\"flag\":\"reusable\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Indicates whether the coupon can be reused or not. If set to `true`, the coupon is reusable, meaning it can be applied multiple times to the same customer. If set to `false`, the coupon can only be used once and is not reusable. If not specified, this field is set to `true` by default.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"create\",\"operation_id\":\"createCreditNote\",\"method\":\"POST\",\"path\":\"/credit_notes\",\"summary\":\"Create a credit note\",\"description\":\"This endpoint creates a new credit note.\\nThis is a premium feature.\\nA credit note cannot be issued on an invoice in a `pending` or `failed` status. In that case the endpoint returns a `405` error with the `invalid_type_or_status` code.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"body\":{\"wrapper\":\"credit_note\",\"fields\":[{\"path\":[\"credit_amount_cents\"],\"flag\":\"credit-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The total amount to be credited to the customer balance for discounts on future invoices. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice's total fees.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The description of the credit note.\"},{\"path\":[\"invoice_id\"],\"flag\":\"invoice-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The invoice unique identifier, created by Lago.\"},{\"path\":[\"items\"],\"flag\":\"items\",\"type\":\"array\",\"required\":true,\"complex\":true,\"description\":\"The list of credit note's items.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"offset_amount_cents\"],\"flag\":\"offset-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The total amount to be immediately deducted from the invoice balance. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice's total fees.\"},{\"path\":[\"reason\"],\"flag\":\"reason\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The reason of the credit note creation.\\nPossible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.\",\"enum\":[\"duplicated_charge\",\"product_unsatisfactory\",\"order_change\",\"order_cancellation\",\"fraudulent_charge\",\"other\",\"\"]},{\"path\":[\"refund_amount_cents\"],\"flag\":\"refund-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The total amount to be refunded immediately to the payment method used by the customer. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice's total fees.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"delete-all-credit-note-metadata\",\"operation_id\":\"deleteAllCreditNoteMetadata\",\"method\":\"DELETE\",\"path\":\"/credit_notes/{lago_id}/metadata\",\"summary\":\"Delete all credit note metadata\",\"description\":\"This endpoint removes all metadata from a credit note.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"delete-credit-note-metadata-key\",\"operation_id\":\"deleteCreditNoteMetadataKey\",\"method\":\"DELETE\",\"path\":\"/credit_notes/{lago_id}/metadata/{key}\",\"summary\":\"Delete a metadata key\",\"description\":\"This endpoint removes a single metadata key from a credit note.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"},{\"name\":\"key\",\"flag\":\"key\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The metadata key to delete.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"download\",\"operation_id\":\"downloadCreditNote\",\"method\":\"POST\",\"path\":\"/credit_notes/{lago_id}/download\",\"summary\":\"Download a credit note PDF\",\"description\":\"This endpoint downloads the PDF of an existing credit note. Only `finalized` credit notes can be downloaded; any other credit note returns a `404` error.\\nWhen the PDF has already been generated, the credit note object is returned and its `file_url` points to the document. When it has not been generated yet, the response is a `200` with an empty body and the generation starts in the background. Call the endpoint again to get the credit note object with its `file_url`.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"credit-notes\",\"action\":\"estimate\",\"operation_id\":\"estimateCreditNote\",\"method\":\"POST\",\"path\":\"/credit_notes/estimate\",\"summary\":\"Estimate amounts for a new credit note\",\"description\":\"This endpoint allows you to retrieve amounts for a new credit note creation.\\nThis is a premium feature.\\nAmounts cannot be estimated on an invoice in a `pending` or `failed` status. In that case the endpoint returns a `405` error with the `invalid_type_or_status` code.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"body\":{\"wrapper\":\"credit_note\",\"fields\":[{\"path\":[\"invoice_id\"],\"flag\":\"invoice-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The invoice unique identifier, created by Lago.\"},{\"path\":[\"items\"],\"flag\":\"items\",\"type\":\"array\",\"required\":true,\"complex\":true,\"description\":\"The list of credit note's items.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"credit-notes\",\"action\":\"get\",\"operation_id\":\"findCreditNote\",\"method\":\"GET\",\"path\":\"/credit_notes/{lago_id}\",\"summary\":\"Retrieve a credit note\",\"description\":\"This endpoint retrieves an existing credit note.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"credit-notes\",\"action\":\"list\",\"operation_id\":\"findAllCreditNotes\",\"method\":\"GET\",\"path\":\"/credit_notes\",\"summary\":\"List all credit notes\",\"description\":\"This endpoint lists all existing credit notes.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"name\":\"issuing_date_from\",\"flag\":\"issuing-date-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes starting from a specific date.\"},{\"name\":\"issuing_date_to\",\"flag\":\"issuing-date-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes up to a specific date.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Search credit notes by id, number, customer name, customer external_id or customer email.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by currency. Possible values ISO 4217 currency codes.\"},{\"name\":\"reason\",\"flag\":\"reason\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by reasons. Possible values are `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge`, `duplicated_charge` or `other`.\",\"enum\":[\"product_unsatisfactory\",\"order_change\",\"order_cancellation\",\"fraudulent_charge\",\"duplicated_charge\",\"other\"]},{\"name\":\"credit_status\",\"flag\":\"credit-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by credit status. Possible values are `available`, `consumed` or `voided`.\",\"enum\":[\"available\",\"consumed\",\"voided\"]},{\"name\":\"refund_status\",\"flag\":\"refund-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by refund status. Possible values are `pending`, `succeeded` or `failed`.\",\"enum\":[\"pending\",\"succeeded\",\"failed\"]},{\"name\":\"invoice_number\",\"flag\":\"invoice-number\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by their related invoice number.\"},{\"name\":\"purchase_order_number\",\"flag\":\"purchase-order-number\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by the invoice purchase order number. The match is exact but case-insensitive.\"},{\"name\":\"amount_from\",\"flag\":\"amount-from\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter credit notes of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"amount_to\",\"flag\":\"amount-to\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter credit notes up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"types[]\",\"flag\":\"types\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter credit notes by the kind of amount they carry. `credit` matches credit notes with a credited amount, `refund` those with a refunded amount and `offset` those with an amount deducted from the invoice balance. A credit note can match several types.\"},{\"name\":\"self_billed\",\"flag\":\"self-billed\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter credit notes belonging to a self billed invoice. Possible values are `true` or `false`.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter credit notes by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"credit-notes\",\"action\":\"merge-credit-note-metadata\",\"operation_id\":\"mergeCreditNoteMetadata\",\"method\":\"PATCH\",\"path\":\"/credit_notes/{lago_id}/metadata\",\"summary\":\"Merge credit note metadata\",\"description\":\"This endpoint merges the provided metadata with existing metadata on the credit note.\\nExisting keys not in the request are preserved. New keys are added, existing keys are updated.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"metadata\",\"operation_id\":\"replaceCreditNoteMetadata\",\"method\":\"POST\",\"path\":\"/credit_notes/{lago_id}/metadata\",\"summary\":\"Replace credit note metadata\",\"description\":\"This endpoint replaces all existing metadata on a credit note with the provided key-value pairs.\\nAny existing metadata keys not included in the request will be removed.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"update\",\"operation_id\":\"updateCreditNote\",\"method\":\"PUT\",\"path\":\"/credit_notes/{lago_id}\",\"summary\":\"Update a credit note\",\"description\":\"This endpoint updates an existing credit note.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"body\":{\"wrapper\":\"credit_note\",\"fields\":[{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"refund_status\"],\"flag\":\"refund-status\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:\\n\\n- `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.\\n- `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.\\n- `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.\",\"enum\":[\"pending\",\"succeeded\",\"failed\"]}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"credit-notes\",\"action\":\"void\",\"operation_id\":\"voidCreditNote\",\"method\":\"PUT\",\"path\":\"/credit_notes/{lago_id}/void\",\"summary\":\"Void available credit\",\"description\":\"This endpoint voids the available credit linked to a specific credit note.\",\"docs_url\":\"https://getlago.com/docs/api-reference/credit-notes/credit-note-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The credit note unique identifier, created by Lago.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"customers\",\"action\":\"applied-coupons\",\"operation_id\":\"findAllCustomerAppliedCoupons\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/applied_coupons\",\"summary\":\"List all customer's applied coupons\",\"description\":\"This endpoint is used to list all applied coupons for a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The status of the coupon. Can be either `active` or `terminated`.\",\"enum\":[\"active\",\"terminated\"]},{\"name\":\"coupon_code[]\",\"flag\":\"coupon-code\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"The code of the coupon applied to the customer. Use it to filter applied coupons by their code.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"checkout-url\",\"operation_id\":\"generateCustomerCheckoutURL\",\"method\":\"POST\",\"path\":\"/customers/{external_customer_id}/checkout_url\",\"summary\":\"Generate a Customer Payment Provider Checkout URL\",\"description\":\"This endpoint regenerates the Payment Provider Checkout URL of a Customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application).\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"create\",\"operation_id\":\"createCustomer\",\"method\":\"POST\",\"path\":\"/customers\",\"summary\":\"Create a customer\",\"description\":\"This endpoint creates a customer. When a customer with the same `external_id` already exists, it is updated instead, and only the fields present in the payload are changed.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"body\":{\"wrapper\":\"customer\",\"fields\":[{\"path\":[\"account_type\"],\"flag\":\"account-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of the account. It can have one of the following values:\\n- `customer`: the account is a customer, default value.\\n- `partner`: the account is a partner.\\n\\nThis field is only applied when revenue share is enabled on your organization and the customer has no subscription, invoice, add-on, fixed-amount coupon or wallet yet; otherwise it is ignored.\",\"enum\":[\"customer\",\"partner\"]},{\"path\":[\"address_line1\"],\"flag\":\"address-line1\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The first line of the billing address (500 characters max).\"},{\"path\":[\"address_line2\"],\"flag\":\"address-line2\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The second line of the billing address (500 characters max).\"},{\"path\":[\"billing_configuration\",\"document_locale\"],\"flag\":\"billing-configuration-document-locale\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The document locale, specified in the ISO 639-1 format. This field represents the language or locale used for the documents issued by Lago\"},{\"path\":[\"billing_configuration\",\"invoice_grace_period\"],\"flag\":\"billing-configuration-invoice-grace-period\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items. It is null when the customer has no grace period of its own and falls back to the billing entity. This is a premium feature, the value is ignored without a premium license.\"},{\"path\":[\"billing_configuration\",\"payment_provider\"],\"flag\":\"billing-configuration-payment-provider\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The payment provider utilized to initiate payments for invoices issued by Lago.\\nAccepted values: `stripe`, `adyen`, `cashfree`, `flutterwave`, `gocardless`, `moneyhash` or null. This field is required if you intend to assign a `provider_customer_id`. Send null to detach the customer from its current payment provider.\",\"enum\":[\"stripe\",\"adyen\",\"cashfree\",\"flutterwave\",\"gocardless\",\"moneyhash\",\"\"]},{\"path\":[\"billing_configuration\",\"payment_provider_code\"],\"flag\":\"billing-configuration-payment-provider-code\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Unique code used to identify a payment provider connection.\"},{\"path\":[\"billing_configuration\",\"provider_customer_id\"],\"flag\":\"billing-configuration-provider-customer-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The customer ID within the payment provider's system. If this field is not provided, Lago has the option to create a new customer record within the payment provider's system on behalf of the customer\"},{\"path\":[\"billing_configuration\",\"provider_payment_methods\"],\"flag\":\"billing-configuration-provider-payment-methods\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set, the payment methods will be set to `card`. For now, possible values are `card`, `sepa_debit`, `us_bank_account`, `bacs_debit`, `boleto`, `link`, `crypto` and `customer_balance`. Note that when `link` is selected, `card` should also be provided in the array. When `customer_balance` is selected, no other payment can be selected.\"},{\"path\":[\"billing_configuration\",\"subscription_invoice_issuing_date_adjustment\"],\"flag\":\"billing-configuration-subscription-invoice-issuing-date-adjustment\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.\",\"enum\":[\"align_with_finalization_date\",\"keep_anchor\",\"\"]},{\"path\":[\"billing_configuration\",\"subscription_invoice_issuing_date_anchor\"],\"flag\":\"billing-configuration-subscription-invoice-issuing-date-anchor\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Defines whether the issuing date follows the current billing period's end date or the next period starting date.\",\"enum\":[\"current_period_end\",\"next_period_start\",\"\"]},{\"path\":[\"billing_configuration\",\"sync\"],\"flag\":\"billing-configuration-sync\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set this field to `true` if you want to create the customer in the payment provider synchronously with the customer creation process in Lago. This option is applicable only when the `provider_customer_id` is `null` and the customer is automatically created in the payment provider through Lago. By default, the value is set to `false`\"},{\"path\":[\"billing_configuration\",\"sync_with_provider\"],\"flag\":\"billing-configuration-sync-with-provider\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set this field to `true` if you want to create a customer record in the payment provider's system. This option is applicable only when the `provider_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`\"},{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The unique code of the billing entity to associate with the customer. If not provided, the default billing entity will be used.\"},{\"path\":[\"city\"],\"flag\":\"city\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The city of the customer's billing address (255 characters max).\"},{\"path\":[\"country\"],\"flag\":\"country\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)\",\"enum\":[\"\",\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"currency\"],\"flag\":\"currency\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Currency of the customer. Format must be ISO 4217\",\"enum\":[\"\",\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"customer_type\"],\"flag\":\"customer-type\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The type of the customer. It can have one of the following values:\\n- `company`: the customer is a company.\\n- `individual`: the customer is an individual.\",\"enum\":[\"company\",\"individual\",\"\"]},{\"path\":[\"email\"],\"flag\":\"email\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The email of the customer\"},{\"path\":[\"external_id\"],\"flag\":\"external-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"path\":[\"external_salesforce_id\"],\"flag\":\"external-salesforce-id\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The customer ID within the Salesforce system\"},{\"path\":[\"finalize_zero_amount_invoice\"],\"flag\":\"finalize-zero-amount-invoice\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies how invoices with a zero total amount should be handled:\\n- `inherit`: (Default) Follows the organization-level configuration.\\n- `finalize`: Invoices are issued and finalized even if the total amount is zero.\\n- `skip`: Invoices with a total amount of zero are not finalized.\",\"enum\":[\"inherit\",\"skip\",\"finalize\"]},{\"path\":[\"firstname\"],\"flag\":\"firstname\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"First name of the customer (255 characters max).\"},{\"path\":[\"integration_customers\"],\"flag\":\"integration-customers\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The integration customers to create or update for this customer. Only one entry per `integration_type` is accepted; sending two entries with the same type returns a `422` error with `invalid_count_per_integration_type` on `integration_customers`.\"},{\"path\":[\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections.\"},{\"path\":[\"lastname\"],\"flag\":\"lastname\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Last name of the customer (255 characters max).\"},{\"path\":[\"legal_name\"],\"flag\":\"legal-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal company name of the customer (255 characters max).\"},{\"path\":[\"legal_number\"],\"flag\":\"legal-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal company number of the customer\"},{\"path\":[\"logo_url\"],\"flag\":\"logo-url\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The logo URL of the customer\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format. A customer can hold up to 5 key-value pairs.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The full name of the customer (255 characters max).\"},{\"path\":[\"net_payment_term\"],\"flag\":\"net-payment-term\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.\"},{\"path\":[\"phone\"],\"flag\":\"phone\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The phone number of the customer\"},{\"path\":[\"shipping_address\",\"address_line1\"],\"flag\":\"shipping-address-address-line1\",\"type\":\"string\",\"required\":false,\"complex\":false},{\"path\":[\"shipping_address\",\"address_line2\"],\"flag\":\"shipping-address-address-line2\",\"type\":\"string\",\"required\":false,\"complex\":false},{\"path\":[\"shipping_address\",\"city\"],\"flag\":\"shipping-address-city\",\"type\":\"string\",\"required\":false,\"complex\":false},{\"path\":[\"shipping_address\",\"country\"],\"flag\":\"shipping-address-country\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Country code of the customer's shipping address. Format must be ISO 3166 (alpha-2)\",\"enum\":[\"\",\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"shipping_address\",\"state\"],\"flag\":\"shipping-address-state\",\"type\":\"string\",\"required\":false,\"complex\":false},{\"path\":[\"shipping_address\",\"zipcode\"],\"flag\":\"shipping-address-zipcode\",\"type\":\"string\",\"required\":false,\"complex\":false},{\"path\":[\"skip_invoice_custom_sections\"],\"flag\":\"skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for this customer only. False by default\"},{\"path\":[\"state\"],\"flag\":\"state\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The state of the customer's billing address (255 characters max).\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"tax_identification_number\"],\"flag\":\"tax-identification-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The tax identification number of the customer (255 characters max).\"},{\"path\":[\"timezone\"],\"flag\":\"timezone\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone. This is a premium feature, the value is ignored without a premium license.\",\"enum\":[\"\",\"UTC\",\"Africa/Algiers\",\"Africa/Cairo\",\"Africa/Casablanca\",\"Africa/Harare\",\"Africa/Johannesburg\",\"Africa/Monrovia\",\"Africa/Nairobi\",\"America/Argentina/Buenos_Aires\",\"America/Bogota\",\"America/Caracas\",\"America/Chicago\",\"America/Chihuahua\",\"America/Denver\",\"America/Godthab\",\"America/Guatemala\",\"America/Guyana\",\"America/Halifax\",\"America/Indiana/Indianapolis\",\"America/Juneau\",\"America/La_Paz\",\"America/Lima\",\"America/Los_Angeles\",\"America/Mazatlan\",\"America/Mexico_City\",\"America/Monterrey\",\"America/Montevideo\",\"America/New_York\",\"America/Phoenix\",\"America/Puerto_Rico\",\"America/Regina\",\"America/Santiago\",\"America/Sao_Paulo\",\"America/St_Johns\",\"America/Tijuana\",\"Asia/Almaty\",\"Asia/Baghdad\",\"Asia/Baku\",\"Asia/Bangkok\",\"Asia/Chongqing\",\"Asia/Colombo\",\"Asia/Dhaka\",\"Asia/Hong_Kong\",\"Asia/Irkutsk\",\"Asia/Jakarta\",\"Asia/Jerusalem\",\"Asia/Kabul\",\"Asia/Kamchatka\",\"Asia/Karachi\",\"Asia/Kathmandu\",\"Asia/Kolkata\",\"Asia/Krasnoyarsk\",\"Asia/Kuala_Lumpur\",\"Asia/Kuwait\",\"Asia/Magadan\",\"Asia/Muscat\",\"Asia/Novosibirsk\",\"Asia/Rangoon\",\"Asia/Riyadh\",\"Asia/Seoul\",\"Asia/Shanghai\",\"Asia/Singapore\",\"Asia/Srednekolymsk\",\"Asia/Taipei\",\"Asia/Tashkent\",\"Asia/Tbilisi\",\"Asia/Tehran\",\"Asia/Tokyo\",\"Asia/Ulaanbaatar\",\"Asia/Urumqi\",\"Asia/Vladivostok\",\"Asia/Yakutsk\",\"Asia/Yekaterinburg\",\"Asia/Yerevan\",\"Atlantic/Azores\",\"Atlantic/Cape_Verde\",\"Atlantic/South_Georgia\",\"Australia/Adelaide\",\"Australia/Brisbane\",\"Australia/Darwin\",\"Australia/Hobart\",\"Australia/Melbourne\",\"Australia/Perth\",\"Australia/Sydney\",\"Europe/Amsterdam\",\"Europe/Athens\",\"Europe/Belgrade\",\"Europe/Berlin\",\"Europe/Bratislava\",\"Europe/Brussels\",\"Europe/Bucharest\",\"Europe/Budapest\",\"Europe/Copenhagen\",\"Europe/Dublin\",\"Europe/Helsinki\",\"Europe/Istanbul\",\"Europe/Kaliningrad\",\"Europe/Kiev\",\"Europe/Lisbon\",\"Europe/Ljubljana\",\"Europe/London\",\"Europe/Madrid\",\"Europe/Minsk\",\"Europe/Moscow\",\"Europe/Paris\",\"Europe/Prague\",\"Europe/Riga\",\"Europe/Rome\",\"Europe/Samara\",\"Europe/Sarajevo\",\"Europe/Skopje\",\"Europe/Sofia\",\"Europe/Stockholm\",\"Europe/Tallinn\",\"Europe/Vienna\",\"Europe/Vilnius\",\"Europe/Volgograd\",\"Europe/Warsaw\",\"Europe/Zagreb\",\"Europe/Zurich\",\"GMT+12\",\"Pacific/Apia\",\"Pacific/Auckland\",\"Pacific/Chatham\",\"Pacific/Fakaofo\",\"Pacific/Fiji\",\"Pacific/Guadalcanal\",\"Pacific/Guam\",\"Pacific/Honolulu\",\"Pacific/Majuro\",\"Pacific/Midway\",\"Pacific/Noumea\",\"Pacific/Pago_Pago\",\"Pacific/Port_Moresby\",\"Pacific/Tongatapu\"]},{\"path\":[\"url\"],\"flag\":\"url\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The custom website URL of the customer\"},{\"path\":[\"zipcode\"],\"flag\":\"zipcode\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The zipcode of the customer's billing address (255 characters max).\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"customers\",\"action\":\"credit-notes\",\"operation_id\":\"findAllCustomerCreditNotes\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/credit_notes\",\"summary\":\"List all customer's credit notes\",\"description\":\"This endpoint lists all existing credit notes for a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"issuing_date_from\",\"flag\":\"issuing-date-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes starting from a specific date.\"},{\"name\":\"issuing_date_to\",\"flag\":\"issuing-date-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes up to a specific date.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Search credit notes by id, number, customer name, customer external_id or customer email.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by currency. Possible values ISO 4217 currency codes.\"},{\"name\":\"reason\",\"flag\":\"reason\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by reasons. Possible values are `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge`, `duplicated_charge` or `other`.\",\"enum\":[\"product_unsatisfactory\",\"order_change\",\"order_cancellation\",\"fraudulent_charge\",\"duplicated_charge\",\"other\"]},{\"name\":\"credit_status\",\"flag\":\"credit-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by credit status. Possible values are `available`, `consumed` or `voided`.\",\"enum\":[\"available\",\"consumed\",\"voided\"]},{\"name\":\"refund_status\",\"flag\":\"refund-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by refund status. Possible values are `pending`, `succeeded` or `failed`.\",\"enum\":[\"pending\",\"succeeded\",\"failed\"]},{\"name\":\"invoice_number\",\"flag\":\"invoice-number\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter credit notes by their related invoice number.\"},{\"name\":\"purchase_order_number\",\"flag\":\"purchase-order-number\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by the invoice purchase order number. The match is exact but case-insensitive.\"},{\"name\":\"amount_from\",\"flag\":\"amount-from\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter credit notes of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"amount_to\",\"flag\":\"amount-to\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter credit notes up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"types[]\",\"flag\":\"types\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter credit notes by the kind of amount they carry. `credit` matches credit notes with a credited amount, `refund` those with a refunded amount and `offset` those with an amount deducted from the invoice balance. A credit note can match several types.\"},{\"name\":\"self_billed\",\"flag\":\"self-billed\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter credit notes belonging to a self billed invoice. Possible values are `true` or `false`.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter credit notes by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"current-usage\",\"operation_id\":\"findCustomerCurrentUsage\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/current_usage\",\"summary\":\"Retrieve customer current usage\",\"description\":\"This endpoint enables the retrieval of the usage-based billing data for a customer within the current period.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application).\"},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":true,\"description\":\"The unique identifier of the subscription within your application.\"},{\"name\":\"apply_taxes\",\"flag\":\"apply-taxes\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Optional flag to determine if taxes should be applied. Defaults to `true` if not provided or if null.\\n\"},{\"name\":\"charge_id\",\"flag\":\"charge-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter usage to a specific charge by its Lago ID (UUID). Replaces deprecated `filter_by_charge_id`.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter usage to a specific charge by its code. Replaces deprecated `filter_by_charge_code`.\"},{\"name\":\"billable_metric_code\",\"flag\":\"billable-metric-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter usage to a specific billable metric by its code.\"},{\"name\":\"group\",\"flag\":\"group\",\"in\":\"query\",\"type\":\"object\",\"required\":false,\"description\":\"Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `group[cloud]=aws`. Replaces deprecated `filter_by_group`.\\n\"},{\"name\":\"filter_by_charge_id\",\"flag\":\"filter-by-charge-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"**Deprecated.** Filter usage to a specific charge by its Lago ID (UUID).\"},{\"name\":\"filter_by_charge_code\",\"flag\":\"filter-by-charge-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"**Deprecated.** Filter usage to a specific charge by its code.\"},{\"name\":\"filter_by_group\",\"flag\":\"filter-by-group\",\"in\":\"query\",\"type\":\"object\",\"required\":false,\"description\":\"**Deprecated.** Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `filter_by_group[cloud]=aws`.\\n\"},{\"name\":\"full_usage\",\"flag\":\"full-usage\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"When `true`, returns usage since the subscription started instead of the current billing period. It requires the granular lifetime usage add-on, at least one of `charge_id`, `charge_code`, `billable_metric_code` or `group` (or their deprecated `filter_by_*` equivalents), and a subscription without prorated charges. The request returns `405` when one of these conditions is not met.\\n\"},{\"name\":\"filter_by_presentation\",\"flag\":\"filter-by-presentation\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter `presentation_breakdowns` by a JSON-encoded array of presentation group key values. Only breakdowns matching the provided values will be returned. Pass an empty array to disable `presentation_breakdowns` entirely.\\n\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"delete\",\"operation_id\":\"destroyCustomer\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}\",\"summary\":\"Delete a customer\",\"description\":\"This endpoint deletes an existing customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"customers\",\"action\":\"get\",\"operation_id\":\"findCustomer\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}\",\"summary\":\"Retrieve a customer\",\"description\":\"This endpoint retrieves an existing customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"invoices\",\"operation_id\":\"findAllCustomerInvoices\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/invoices\",\"summary\":\"List all customer's invoices\",\"description\":\"This endpoint is used for retrieving all invoices of a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"amount_from\",\"flag\":\"amount-from\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter invoices of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"amount_to\",\"flag\":\"amount-to\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter invoices up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"issuing_date_from\",\"flag\":\"issuing-date-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices starting from a specific date.\"},{\"name\":\"issuing_date_to\",\"flag\":\"issuing-date-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices up to a specific date.\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by status. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`.\",\"enum\":[\"draft\",\"finalized\",\"failed\",\"pending\",\"voided\"]},{\"name\":\"statuses[]\",\"flag\":\"statuses\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter invoices by statuses. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`.\"},{\"name\":\"payment_status\",\"flag\":\"payment-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by payment status. Possible values are `pending`, `failed` or `succeeded`.\",\"enum\":[\"pending\",\"failed\",\"succeeded\"]},{\"name\":\"payment_statuses[]\",\"flag\":\"payment-statuses\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter invoices by payment statuses. Possible values are `pending`, `failed` or `succeeded`.\"},{\"name\":\"payment_overdue\",\"flag\":\"payment-overdue\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices by payment_overdue. Possible values are `true` or `false`.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Search the customer's invoices by id or number. Customer attributes are not searched here, because the list is already scoped to one customer.\"},{\"name\":\"payment_dispute_lost\",\"flag\":\"payment-dispute-lost\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices with a payment dispute lost. Possible values are `true` or `false`.\"},{\"name\":\"invoice_type\",\"flag\":\"invoice-type\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off`, `advance_charges` or `progressive_billing`.\",\"enum\":[\"subscription\",\"add_on\",\"credit\",\"one_off\",\"advance_charges\",\"progressive_billing\"]},{\"name\":\"self_billed\",\"flag\":\"self-billed\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices by self billed. Possible values are `true` or `false`.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by currency. Possible values ISO 4217 currency codes.\"},{\"name\":\"partially_paid\",\"flag\":\"partially-paid\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices that are partially paid. When `true`, only invoices with a non-zero amount paid that is below the total due are returned. When `false`, those invoices are excluded.\"},{\"name\":\"settlements[]\",\"flag\":\"settlements\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter invoices settled by at least one of the given settlement types. `payment` matches invoices settled by a payment, `credit_note` matches invoices settled by a credit note.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter invoices by billing entity codes. Possible values are the billing entity codes you have created.\"},{\"name\":\"metadata[key]\",\"flag\":\"metadata[key]\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for invoice without given metadata key. For example, `metadata[color]=blue`.\"},{\"name\":\"purchase_order_number\",\"flag\":\"purchase-order-number\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by the invoice purchase order number. The match is exact but case-insensitive.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"list\",\"operation_id\":\"findAllCustomers\",\"method\":\"GET\",\"path\":\"/customers\",\"summary\":\"List all customers\",\"description\":\"This endpoint retrieves all existing customers.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter customers by external ID.\"},{\"name\":\"account_type[]\",\"flag\":\"account-type\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter customers by account type.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter customers by billing entity codes.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter customers by search term. This will filter all customers whose name, firstname, lastname, legal name, external id or email contain the search term.\"},{\"name\":\"countries[]\",\"flag\":\"countries\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter customers by countries. Possible values are the ISO 3166-1 alpha-2 codes.\"},{\"name\":\"states[]\",\"flag\":\"states\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter customers by states.\"},{\"name\":\"zipcodes[]\",\"flag\":\"zipcodes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter customers by zipcodes.\"},{\"name\":\"currencies[]\",\"flag\":\"currencies\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter customers by currencies.\"},{\"name\":\"has_tax_identification_number\",\"flag\":\"has-tax-identification-number\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter customers by whether they have a tax identification number or not.\"},{\"name\":\"metadata[key]\",\"flag\":\"metadata[key]\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter customers by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for customers without given metadata key. For example, `metadata[is_synced]=true\\u0026metadata[last_synced_at]=`.\"},{\"name\":\"customer_type\",\"flag\":\"customer-type\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter customers by customer type.\",\"enum\":[\"company\",\"individual\"]},{\"name\":\"has_customer_type\",\"flag\":\"has-customer-type\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter customers by whether they have a customer type or not.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"past-usage\",\"operation_id\":\"findAllCustomerPastUsage\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/past_usage\",\"summary\":\"Retrieve customer past usage\",\"description\":\"This endpoint enables the retrieval of the usage-based billing data for a customer within past periods.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application).\"},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":true,\"description\":\"The unique identifier of the subscription within your application.\"},{\"name\":\"billable_metric_code\",\"flag\":\"billable-metric-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Billable metric code filter to apply to the charge usage\"},{\"name\":\"periods_count\",\"flag\":\"periods-count\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of past billing periods to return in the result.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"payment-requests\",\"operation_id\":\"findAllCustomerPaymentRequests\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/payment_requests\",\"summary\":\"List all customer's payment requests\",\"description\":\"This endpoint is used to list all existing payment requests of a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter the results by currency, expressed as an ISO 4217 code.\"},{\"name\":\"payment_status\",\"flag\":\"payment-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by payment status. Possible values are `pending`, `failed` or `succeeded`.\",\"enum\":[\"pending\",\"failed\",\"succeeded\"]},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter payment requests by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"payments\",\"operation_id\":\"findAllCustomerPayments\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/payments\",\"summary\":\"List all customer's payments\",\"description\":\"This endpoint is used to list all payments of a customer\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"invoice_id\",\"flag\":\"invoice-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"portal-url\",\"operation_id\":\"getCustomerPortalUrl\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/portal_url\",\"summary\":\"Get a customer portal URL\",\"description\":\"Retrieves an embeddable link for displaying a customer portal.\\n\\nThis endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal.\\n\\nThe portal lets the customer update their information and top up their wallets, so when API key permissions are enabled, the API key needs the `write` permission on `customer`.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing customer\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"projected-usage\",\"operation_id\":\"findCustomerProjectedUsage\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/projected_usage\",\"summary\":\"Retrieve customer current and projected usage\",\"description\":\"This endpoint enables the retrieval of the usage-based billing data for a customer within the current period. It also returns the projected usage for the current period based on the current usage.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application).\"},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":true,\"description\":\"The unique identifier of the subscription within your application.\"},{\"name\":\"apply_taxes\",\"flag\":\"apply-taxes\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Optional flag to determine if taxes should be applied. Defaults to `true` if not provided or if null.\\n\"},{\"name\":\"charge_id\",\"flag\":\"charge-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter usage to a specific charge by its Lago ID (UUID).\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter usage to a specific charge by its code.\"},{\"name\":\"billable_metric_code\",\"flag\":\"billable-metric-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter usage to a specific billable metric by its code.\"},{\"name\":\"group\",\"flag\":\"group\",\"in\":\"query\",\"type\":\"object\",\"required\":false,\"description\":\"Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `group[cloud]=aws`.\\n\"},{\"name\":\"filter_by_presentation\",\"flag\":\"filter-by-presentation\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter `presentation_breakdowns` by a JSON-encoded array of presentation group key values. Only breakdowns matching the provided values will be returned. Pass an empty array to disable `presentation_breakdowns` entirely.\\n\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"customers\",\"action\":\"subscriptions\",\"operation_id\":\"findAllCustomerSubscriptions\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/subscriptions\",\"summary\":\"List all customer's subscriptions\",\"description\":\"This endpoint retrieves all active subscriptions for a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/customers/object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter the results by currency, expressed as an ISO 4217 code.\"},{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The subscription external unique identifier (provided by your own application).\"},{\"name\":\"plan_code\",\"flag\":\"plan-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans.\"},{\"name\":\"overridden\",\"flag\":\"overridden\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"When set, filters subscriptions by whether their plan is an override of a parent plan. `true` returns only subscriptions on overridden plans; `false` returns only those on standard (non-overridden) plans.\"},{\"name\":\"status[]\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`, `incomplete`.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter subscriptions by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"entitlements\",\"action\":\"create\",\"operation_id\":\"createEntitlement\",\"method\":\"POST\",\"path\":\"/plans/{code}/entitlements\",\"summary\":\"Create an entitlement\",\"description\":\"This endpoint creates new entitlements by adding features to a plan. Note that all existing entitlements will be deleted and replaced by the ones provided. Sending an empty `entitlements` object, or omitting the key, therefore removes every entitlement of the plan. To add a new entitlement without removing the existing ones, use PATCH. The feature must exist and all privileges must be valid for the feature.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"}],\"body\":{\"wrapper\":\"entitlements\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"entitlements\",\"action\":\"destroy\",\"operation_id\":\"destroyEntitlement\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/entitlements/{feature_code}\",\"summary\":\"Delete an entitlement\",\"description\":\"This endpoint deletes an existing entitlement by removing the feature from the plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"feature_code\",\"flag\":\"feature-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"entitlements\",\"action\":\"destroy-subscription-entitlement\",\"operation_id\":\"destroySubscriptionEntitlement\",\"method\":\"DELETE\",\"path\":\"/subscriptions/{external_id}/entitlements/{feature_code}\",\"summary\":\"Remove an entitlement from a subscription\",\"description\":\"This endpoint removes a specific feature entitlement from a subscription. The plan keeps the feature and other subscriptions are not affected, but this subscription stops getting it. It returns the full list of entitlements remaining on the subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"feature_code\",\"flag\":\"feature-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"entitlements\",\"action\":\"destroy-subscription-entitlement-privilege\",\"operation_id\":\"destroySubscriptionEntitlementPrivilege\",\"method\":\"DELETE\",\"path\":\"/subscriptions/{external_id}/entitlements/{feature_code}/privileges/{privilege_code}\",\"summary\":\"Remove a privilege from a subscription entitlement override\",\"description\":\"This endpoint removes a specific privilege from a subscription entitlement. The plan keeps the privilege and other subscriptions are not affected, but this subscription stops getting it. It returns the full list of entitlements remaining on the subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"feature_code\",\"flag\":\"feature-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"},{\"name\":\"privilege_code\",\"flag\":\"privilege-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the privilege to remove from the subscription entitlement override.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"entitlements\",\"action\":\"get\",\"operation_id\":\"findEntitlement\",\"method\":\"GET\",\"path\":\"/plans/{code}/entitlements/{feature_code}\",\"summary\":\"Retrieve an entitlement\",\"description\":\"This endpoint retrieves a specific entitlement for a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"feature_code\",\"flag\":\"feature-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"entitlements\",\"action\":\"list\",\"operation_id\":\"findAllEntitlements\",\"method\":\"GET\",\"path\":\"/plans/{code}/entitlements\",\"summary\":\"List all entitlements\",\"description\":\"This endpoint retrieves all entitlements for a specific plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"entitlements\",\"action\":\"list-subscription-entitlements\",\"operation_id\":\"findAllSubscriptionEntitlements\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/entitlements\",\"summary\":\"List all subscription entitlements\",\"description\":\"This endpoint retrieves all entitlements for a specific subscription, including both plan entitlements and any subscription-specific overrides.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"entitlements\",\"action\":\"remove-entitlement-privilege\",\"operation_id\":\"removeEntitlementPrivilege\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/entitlements/{feature_code}/privileges/{privilege_code}\",\"summary\":\"Remove a privilege from an entitlement\",\"description\":\"This endpoint removes a specific privilege and its value from an entitlement. The privilege remains untouched on the original feature.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"feature_code\",\"flag\":\"feature-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"},{\"name\":\"privilege_code\",\"flag\":\"privilege-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the privilege to remove from the entitlement.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"entitlements\",\"action\":\"update\",\"operation_id\":\"updateEntitlement\",\"method\":\"PATCH\",\"path\":\"/plans/{code}/entitlements\",\"summary\":\"Partial update of an entitlement\",\"description\":\"This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"}],\"body\":{\"wrapper\":\"entitlements\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"entitlements\",\"action\":\"update-subscription-entitlements\",\"operation_id\":\"updateSubscriptionEntitlements\",\"method\":\"PATCH\",\"path\":\"/subscriptions/{external_id}/entitlements\",\"summary\":\"Update subscription entitlements\",\"description\":\"This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"body\":{\"wrapper\":\"entitlements\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"events\",\"action\":\"batch\",\"operation_id\":\"createBatchEvents\",\"method\":\"POST\",\"path\":\"/events/batch\",\"summary\":\"Batch multiple events\",\"description\":\"This endpoint can be used to send a batch of usage records. Each request may include up to 100 events.\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"body\":{\"fields\":[{\"path\":[\"events\"],\"flag\":\"events\",\"type\":\"array\",\"required\":true,\"complex\":true}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"events\",\"action\":\"batch-estimate-instant-fees\",\"operation_id\":\"eventBatchEstimateInstantFees\",\"method\":\"POST\",\"path\":\"/events/batch_estimate_instant_fees\",\"summary\":\"Batch estimate instant fees for a pay in advance charge\",\"description\":\"Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance standard or percentage charges\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"body\":{\"fields\":[{\"path\":[\"events\"],\"flag\":\"events\",\"type\":\"array\",\"required\":true,\"complex\":true}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"events\",\"action\":\"estimate-fees\",\"operation_id\":\"eventEstimateFees\",\"method\":\"POST\",\"path\":\"/events/estimate_fees\",\"summary\":\"Estimate fees for a pay in advance charge\",\"description\":\"Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance charges\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"body\":{\"wrapper\":\"event\",\"fields\":[{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.\"},{\"path\":[\"external_subscription_id\"],\"flag\":\"external-subscription-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The unique identifier of the subscription within your application.\"},{\"path\":[\"precise_total_amount_cents\"],\"flag\":\"precise-total-amount-cents\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The precise total amount in cents with precision used by the `dynamic` pricing model to compute the estimated usage amount. Defaults to `0` when omitted.\"},{\"path\":[\"properties\"],\"flag\":\"properties\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. Any property of the targeted billable metric can be sent here, in addition to the documented fields below.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"events\",\"action\":\"estimate-instant-fees\",\"operation_id\":\"eventEstimateInstantFees\",\"method\":\"POST\",\"path\":\"/events/estimate_instant_fees\",\"summary\":\"Estimate instant fees for a pay in advance charge\",\"description\":\"Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance standard or percentage charges\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"body\":{\"wrapper\":\"event\",\"fields\":[{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.\"},{\"path\":[\"external_subscription_id\"],\"flag\":\"external-subscription-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The unique identifier of the subscription within your application.\"},{\"path\":[\"properties\"],\"flag\":\"properties\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.\"},{\"path\":[\"transaction_id\"],\"flag\":\"transaction-id\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This field represents a unique identifier for the event.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"events\",\"action\":\"get\",\"operation_id\":\"findEvent\",\"method\":\"GET\",\"path\":\"/events/{transaction_id}\",\"summary\":\"Retrieve a specific event\",\"description\":\"This endpoint is used for retrieving a specific usage measurement event that has been sent to a subscription.\\n\\nNote that transaction_id is unique per external_subscription_id so multiple subscriptions can share the same transaction_id. This endpoint will only return the first event found with the given transaction_id.\\n\\nWARNING: If your Lago organization is configured to use the Clickhouse-based event pipeline, multiple events can share the same `transaction_id` (with different timestamps). This endpoint will only return the first event found.\\n\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"parameters\":[{\"name\":\"transaction_id\",\"flag\":\"transaction-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"This field represents the unique identifier sent for this specific event (must be URL encoded).\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"events\",\"action\":\"list\",\"operation_id\":\"findAllEvents\",\"method\":\"GET\",\"path\":\"/events\",\"summary\":\"List all events\",\"description\":\"This endpoint is used for retrieving all events.\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"External subscription ID\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter events by code.\"},{\"name\":\"timestamp_from_started_at\",\"flag\":\"timestamp-from-started-at\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Requires `external_subscription_id` to be set, and cannot be combined with `timestamp_from`. Filter events by timestamp after the subscription started at datetime.\"},{\"name\":\"timestamp_from\",\"flag\":\"timestamp-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter events by timestamp starting from a specific date.\"},{\"name\":\"timestamp_to\",\"flag\":\"timestamp-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter events by timestamp up to a specific date.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"events\",\"action\":\"send\",\"operation_id\":\"createEvent\",\"method\":\"POST\",\"path\":\"/events\",\"summary\":\"Send a usage event\",\"description\":\"This endpoint is used for transmitting a usage measurement event to a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/events/event-object\",\"body\":{\"wrapper\":\"event\",\"fields\":[{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.\"},{\"path\":[\"external_subscription_id\"],\"flag\":\"external-subscription-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The unique identifier of the subscription in your application. This field is mandatory in order to link events to the correct customer subscription.\"},{\"path\":[\"precise_total_amount_cents\"],\"flag\":\"precise-total-amount-cents\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The precise total amount in cents with precision used by the `dynamic` pricing model to compute the usage amount.\"},{\"path\":[\"properties\"],\"flag\":\"properties\",\"type\":\"object\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.\"},{\"path\":[\"timestamp\"],\"flag\":\"timestamp\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).\\nIf this timestamp is not provided, the API will automatically set it to the time of event reception.\\nYou can also provide milliseconds precision by appending decimals to the timestamp.\\n\"},{\"path\":[\"transaction_id\"],\"flag\":\"transaction-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"This field represents a unique identifier for the event.\\nIt is crucial for ensuring idempotency, meaning that each event can be uniquely identified and processed without causing any unintended side effects.\\n\\nWARNING: If the Lago organization is configured to use the new Clickhouse-based event pipeline (designed for high-volume processing), the idempotency logic is handled differently.\\nEvent uniqueness is maintained with both `transaction_id` and `timestamp` fields.\\nIf a new event arrives with identical values for these two fields as an existing event, the new one will overwrite the previous event rather than being rejected.\\n\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"features\",\"action\":\"create\",\"operation_id\":\"createFeature\",\"method\":\"POST\",\"path\":\"/features\",\"summary\":\"Create a feature\",\"description\":\"This endpoint creates a new feature representing an entitlement component of your application.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/features/feature-object\",\"body\":{\"wrapper\":\"feature\",\"fields\":[{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code used to identify the feature. Max 255 characters.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Internal description of the feature. Max 600 characters.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Name of the feature. Max 255 characters.\"},{\"path\":[\"privileges\"],\"flag\":\"privileges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Privileges associated with this feature. Can be empty. Each privilege code must appear only once in the list.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"features\",\"action\":\"delete\",\"operation_id\":\"destroyFeature\",\"method\":\"DELETE\",\"path\":\"/features/{code}\",\"summary\":\"Delete a feature\",\"description\":\"This endpoint deletes an existing feature representing an entitlement component of your application. Deleting a feature will remove it from all plans and subscriptions.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/features/feature-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"features\",\"action\":\"delete-feature-privilege\",\"operation_id\":\"deleteFeaturePrivilege\",\"method\":\"DELETE\",\"path\":\"/features/{code}/privileges/{privilege_code}\",\"summary\":\"Delete a privilege\",\"description\":\"This endpoint deletes a privilege from a feature. Deleting a privilege removes it from all plans and subscriptions.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/features/feature-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"},{\"name\":\"privilege_code\",\"flag\":\"privilege-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing privilege.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"features\",\"action\":\"get\",\"operation_id\":\"findFeature\",\"method\":\"GET\",\"path\":\"/features/{code}\",\"summary\":\"Retrieve a feature\",\"description\":\"This endpoint retrieves an existing feature that represents an entitlement component of your application. The feature is identified by its unique code.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/features/feature-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"features\",\"action\":\"list\",\"operation_id\":\"findAllFeatures\",\"method\":\"GET\",\"path\":\"/features\",\"summary\":\"List all features\",\"description\":\"This endpoint retrieves all existing features that represent entitlement components of your application.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/features/feature-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter features by search term. The term is matched against the name, the code and the description of the feature.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"features\",\"action\":\"update\",\"operation_id\":\"updateFeature\",\"method\":\"PUT\",\"path\":\"/features/{code}\",\"summary\":\"Update a feature\",\"description\":\"This endpoint updates an existing feature representing an entitlement component of your application. Only the fields present in the payload are updated. Privileges are matched by their code, an unknown code adds a new privilege and a known one updates its name and adds the select options of the payload to the existing ones. The value type of an existing privilege cannot be changed. Privileges left out of the payload are kept, use the delete privilege endpoint to remove one.\",\"docs_url\":\"https://getlago.com/docs/api-reference/entitlements/features/feature-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing feature.\"}],\"body\":{\"wrapper\":\"feature\",\"fields\":[{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Internal description of the feature. Max 600 characters.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Name of the feature. Max 255 characters.\"},{\"path\":[\"privileges\"],\"flag\":\"privileges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Privileges associated with this feature. Can be empty. Each privilege code must appear only once in the list.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"fees\",\"action\":\"delete\",\"operation_id\":\"deleteFee\",\"method\":\"DELETE\",\"path\":\"/fees/{lago_id}\",\"summary\":\"Delete a fee\",\"description\":\"This endpoint is used for deleting a specific fee that has not yet been invoiced\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object#fee-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"fees\",\"action\":\"get\",\"operation_id\":\"findFee\",\"method\":\"GET\",\"path\":\"/fees/{lago_id}\",\"summary\":\"Retrieve a specific fee\",\"description\":\"This endpoint is used for retrieving a specific fee that has been issued.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object#fee-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"fees\",\"action\":\"list\",\"operation_id\":\"findAllFees\",\"method\":\"GET\",\"path\":\"/fees\",\"summary\":\"List all fees\",\"description\":\"This endpoint is used for retrieving all fees that have been issued.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object#fee-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"name\":\"external_subscription_id\",\"flag\":\"external-subscription-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"External subscription ID\"},{\"name\":\"event_transaction_id\",\"flag\":\"event-transaction-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results by event transaction ID\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results by the fee's currency.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"name\":\"fee_type\",\"flag\":\"fee-type\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The fee type. Possible values are `add_on`, `charge`, `fixed_charge`, `credit`, `subscription` or `commitment`.\",\"enum\":[\"charge\",\"fixed_charge\",\"add_on\",\"subscription\",\"credit\",\"commitment\"]},{\"name\":\"billable_metric_code\",\"flag\":\"billable-metric-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results by the `code` of the billable metric attached to the fee. Only applies to `charge` types.\"},{\"name\":\"payment_status\",\"flag\":\"payment-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The possible values for this field are `pending`, `succeeded`, `failed` and `refunded`.\",\"enum\":[\"pending\",\"succeeded\",\"failed\",\"refunded\"]},{\"name\":\"created_at_from\",\"flag\":\"created-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results created at or after this date and time in UTC.\"},{\"name\":\"created_at_to\",\"flag\":\"created-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results created at or before this date and time in UTC.\"},{\"name\":\"succeeded_at_from\",\"flag\":\"succeeded-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results with a payment success at or after this date and time in UTC.\"},{\"name\":\"succeeded_at_to\",\"flag\":\"succeeded-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results with a payment success at or before this date and time in UTC.\"},{\"name\":\"failed_at_from\",\"flag\":\"failed-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results with a payment failure at or after this date and time in UTC.\"},{\"name\":\"failed_at_to\",\"flag\":\"failed-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results with a payment failure at or before this date and time in UTC.\"},{\"name\":\"refunded_at_from\",\"flag\":\"refunded-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results with a payment refund at or after this date and time in UTC.\"},{\"name\":\"refunded_at_to\",\"flag\":\"refunded-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter results with a payment refund at or before this date and time in UTC.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"fees\",\"action\":\"update\",\"operation_id\":\"updateFee\",\"method\":\"PUT\",\"path\":\"/fees/{lago_id}\",\"summary\":\"Update a fee\",\"description\":\"This endpoint is used for updating the payment status of a specific fee. Only a fee that is not attached to an invoice can be updated; once the fee is on an invoice, its payment status follows the invoice and the endpoint returns a `405` error.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object#fee-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.\"}],\"body\":{\"wrapper\":\"fee\",\"fields\":[{\"path\":[\"payment_status\"],\"flag\":\"payment-status\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The payment status of the fee. Possible values are `pending`, `succeeded`, `failed` or `refunded`.\",\"enum\":[\"pending\",\"succeeded\",\"failed\",\"refunded\"]}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"create\",\"operation_id\":\"createInvoice\",\"method\":\"POST\",\"path\":\"/invoices\",\"summary\":\"Create a one-off invoice\",\"description\":\"This endpoint is used for issuing a one-off invoice.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"body\":{\"wrapper\":\"invoice\",\"fields\":[{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity to issue the invoice from. If not provided, the customer's billing entity is used.\"},{\"path\":[\"currency\"],\"flag\":\"currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the invoice.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"external_customer_id\"],\"flag\":\"external-customer-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"path\":[\"fees\"],\"flag\":\"fees\",\"type\":\"array\",\"required\":true,\"complex\":true},{\"path\":[\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number to associate with the invoice.\"},{\"path\":[\"skip_psp\"],\"flag\":\"skip-psp\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"If true, the invoice will be created but not sent to the payment provider.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"delete\",\"operation_id\":\"deleteInvoice\",\"method\":\"DELETE\",\"path\":\"/invoices/{lago_id}\",\"summary\":\"Delete a draft invoice\",\"description\":\"This endpoint is used for permanently deleting a `draft` invoice. Deleting a draft invoice removes it entirely: it never becomes accounts receivable, consumes no invoice number, and disappears from every list, export, and analytics surface. Only invoices in the `draft` status can be deleted; for a `finalized` invoice, void it instead.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"download\",\"operation_id\":\"downloadInvoice\",\"method\":\"POST\",\"path\":\"/invoices/{lago_id}/download\",\"summary\":\"Download an invoice PDF\",\"description\":\"This endpoint is used for downloading a specific invoice PDF document. Only `finalized` invoices can be downloaded; any other invoice returns a `404` error.\\nWhen the PDF has already been generated, the invoice object is returned and its `file_url` points to the document. When it has not been generated yet, the response is a `200` with an empty body and the generation starts in the background. Call the endpoint again to get the invoice object with its `file_url`.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"invoices\",\"action\":\"finalize\",\"operation_id\":\"finalizeInvoice\",\"method\":\"PUT\",\"path\":\"/invoices/{lago_id}/finalize\",\"summary\":\"Finalize a draft invoice\",\"description\":\"This endpoint is used for finalizing a draft invoice.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"get\",\"operation_id\":\"findInvoice\",\"method\":\"GET\",\"path\":\"/invoices/{lago_id}\",\"summary\":\"Retrieve an invoice\",\"description\":\"This endpoint is used for retrieving a specific invoice that has been issued.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"invoices\",\"action\":\"list\",\"operation_id\":\"findAllInvoices\",\"method\":\"GET\",\"path\":\"/invoices\",\"summary\":\"List all invoices\",\"description\":\"This endpoint is used for retrieving all invoices.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"name\":\"amount_from\",\"flag\":\"amount-from\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter invoices of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"amount_to\",\"flag\":\"amount-to\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Filter invoices up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.\"},{\"name\":\"issuing_date_from\",\"flag\":\"issuing-date-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices starting from a specific date.\"},{\"name\":\"issuing_date_to\",\"flag\":\"issuing-date-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices up to a specific date.\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by status. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`.\",\"enum\":[\"draft\",\"finalized\",\"failed\",\"pending\",\"voided\"]},{\"name\":\"statuses[]\",\"flag\":\"statuses\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter invoices by statuses. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`.\"},{\"name\":\"payment_status\",\"flag\":\"payment-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by payment status. Possible values are `pending`, `failed` or `succeeded`.\",\"enum\":[\"pending\",\"failed\",\"succeeded\"]},{\"name\":\"payment_statuses[]\",\"flag\":\"payment-statuses\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter invoices by payment statuses. Possible values are `pending`, `failed` or `succeeded`.\"},{\"name\":\"payment_overdue\",\"flag\":\"payment-overdue\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices by payment_overdue. Possible values are `true` or `false`.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Search invoices by id, number, purchase order number, or by the name, legal name, first name, last name, external_id or email of the customer.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by currency. Possible values ISO 4217 currency codes.\"},{\"name\":\"payment_dispute_lost\",\"flag\":\"payment-dispute-lost\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices with a payment dispute lost. Possible values are `true` or `false`.\"},{\"name\":\"partially_paid\",\"flag\":\"partially-paid\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices that are partially paid. When `true`, only invoices with a non-zero amount paid that is below the total due are returned. When `false`, those invoices are excluded.\"},{\"name\":\"settlements[]\",\"flag\":\"settlements\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter invoices settled by at least one of the given settlement types. `payment` matches invoices settled by a payment, `credit_note` matches invoices settled by a credit note.\"},{\"name\":\"invoice_type\",\"flag\":\"invoice-type\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off`, `advance_charges` or `progressive_billing`.\",\"enum\":[\"subscription\",\"add_on\",\"credit\",\"one_off\",\"advance_charges\",\"progressive_billing\"]},{\"name\":\"self_billed\",\"flag\":\"self-billed\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"Filter invoices by self billed. Possible values are `true` or `false`.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter invoices by billing entity codes. Possible values are the billing entity codes you have created.\"},{\"name\":\"metadata[key]\",\"flag\":\"metadata[key]\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter invoices by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for invoice without given metadata key. For example, `metadata[color]=blue`.\"},{\"name\":\"purchase_order_number\",\"flag\":\"purchase-order-number\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by the invoice purchase order number. The match is exact but case-insensitive.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"invoices\",\"action\":\"lose-dispute\",\"operation_id\":\"loseDisputeInvoice\",\"method\":\"POST\",\"path\":\"/invoices/{lago_id}/lose_dispute\",\"summary\":\"Mark an invoice payment dispute as lost\",\"description\":\"This endpoint is used for setting invoice's payment dispute as lost.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"payment-url\",\"operation_id\":\"invoicePaymentUrl\",\"method\":\"POST\",\"path\":\"/invoices/{lago_id}/payment_url\",\"summary\":\"Generate a payment URL\",\"description\":\"This endpoint generates a checkout link for a specific invoice.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"invoices\",\"action\":\"preview\",\"operation_id\":\"invoicePreview\",\"method\":\"POST\",\"path\":\"/invoices/preview\",\"summary\":\"Create an invoice preview\",\"description\":\"This endpoint is used for generating invoice preview.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"body\":{\"fields\":[{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity to which will be associated a customer if the external_id is not provided. If billing_entity_code is not provided, default billing_entity of organization will be used.\"},{\"path\":[\"billing_time\"],\"flag\":\"billing-time\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).\",\"enum\":[\"calendar\",\"anniversary\"]},{\"path\":[\"coupons\"],\"flag\":\"coupons\",\"type\":\"array\",\"required\":false,\"complex\":true},{\"path\":[\"customer\",\"address_line1\"],\"flag\":\"address-line1\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The first line of the billing address\"},{\"path\":[\"customer\",\"address_line2\"],\"flag\":\"address-line2\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The second line of the billing address\"},{\"path\":[\"customer\",\"city\"],\"flag\":\"city\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The city of the customer's billing address\"},{\"path\":[\"customer\",\"country\"],\"flag\":\"country\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)\",\"enum\":[\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"customer\",\"currency\"],\"flag\":\"currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the invoice.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"customer\",\"external_id\"],\"flag\":\"external-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"path\":[\"customer\",\"integration_customers\"],\"flag\":\"integration-customers\",\"type\":\"array\",\"required\":false,\"complex\":true},{\"path\":[\"customer\",\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The full name of the customer\"},{\"path\":[\"customer\",\"shipping_address\",\"address_line1\"],\"flag\":\"shipping-address-address-line1\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The first line of the shipping address\"},{\"path\":[\"customer\",\"shipping_address\",\"address_line2\"],\"flag\":\"shipping-address-address-line2\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The second line of the shipping address\"},{\"path\":[\"customer\",\"shipping_address\",\"city\"],\"flag\":\"shipping-address-city\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The city of the customer's shipping address\"},{\"path\":[\"customer\",\"shipping_address\",\"country\"],\"flag\":\"shipping-address-country\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Country code of the customer's shipping address. Format must be ISO 3166 (alpha-2)\",\"enum\":[\"\",\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"customer\",\"shipping_address\",\"state\"],\"flag\":\"shipping-address-state\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The state of the customer's shipping address\"},{\"path\":[\"customer\",\"shipping_address\",\"zipcode\"],\"flag\":\"shipping-address-zipcode\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The zipcode of the customer's shipping address\"},{\"path\":[\"customer\",\"state\"],\"flag\":\"state\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The state of the customer's billing address\"},{\"path\":[\"customer\",\"tax_identification_number\"],\"flag\":\"tax-identification-number\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The tax identification number of the customer\"},{\"path\":[\"customer\",\"timezone\"],\"flag\":\"timezone\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone\",\"enum\":[\"UTC\",\"Africa/Algiers\",\"Africa/Cairo\",\"Africa/Casablanca\",\"Africa/Harare\",\"Africa/Johannesburg\",\"Africa/Monrovia\",\"Africa/Nairobi\",\"America/Argentina/Buenos_Aires\",\"America/Bogota\",\"America/Caracas\",\"America/Chicago\",\"America/Chihuahua\",\"America/Denver\",\"America/Guatemala\",\"America/Guyana\",\"America/Halifax\",\"America/Indiana/Indianapolis\",\"America/Juneau\",\"America/La_Paz\",\"America/Lima\",\"America/Los_Angeles\",\"America/Mazatlan\",\"America/Mexico_City\",\"America/Monterrey\",\"America/Montevideo\",\"America/New_York\",\"America/Nuuk\",\"America/Phoenix\",\"America/Puerto_Rico\",\"America/Regina\",\"America/Santiago\",\"America/Sao_Paulo\",\"America/St_Johns\",\"America/Tijuana\",\"Asia/Almaty\",\"Asia/Baghdad\",\"Asia/Baku\",\"Asia/Bangkok\",\"Asia/Chongqing\",\"Asia/Colombo\",\"Asia/Dhaka\",\"Asia/Hong_Kong\",\"Asia/Irkutsk\",\"Asia/Jakarta\",\"Asia/Jerusalem\",\"Asia/Kabul\",\"Asia/Kamchatka\",\"Asia/Karachi\",\"Asia/Kathmandu\",\"Asia/Kolkata\",\"Asia/Krasnoyarsk\",\"Asia/Kuala_Lumpur\",\"Asia/Kuwait\",\"Asia/Magadan\",\"Asia/Muscat\",\"Asia/Novosibirsk\",\"Asia/Riyadh\",\"Asia/Seoul\",\"Asia/Shanghai\",\"Asia/Singapore\",\"Asia/Srednekolymsk\",\"Asia/Taipei\",\"Asia/Tashkent\",\"Asia/Tbilisi\",\"Asia/Tehran\",\"Asia/Tokyo\",\"Asia/Ulaanbaatar\",\"Asia/Urumqi\",\"Asia/Vladivostok\",\"Asia/Yakutsk\",\"Asia/Yangon\",\"Asia/Yekaterinburg\",\"Asia/Yerevan\",\"Atlantic/Azores\",\"Atlantic/Cape_Verde\",\"Atlantic/South_Georgia\",\"Australia/Adelaide\",\"Australia/Brisbane\",\"Australia/Darwin\",\"Australia/Hobart\",\"Australia/Melbourne\",\"Australia/Perth\",\"Australia/Sydney\",\"Europe/Amsterdam\",\"Europe/Athens\",\"Europe/Belgrade\",\"Europe/Berlin\",\"Europe/Bratislava\",\"Europe/Brussels\",\"Europe/Bucharest\",\"Europe/Budapest\",\"Europe/Copenhagen\",\"Europe/Dublin\",\"Europe/Helsinki\",\"Europe/Istanbul\",\"Europe/Kaliningrad\",\"Europe/Kyiv\",\"Europe/Lisbon\",\"Europe/Ljubljana\",\"Europe/London\",\"Europe/Madrid\",\"Europe/Minsk\",\"Europe/Moscow\",\"Europe/Paris\",\"Europe/Prague\",\"Europe/Riga\",\"Europe/Rome\",\"Europe/Samara\",\"Europe/Sarajevo\",\"Europe/Skopje\",\"Europe/Sofia\",\"Europe/Stockholm\",\"Europe/Tallinn\",\"Europe/Vienna\",\"Europe/Vilnius\",\"Europe/Volgograd\",\"Europe/Warsaw\",\"Europe/Zagreb\",\"Europe/Zurich\",\"GMT+12\",\"Pacific/Apia\",\"Pacific/Auckland\",\"Pacific/Chatham\",\"Pacific/Fakaofo\",\"Pacific/Fiji\",\"Pacific/Guadalcanal\",\"Pacific/Guam\",\"Pacific/Honolulu\",\"Pacific/Majuro\",\"Pacific/Midway\",\"Pacific/Noumea\",\"Pacific/Pago_Pago\",\"Pacific/Port_Moresby\",\"Pacific/Tongatapu\"]},{\"path\":[\"customer\",\"zipcode\"],\"flag\":\"zipcode\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The zipcode of the customer's billing address.\"},{\"path\":[\"plan_code\"],\"flag\":\"plan-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.\"},{\"path\":[\"subscription_at\"],\"flag\":\"subscription-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"subscriptions\",\"external_ids\"],\"flag\":\"subscriptions-external-ids\",\"type\":\"array\",\"required\":false,\"complex\":true},{\"path\":[\"subscriptions\",\"plan_code\"],\"flag\":\"subscriptions-plan-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the plan. It serves as a unique identifier associated with the new plan to which the customer is upgrading or downgrading.\"},{\"path\":[\"subscriptions\",\"terminated_at\"],\"flag\":\"subscriptions-terminated-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The date and time when the subscription is terminated. It should defined in the future.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"invoices\",\"action\":\"refresh\",\"operation_id\":\"refreshInvoice\",\"method\":\"PUT\",\"path\":\"/invoices/{lago_id}/refresh\",\"summary\":\"Refresh a draft invoice\",\"description\":\"This endpoint is used for refreshing a draft invoice.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"retry\",\"operation_id\":\"retryInvoice\",\"method\":\"POST\",\"path\":\"/invoices/{lago_id}/retry\",\"summary\":\"Retry generation of a failed invoice\",\"description\":\"This endpoint is used for retrying to generate a failed invoice.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"retry-payment\",\"operation_id\":\"retryPayment\",\"method\":\"POST\",\"path\":\"/invoices/{lago_id}/retry_payment\",\"summary\":\"Retry an invoice payment\",\"description\":\"This endpoint resends an invoice for collection and retry a payment.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"body\":{\"wrapper\":\"payment_method\",\"fields\":[{\"path\":[\"payment_method_id\"],\"flag\":\"payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method_type\"],\"flag\":\"payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]}],\"required\":false},\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"update\",\"operation_id\":\"updateInvoice\",\"method\":\"PUT\",\"path\":\"/invoices/{lago_id}\",\"summary\":\"Update an invoice\",\"description\":\"This endpoint is used for updating an existing invoice. A voided invoice cannot be updated and returns a `405` error.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"body\":{\"wrapper\":\"invoice\",\"fields\":[{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"array\",\"required\":false,\"complex\":true},{\"path\":[\"payment_status\"],\"flag\":\"payment-status\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The payment status of the invoice. Possible values are `pending`, `failed` or `succeeded`.\",\"enum\":[\"pending\",\"succeeded\",\"failed\"]}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"invoices\",\"action\":\"void\",\"operation_id\":\"voidInvoice\",\"method\":\"POST\",\"path\":\"/invoices/{lago_id}/void\",\"summary\":\"Void an invoice\",\"description\":\"This endpoint is used for voiding an invoice.\\n• When no body parameters are provided, the invoice can be voided only if it is in a `finalized` status and its payment status is NOT `succeeded`.\\n• When `generate_credit_note` is provided (optionally with `refund_amount` and/or `credit_amount`), this validation is bypassed: the invoice is forcibly voided and a credit note is generated. If the specified refund/credit amounts do not cover the full invoice total, the remainder is issued on a second credit note that is created and immediately voided.\",\"docs_url\":\"https://getlago.com/docs/api-reference/invoices/invoice-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"body\":{\"fields\":[{\"path\":[\"credit_amount\"],\"flag\":\"credit-amount\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"Portion of the invoice amount (in cents) to be credited to the customer's balance in the generated credit note.\"},{\"path\":[\"generate_credit_note\"],\"flag\":\"generate-credit-note\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to force voiding the invoice and generate a credit note.\"},{\"path\":[\"refund_amount\"],\"flag\":\"refund-amount\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"Portion of the invoice amount (in cents) to be refunded to the customer in the generated credit note.\"}],\"required\":false},\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"order-forms\",\"action\":\"get\",\"operation_id\":\"findOrderForm\",\"method\":\"GET\",\"path\":\"/order_forms/{lago_id}\",\"summary\":\"Retrieve an order form\",\"description\":\"This endpoint retrieves a specific order form.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the order form within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the order form's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"order-forms\",\"action\":\"list\",\"operation_id\":\"findAllOrderForms\",\"method\":\"GET\",\"path\":\"/order_forms\",\"summary\":\"List all order forms\",\"description\":\"This endpoint is used to list all existing order forms.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"status[]\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter order forms by status. Possible values are `generated`, `signed`, `expired` and `voided`.\"},{\"name\":\"customer_id[]\",\"flag\":\"customer-id\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter order forms by the Lago identifiers of their customers.\"},{\"name\":\"number[]\",\"flag\":\"number\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter order forms by their number, as assigned by Lago.\"},{\"name\":\"quote_number[]\",\"flag\":\"quote-number\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter order forms by the number of the quote they come from.\"},{\"name\":\"owner_id[]\",\"flag\":\"owner-id\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter order forms by the Lago identifiers of the users owning the quote they come from.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Search order forms by number.\"},{\"name\":\"created_at_from\",\"flag\":\"created-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter order forms created from a specific date and time, in UTC (ISO 8601).\"},{\"name\":\"created_at_to\",\"flag\":\"created-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter order forms created up to a specific date and time, in UTC (ISO 8601).\"},{\"name\":\"expires_at_from\",\"flag\":\"expires-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter order forms expiring from a specific date and time, in UTC (ISO 8601). Order forms that never expire are excluded.\"},{\"name\":\"expires_at_to\",\"flag\":\"expires-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter order forms expiring up to a specific date and time, in UTC (ISO 8601). Order forms that never expire are excluded.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"order-forms\",\"action\":\"mark-as-signed\",\"operation_id\":\"markOrderFormAsSigned\",\"method\":\"POST\",\"path\":\"/order_forms/{lago_id}/mark_as_signed\",\"summary\":\"Mark an order form as signed\",\"description\":\"This endpoint records the customer's signature on an order form, and creates the order that carries the quoted deal out.\\nOnly a `generated` order form can be signed, so a `422` is returned once the order form has been signed, has expired or has been voided.\\nAn `execute_at` landing on or after the day the quoted deal stops being executable is rejected as well, so the order can never be scheduled past the term it bills.\\nA concurrent write on the same quote is reported as a `422` rather than retried, so a duplicated call can fail while the first one is still in flight.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the order form within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the order form's record within the Lago system.\"}],\"body\":{\"wrapper\":\"order_form\",\"fields\":[{\"path\":[\"execute_at\"],\"flag\":\"execute-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The date and time in UTC (ISO 8601) when Lago executes the order created from the order form. It must be in the future, requires `execution_mode` to be set, and must fall strictly before the day the quoted deal stops being executable, otherwise signing is rejected with a `422`. When it is omitted, the order is created but not scheduled, and waits to be executed on demand.\"},{\"path\":[\"execution_mode\"],\"flag\":\"execution-mode\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"How the order created from the order form is carried out. It becomes mandatory as soon as `execute_at` is provided.\",\"enum\":[\"execute_in_lago\",\"order_only\"]},{\"path\":[\"signed_document\"],\"flag\":\"signed-document\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The document signed by the customer, as a base64 data URI (`data:\\u003ccontent_type\\u003e;base64,\\u003cdata\\u003e`). Accepted content types are `application/pdf`, `image/jpeg` and `image/png`, for a maximum of 10 MB. Once attached, it is exposed as `signed_document_url` on the order form.\"}],\"required\":false},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"order-forms\",\"action\":\"void\",\"operation_id\":\"voidOrderForm\",\"method\":\"POST\",\"path\":\"/order_forms/{lago_id}/void\",\"summary\":\"Void an order form\",\"description\":\"This endpoint voids an order form, with the `manual` reason, and cascades to the quote version it was generated from, which is voided with the `cascade_of_voided` reason.\\nOnly a `generated` order form can be voided, so a `422` is returned once the order form has been signed, has expired or has already been voided.\\nA concurrent write on the same quote is reported as a `422` rather than retried, so a duplicated call can fail while the first one is still in flight.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the order form within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the order form's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"orders\",\"action\":\"execute\",\"operation_id\":\"executeOrder\",\"method\":\"POST\",\"path\":\"/orders/{lago_id}/execute\",\"summary\":\"Execute an order\",\"description\":\"This endpoint carries out an order on demand, without waiting for its `execute_at` schedule. It runs synchronously, so the response carries the resulting status and, when the execution fails, the reason it failed.\\nAn `execute_in_lago` order applies the quoted deal, creating the subscriptions, coupons, wallets or one-off invoice it describes; an `order_only` order is simply marked as executed. What the execution produced is listed in `execution_record`.\\nExecuting is idempotent: an order that has already been executed is returned untouched. An order whose previous execution failed is executed again, and a `422` is returned when the order carries no execution mode and none is provided in the body.\\nRestating an `execution_mode` that differs from the one stored on the order updates it first, which only succeeds while the order is still `created`: a `failed` order can be retried, but not switched to another mode. That update also re-validates the order's own `execute_at` against the day the quoted deal stops being executable, so a `422` is possible even though no date was sent. An order carrying no `execute_at` is not bounded that way, and a deal whose term has passed then only fails when the execution runs.\\nA `404` is not limited to an unknown order: when the execution cannot find a catalog record the quote pinned, such as a deleted plan, charge, coupon or the subscription being amended, the missing resource is reported as a `404` and the order is left `failed`.\\nConcurrency is reported two ways. A mode change losing the race on the quote comes back as a `422` validation error, while the execution itself losing it comes back as a `422` carrying a lock code, because a scheduled execution relies on that error to be retried.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the order within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the order's record within the Lago system.\"}],\"body\":{\"wrapper\":\"order\",\"fields\":[{\"path\":[\"execution_mode\"],\"flag\":\"execution-mode\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"How the order is carried out. It is only persisted when it differs from the mode already stored on the order, so restating the current mode never fails. Changing the mode of an order that has already been executed is rejected.\",\"enum\":[\"execute_in_lago\",\"order_only\"]}],\"required\":false},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"orders\",\"action\":\"get\",\"operation_id\":\"findOrder\",\"method\":\"GET\",\"path\":\"/orders/{lago_id}\",\"summary\":\"Retrieve an order\",\"description\":\"This endpoint retrieves a specific order, along with the `billing_snapshot` its execution applies and the `execution_record` of what it produced.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the order within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the order's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"orders\",\"action\":\"list\",\"operation_id\":\"findAllOrders\",\"method\":\"GET\",\"path\":\"/orders\",\"summary\":\"List all orders\",\"description\":\"This endpoint is used to list all existing orders.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"status[]\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by status. Possible values are `created`, `executed` and `failed`.\"},{\"name\":\"order_type[]\",\"flag\":\"order-type\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by the order type of the quote they come from. Possible values are `subscription_creation`, `subscription_amendment` and `one_off`.\"},{\"name\":\"execution_mode[]\",\"flag\":\"execution-mode\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by execution mode. Possible values are `execute_in_lago` and `order_only`.\"},{\"name\":\"customer_id[]\",\"flag\":\"customer-id\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by the Lago identifiers of their customers.\"},{\"name\":\"number[]\",\"flag\":\"number\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by their number, as assigned by Lago.\"},{\"name\":\"order_form_number[]\",\"flag\":\"order-form-number\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by the number of the order form they come from.\"},{\"name\":\"quote_number[]\",\"flag\":\"quote-number\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by the number of the quote they come from.\"},{\"name\":\"owner_id[]\",\"flag\":\"owner-id\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter orders by the Lago identifiers of the users owning the quote they come from.\"},{\"name\":\"search_term\",\"flag\":\"search-term\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Search orders by number.\"},{\"name\":\"executed_at_from\",\"flag\":\"executed-at-from\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter orders executed from a specific date and time, in UTC (ISO 8601). Orders that have not been executed are excluded.\"},{\"name\":\"executed_at_to\",\"flag\":\"executed-at-to\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter orders executed up to a specific date and time, in UTC (ISO 8601). Orders that have not been executed are excluded.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"organizations\",\"action\":\"get\",\"operation_id\":\"findOrganization\",\"method\":\"GET\",\"path\":\"/organizations\",\"summary\":\"Retrieve your organization\",\"description\":\"This endpoint retrieves your own organization's settings.\",\"docs_url\":\"https://getlago.com/docs/api-reference/organizations/organization-object\",\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"organizations\",\"action\":\"update\",\"operation_id\":\"updateOrganization\",\"method\":\"PUT\",\"path\":\"/organizations\",\"summary\":\"Update your organization\",\"description\":\"This endpoint is used to update your own organization's settings. The same payload is also applied to the default billing entity of your organization.\",\"docs_url\":\"https://getlago.com/docs/api-reference/organizations/organization-object\",\"body\":{\"wrapper\":\"organization\",\"fields\":[{\"path\":[\"address_line1\"],\"flag\":\"address-line1\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The first line of your organization's billing address.\"},{\"path\":[\"address_line2\"],\"flag\":\"address-line2\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The second line of your organization's billing address.\"},{\"path\":[\"billing_configuration\",\"document_locale\"],\"flag\":\"billing-configuration-document-locale\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The locale of the billing documents, expressed in the ISO 639-1 format. This field indicates the language or regional variant used for the documents content issued or the embeddable customer portal.\"},{\"path\":[\"billing_configuration\",\"invoice_footer\"],\"flag\":\"billing-configuration-invoice-footer\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The customer invoice message that appears at the bottom of each billing documents. It accepts up to 600 characters.\"},{\"path\":[\"billing_configuration\",\"invoice_grace_period\"],\"flag\":\"billing-configuration-invoice-grace-period\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period. This is a premium feature, the value is ignored without a premium license.\"},{\"path\":[\"city\"],\"flag\":\"city\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The city of your organization's billing address.\"},{\"path\":[\"country\"],\"flag\":\"country\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The country of your organization.\",\"enum\":[\"\",\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]},{\"path\":[\"default_currency\"],\"flag\":\"default-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The default currency of an organization.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"document_number_prefix\"],\"flag\":\"document-number-prefix\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four characters of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago.\"},{\"path\":[\"document_numbering\"],\"flag\":\"document-numbering\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"This parameter configures the method of incrementing invoice numbers for your customers.\\n\\n- `per_customer`: Invoice numbers are incremented individually for each customer. This means every customer will have their own unique sequence of invoice numbers, separate from other customers. It ensures that each customer's invoice numbers follow a distinct and isolated numbering pattern.\\n- `per_organization`: Invoice number incrementation is made across your entire organization. Rather than individual sequences for each customer, all invoices within the organization follow a single, unified numbering system. This creates a continuous and organization-wide sequence for all invoice numbers. Invoices are incremented per month (dynamic value used is YYYYMM), and invoice numbers are reset at the end of each month.\\n\\nThe default value for `document_numbering` is set to `per_customer`, meaning that, unless changed, invoice numbers will increment uniquely for each customer.\",\"enum\":[\"per_customer\",\"per_organization\"]},{\"path\":[\"email\"],\"flag\":\"email\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The email address of your organization used to bill your customers.\"},{\"path\":[\"email_settings\"],\"flag\":\"email-settings\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values are `invoice.finalized`, `credit_note.created` and `payment_receipt.created`. This is a premium feature, the value is ignored without a premium license.\"},{\"path\":[\"finalize_zero_amount_invoice\"],\"flag\":\"finalize-zero-amount-invoice\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Determines whether invoices with a zero total amount should be finalized. If set to true, zero amount invoices will be finalized. If set to false, zero amount invoices will not be finalized.\"},{\"path\":[\"legal_name\"],\"flag\":\"legal-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal name of your organization.\"},{\"path\":[\"legal_number\"],\"flag\":\"legal-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The legal number of your organization.\"},{\"path\":[\"net_payment_term\"],\"flag\":\"net-payment-term\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.\"},{\"path\":[\"slug\"],\"flag\":\"slug\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"A concise and unique identifier for your organization. It must contain between 3 and 40 characters, limited to lowercase letters, digits and hyphens, and it must start and end with a letter or a digit. Lago trims it and converts it to lowercase before saving it. A value already taken by another organization, or one of the names Lago reserves for its own routes, is rejected.\"},{\"path\":[\"state\"],\"flag\":\"state\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The state of your organization's billing address.\"},{\"path\":[\"tax_identification_number\"],\"flag\":\"tax-identification-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The tax identification number of your organization.\"},{\"path\":[\"timezone\"],\"flag\":\"timezone\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. This is a premium feature, the value is ignored without a premium license.\",\"enum\":[\"UTC\",\"Africa/Algiers\",\"Africa/Cairo\",\"Africa/Casablanca\",\"Africa/Harare\",\"Africa/Johannesburg\",\"Africa/Monrovia\",\"Africa/Nairobi\",\"America/Argentina/Buenos_Aires\",\"America/Bogota\",\"America/Caracas\",\"America/Chicago\",\"America/Chihuahua\",\"America/Denver\",\"America/Guatemala\",\"America/Guyana\",\"America/Halifax\",\"America/Indiana/Indianapolis\",\"America/Juneau\",\"America/La_Paz\",\"America/Lima\",\"America/Los_Angeles\",\"America/Mazatlan\",\"America/Mexico_City\",\"America/Monterrey\",\"America/Montevideo\",\"America/New_York\",\"America/Nuuk\",\"America/Phoenix\",\"America/Puerto_Rico\",\"America/Regina\",\"America/Santiago\",\"America/Sao_Paulo\",\"America/St_Johns\",\"America/Tijuana\",\"Asia/Almaty\",\"Asia/Baghdad\",\"Asia/Baku\",\"Asia/Bangkok\",\"Asia/Chongqing\",\"Asia/Colombo\",\"Asia/Dhaka\",\"Asia/Hong_Kong\",\"Asia/Irkutsk\",\"Asia/Jakarta\",\"Asia/Jerusalem\",\"Asia/Kabul\",\"Asia/Kamchatka\",\"Asia/Karachi\",\"Asia/Kathmandu\",\"Asia/Kolkata\",\"Asia/Krasnoyarsk\",\"Asia/Kuala_Lumpur\",\"Asia/Kuwait\",\"Asia/Magadan\",\"Asia/Muscat\",\"Asia/Novosibirsk\",\"Asia/Riyadh\",\"Asia/Seoul\",\"Asia/Shanghai\",\"Asia/Singapore\",\"Asia/Srednekolymsk\",\"Asia/Taipei\",\"Asia/Tashkent\",\"Asia/Tbilisi\",\"Asia/Tehran\",\"Asia/Tokyo\",\"Asia/Ulaanbaatar\",\"Asia/Urumqi\",\"Asia/Vladivostok\",\"Asia/Yakutsk\",\"Asia/Yangon\",\"Asia/Yekaterinburg\",\"Asia/Yerevan\",\"Atlantic/Azores\",\"Atlantic/Cape_Verde\",\"Atlantic/South_Georgia\",\"Australia/Adelaide\",\"Australia/Brisbane\",\"Australia/Darwin\",\"Australia/Hobart\",\"Australia/Melbourne\",\"Australia/Perth\",\"Australia/Sydney\",\"Europe/Amsterdam\",\"Europe/Athens\",\"Europe/Belgrade\",\"Europe/Berlin\",\"Europe/Bratislava\",\"Europe/Brussels\",\"Europe/Bucharest\",\"Europe/Budapest\",\"Europe/Copenhagen\",\"Europe/Dublin\",\"Europe/Helsinki\",\"Europe/Istanbul\",\"Europe/Kaliningrad\",\"Europe/Kyiv\",\"Europe/Lisbon\",\"Europe/Ljubljana\",\"Europe/London\",\"Europe/Madrid\",\"Europe/Minsk\",\"Europe/Moscow\",\"Europe/Paris\",\"Europe/Prague\",\"Europe/Riga\",\"Europe/Rome\",\"Europe/Samara\",\"Europe/Sarajevo\",\"Europe/Skopje\",\"Europe/Sofia\",\"Europe/Stockholm\",\"Europe/Tallinn\",\"Europe/Vienna\",\"Europe/Vilnius\",\"Europe/Volgograd\",\"Europe/Warsaw\",\"Europe/Zagreb\",\"Europe/Zurich\",\"GMT+12\",\"Pacific/Apia\",\"Pacific/Auckland\",\"Pacific/Chatham\",\"Pacific/Fakaofo\",\"Pacific/Fiji\",\"Pacific/Guadalcanal\",\"Pacific/Guam\",\"Pacific/Honolulu\",\"Pacific/Majuro\",\"Pacific/Midway\",\"Pacific/Noumea\",\"Pacific/Pago_Pago\",\"Pacific/Port_Moresby\",\"Pacific/Tongatapu\"]},{\"path\":[\"webhook_url\"],\"flag\":\"webhook-url\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Sets the URL of the first webhook endpoint of your organization. This URL allows your organization to receive important messages, notifications, or data from the Lago system. When your organization has no webhook endpoint yet, this creates one.\"},{\"path\":[\"zipcode\"],\"flag\":\"zipcode\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The zipcode of your organization's billing address.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"payment-methods\",\"action\":\"destroy\",\"operation_id\":\"destroyPaymentMethod\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/payment_methods/{lago_id}\",\"summary\":\"Delete a payment method\",\"description\":\"This endpoint deletes a specific payment method for a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-methods/payment-method-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The payment method unique identifier, created by Lago.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"payment-methods\",\"action\":\"list-customers-payment-methods\",\"operation_id\":\"findAllCustomersPaymentMethods\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/payment_methods\",\"summary\":\"List all customer payment methods\",\"description\":\"This endpoint retrieves all payment methods of a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-methods/payment-method-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"payment-methods\",\"action\":\"payment-method-set-as-default\",\"operation_id\":\"paymentMethodSetAsDefault\",\"method\":\"PUT\",\"path\":\"/customers/{external_customer_id}/payment_methods/{lago_id}/set_as_default\",\"summary\":\"Set the payment method as default\",\"description\":\"This endpoint sets a payment method as the customer's default one. It is the payment method Lago uses when a payment is triggered without an explicit one. Any other default payment method of the customer is unset.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-methods/payment-method-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The payment method unique identifier, created by Lago.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"payment-receipts\",\"action\":\"get\",\"operation_id\":\"findPaymentReceipt\",\"method\":\"GET\",\"path\":\"/payment_receipts/{lago_id}\",\"summary\":\"Retrieve a payment receipt\",\"description\":\"This endpoint retrieves a specific payment receipt.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-receipts/payment-receipt-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the payment receipt.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"payment-receipts\",\"action\":\"list\",\"operation_id\":\"findAllPaymentReceipts\",\"method\":\"GET\",\"path\":\"/payment_receipts\",\"summary\":\"List all payment receipts\",\"description\":\"This endpoint is used to list all existing payment receipts.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-receipts/payment-receipt-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"invoice_id\",\"flag\":\"invoice-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter payment receipts by invoice. It returns the receipts of the payments made on this invoice, including the payments made through a payment request that covers it.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"payment-requests\",\"action\":\"create\",\"operation_id\":\"createPaymentRequest\",\"method\":\"POST\",\"path\":\"/payment_requests\",\"summary\":\"Create a payment request\",\"description\":\"This endpoint is used to create a payment request to collect the payment of the overdue invoices of a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-requests/payment-request-object\",\"body\":{\"wrapper\":\"payment_request\",\"fields\":[{\"path\":[\"email\"],\"flag\":\"email\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The email address used for sending dunning notifications. When omitted, the customer's own email address is used.\"},{\"path\":[\"external_customer_id\"],\"flag\":\"external-customer-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The customer external unique identifier (provided by your own application).\"},{\"path\":[\"lago_invoice_ids\"],\"flag\":\"lago-invoice-ids\",\"type\":\"array\",\"required\":true,\"complex\":true,\"description\":\"A list of Lago IDs for the customer's overdue invoices to start the dunning process.\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"payment-requests\",\"action\":\"get\",\"operation_id\":\"findPaymentRequest\",\"method\":\"GET\",\"path\":\"/payment_requests/{lago_id}\",\"summary\":\"Retrieve a payment request\",\"description\":\"This endpoint retrieves a specific payment request by its ID.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-requests/payment-request-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the payment request.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"payment-requests\",\"action\":\"list\",\"operation_id\":\"findAllPaymentRequests\",\"method\":\"GET\",\"path\":\"/payment_requests\",\"summary\":\"List all payment requests\",\"description\":\"This endpoint is used to list all existing payment requests.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payment-requests/payment-request-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter the results by currency, expressed as an ISO 4217 code.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"name\":\"payment_status\",\"flag\":\"payment-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by payment status. Possible values are `pending`, `failed` or `succeeded`.\",\"enum\":[\"pending\",\"failed\",\"succeeded\"]},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter payment requests by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"payments\",\"action\":\"create\",\"operation_id\":\"createPayment\",\"method\":\"POST\",\"path\":\"/payments\",\"summary\":\"Create a payment\",\"description\":\"This endpoint is used to create a manual payment\",\"docs_url\":\"https://getlago.com/docs/api-reference/payments/payment-object\",\"body\":{\"wrapper\":\"payment\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":true,\"complex\":false,\"description\":\"The payment amount in cents. It must be greater than zero.\"},{\"path\":[\"invoice_id\"],\"flag\":\"invoice-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique identifier of the invoice the payment is recorded on, created by Lago.\"},{\"path\":[\"paid_at\"],\"flag\":\"paid-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The date the payment was made. It is returned as the payment's `created_at`. When omitted, the date and time of the request is used.\"},{\"path\":[\"reference\"],\"flag\":\"reference\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Reference for the payment, such as the bank transfer or cheque number.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"payments\",\"action\":\"get\",\"operation_id\":\"findPayment\",\"method\":\"GET\",\"path\":\"/payments/{lago_id}\",\"summary\":\"Retrieve a payment\",\"description\":\"This endpoint retrieves a specific payment by its ID.\",\"docs_url\":\"https://getlago.com/docs/api-reference/payments/payment-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the payment.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"payments\",\"action\":\"list\",\"operation_id\":\"findAllPayments\",\"method\":\"GET\",\"path\":\"/payments\",\"summary\":\"List all payments\",\"description\":\"This endpoint is used to list all payments\",\"docs_url\":\"https://getlago.com/docs/api-reference/payments/payment-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the customer in your application.\"},{\"name\":\"invoice_id\",\"flag\":\"invoice-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"charges\",\"operation_id\":\"findAllPlanCharges\",\"method\":\"GET\",\"path\":\"/plans/{code}/charges\",\"summary\":\"List all charges for a plan\",\"description\":\"This endpoint retrieves all charges for a specific plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"create\",\"operation_id\":\"createPlan\",\"method\":\"POST\",\"path\":\"/plans\",\"summary\":\"Create a plan\",\"description\":\"This endpoint creates a plan with subscription and usage-based charges. It supports flexible billing cadence (in-advance or in-arrears) and allows for both recurring and metered charges.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"body\":{\"wrapper\":\"plan\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":true,\"complex\":false,\"description\":\"The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"bill_charges_monthly\"],\"flag\":\"bill-charges-monthly\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is `yearly` or `semiannual`. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.\"},{\"path\":[\"bill_fixed_charges_monthly\"],\"flag\":\"bill-fixed-charges-monthly\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This field, when set to `true`, enables to invoice fixed charges on monthly basis, even if the cadence of the plan is `yearly` or `semiannual`. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.\"},{\"path\":[\"charges\"],\"flag\":\"charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Additional usage-based charges for this plan.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The description on the plan.\"},{\"path\":[\"fixed_charges\"],\"flag\":\"fixed-charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Additional fixed charges for this plan.\"},{\"path\":[\"interval\"],\"flag\":\"interval\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `semiannual`, `quarterly`, `monthly`, or `weekly`.\",\"enum\":[\"weekly\",\"monthly\",\"quarterly\",\"semiannual\",\"yearly\"]},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"minimum_commitment\",\"amount_cents\"],\"flag\":\"minimum-commitment-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The amount of the minimum commitment in cents.\"},{\"path\":[\"minimum_commitment\",\"invoice_display_name\"],\"flag\":\"minimum-commitment-invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.\"},{\"path\":[\"minimum_commitment\",\"tax_codes\"],\"flag\":\"minimum-commitment-tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The name of the plan.\"},{\"path\":[\"pay_in_advance\"],\"flag\":\"pay-in-advance\",\"type\":\"boolean\",\"required\":true,\"complex\":false,\"description\":\"This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"trial_period\"],\"flag\":\"trial-period\",\"type\":\"number\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The duration in days during which the base cost of the plan is offered for free.\"},{\"path\":[\"usage_thresholds\"],\"flag\":\"usage-thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of usage thresholds to apply to the plan.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"create-plan-charge\",\"operation_id\":\"createPlanCharge\",\"method\":\"POST\",\"path\":\"/plans/{code}/charges\",\"summary\":\"Create a charge\",\"description\":\"This endpoint creates a new charge for a specific plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"}],\"body\":{\"wrapper\":\"charge\",\"fields\":[{\"path\":[\"accepts_target_wallet\"],\"flag\":\"accepts-target-wallet\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies whether the charge accepts a target wallet for prepaid credits deduction.\\nWhen set to `true`, events may include a `target_wallet_code` in their `properties` to direct credit deduction to a specific wallet.\\nIf no `target_wallet_code` is provided on the event, the standard wallet selection logic is applied.\\nIf the `target_wallet_code` does not match an existing wallet, no credits will be applied for that event.\\n\\nThis field requires a premium integration.\"},{\"path\":[\"applied_pricing_unit\",\"code\"],\"flag\":\"applied-pricing-unit-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the pricing unit.\"},{\"path\":[\"applied_pricing_unit\",\"conversion_rate\"],\"flag\":\"applied-pricing-unit-conversion-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The conversion rate from pricing units to the plan's currency.\\nThis rate determines how many currency units (in the plan's base currency) equal one pricing unit.\\nFor example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50.\"},{\"path\":[\"billable_metric_id\"],\"flag\":\"billable-metric-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique identifier of the billable metric created by Lago.\"},{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the creation of the charge should be cascaded to the children plans. When set to `true`, the charge will be created in children plans. Conversely, when set to `false`, the charge will only be created in the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"charge_model\"],\"flag\":\"charge-model\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:\\n - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)\\n - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)\\n - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)\\n - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)\\n - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)\\n - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)\\n - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)\\n\",\"enum\":[\"dynamic\",\"graduated\",\"graduated_percentage\",\"package\",\"percentage\",\"standard\",\"volume\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code identifying the charge within the plan.\"},{\"path\":[\"filters\"],\"flag\":\"filters\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of filters used to apply differentiated pricing based on additional event properties.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.\"},{\"path\":[\"invoiceable\"],\"flag\":\"invoiceable\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.\"},{\"path\":[\"min_amount_cents\"],\"flag\":\"min-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.\"},{\"path\":[\"pay_in_advance\"],\"flag\":\"pay-in-advance\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"presentation_group_keys\"],\"flag\":\"properties-presentation-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Groups usage into sub-items on invoices for display only, without affecting pricing or aggregation.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"prorated\"],\"flag\":\"prorated\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.\\n\\n- If set to `true`, the charge is prorated based on the remaining days in the current billing period.\\n- If set to `false`, the charge is billed in full.\\n- If not defined in the request, default value is `false`.\"},{\"path\":[\"regroup_paid_fees\"],\"flag\":\"regroup-paid-fees\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.\\nThis field determines whether and when the charge fee should be included in\\nthe invoice. If `null`, no invoice will be issued for this charge fee.\\nIf `invoice`, an invoice will be generated at the end of the period,\\nconsolidating all charge fees with a succeeded payment status.\",\"enum\":[\"\",\"invoice\"]},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"create-plan-charge-filter\",\"operation_id\":\"createPlanChargeFilter\",\"method\":\"POST\",\"path\":\"/plans/{code}/charges/{charge_code}/filters\",\"summary\":\"Create a charge filter\",\"description\":\"This endpoint creates a new filter for a specific charge.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"}],\"body\":{\"wrapper\":\"filter\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the creation of the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"values\"],\"flag\":\"values\",\"type\":\"object\",\"required\":true,\"complex\":true,\"description\":\"List of possible filter values. The key and values must match one of the billable metric filters.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"create-plan-fixed-charge\",\"operation_id\":\"createPlanFixedCharge\",\"method\":\"POST\",\"path\":\"/plans/{code}/fixed_charges\",\"summary\":\"Create a fixed charge\",\"description\":\"This endpoint creates a new fixed charge for a specific plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"}],\"body\":{\"wrapper\":\"fixed_charge\",\"fields\":[{\"path\":[\"add_on_code\"],\"flag\":\"add-on-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code identifying an add-on. Either add_on_id or add_on_code is required.\"},{\"path\":[\"add_on_id\"],\"flag\":\"add-on-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique identifier of the add-on. Either add_on_id or add_on_code is required.\"},{\"path\":[\"apply_units_immediately\"],\"flag\":\"apply-units-immediately\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When set to `true`, the fixed charge units are applied immediately for active subscriptions. When set to `false`, the units are applied at the next billing period.\"},{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the creation of the fixed charge should be cascaded to the children plans. When set to `true`, the fixed charge will be created in children plans. Conversely, when set to `false`, the fixed charge will only be created in the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"charge_model\"],\"flag\":\"charge-model\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Specifies the pricing model used for the calculation of the fixed charge fee. It can be any of the following values:\\n - `standard`\\n - `graduated`\\n - `volume`\\n\",\"enum\":[\"standard\",\"graduated\",\"volume\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code identifying the fixed charge within the plan.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name.\"},{\"path\":[\"pay_in_advance\"],\"flag\":\"pay-in-advance\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines the billing timing for this fixed charge. When set to `true`, the charge is due and invoiced immediately at the beginning of the billing period. When set to `false`, the charge is due and invoiced at the end of the billing period.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"prorated\"],\"flag\":\"prorated\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.\\n\\n- If set to `true`, the charge is prorated based on the remaining days in the current billing period.\\n- If set to `false`, the charge is billed in full.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"units\"],\"flag\":\"units\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units for the fixed charge.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"delete\",\"operation_id\":\"destroyPlan\",\"method\":\"DELETE\",\"path\":\"/plans/{code}\",\"summary\":\"Delete a plan\",\"description\":\"This endpoint deletes a specific plan. Note that this plan could be associated with active subscriptions.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"delete-all-plan-metadata\",\"operation_id\":\"deleteAllPlanMetadata\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/metadata\",\"summary\":\"Delete all plan metadata\",\"description\":\"This endpoint removes all metadata from a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"delete-plan-metadata-key\",\"operation_id\":\"deletePlanMetadataKey\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/metadata/{key}\",\"summary\":\"Delete a metadata key\",\"description\":\"This endpoint removes a single metadata key from a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan.\"},{\"name\":\"key\",\"flag\":\"key\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The metadata key to delete.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"destroy-plan-charge\",\"operation_id\":\"destroyPlanCharge\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/charges/{charge_code}\",\"summary\":\"Delete a charge\",\"description\":\"This endpoint deletes a specific charge from a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"}],\"body\":{\"wrapper\":\"charge\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When set to `true`, the deletion will be cascaded to the children plans.\"}],\"required\":false},\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"destroy-plan-charge-filter\",\"operation_id\":\"destroyPlanChargeFilter\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/charges/{charge_code}/filters/{filter_id}\",\"summary\":\"Delete a charge filter\",\"description\":\"This endpoint deletes a specific filter from a charge.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"filter_id\",\"flag\":\"filter-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the charge filter.\"}],\"body\":{\"wrapper\":\"filter\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When set to `true`, the deletion will be cascaded to the children plans.\"}],\"required\":false},\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"destroy-plan-fixed-charge\",\"operation_id\":\"destroyPlanFixedCharge\",\"method\":\"DELETE\",\"path\":\"/plans/{code}/fixed_charges/{fixed_charge_code}\",\"summary\":\"Delete a fixed charge\",\"description\":\"This endpoint deletes a specific fixed charge from a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"fixed_charge_code\",\"flag\":\"fixed-charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing fixed charge.\"}],\"body\":{\"wrapper\":\"fixed_charge\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When set to `true`, the deletion will be cascaded to the children plans.\"}],\"required\":false},\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"filters\",\"operation_id\":\"findAllPlanChargeFilters\",\"method\":\"GET\",\"path\":\"/plans/{code}/charges/{charge_code}/filters\",\"summary\":\"List all filters for a charge\",\"description\":\"This endpoint retrieves all filters for a specific charge.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"fixed-charges\",\"operation_id\":\"findAllPlanFixedCharges\",\"method\":\"GET\",\"path\":\"/plans/{code}/fixed_charges\",\"summary\":\"List all fixed charges for a plan\",\"description\":\"This endpoint retrieves all fixed charges for a specific plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"get\",\"operation_id\":\"findPlan\",\"method\":\"GET\",\"path\":\"/plans/{code}\",\"summary\":\"Retrieve a plan\",\"description\":\"This endpoint retrieves a specific plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"get-plan-charge\",\"operation_id\":\"findPlanCharge\",\"method\":\"GET\",\"path\":\"/plans/{code}/charges/{charge_code}\",\"summary\":\"Retrieve a charge\",\"description\":\"This endpoint retrieves a specific charge for a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"get-plan-charge-filter\",\"operation_id\":\"findPlanChargeFilter\",\"method\":\"GET\",\"path\":\"/plans/{code}/charges/{charge_code}/filters/{filter_id}\",\"summary\":\"Retrieve a charge filter\",\"description\":\"This endpoint retrieves a specific filter for a charge.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"filter_id\",\"flag\":\"filter-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the charge filter.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"get-plan-fixed-charge\",\"operation_id\":\"findPlanFixedCharge\",\"method\":\"GET\",\"path\":\"/plans/{code}/fixed_charges/{fixed_charge_code}\",\"summary\":\"Retrieve a fixed charge\",\"description\":\"This endpoint retrieves a specific fixed charge for a plan.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"fixed_charge_code\",\"flag\":\"fixed-charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing fixed charge.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"list\",\"operation_id\":\"findAllPlans\",\"method\":\"GET\",\"path\":\"/plans\",\"summary\":\"List all plans\",\"description\":\"This endpoint retrieves all existing plans.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"plans\",\"action\":\"merge-plan-metadata\",\"operation_id\":\"mergePlanMetadata\",\"method\":\"PATCH\",\"path\":\"/plans/{code}/metadata\",\"summary\":\"Merge plan metadata\",\"description\":\"This endpoint merges the provided metadata with existing metadata on the plan.\\nExisting keys not in the request are preserved. New keys are added, existing keys are updated.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"metadata\",\"operation_id\":\"replacePlanMetadata\",\"method\":\"POST\",\"path\":\"/plans/{code}/metadata\",\"summary\":\"Replace plan metadata\",\"description\":\"This endpoint replaces all existing metadata on a plan with the provided key-value pairs.\\nAny existing metadata keys not included in the request will be removed.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"update\",\"operation_id\":\"updatePlan\",\"method\":\"PUT\",\"path\":\"/plans/{code}\",\"summary\":\"Update a plan\",\"description\":\"This endpoint updates a specific plan with subscription and usage-based charges. It supports flexible billing cadence (in-advance or in-arrears) and allows for both recurring and metered charges.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.\"}],\"body\":{\"wrapper\":\"plan\",\"fields\":[{\"path\":[\"amount_cents\"],\"flag\":\"amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.\"},{\"path\":[\"amount_currency\"],\"flag\":\"amount-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"bill_charges_monthly\"],\"flag\":\"bill-charges-monthly\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly or semiannual. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.\"},{\"path\":[\"bill_fixed_charges_monthly\"],\"flag\":\"bill-fixed-charges-monthly\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This field, when set to `true`, enables to invoice fixed charges on monthly basis, even if the cadence of the plan is `yearly` or `semiannual`. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`.\"},{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the changes made to the plan should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"charges\"],\"flag\":\"charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Additional usage-based charges for this plan.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The description on the plan.\"},{\"path\":[\"fixed_charges\"],\"flag\":\"fixed-charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Additional fixed charges for this plan.\"},{\"path\":[\"interval\"],\"flag\":\"interval\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `semiannual`, `quarterly`, `monthly`, or `weekly`.\",\"enum\":[\"weekly\",\"monthly\",\"quarterly\",\"semiannual\",\"yearly\"]},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"minimum_commitment\",\"amount_cents\"],\"flag\":\"minimum-commitment-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The amount of the minimum commitment in cents.\"},{\"path\":[\"minimum_commitment\",\"invoice_display_name\"],\"flag\":\"minimum-commitment-invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.\"},{\"path\":[\"minimum_commitment\",\"tax_codes\"],\"flag\":\"minimum-commitment-tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The name of the plan.\"},{\"path\":[\"pay_in_advance\"],\"flag\":\"pay-in-advance\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"trial_period\"],\"flag\":\"trial-period\",\"type\":\"number\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The duration in days during which the base cost of the plan is offered for free.\"},{\"path\":[\"usage_thresholds\"],\"flag\":\"usage-thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of usage thresholds to apply to the plan.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"update-plan-charge\",\"operation_id\":\"updatePlanCharge\",\"method\":\"PUT\",\"path\":\"/plans/{code}/charges/{charge_code}\",\"summary\":\"Update a charge\",\"description\":\"This endpoint updates a specific charge for a plan.\\n\\nThe payload replaces the charge configuration: `charge_model` must be sent on every update, and `invoice_display_name` is cleared when it is left out.\\n\\nOnce the plan is attached to a subscription, only `invoice_display_name`, `properties`, `filters`, `tax_codes`, `applied_pricing_unit` and `accepts_target_wallet` are applied. The other fields are ignored.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"}],\"body\":{\"wrapper\":\"charge\",\"fields\":[{\"path\":[\"accepts_target_wallet\"],\"flag\":\"accepts-target-wallet\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies whether the charge accepts a target wallet for prepaid credits deduction.\\nWhen set to `true`, events may include a `target_wallet_code` in their `properties` to direct credit deduction to a specific wallet.\\nIf no `target_wallet_code` is provided on the event, the standard wallet selection logic is applied.\\nIf the `target_wallet_code` does not match an existing wallet, no credits will be applied for that event.\\n\\nThis field requires a premium integration.\"},{\"path\":[\"applied_pricing_unit\",\"code\"],\"flag\":\"applied-pricing-unit-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the pricing unit.\"},{\"path\":[\"applied_pricing_unit\",\"conversion_rate\"],\"flag\":\"applied-pricing-unit-conversion-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The conversion rate from pricing units to the plan's currency.\\nThis rate determines how many currency units (in the plan's base currency) equal one pricing unit.\\nFor example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50.\"},{\"path\":[\"billable_metric_id\"],\"flag\":\"billable-metric-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique identifier of the billable metric created by Lago.\"},{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the changes made to the charge should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"charge_model\"],\"flag\":\"charge-model\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:\\n - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)\\n - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)\\n - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)\\n - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)\\n - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)\\n - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)\\n - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)\\n\",\"enum\":[\"dynamic\",\"graduated\",\"graduated_percentage\",\"package\",\"percentage\",\"standard\",\"volume\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code identifying the charge within the plan.\"},{\"path\":[\"filters\"],\"flag\":\"filters\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of filters used to apply differentiated pricing based on additional event properties.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.\"},{\"path\":[\"invoiceable\"],\"flag\":\"invoiceable\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.\"},{\"path\":[\"min_amount_cents\"],\"flag\":\"min-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.\"},{\"path\":[\"pay_in_advance\"],\"flag\":\"pay-in-advance\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"presentation_group_keys\"],\"flag\":\"properties-presentation-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Groups usage into sub-items on invoices for display only, without affecting pricing or aggregation.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"prorated\"],\"flag\":\"prorated\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.\\n\\n- If set to `true`, the charge is prorated based on the remaining days in the current billing period.\\n- If set to `false`, the charge is billed in full.\\n- If not defined in the request, default value is `false`.\"},{\"path\":[\"regroup_paid_fees\"],\"flag\":\"regroup-paid-fees\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.\\nThis field determines whether and when the charge fee should be included in\\nthe invoice. If `null`, no invoice will be issued for this charge fee.\\nIf `invoice`, an invoice will be generated at the end of the period,\\nconsolidating all charge fees with a succeeded payment status.\",\"enum\":[\"\",\"invoice\"]},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"update-plan-charge-filter\",\"operation_id\":\"updatePlanChargeFilter\",\"method\":\"PUT\",\"path\":\"/plans/{code}/charges/{charge_code}/filters/{filter_id}\",\"summary\":\"Update a charge filter\",\"description\":\"This endpoint updates a specific filter for a charge.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"filter_id\",\"flag\":\"filter-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the charge filter.\"}],\"body\":{\"wrapper\":\"filter\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the changes made to the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"values\"],\"flag\":\"values\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"List of possible filter values. The key and values must match one of the billable metric filters.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"plans\",\"action\":\"update-plan-fixed-charge\",\"operation_id\":\"updatePlanFixedCharge\",\"method\":\"PUT\",\"path\":\"/plans/{code}/fixed_charges/{fixed_charge_code}\",\"summary\":\"Update a fixed charge\",\"description\":\"This endpoint updates a specific fixed charge for a plan.\\n\\nThe payload replaces the fixed charge configuration: `units` and `charge_model` must be sent on every update, and `invoice_display_name` is cleared when it is left out.\\n\\nOnce the plan is attached to a subscription, `code` and `charge_model` are ignored.\",\"docs_url\":\"https://getlago.com/docs/api-reference/plans/object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing plan.\"},{\"name\":\"fixed_charge_code\",\"flag\":\"fixed-charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing fixed charge.\"}],\"body\":{\"wrapper\":\"fixed_charge\",\"fields\":[{\"path\":[\"add_on_code\"],\"flag\":\"add-on-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code identifying an add-on. Either add_on_id or add_on_code is required.\"},{\"path\":[\"add_on_id\"],\"flag\":\"add-on-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique identifier of the add-on. Either add_on_id or add_on_code is required.\"},{\"path\":[\"apply_units_immediately\"],\"flag\":\"apply-units-immediately\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When set to `true`, the fixed charge units are applied immediately for active subscriptions. When set to `false`, the units are applied at the next billing period.\"},{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the changes made to the fixed charge should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.\"},{\"path\":[\"charge_model\"],\"flag\":\"charge-model\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the pricing model used for the calculation of the fixed charge fee. It can be any of the following values:\\n - `standard`\\n - `graduated`\\n - `volume`\\n\",\"enum\":[\"standard\",\"graduated\",\"volume\"]},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code identifying the fixed charge within the plan.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name.\"},{\"path\":[\"pay_in_advance\"],\"flag\":\"pay-in-advance\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines the billing timing for this fixed charge. When set to `true`, the charge is due and invoiced immediately at the beginning of the billing period. When set to `false`, the charge is due and invoiced at the end of the billing period.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"prorated\"],\"flag\":\"prorated\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.\\n\\n- If set to `true`, the charge is prorated based on the remaining days in the current billing period.\\n- If set to `false`, the charge is billed in full.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"units\"],\"flag\":\"units\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units for the fixed charge.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"quotes\",\"action\":\"approve-quote-version\",\"operation_id\":\"approveQuoteVersion\",\"method\":\"POST\",\"path\":\"/quote_versions/{lago_id}/approve\",\"summary\":\"Approve a quote version\",\"description\":\"This endpoint approves a quote version and generates the order form to send to the customer for signature.\\nOnly a `draft` version can be approved, and its `billing_items` must be complete: approval validates them against the catalog and against the customer, and returns a `422` when the deal cannot be executed as quoted.\\nThe `expires_at` of the generated order form is bounded by the deal's own term, so a signing window reaching beyond the day the deal stops being executable is rejected.\\nA concurrent write on the same quote is reported as a `422` rather than retried, so a duplicated call can fail while the first one is still in flight.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the quote version within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the quote version's record within the Lago system.\"}],\"body\":{\"fields\":[{\"path\":[\"expires_at\"],\"flag\":\"expires-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The date and time in UTC (ISO 8601) when the order form generated by the approval expires. It must be in the future, and must fall strictly before the day the quoted deal stops being executable, otherwise the approval is rejected with a `422`. That boundary is the earliest of the `endDate` of any quoted plan and the `expirationAt` of any quoted wallet credit or recurring top-up rule. A `one_off` quote carries none of them, so its signing window is never bounded. When `expires_at` is omitted, the order form never expires.\"}],\"required\":false},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"quotes\",\"action\":\"clone-quote-version\",\"operation_id\":\"cloneQuoteVersion\",\"method\":\"POST\",\"path\":\"/quote_versions/{lago_id}/clone\",\"summary\":\"Clone a quote version\",\"description\":\"This endpoint copies a quote version into a new `draft` version of the same quote, so that the deal can be renegotiated.\\nAny version of the quote can be cloned, but a quote can only carry one active version: the draft the quote currently holds, if any, is voided with the `superseded` reason. Cloning is therefore rejected with a `422` once a version of the quote has been approved.\\nA concurrent write on the same quote is reported as a `422` rather than retried, so a duplicated call can fail while the first one is still in flight.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the quote version within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the quote version's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"quotes\",\"action\":\"get\",\"operation_id\":\"findQuote\",\"method\":\"GET\",\"path\":\"/quotes/{lago_id}\",\"summary\":\"Retrieve a quote\",\"description\":\"This endpoint retrieves a specific quote, along with its owners and its current version.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the quote within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the quote's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"quotes\",\"action\":\"get-quote-version\",\"operation_id\":\"findQuoteVersion\",\"method\":\"GET\",\"path\":\"/quote_versions/{lago_id}\",\"summary\":\"Retrieve a quote version\",\"description\":\"This endpoint retrieves a specific quote version, along with its document `content` and its `billing_items`.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the quote version within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the quote version's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"quotes\",\"action\":\"list\",\"operation_id\":\"findAllQuotes\",\"method\":\"GET\",\"path\":\"/quotes\",\"summary\":\"List all quotes\",\"description\":\"This endpoint is used to list all existing quotes.\\nQuotes are ordered by creation date, from the most recent to the oldest.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"status[]\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter quotes by the status of their current version. Possible values are `draft`, `approved` and `voided`.\"},{\"name\":\"order_type[]\",\"flag\":\"order-type\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter quotes by order type. Possible values are `subscription_creation`, `subscription_amendment` and `one_off`.\"},{\"name\":\"number[]\",\"flag\":\"number\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter quotes by their number, as assigned by Lago.\"},{\"name\":\"owner_id[]\",\"flag\":\"owner-id\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter quotes by the Lago identifiers of the users owning them.\"},{\"name\":\"external_customer_id[]\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter quotes by the external unique identifiers of their customers (provided by your own application).\"},{\"name\":\"from_date\",\"flag\":\"from-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter quotes created from a specific date.\"},{\"name\":\"to_date\",\"flag\":\"to-date\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter quotes created up to a specific date.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"quotes\",\"action\":\"versions\",\"operation_id\":\"findAllQuoteVersions\",\"method\":\"GET\",\"path\":\"/quotes/{lago_id}/versions\",\"summary\":\"List all versions of a quote\",\"description\":\"This endpoint is used to list all the versions of a specific quote, from the most recent to the oldest.\\nThe `content` and `billing_items` of each version are omitted; retrieve a version to get them.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the quote within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the quote's record within the Lago system.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"quotes\",\"action\":\"void-quote-version\",\"operation_id\":\"voidQuoteVersion\",\"method\":\"POST\",\"path\":\"/quote_versions/{lago_id}/void\",\"summary\":\"Void a quote version\",\"description\":\"This endpoint voids a quote version, which makes it definitive: a voided version can neither be edited nor approved again.\\nOnly a `draft` version can be voided through this endpoint, and the resulting `void_reason` is `manual`. An `approved` version is voided by Lago itself, through the order form generated from it.\\nA concurrent write on the same quote is reported as a `422` rather than retried, so a duplicated call can fail while the first one is still in flight.\\nThis is a premium feature.\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the quote version within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the quote version's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"alerts\",\"operation_id\":\"getSubscriptionAlerts\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/alerts\",\"summary\":\"List subscription alerts\",\"description\":\"This endpoint enables the retrieval of all alerts for a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"charges\",\"operation_id\":\"findAllSubscriptionCharges\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/charges\",\"summary\":\"List all charges for a subscription\",\"description\":\"This endpoint retrieves all effective charges for a specific subscription.\\nIf the subscription has plan overrides with charge overrides, the overridden charges are returned.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"create\",\"operation_id\":\"createSubscription\",\"method\":\"POST\",\"path\":\"/subscriptions\",\"summary\":\"Assign a plan to a customer\",\"description\":\"This endpoint assigns a plan to a customer, creating or modifying a subscription. Ideal for initial subscriptions or plan changes (upgrades/downgrades).\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"body\":{\"fields\":[{\"path\":[\"authorization\",\"amount_cents\"],\"flag\":\"authorization-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The amount of the authorization in cents.\"},{\"path\":[\"authorization\",\"amount_currency\"],\"flag\":\"authorization-amount-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the authorization.\"},{\"path\":[\"subscription\",\"activation_rules\"],\"flag\":\"activation-rules\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Optional list of activation rules that gate the subscription activation. When a `payment` rule is provided and the plan is paid in advance (and the subscription is not in a trial), the subscription is created in the `incomplete` state and is only activated once the gating payment succeeds. If the payment fails or the rule's `timeout_hours` elapses, the subscription is canceled.\\n\"},{\"path\":[\"subscription\",\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity to be used for the subscription. If not provided, the default billing entity will be used.\"},{\"path\":[\"subscription\",\"billing_time\"],\"flag\":\"billing-time\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).\",\"enum\":[\"calendar\",\"anniversary\"]},{\"path\":[\"subscription\",\"consolidate_invoice\"],\"flag\":\"consolidate-invoice\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Defines whether this subscription should be grouped with other subscriptions of the same customer when generating recurring invoices.\\n\\n- `true` (default): the subscription is included in the customer's standard invoice grouping (by billing entity, currency and payment method).\\n- `false`: the subscription is excluded from consolidation and always billed on its own dedicated invoice.\\n\"},{\"path\":[\"subscription\",\"ending_at\"],\"flag\":\"ending-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).\"},{\"path\":[\"subscription\",\"external_customer_id\"],\"flag\":\"external-customer-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"path\":[\"subscription\",\"external_id\"],\"flag\":\"external-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The unique external identifier for the subscription. This identifier serves as an idempotency key, ensuring that each subscription is unique.\"},{\"path\":[\"subscription\",\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"subscription\",\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"subscription\",\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.\"},{\"path\":[\"subscription\",\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"subscription\",\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"subscription\",\"plan_code\"],\"flag\":\"plan-code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The unique code representing the plan to be attached to the customer. This code must correspond to the `code` property of one of the active plans.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"amount_cents\"],\"flag\":\"plan-overrides-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"amount_currency\"],\"flag\":\"plan-overrides-amount-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"subscription\",\"plan_overrides\",\"charges\"],\"flag\":\"plan-overrides-charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Additional usage-based charges for this plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"description\"],\"flag\":\"plan-overrides-description\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The description on the plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"fixed_charges\"],\"flag\":\"plan-overrides-fixed-charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Fixed charge overrides for the subscription. When `plan_overrides` contains only `fixed_charges` and every entry contains only `id`, `units`, and optionally `apply_units_immediately`, the units are recorded as a per-subscription override without creating a plan override, and subscription-scoped reads return these units. If any entry carries other fields, or `plan_overrides` contains any other key, the request is applied as a full plan override for the subscription instead.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"invoice_display_name\"],\"flag\":\"plan-overrides-invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"minimum_commitment\",\"amount_cents\"],\"flag\":\"plan-overrides-minimum-commitment-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The amount of the minimum commitment in cents.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"minimum_commitment\",\"invoice_display_name\"],\"flag\":\"plan-overrides-minimum-commitment-invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"minimum_commitment\",\"tax_codes\"],\"flag\":\"plan-overrides-minimum-commitment-tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"name\"],\"flag\":\"plan-overrides-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The name of the plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"tax_codes\"],\"flag\":\"plan-overrides-tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"trial_period\"],\"flag\":\"plan-overrides-trial-period\",\"type\":\"number\",\"required\":false,\"complex\":false,\"description\":\"The duration in days during which the base cost of the plan is offered for free.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"usage_thresholds\"],\"flag\":\"plan-overrides-usage-thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Managing usage thresholds through `plan_overrides` is deprecated and its behavior is inconsistent: an empty array does not reliably clear thresholds (it is ignored the first time a subscription is overridden), and it never affects thresholds inherited from a parent plan. Use the top-level `usage_thresholds` array on the subscription instead, or `progressive_billing_disabled` to switch progressive billing off.\\n\"},{\"path\":[\"subscription\",\"progressive_billing_disabled\"],\"flag\":\"progressive-billing-disabled\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Disables progressive billing for this subscription, regardless of any usage thresholds defined on the plan (including thresholds inherited from a parent plan when the subscription runs on a plan override).\\n\\nSet to `true` to switch progressive billing off for this subscription specifically, without changing the plan's thresholds.\\n\"},{\"path\":[\"subscription\",\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with the subscription. It will be added to invoices generated for this subscription.\"},{\"path\":[\"subscription\",\"subscription_at\"],\"flag\":\"subscription-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The start date for the subscription, allowing for the creation of subscriptions that can begin in the past or future. Please note that it cannot be used to update the start date of a pending subscription or schedule an upgrade/downgrade. The start_date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"subscription\",\"usage_thresholds\"],\"flag\":\"usage-thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Usage thresholds managed directly on the subscription. This is the recommended way to set progressive billing thresholds per subscription; when present, they take precedence over the thresholds defined on the plan.\\n\\nThis field cannot be combined with `plan_overrides.usage_thresholds` in the same request.\\n\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"create-subscription-alert\",\"operation_id\":\"createSubscriptionAlert\",\"method\":\"POST\",\"path\":\"/subscriptions/{external_id}/alerts\",\"summary\":\"Create subscription alert(s)\",\"description\":\"This endpoint allows you to create alerts for a subscription. Send a single alert object wrapped in `alert` key to create one alert, or an array of alert objects wrapped in `alerts` key to create multiple alerts atomically.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"body\":{\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"create-subscription-charge-filter\",\"operation_id\":\"createSubscriptionChargeFilter\",\"method\":\"POST\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}/filters\",\"summary\":\"Create a charge filter\",\"description\":\"This endpoint creates a new filter for a specific charge on a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"body\":{\"wrapper\":\"filter\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the creation of the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"values\"],\"flag\":\"values\",\"type\":\"object\",\"required\":true,\"complex\":true,\"description\":\"List of possible filter values. The key and values must match one of the billable metric filters.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"delete-all-subscription-alerts\",\"operation_id\":\"deleteAllSubscriptionAlerts\",\"method\":\"DELETE\",\"path\":\"/subscriptions/{external_id}/alerts\",\"summary\":\"Delete all subscription alerts\",\"description\":\"This endpoint allows you to delete all alerts for a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"delete-subscription-alert\",\"operation_id\":\"deleteSubscriptionAlert\",\"method\":\"DELETE\",\"path\":\"/subscriptions/{external_id}/alerts/{code}\",\"summary\":\"Delete a subscription alert\",\"description\":\"This endpoint allows you to delete an existing alert for a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code of the alert\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"destroy-subscription-charge-filter\",\"operation_id\":\"destroySubscriptionChargeFilter\",\"method\":\"DELETE\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}\",\"summary\":\"Delete a charge filter\",\"description\":\"This endpoint deletes a specific filter from a charge on a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"filter_id\",\"flag\":\"filter-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the charge filter.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"filters\",\"operation_id\":\"findAllSubscriptionChargeFilters\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}/filters\",\"summary\":\"List all filters for a charge\",\"description\":\"This endpoint retrieves all filters for a specific charge on a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"fixed-charges\",\"operation_id\":\"findAllSubscriptionFixedCharges\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/fixed_charges\",\"summary\":\"List all fixed charges for a subscription\",\"description\":\"This endpoint retrieves all effective fixed charges for a specific subscription.\\nThe `units` of each fixed charge reflect any per-subscription unit override applied to the subscription; when no override exists, the plan-level units are returned.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"get\",\"operation_id\":\"findSubscription\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}\",\"summary\":\"Retrieve a subscription\",\"description\":\"This endpoint retrieves a specific subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"By default, this endpoint only returns `active` subscriptions. If you want to retrieve a subscription with a different `status`, you can specify it here.\\n\\n_Note: As there may exist multiple `canceled` or `terminated` subscriptions for the same `external_id`, it is recommended to use the \\\"List all subscriptions\\\" endpoint to retrieve those subscriptions._\\n\",\"enum\":[\"active\",\"terminated\",\"pending\",\"canceled\",\"incomplete\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"get-subscription-alert\",\"operation_id\":\"getSubscriptionAlert\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/alerts/{code}\",\"summary\":\"Retrieve a subscription alert\",\"description\":\"This endpoint enables the retrieval of a specific alert for a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code of the alert\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"get-subscription-charge\",\"operation_id\":\"findSubscriptionCharge\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}\",\"summary\":\"Retrieve a charge for a subscription\",\"description\":\"This endpoint retrieves a specific effective charge for a subscription.\\nIf the subscription has a plan override with a charge override, the overridden charge is returned.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"get-subscription-charge-filter\",\"operation_id\":\"findSubscriptionChargeFilter\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}\",\"summary\":\"Retrieve a charge filter\",\"description\":\"This endpoint retrieves a specific filter for a charge on a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"filter_id\",\"flag\":\"filter-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the charge filter.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"get-subscription-fixed-charge\",\"operation_id\":\"findSubscriptionFixedCharge\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/fixed_charges/{fixed_charge_code}\",\"summary\":\"Retrieve a fixed charge for a subscription\",\"description\":\"This endpoint retrieves a specific effective fixed charge for a subscription.\\nThe `units` reflect any per-subscription unit override applied to the subscription; when no override exists, the plan-level units are returned.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"fixed_charge_code\",\"flag\":\"fixed-charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing fixed charge.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"lifetime-usage\",\"operation_id\":\"getSubscriptionLifetimeUsage\",\"method\":\"GET\",\"path\":\"/subscriptions/{external_id}/lifetime_usage\",\"summary\":\"Retrieve subscription lifetime usage\",\"description\":\"This endpoint enables the retrieval of the lifetime usage of a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"list\",\"operation_id\":\"findAllSubscriptions\",\"method\":\"GET\",\"path\":\"/subscriptions\",\"summary\":\"List all subscriptions\",\"description\":\"This endpoint retrieves all active subscriptions.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter the results by currency, expressed as an ISO 4217 code.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter subscriptions by their external unique identifier (provided by your own application).\"},{\"name\":\"plan_code\",\"flag\":\"plan-code\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans.\"},{\"name\":\"overridden\",\"flag\":\"overridden\",\"in\":\"query\",\"type\":\"boolean\",\"required\":false,\"description\":\"When set, filters subscriptions by whether their plan is an override of a parent plan. `true` returns only subscriptions on overridden plans; `false` returns only those on standard (non-overridden) plans.\"},{\"name\":\"status[]\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`, `incomplete`.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter subscriptions by billing entity codes. A code that does not match a billing entity of the organization returns a `404` error.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"subscriptions\",\"action\":\"override-subscription-charge\",\"operation_id\":\"overrideSubscriptionCharge\",\"method\":\"PUT\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}\",\"summary\":\"Override a charge for a subscription\",\"description\":\"This endpoint creates or updates a charge override for a specific subscription.\\nIf the subscription does not have a plan override yet, one will be created automatically.\\nThe charge override allows customizing specific charge properties (invoice_display_name, min_amount_cents, properties, filters, taxes, applied_pricing_unit) without affecting the original plan charge.\\nThis is a premium feature.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"body\":{\"wrapper\":\"charge\",\"fields\":[{\"path\":[\"applied_pricing_unit\",\"code\"],\"flag\":\"applied-pricing-unit-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the pricing unit.\"},{\"path\":[\"applied_pricing_unit\",\"conversion_rate\"],\"flag\":\"applied-pricing-unit-conversion-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The conversion rate from pricing units to the plan's currency.\\nThis rate determines how many currency units (in the plan's base currency) equal one pricing unit.\\nFor example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50.\"},{\"path\":[\"filters\"],\"flag\":\"filters\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of filters used to apply differentiated pricing based on additional event properties.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.\"},{\"path\":[\"min_amount_cents\"],\"flag\":\"min-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"presentation_group_keys\"],\"flag\":\"properties-presentation-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Groups usage into sub-items on invoices for display only, without affecting pricing or aggregation.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"override-subscription-fixed-charge\",\"operation_id\":\"overrideSubscriptionFixedCharge\",\"method\":\"PUT\",\"path\":\"/subscriptions/{external_id}/fixed_charges/{fixed_charge_code}\",\"summary\":\"Override a fixed charge for a subscription\",\"description\":\"This endpoint creates or updates a fixed charge override for a subscription, without affecting the original plan fixed charge.\\nWhen the body contains only `units` (and optionally `apply_units_immediately`), the change is recorded as a per-subscription unit override. When the body also sets `invoice_display_name`, `properties`, or `tax_codes`, it is applied as a full plan override for the subscription instead.\\nWith `apply_units_immediately: true` on a pay-in-advance fixed charge the change is billed mid-period; otherwise it takes effect at the next billing period.\\nThis is a premium feature.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"fixed_charge_code\",\"flag\":\"fixed-charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing fixed charge.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"body\":{\"wrapper\":\"fixed_charge\",\"fields\":[{\"path\":[\"apply_units_immediately\"],\"flag\":\"apply-units-immediately\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When set to `true`, the fixed charge units are applied immediately for active subscriptions. When set to `false`, the units are applied at the next billing period.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"tax_codes\"],\"flag\":\"tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"units\"],\"flag\":\"units\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units for the fixed charge.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"terminate\",\"operation_id\":\"destroySubscription\",\"method\":\"DELETE\",\"path\":\"/subscriptions/{external_id}\",\"summary\":\"Terminate a subscription\",\"description\":\"This endpoint allows you to terminate a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Selects which subscription to terminate for the given `external_id`, based on its status. If the field is not defined, Lago targets only `active` subscriptions.\\n\\n- `pending`: cancel a subscription scheduled for a future activation (include `status=pending`).\\n- `incomplete`: cancel a payment-gated subscription that is still awaiting its activation payment (include `status=incomplete`). The subscription is canceled with `cancellation_reason: manual`, its invoice is closed and nothing is billed, and any pending payment is canceled on a best-effort basis with the payment provider (some provider statuses cannot be canceled). Applied coupons, credit notes and wallet credits are recredited. Termination behaviours (`on_termination_credit_note`, `on_termination_invoice`) are ignored, as an incomplete subscription has never been billed.\\n\"},{\"name\":\"on_termination_credit_note\",\"flag\":\"on-termination-credit-note\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"When a pay-in-advance subscription is terminated before the end of its billing period, we generate a credit note for the unused subscription time by default.\\nThis field allows you to control the behavior of the credit note generation:\\n\\n- `credit`: A credit note is generated for the unused subscription time. The unused amount is credited back to the customer.\\n- `refund`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.\\n- `offset`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due.\\n- `skip`: No credit note is generated for the unused subscription time.\\n\\n_Note: This field is only applicable to pay-in-advance plans and is ignored for pay-in-arrears plans._\\n\",\"enum\":[\"credit\",\"refund\",\"offset\",\"skip\"]},{\"name\":\"on_termination_invoice\",\"flag\":\"on-termination-invoice\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"When a subscription is terminated before the end of its billing period, we generate an invoice for the unbilled usage.\\nThis field allows you to control the behavior of the invoice generation:\\n\\n- `generate`: An invoice is generated for the unbilled usage.\\n- `skip`: No invoice is generated for the unbilled usage.\\n\",\"enum\":[\"generate\",\"skip\"]}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"update\",\"operation_id\":\"updateSubscription\",\"method\":\"PUT\",\"path\":\"/subscriptions/{external_id}\",\"summary\":\"Update a subscription\",\"description\":\"This endpoint allows you to update a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"By default, this endpoint only updates `active` subscriptions. If you want to update a subscription with a different `status`, you can specify it here.\\n\",\"enum\":[\"active\",\"pending\"]}],\"body\":{\"fields\":[{\"path\":[\"status\"],\"flag\":\"status\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"If the field is not defined and multiple `active` and `pending` subscriptions exists, Lago will update the `active` subscription. However, if you wish to update a `pending` subscription, please ensure that you include the `status` attribute with the `pending` value in your request body.\",\"enum\":[\"active\",\"pending\"]},{\"path\":[\"subscription\",\"activation_rules\"],\"flag\":\"activation-rules\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Optional list of activation rules that gate the subscription activation. Activation rules can only be set or modified while the subscription is `pending` (future-dated and not yet activated); the request is rejected for `incomplete`, `active`, or `terminated` subscriptions.\\n\"},{\"path\":[\"subscription\",\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity associated with the subscription. Updates take effect on future invoices only.\"},{\"path\":[\"subscription\",\"consolidate_invoice\"],\"flag\":\"consolidate-invoice\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Defines whether this subscription should be grouped with other subscriptions of the same customer when generating recurring invoices.\\n\\n- `true`: the subscription is included in the customer's standard invoice grouping (by billing entity, currency and payment method).\\n- `false`: the subscription is excluded from consolidation and always billed on its own dedicated invoice.\\n\"},{\"path\":[\"subscription\",\"ending_at\"],\"flag\":\"ending-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).\"},{\"path\":[\"subscription\",\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"subscription\",\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"subscription\",\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.\"},{\"path\":[\"subscription\",\"on_termination_credit_note\"],\"flag\":\"on-termination-credit-note\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Sets the default credit note behaviour applied when this subscription is later terminated before the end of its billing period:\\n\\n- `credit`: a credit note is generated for the unused subscription time. The unused amount is credited back to the customer.\\n- `refund`: a credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.\\n- `offset`: a credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due.\\n- `skip`: no credit note is generated for the unused subscription time.\\n\\n_Note: This field is only applied to pay-in-advance plans and is ignored for pay-in-arrears plans._\\n\",\"enum\":[\"credit\",\"refund\",\"offset\",\"skip\"]},{\"path\":[\"subscription\",\"on_termination_invoice\"],\"flag\":\"on-termination-invoice\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Sets the default invoice behaviour applied when this subscription is later terminated before the end of its billing period:\\n\\n- `generate`: an invoice is generated for the unbilled usage.\\n- `skip`: no invoice is generated for the unbilled usage.\\n\",\"enum\":[\"generate\",\"skip\"]},{\"path\":[\"subscription\",\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"subscription\",\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"subscription\",\"plan_overrides\",\"amount_cents\"],\"flag\":\"plan-overrides-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"amount_currency\"],\"flag\":\"plan-overrides-amount-currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"subscription\",\"plan_overrides\",\"charges\"],\"flag\":\"plan-overrides-charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Additional usage-based charges for this plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"description\"],\"flag\":\"plan-overrides-description\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The description on the plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"fixed_charges\"],\"flag\":\"plan-overrides-fixed-charges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Fixed charge overrides for the subscription. When `plan_overrides` contains only `fixed_charges` and every entry contains only `id`, `units`, and optionally `apply_units_immediately`, the units are recorded as a per-subscription override without creating a plan override, and subscription-scoped reads return these units. If any entry carries other fields, or `plan_overrides` contains any other key, the request is applied as a full plan override for the subscription instead.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"invoice_display_name\"],\"flag\":\"plan-overrides-invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"minimum_commitment\",\"amount_cents\"],\"flag\":\"plan-overrides-minimum-commitment-amount-cents\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The amount of the minimum commitment in cents.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"minimum_commitment\",\"invoice_display_name\"],\"flag\":\"plan-overrides-minimum-commitment-invoice-display-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"minimum_commitment\",\"tax_codes\"],\"flag\":\"plan-overrides-minimum-commitment-tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"name\"],\"flag\":\"plan-overrides-name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The name of the plan.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"tax_codes\"],\"flag\":\"plan-overrides-tax-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique code used to identify the taxes.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"trial_period\"],\"flag\":\"plan-overrides-trial-period\",\"type\":\"number\",\"required\":false,\"complex\":false,\"description\":\"The duration in days during which the base cost of the plan is offered for free.\"},{\"path\":[\"subscription\",\"plan_overrides\",\"usage_thresholds\"],\"flag\":\"plan-overrides-usage-thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Managing usage thresholds through `plan_overrides` is deprecated and its behavior is inconsistent: an empty array does not reliably clear thresholds (it is ignored the first time a subscription is overridden), and it never affects thresholds inherited from a parent plan. Use the top-level `usage_thresholds` array on the subscription instead, or `progressive_billing_disabled` to switch progressive billing off.\\n\"},{\"path\":[\"subscription\",\"progressive_billing_disabled\"],\"flag\":\"progressive-billing-disabled\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Disables progressive billing for this subscription, regardless of any usage thresholds defined on the plan (including thresholds inherited from a parent plan when the subscription runs on a plan override).\\n\\nSet to `true` to switch progressive billing off for this subscription specifically. This is the recommended way to stop progressive billing on a subscription that inherits thresholds from its plan, since clearing `usage_thresholds` only removes subscription-level thresholds and does not remove those defined on (or inherited from) the plan.\\n\"},{\"path\":[\"subscription\",\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with the subscription. It will be added to invoices generated for this subscription.\"},{\"path\":[\"subscription\",\"subscription_at\"],\"flag\":\"subscription-at\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"subscription\",\"usage_thresholds\"],\"flag\":\"usage-thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Usage thresholds managed directly on the subscription. This is the recommended way to set progressive billing thresholds per subscription; when present, they take precedence over the thresholds defined on the plan.\\n\\nSending an empty array removes all subscription-level thresholds. This field cannot be combined with `plan_overrides.usage_thresholds` in the same request. To fully disable progressive billing on a subscription that inherits thresholds from its plan, use `progressive_billing_disabled` instead.\\n\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"update-subscription-alert\",\"operation_id\":\"updateSubscriptionAlert\",\"method\":\"PUT\",\"path\":\"/subscriptions/{external_id}/alerts/{code}\",\"summary\":\"Update a subscription alert\",\"description\":\"This endpoint allows you to update an existing alert for a subscription. A non-empty `thresholds` array replaces the whole set of thresholds on the alert. When `thresholds` is left out, or sent as an empty array, the thresholds already on the alert are kept. A threshold sent with a `code` it already had, and without `notify_on`, keeps the `notify_on` it had.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code of the alert\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"body\":{\"wrapper\":\"alert\",\"fields\":[{\"path\":[\"billable_metric_code\"],\"flag\":\"billable-metric-code\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The code of the billable metric associated with the alert. Only for alerts based on a billable metric.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code used to identify the alert.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the alert.\"},{\"path\":[\"thresholds\"],\"flag\":\"thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Array of thresholds associated with the alert. An alert accepts at most 20 thresholds, and a larger array returns a `422` error with `too_many_thresholds` on `thresholds`. Two thresholds cannot share the same value and the same `recurring` flag. The value of a recurring threshold must be positive.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"update-subscription-charge-filter\",\"operation_id\":\"updateSubscriptionChargeFilter\",\"method\":\"PUT\",\"path\":\"/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}\",\"summary\":\"Update a charge filter\",\"description\":\"This endpoint updates a specific filter for a charge on a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription.\"},{\"name\":\"charge_code\",\"flag\":\"charge-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Code of the existing charge.\"},{\"name\":\"filter_id\",\"flag\":\"filter-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier of the charge filter.\"},{\"name\":\"subscription_status\",\"flag\":\"subscription-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\\n\",\"enum\":[\"pending\",\"active\",\"terminated\",\"canceled\",\"incomplete\"]}],\"body\":{\"wrapper\":\"filter\",\"fields\":[{\"path\":[\"cascade_updates\"],\"flag\":\"cascade-updates\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"This field determines whether the changes made to the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints.\"},{\"path\":[\"invoice_display_name\"],\"flag\":\"invoice-display-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.\"},{\"path\":[\"properties\",\"amount\"],\"flag\":\"properties-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"- The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.\\n- The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"fixed_amount\"],\"flag\":\"properties-fixed-amount\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"free_units\"],\"flag\":\"properties-free-units\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.\"},{\"path\":[\"properties\",\"free_units_per_events\"],\"flag\":\"properties-free-units-per-events\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"free_units_per_total_aggregation\"],\"flag\":\"properties-free-units-per-total-aggregation\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.\"},{\"path\":[\"properties\",\"graduated_percentage_ranges\"],\"flag\":\"properties-graduated-percentage-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model.\"},{\"path\":[\"properties\",\"graduated_ranges\"],\"flag\":\"properties-graduated-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model.\"},{\"path\":[\"properties\",\"grouped_by\"],\"flag\":\"properties-grouped-by\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"**Deprecated.** Replaced by `pricing_group_keys`.\\nThe list of event properties that are used to group the events on the invoice for a `standard` charge model.\"},{\"path\":[\"properties\",\"package_size\"],\"flag\":\"properties-package-size\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.\"},{\"path\":[\"properties\",\"per_transaction_max_amount\"],\"flag\":\"properties-per-transaction-max-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.\"},{\"path\":[\"properties\",\"per_transaction_min_amount\"],\"flag\":\"properties-per-transaction-min-amount\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.\"},{\"path\":[\"properties\",\"pricing_group_keys\"],\"flag\":\"properties-pricing-group-keys\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"The list of event properties that are used to group the events on the invoice.\"},{\"path\":[\"properties\",\"rate\"],\"flag\":\"properties-rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.\"},{\"path\":[\"properties\",\"volume_ranges\"],\"flag\":\"properties-volume-ranges\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model.\"},{\"path\":[\"values\"],\"flag\":\"values\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"List of possible filter values. The key and values must match one of the billable metric filters.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"subscriptions\",\"action\":\"update-subscription-lifetime-usage\",\"operation_id\":\"updateSubscriptionLifetimeUsage\",\"method\":\"PUT\",\"path\":\"/subscriptions/{external_id}/lifetime_usage\",\"summary\":\"Update a subscription lifetime usage\",\"description\":\"This endpoint allows you to update the lifetime usage of a subscription.\",\"docs_url\":\"https://getlago.com/docs/api-reference/subscriptions/subscription-object\",\"parameters\":[{\"name\":\"external_id\",\"flag\":\"external-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"External ID of the existing subscription\"}],\"body\":{\"wrapper\":\"lifetime_usage\",\"fields\":[{\"path\":[\"external_historical_usage_amount_cents\"],\"flag\":\"external-historical-usage-amount-cents\",\"type\":\"integer\",\"required\":true,\"complex\":false,\"description\":\"The historical usage amount in cents for the subscription (provided by your own application).\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"taxes\",\"action\":\"create\",\"operation_id\":\"createTax\",\"method\":\"POST\",\"path\":\"/taxes\",\"summary\":\"Create a tax\",\"description\":\"This endpoint creates a new tax representing a customizable tax rate applicable to either a billing entity or a specific customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/taxes/tax-object\",\"body\":{\"wrapper\":\"tax\",\"fields\":[{\"path\":[\"applied_to_organization\"],\"flag\":\"applied-to-organization\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. When set to false on an update, it removes the tax from the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique code used to identify the tax associated with the API request.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Internal description of the tax.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Name of the tax.\"},{\"path\":[\"rate\"],\"flag\":\"rate\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The percentage rate of the tax. Accepts a number or a decimal string.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"taxes\",\"action\":\"delete\",\"operation_id\":\"destroyTax\",\"method\":\"DELETE\",\"path\":\"/taxes/{code}\",\"summary\":\"Delete a tax\",\"description\":\"This endpoint is used to delete a tax.\",\"docs_url\":\"https://getlago.com/docs/api-reference/taxes/tax-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the tax. It serves as a unique identifier associated with a particular tax. The code is typically used for internal or system-level identification purposes.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"taxes\",\"action\":\"get\",\"operation_id\":\"findTax\",\"method\":\"GET\",\"path\":\"/taxes/{code}\",\"summary\":\"Retrieve a tax\",\"description\":\"This endpoint retrieves an existing tax representing a customizable tax rate applicable to either a billing entity or a specific customer. The tax is identified by its unique code.\",\"docs_url\":\"https://getlago.com/docs/api-reference/taxes/tax-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the tax. It serves as a unique identifier associated with a particular tax. The code is typically used for internal or system-level identification purposes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"taxes\",\"action\":\"list\",\"operation_id\":\"findAllTaxes\",\"method\":\"GET\",\"path\":\"/taxes\",\"summary\":\"List all taxes\",\"description\":\"This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either a billing entity or a specific customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/taxes/tax-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"taxes\",\"action\":\"update\",\"operation_id\":\"updateTax\",\"method\":\"PUT\",\"path\":\"/taxes/{code}\",\"summary\":\"Update a tax\",\"description\":\"This endpoint updates an existing tax representing a customizable tax rate applicable to either a billing entity or a specific customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/taxes/tax-object\",\"parameters\":[{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The code of the tax. It serves as a unique identifier associated with a particular tax. The code is typically used for internal or system-level identification purposes.\"}],\"body\":{\"wrapper\":\"tax\",\"fields\":[{\"path\":[\"applied_to_organization\"],\"flag\":\"applied-to-organization\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. When set to false on an update, it removes the tax from the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code used to identify the tax associated with the API request.\"},{\"path\":[\"description\"],\"flag\":\"description\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Internal description of the tax.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Name of the tax.\"},{\"path\":[\"rate\"],\"flag\":\"rate\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The percentage rate of the tax. Accepts a number or a decimal string.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"create\",\"operation_id\":\"createWallet\",\"method\":\"POST\",\"path\":\"/wallets\",\"summary\":\"Create a wallet\",\"description\":\"This endpoint is used to create a wallet with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"body\":{\"wrapper\":\"wallet\",\"fields\":[{\"path\":[\"applies_to\",\"billable_metric_codes\"],\"flag\":\"applies-to-billable-metric-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.\"},{\"path\":[\"applies_to\",\"fee_types\"],\"flag\":\"applies-to-fee-types\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.\"},{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity associated with the wallet. If not provided, the customer's billing entity is used.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The code of the wallet.\"},{\"path\":[\"currency\"],\"flag\":\"currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the wallet. Required when the customer has no currency yet. When omitted, the wallet uses the customer's currency. When provided on a customer without a currency, it also sets the customer's currency.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"expiration_at\"],\"flag\":\"expiration-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"external_customer_id\"],\"flag\":\"external-customer-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"path\":[\"granted_credits\"],\"flag\":\"granted-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of free granted credits. Required only if there is no paid credits.\"},{\"path\":[\"ignore_paid_top_up_limits_on_creation\"],\"flag\":\"ignore-paid-top-up-limits-on-creation\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"If set to true, the wallet will ignore paid top-up limits on creation.\"},{\"path\":[\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"invoice_requires_successful_payment\"],\"flag\":\"invoice-requires-successful-payment\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet.\"},{\"path\":[\"paid_credits\"],\"flag\":\"paid-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of paid credits. Required only if there is no granted credits.\"},{\"path\":[\"paid_top_up_max_amount_cents\"],\"flag\":\"paid-top-up-max-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The maximum amount, in cents, of a single paid top-up transaction.\"},{\"path\":[\"paid_top_up_min_amount_cents\"],\"flag\":\"paid-top-up-min-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The minimum amount, in cents, of a single paid top-up transaction.\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"priority\"],\"flag\":\"priority\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first.\"},{\"path\":[\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with the wallet. It will be added to invoices generated for wallet top-ups, unless a more specific purchase order number is set on the wallet transaction or recurring transaction rule that triggered the top-up.\"},{\"path\":[\"rate_amount\"],\"flag\":\"rate-amount\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.\"},{\"path\":[\"recurring_transaction_rules\"],\"flag\":\"recurring-transaction-rules\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license.\"},{\"path\":[\"transaction_metadata\"],\"flag\":\"transaction-metadata\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"This optional field allows you to store a list of key-value pairs that provide additional information or custom attributes. These key-value pairs will be included in the metadata of wallet transactions generated during the wallet creation process.\"},{\"path\":[\"transaction_name\"],\"flag\":\"transaction-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.\"},{\"path\":[\"transaction_priority\"],\"flag\":\"transaction-priority\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The priority of the wallet transactions triggered when creating the wallet. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"create-customer-wallet\",\"operation_id\":\"createCustomerWallet\",\"method\":\"POST\",\"path\":\"/customers/{external_customer_id}/wallets\",\"summary\":\"Create a wallet\",\"description\":\"This endpoint is used to create a wallet with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"}],\"body\":{\"wrapper\":\"wallet\",\"fields\":[{\"path\":[\"applies_to\",\"billable_metric_codes\"],\"flag\":\"applies-to-billable-metric-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.\"},{\"path\":[\"applies_to\",\"fee_types\"],\"flag\":\"applies-to-fee-types\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.\"},{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity associated with the wallet. If not provided, the customer's billing entity is used.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The code of the wallet.\"},{\"path\":[\"currency\"],\"flag\":\"currency\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The currency of the wallet. Required when the customer has no currency yet. When omitted, the wallet uses the customer's currency. When provided on a customer without a currency, it also sets the customer's currency.\",\"enum\":[\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BRL\",\"BSD\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHF\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"CRC\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HRK\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"ISK\",\"JMD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KRW\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRO\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SEK\",\"SGD\",\"SHP\",\"SLL\",\"SOS\",\"SRD\",\"STD\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"UYU\",\"UZS\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XCD\",\"XOF\",\"XPF\",\"YER\",\"ZAR\",\"ZMW\"]},{\"path\":[\"expiration_at\"],\"flag\":\"expiration-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"external_customer_id\"],\"flag\":\"external-customer-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"path\":[\"granted_credits\"],\"flag\":\"granted-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of free granted credits. Required only if there is no paid credits.\"},{\"path\":[\"ignore_paid_top_up_limits_on_creation\"],\"flag\":\"ignore-paid-top-up-limits-on-creation\",\"type\":\"boolean\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"If set to true, the wallet will ignore paid top-up limits on creation.\"},{\"path\":[\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"invoice_requires_successful_payment\"],\"flag\":\"invoice-requires-successful-payment\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet.\"},{\"path\":[\"paid_credits\"],\"flag\":\"paid-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of paid credits. Required only if there is no granted credits.\"},{\"path\":[\"paid_top_up_max_amount_cents\"],\"flag\":\"paid-top-up-max-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The maximum amount, in cents, of a single paid top-up transaction.\"},{\"path\":[\"paid_top_up_min_amount_cents\"],\"flag\":\"paid-top-up-min-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The minimum amount, in cents, of a single paid top-up transaction.\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"priority\"],\"flag\":\"priority\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first.\"},{\"path\":[\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with the wallet. It will be added to invoices generated for wallet top-ups, unless a more specific purchase order number is set on the wallet transaction or recurring transaction rule that triggered the top-up.\"},{\"path\":[\"rate_amount\"],\"flag\":\"rate-amount\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.\"},{\"path\":[\"recurring_transaction_rules\"],\"flag\":\"recurring-transaction-rules\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license.\"},{\"path\":[\"transaction_metadata\"],\"flag\":\"transaction-metadata\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"This optional field allows you to store a list of key-value pairs that provide additional information or custom attributes. These key-value pairs will be included in the metadata of wallet transactions generated during the wallet creation process.\"},{\"path\":[\"transaction_name\"],\"flag\":\"transaction-name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.\"},{\"path\":[\"transaction_priority\"],\"flag\":\"transaction-priority\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The priority of the wallet transactions triggered when creating the wallet. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"create-customer-wallet-alert\",\"operation_id\":\"createCustomerWalletAlert\",\"method\":\"POST\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/alerts\",\"summary\":\"Create wallet alert(s)\",\"description\":\"This endpoint allows you to create new alerts for a wallet. Send a single alert object wrapped in `alert` key to create one alert, or an array of alert objects wrapped in `alerts` key to create multiple alerts atomically.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"body\":{\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"create-wallet-transaction\",\"operation_id\":\"createWalletTransaction\",\"method\":\"POST\",\"path\":\"/wallet_transactions\",\"summary\":\"Top up a wallet\",\"description\":\"This endpoint is used to top-up an active wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"body\":{\"wrapper\":\"wallet_transaction\",\"fields\":[{\"path\":[\"granted_credits\"],\"flag\":\"granted-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of free granted credits.\"},{\"path\":[\"ignore_paid_top_up_limits\"],\"flag\":\"ignore-paid-top-up-limits\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"When true, allows topping up the wallet with transactions that exceed the paid top-up limits. Defaults to false.\"},{\"path\":[\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"invoice_requires_successful_payment\"],\"flag\":\"invoice-requires-successful-payment\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"This optional field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet transaction. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.\\n\\nNote that this name will apply to all transactions (`paid_credits`, `granted_credits` and `voided_credits`) created by this action.\\n\"},{\"path\":[\"paid_credits\"],\"flag\":\"paid-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of paid credits.\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"priority\"],\"flag\":\"priority\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"The priority of the wallet transaction. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.\"},{\"path\":[\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with this wallet transaction. It will be added to invoices generated for the resulting wallet top-up. If not set, falls back to the wallet's `purchase_order_number`.\"},{\"path\":[\"voided_credits\"],\"flag\":\"voided-credits\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The number of voided credits.\"},{\"path\":[\"voided_transaction_id\"],\"flag\":\"voided-transaction-id\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"Unique identifier of the inbound wallet transaction to void. Only available on traceable wallets, and the target transaction must still have a remaining amount.\"},{\"path\":[\"wallet_id\"],\"flag\":\"wallet-id\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"delete-all-customer-wallet-alerts\",\"operation_id\":\"deleteAllCustomerWalletAlerts\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/alerts\",\"summary\":\"Delete all wallet alerts\",\"description\":\"This endpoint allows you to delete all alerts for a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"delete-all-customer-wallet-metadata\",\"operation_id\":\"deleteAllCustomerWalletMetadata\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/metadata\",\"summary\":\"Delete all wallet metadata\",\"description\":\"This endpoint removes all metadata from a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"delete-all-wallet-metadata\",\"operation_id\":\"deleteAllWalletMetadata\",\"method\":\"DELETE\",\"path\":\"/wallets/{lago_id}/metadata\",\"summary\":\"Delete all wallet metadata\",\"description\":\"This endpoint removes all metadata from a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"delete-customer-wallet-alert\",\"operation_id\":\"deleteCustomerWalletAlert\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}\",\"summary\":\"Delete a wallet alert\",\"description\":\"This endpoint allows you to delete an existing alert for a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code of the alert\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"delete-customer-wallet-metadata-key\",\"operation_id\":\"deleteCustomerWalletMetadataKey\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/metadata/{key}\",\"summary\":\"Delete a metadata key\",\"description\":\"This endpoint removes a single metadata key from a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"},{\"name\":\"key\",\"flag\":\"key\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The metadata key to delete.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"delete-wallet-metadata-key\",\"operation_id\":\"deleteWalletMetadataKey\",\"method\":\"DELETE\",\"path\":\"/wallets/{lago_id}/metadata/{key}\",\"summary\":\"Delete a metadata key\",\"description\":\"This endpoint removes a single metadata key from a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application.\"},{\"name\":\"key\",\"flag\":\"key\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The metadata key to delete.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"destroy-customer-wallet\",\"operation_id\":\"destroyCustomerWallet\",\"method\":\"DELETE\",\"path\":\"/customers/{external_customer_id}/wallets/{code}\",\"summary\":\"Terminate a wallet\",\"description\":\"This endpoint is used to terminate an existing wallet with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"get\",\"operation_id\":\"findWallet\",\"method\":\"GET\",\"path\":\"/wallets/{lago_id}\",\"summary\":\"Retrieve a wallet\",\"description\":\"This endpoint is used to retrieve an existing wallet with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"get-customer-wallet\",\"operation_id\":\"findCustomerWallet\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/wallets/{code}\",\"summary\":\"Retrieve a wallet\",\"description\":\"This endpoint is used to retrieve an existing wallet with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"get-customer-wallet-alert\",\"operation_id\":\"getCustomerWalletAlert\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}\",\"summary\":\"Retrieve a wallet alert\",\"description\":\"This endpoint enables the retrieval of a specific alert for a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code of the alert\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"get-customer-wallet-alerts\",\"operation_id\":\"getCustomerWalletAlerts\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/alerts\",\"summary\":\"List wallet alerts\",\"description\":\"This endpoint enables the retrieval of all alerts for a wallet.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"get-wallet-transaction\",\"operation_id\":\"findWalletTransaction\",\"method\":\"GET\",\"path\":\"/wallet_transactions/{lago_id}\",\"summary\":\"Retrieve a wallet transaction\",\"description\":\"This endpoint is used to retrieve a specific wallet transaction.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"list\",\"operation_id\":\"findAllWallets\",\"method\":\"GET\",\"path\":\"/wallets\",\"summary\":\"List all wallets\",\"description\":\"This endpoint is used to list all wallets with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter the results by currency, expressed as an ISO 4217 code.\"},{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter wallets by customer external unique identifier (provided by your own application). When omitted, all wallets for the organization are returned.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter wallets by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"list-customer-wallets\",\"operation_id\":\"findAllCustomerWallets\",\"method\":\"GET\",\"path\":\"/customers/{external_customer_id}/wallets\",\"summary\":\"List all customer's wallets\",\"description\":\"This endpoint is used to list all wallets with prepaid credits of a customer.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"currency\",\"flag\":\"currency\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter the results by currency, expressed as an ISO 4217 code.\"},{\"name\":\"billing_entity_codes[]\",\"flag\":\"billing-entity-codes\",\"in\":\"query\",\"type\":\"array\",\"required\":false,\"description\":\"Filter wallets by billing entity codes.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"list-wallet-transaction-consumptions\",\"operation_id\":\"findAllWalletTransactionConsumptions\",\"method\":\"GET\",\"path\":\"/wallet_transactions/{lago_id}/consumptions\",\"summary\":\"List all consumptions for a wallet transaction\",\"description\":\"This endpoint is used to list all consumption records for an inbound wallet transaction. It shows how the credits from this inbound transaction were consumed by outbound transactions. Only available for traceable wallets.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet transaction within the Lago application. Must be an inbound wallet transaction.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"list-wallet-transaction-fundings\",\"operation_id\":\"findAllWalletTransactionFundings\",\"method\":\"GET\",\"path\":\"/wallet_transactions/{lago_id}/fundings\",\"summary\":\"List all fundings for a wallet transaction\",\"description\":\"This endpoint is used to list all funding records for an outbound wallet transaction. It shows which inbound transactions funded this outbound transaction. Only available for traceable wallets.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet transaction within the Lago application. Must be an outbound wallet transaction.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"merge-customer-wallet-metadata\",\"operation_id\":\"mergeCustomerWalletMetadata\",\"method\":\"PATCH\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/metadata\",\"summary\":\"Merge wallet metadata\",\"description\":\"This endpoint merges the provided metadata with existing metadata on the wallet.\\nExisting keys not in the request are preserved. New keys are added, existing keys are updated.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"merge-wallet-metadata\",\"operation_id\":\"mergeWalletMetadata\",\"method\":\"PATCH\",\"path\":\"/wallets/{lago_id}/metadata\",\"summary\":\"Merge wallet metadata\",\"description\":\"This endpoint merges the provided metadata with existing metadata on the wallet.\\nExisting keys not in the request are preserved. New keys are added, existing keys are updated.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"metadata\",\"operation_id\":\"replaceWalletMetadata\",\"method\":\"POST\",\"path\":\"/wallets/{lago_id}/metadata\",\"summary\":\"Replace wallet metadata\",\"description\":\"This endpoint replaces all existing metadata on a wallet with the provided key-value pairs.\\nAny existing metadata keys not included in the request will be removed.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"replace-customer-wallet-metadata\",\"operation_id\":\"replaceCustomerWalletMetadata\",\"method\":\"POST\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/metadata\",\"summary\":\"Replace wallet metadata\",\"description\":\"This endpoint replaces all existing metadata on a wallet with the provided key-value pairs.\\nAny existing metadata keys not included in the request will be removed.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"body\":{\"wrapper\":\"metadata\",\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"terminate\",\"operation_id\":\"destroyWallet\",\"method\":\"DELETE\",\"path\":\"/wallets/{lago_id}\",\"summary\":\"Terminate a wallet\",\"description\":\"This endpoint is used to terminate an existing wallet with prepaid credits.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"update\",\"operation_id\":\"updateWallet\",\"method\":\"PUT\",\"path\":\"/wallets/{lago_id}\",\"summary\":\"Update a wallet\",\"description\":\"This endpoint is used to update an existing wallet with prepaid credits. A terminated wallet cannot be updated and returns a `422` error.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.\"}],\"body\":{\"wrapper\":\"wallet\",\"fields\":[{\"path\":[\"applies_to\",\"billable_metric_codes\"],\"flag\":\"applies-to-billable-metric-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.\"},{\"path\":[\"applies_to\",\"fee_types\"],\"flag\":\"applies-to-fee-types\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.\"},{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity associated with the wallet.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The code of the wallet.\"},{\"path\":[\"expiration_at\"],\"flag\":\"expiration-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"invoice_requires_successful_payment\"],\"flag\":\"invoice-requires-successful-payment\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet.\"},{\"path\":[\"paid_top_up_max_amount_cents\"],\"flag\":\"paid-top-up-max-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The maximum amount, in cents, of a single paid top-up transaction.\"},{\"path\":[\"paid_top_up_min_amount_cents\"],\"flag\":\"paid-top-up-min-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The minimum amount, in cents, of a single paid top-up transaction.\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"priority\"],\"flag\":\"priority\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first.\"},{\"path\":[\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with the wallet. It will be added to invoices generated for wallet top-ups, unless a more specific purchase order number is set on the wallet transaction or recurring transaction rule that triggered the top-up.\"},{\"path\":[\"recurring_transaction_rules\"],\"flag\":\"recurring-transaction-rules\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"update-customer-wallet\",\"operation_id\":\"updateCustomerWallet\",\"method\":\"PUT\",\"path\":\"/customers/{external_customer_id}/wallets/{code}\",\"summary\":\"Update a wallet\",\"description\":\"This endpoint is used to update an existing wallet with prepaid credits. A terminated wallet cannot be updated and returns a `422` error.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"}],\"body\":{\"wrapper\":\"wallet\",\"fields\":[{\"path\":[\"applies_to\",\"billable_metric_codes\"],\"flag\":\"applies-to-billable-metric-codes\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.\"},{\"path\":[\"applies_to\",\"fee_types\"],\"flag\":\"applies-to-fee-types\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.\"},{\"path\":[\"billing_entity_code\"],\"flag\":\"billing-entity-code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The code of the billing entity associated with the wallet.\"},{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The code of the wallet.\"},{\"path\":[\"expiration_at\"],\"flag\":\"expiration-at\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).\"},{\"path\":[\"invoice_custom_section\",\"invoice_custom_section_codes\"],\"flag\":\"invoice-custom-section-invoice-custom-section-codes\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.\"},{\"path\":[\"invoice_custom_section\",\"skip_invoice_custom_sections\"],\"flag\":\"invoice-custom-section-skip-invoice-custom-sections\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.\"},{\"path\":[\"invoice_requires_successful_payment\"],\"flag\":\"invoice-requires-successful-payment\",\"type\":\"boolean\",\"required\":false,\"complex\":false,\"description\":\"A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.\"},{\"path\":[\"metadata\"],\"flag\":\"metadata\",\"type\":\"object\",\"required\":false,\"complex\":true,\"description\":\"Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the wallet.\"},{\"path\":[\"paid_top_up_max_amount_cents\"],\"flag\":\"paid-top-up-max-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The maximum amount, in cents, of a single paid top-up transaction.\"},{\"path\":[\"paid_top_up_min_amount_cents\"],\"flag\":\"paid-top-up-min-amount-cents\",\"type\":\"integer\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The minimum amount, in cents, of a single paid top-up transaction.\"},{\"path\":[\"payment_method\",\"payment_method_id\"],\"flag\":\"payment-method-payment-method-id\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The unique identifier of the payment method (required when using a specific provider payment method).\"},{\"path\":[\"payment_method\",\"payment_method_type\"],\"flag\":\"payment-method-payment-method-type\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The type of payment method to use.\",\"enum\":[\"provider\",\"manual\"]},{\"path\":[\"priority\"],\"flag\":\"priority\",\"type\":\"integer\",\"required\":false,\"complex\":false,\"description\":\"Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first.\"},{\"path\":[\"purchase_order_number\"],\"flag\":\"purchase-order-number\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The purchase order number associated with the wallet. It will be added to invoices generated for wallet top-ups, unless a more specific purchase order number is set on the wallet transaction or recurring transaction rule that triggered the top-up.\"},{\"path\":[\"recurring_transaction_rules\"],\"flag\":\"recurring-transaction-rules\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"update-customer-wallet-alert\",\"operation_id\":\"updateCustomerWalletAlert\",\"method\":\"PUT\",\"path\":\"/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}\",\"summary\":\"Update a wallet alert\",\"description\":\"This endpoint allows you to update an existing alert for a wallet. A non-empty `thresholds` array replaces the whole set of thresholds on the alert. When `thresholds` is left out, or sent as an empty array, the thresholds already on the alert are kept. A threshold sent with a `code` it already had, and without `notify_on`, keeps the `notify_on` it had.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"external_customer_id\",\"flag\":\"external-customer-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"The customer external unique identifier (provided by your own application)\"},{\"name\":\"wallet_code\",\"flag\":\"wallet-code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided.\"},{\"name\":\"code\",\"flag\":\"code\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique code of the alert\"}],\"body\":{\"wrapper\":\"alert\",\"fields\":[{\"path\":[\"code\"],\"flag\":\"code\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"Unique code used to identify the alert.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the alert.\"},{\"path\":[\"thresholds\"],\"flag\":\"thresholds\",\"type\":\"array\",\"required\":false,\"complex\":true,\"description\":\"Array of thresholds associated with the alert. An alert accepts at most 20 thresholds, and a larger array returns a `422` error with `too_many_thresholds` on `thresholds`. Two thresholds cannot share the same value and the same `recurring` flag. The value of a recurring threshold must be positive.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"wallets\",\"action\":\"wallet-transaction-payment-url\",\"operation_id\":\"walletTransactionPaymentUrl\",\"method\":\"POST\",\"path\":\"/wallet_transactions/{lago_id}/payment_url\",\"summary\":\"Generate a payment URL\",\"description\":\"This endpoint generates a checkout link for a specific wallet transaction.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"ID of the wallet transaction.\"}],\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"wallets\",\"action\":\"wallet-transactions\",\"operation_id\":\"findAllWalletTransactions\",\"method\":\"GET\",\"path\":\"/wallets/{lago_id}/wallet_transactions\",\"summary\":\"List all wallet transactions\",\"description\":\"This endpoint is used to list all wallet transactions.\",\"docs_url\":\"https://getlago.com/docs/api-reference/wallets/wallet-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.\"},{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"},{\"name\":\"status\",\"flag\":\"status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The status of the wallet transaction. Possible values are `pending`, `settled` or `failed`.\"},{\"name\":\"transaction_status\",\"flag\":\"transaction-status\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.\"},{\"name\":\"transaction_type\",\"flag\":\"transaction-type\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"The transaction type of the wallet transaction. Possible values are `inbound` (increasing the wallet balance) or `outbound` (decreasing the wallet balance).\"},{\"name\":\"metadata[key]\",\"flag\":\"metadata[key]\",\"in\":\"query\",\"type\":\"string\",\"required\":false,\"description\":\"Filter wallet transactions by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. For example, `metadata[color]=blue`.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"webhook-endpoints\",\"action\":\"create\",\"operation_id\":\"createWebhookEndpoint\",\"method\":\"POST\",\"path\":\"/webhook_endpoints\",\"summary\":\"Create a webhook endpoint\",\"description\":\"This endpoint is used to create a webhook endpoint. An organization can have at most 10 webhook endpoints.\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object\",\"body\":{\"wrapper\":\"webhook_endpoint\",\"fields\":[{\"path\":[\"event_types\"],\"flag\":\"event-types\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"The list of event types sent to this webhook endpoint. Pass `null` or `[\\\"*\\\"]` to receive every event type. An empty array stops every delivery.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the webhook endpoint.\"},{\"path\":[\"signature_algo\"],\"flag\":\"signature-algo\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The algorithm used to sign the webhook payload. Defaults to `jwt` when no value is passed.\",\"enum\":[\"jwt\",\"hmac\",\"\"]},{\"path\":[\"webhook_url\"],\"flag\":\"webhook-url\",\"type\":\"string\",\"required\":true,\"complex\":false,\"description\":\"The URL of the webhook endpoint. It must be unique within the organization.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"webhook-endpoints\",\"action\":\"delete\",\"operation_id\":\"destroyWebhookEndpoint\",\"method\":\"DELETE\",\"path\":\"/webhook_endpoints/{lago_id}\",\"summary\":\"Delete a webhook endpoint\",\"description\":\"This endpoint is used to delete an existing webhook endpoint.\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.\"}],\"idempotent\":false,\"dangerous\":true,\"paginated\":false,\"mutation\":true},{\"resource\":\"webhook-endpoints\",\"action\":\"get\",\"operation_id\":\"findWebhookEndpoint\",\"method\":\"GET\",\"path\":\"/webhook_endpoints/{lago_id}\",\"summary\":\"Retrieve a webhook endpoint\",\"description\":\"This endpoint is used to retrieve an existing webhook endpoint.\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"webhook-endpoints\",\"action\":\"list\",\"operation_id\":\"findAllWebhookEndpoints\",\"method\":\"GET\",\"path\":\"/webhook_endpoints\",\"summary\":\"List all webhook endpoints\",\"description\":\"This endpoint is used to list all webhook endpoints.\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object\",\"parameters\":[{\"name\":\"page\",\"flag\":\"page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page.\"},{\"name\":\"per_page\",\"flag\":\"per-page\",\"in\":\"query\",\"type\":\"integer\",\"required\":false,\"description\":\"Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records.\"}],\"idempotent\":true,\"dangerous\":false,\"paginated\":true,\"mutation\":false},{\"resource\":\"webhook-endpoints\",\"action\":\"update\",\"operation_id\":\"updateWebhookEndpoint\",\"method\":\"PUT\",\"path\":\"/webhook_endpoints/{lago_id}\",\"summary\":\"Update a webhook endpoint\",\"description\":\"This endpoint is used to update an existing webhook endpoint.\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object\",\"parameters\":[{\"name\":\"lago_id\",\"flag\":\"lago-id\",\"in\":\"path\",\"type\":\"string\",\"required\":true,\"description\":\"Unique identifier assigned to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.\"}],\"body\":{\"wrapper\":\"webhook_endpoint\",\"fields\":[{\"path\":[\"event_types\"],\"flag\":\"event-types\",\"type\":\"array\",\"required\":false,\"nullable\":true,\"complex\":true,\"description\":\"The list of event types sent to this webhook endpoint. Pass `null` or `[\\\"*\\\"]` to receive every event type. An empty array stops every delivery.\"},{\"path\":[\"name\"],\"flag\":\"name\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The name of the webhook endpoint.\"},{\"path\":[\"signature_algo\"],\"flag\":\"signature-algo\",\"type\":\"string\",\"required\":false,\"nullable\":true,\"complex\":false,\"description\":\"The algorithm used to sign the webhook payload. When the field is omitted, the current value is kept.\",\"enum\":[\"jwt\",\"hmac\",\"\"]},{\"path\":[\"webhook_url\"],\"flag\":\"webhook-url\",\"type\":\"string\",\"required\":false,\"complex\":false,\"description\":\"The URL of the webhook endpoint. It must be unique within the organization.\"}],\"required\":true},\"idempotent\":false,\"dangerous\":false,\"paginated\":false,\"mutation\":true},{\"resource\":\"webhooks\",\"action\":\"json-public-key\",\"operation_id\":\"fetchJsonPublicKey\",\"method\":\"GET\",\"path\":\"/webhooks/json_public_key\",\"summary\":\"Retrieve webhook public key (JSON)\",\"description\":\"This endpoint is used to retrieve the public key used to verify the webhook signature, wrapped in a JSON object. Prefer this endpoint over the deprecated `GET /webhooks/public_key`.\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhooks/format---signature#1-retrieve-the-public-key\",\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false},{\"resource\":\"webhooks\",\"action\":\"public-key\",\"operation_id\":\"fetchPublicKey\",\"method\":\"GET\",\"path\":\"/webhooks/public_key\",\"summary\":\"Retrieve webhook public key\",\"description\":\"**Deprecated.** Use `GET /webhooks/json_public_key` instead. This endpoint is used to retrieve the public key used to verify the webhook signature.\",\"docs_url\":\"https://getlago.com/docs/api-reference/webhooks/format---signature#1-retrieve-the-public-key\",\"idempotent\":true,\"dangerous\":false,\"paginated\":false,\"mutation\":false}]" diff --git a/man/lago-activity-logs-list.1 b/man/lago-activity-logs-list.1 index 80abe82..c824db9 100644 --- a/man/lago-activity-logs-list.1 +++ b/man/lago-activity-logs-list.1 @@ -10,16 +10,16 @@ lago-activity-logs-list - List all activity logs .SH DESCRIPTION -This endpoint retrieves all existing activity logs that represent actions performed on application resources. +This endpoint retrieves all existing activity logs that represent actions performed on application resources. Logs are returned from the most recent to the oldest. .SH OPTIONS \fB--activity-sources\fP="" - Filter results by activity sources + Filter results by activity sources. .PP \fB--activity-types\fP="" - Filter results by activity types + Filter results by activity types. .PP \fB--all\fP[=false] @@ -35,7 +35,7 @@ This endpoint retrieves all existing activity logs that represent actions perfor .PP \fB--from-date\fP="" - Filter activity logs from a specific date. + Filter activity logs logged at or after this date. A date or a full ISO 8601 datetime is accepted. .PP \fB-h\fP, \fB--help\fP[=false] @@ -47,27 +47,27 @@ This endpoint retrieves all existing activity logs that represent actions perfor .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--resource-ids\fP="" - Filter results by resources unique identifiers + Filter results by the unique identifiers of the resources the actions were applied to. .PP \fB--resource-types\fP="" - Filter results by resource class types + Filter results by resource types. .PP \fB--to-date\fP="" - Filter activity logs up to a specific date. + Filter activity logs logged at or before this date. A date or a full ISO 8601 datetime is accepted. .PP \fB--user-emails\fP="" - Filter results by user emails + Filter results by the email of the user who performed the activity. .PP \fB--watch\fP[=false] diff --git a/man/lago-add-ons-create.1 b/man/lago-add-ons-create.1 index 19518f9..5c29a5c 100644 --- a/man/lago-add-ons-create.1 +++ b/man/lago-add-ons-create.1 @@ -15,11 +15,11 @@ This endpoint is used to create an add-on that can be then attached to a one-off .SH OPTIONS \fB--amount-cents\fP="" - The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. + The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. It must be greater than zero. By creating a one-off invoice, you will be able to override this value. .PP \fB--amount-currency\fP="" - The currency of the add-on.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of the add-on.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--code\fP="" @@ -39,7 +39,7 @@ This endpoint is used to create an add-on that can be then attached to a one-off .PP \fB--invoice-display-name\fP="" - Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. + Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name. .PP \fB--name\fP="" diff --git a/man/lago-add-ons-delete.1 b/man/lago-add-ons-delete.1 index adeaf58..75eee31 100644 --- a/man/lago-add-ons-delete.1 +++ b/man/lago-add-ons-delete.1 @@ -10,7 +10,7 @@ lago-add-ons-delete - Delete an add-on .SH DESCRIPTION -This endpoint is used to delete an existing add-on. +This endpoint is used to delete an existing add-on. The fixed charges that use this add-on are deleted too. .SH OPTIONS diff --git a/man/lago-add-ons-list.1 b/man/lago-add-ons-list.1 index fa8e0d8..08c9a52 100644 --- a/man/lago-add-ons-list.1 +++ b/man/lago-add-ons-list.1 @@ -27,11 +27,11 @@ This endpoint is used to list all existing add-ons. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-add-ons-update.1 b/man/lago-add-ons-update.1 index 348678c..d295af0 100644 --- a/man/lago-add-ons-update.1 +++ b/man/lago-add-ons-update.1 @@ -15,11 +15,11 @@ This endpoint is used to update an existing add-on. .SH OPTIONS \fB--amount-cents\fP="" - The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. + The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. It must be greater than zero. By creating a one-off invoice, you will be able to override this value. .PP \fB--amount-currency\fP="" - The currency of the add-on.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of the add-on.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--code\fP="" @@ -39,7 +39,7 @@ This endpoint is used to update an existing add-on. .PP \fB--invoice-display-name\fP="" - Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. + Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name. .PP \fB--name\fP="" diff --git a/man/lago-analytics-gross-revenue.1 b/man/lago-analytics-gross-revenue.1 index 0ccbf83..499daef 100644 --- a/man/lago-analytics-gross-revenue.1 +++ b/man/lago-analytics-gross-revenue.1 @@ -10,12 +10,16 @@ lago-analytics-gross-revenue - List gross revenue .SH DESCRIPTION -Gross revenue is the sum of monthly \fBfinalized\fR invoice payments and fees paid in advance that are not invoiceable. This total is calculated after deducting taxes and discounts. +Gross revenue is the monthly sum of the totals of \fBfinalized\fR invoices and of the amounts of the fees paid in advance that are not attached to an invoice. Invoice totals include taxes, are net of coupons, and are reduced by the amounts refunded through credit notes. Self-billed invoices and invoices with a lost payment dispute are excluded. .SH OPTIONS +\fB--billing-entity-code\fP="" + Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. + +.PP \fB--currency\fP="" - Currency of revenue analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + Currency of revenue analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--external-customer-id\fP="" diff --git a/man/lago-analytics-invoice-collection.1 b/man/lago-analytics-invoice-collection.1 index b942af2..28cde25 100644 --- a/man/lago-analytics-invoice-collection.1 +++ b/man/lago-analytics-invoice-collection.1 @@ -10,12 +10,17 @@ lago-analytics-invoice-collection - List of finalized invoices .SH DESCRIPTION -Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as \fBfinalized\fR\&. This report sorts invoices categorically based on their \fBpayment_status\fR\&. +Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as \fBfinalized\fR\&. This report sorts invoices categorically based on their \fBpayment_status\fR\&. Self-billed invoices and invoices with a lost payment dispute are excluded. +This is a premium feature. .SH OPTIONS +\fB--billing-entity-code\fP="" + Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. + +.PP \fB--currency\fP="" - The currency of revenue analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of revenue analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB-h\fP, \fB--help\fP[=false] diff --git a/man/lago-analytics-invoiced-usage.1 b/man/lago-analytics-invoiced-usage.1 index f7bb85a..6f2d647 100644 --- a/man/lago-analytics-invoiced-usage.1 +++ b/man/lago-analytics-invoiced-usage.1 @@ -10,12 +10,16 @@ lago-analytics-invoiced-usage - List usage revenue .SH DESCRIPTION -Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts. +Reports the monthly revenue generated by usage-based fees, broken down by billable metric. It only counts usage that has already been invoiced, so the usage of the current billing period is not included. Amounts exclude taxes and are net of coupons. Fees on self-billed invoices and on invoices with a lost payment dispute are left out. .SH OPTIONS +\fB--billing-entity-code\fP="" + Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. + +.PP \fB--currency\fP="" - The currency of invoiced usage analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of invoiced usage analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB-h\fP, \fB--help\fP[=false] diff --git a/man/lago-analytics-mrr.1 b/man/lago-analytics-mrr.1 index 3a4e2af..c727bd9 100644 --- a/man/lago-analytics-mrr.1 +++ b/man/lago-analytics-mrr.1 @@ -10,22 +10,26 @@ lago-analytics-mrr - List MRR .SH DESCRIPTION -This endpoint is used to list MRR. - - -.SH OPTIONS -\fB--currency\fP="" - Quantifies the revenue generated from 'subscription' fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle: +Quantifies the revenue generated from \fBsubscription\fR fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle: .IP \(bu 2 -Revenue from 'monthly' subscription invoices is included in the MRR for the month in which the invoice is issued. +Revenue from \fBmonthly\fR subscription invoices is included in the MRR for the month in which the invoice is issued. .IP \(bu 2 -Revenue from 'quarterly' subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing). +Revenue from \fBquarterly\fR subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing). .IP \(bu 2 -Revenue from 'yearly' subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing). +Revenue from \fByearly\fR subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing). .IP \(bu 2 -Revenue from 'semiannual' subscription invoices is distributed evenly over six months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing). +Revenue from \fBsemiannual\fR subscription invoices is distributed evenly over six months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing). .IP \(bu 2 -Revenue from 'weekly' subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW +Revenue from \fBweekly\fR subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month. + + +.SH OPTIONS +\fB--billing-entity-code\fP="" + Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. + +.PP +\fB--currency\fP="" + The currency of MRR analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB-h\fP, \fB--help\fP[=false] diff --git a/man/lago-analytics-overdue-balance.1 b/man/lago-analytics-overdue-balance.1 index 64ff075..43cee50 100644 --- a/man/lago-analytics-overdue-balance.1 +++ b/man/lago-analytics-overdue-balance.1 @@ -10,16 +10,20 @@ lago-analytics-overdue-balance - List overdue balance .SH DESCRIPTION -Overdue balance is the total amount associated with overdue invoices (invoices with pending or failed payments which are past their due dates). +Overdue balance is the amount still due on invoices that are past their payment due date. Each entry covers one month of payment due dates and sums the invoice totals minus the amounts already paid and minus the credits applied by finalized credit notes. Self-billed invoices are excluded. .SH OPTIONS +\fB--billing-entity-code\fP="" + Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. + +.PP \fB--currency\fP="" - Currency of revenue analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + Filter the overdue balances by the currency of the invoices. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--external-customer-id\fP="" - The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level. + The customer external unique identifier (provided by your own application). Use it to restrict the overdue balances to a single customer. .PP \fB-h\fP, \fB--help\fP[=false] diff --git a/man/lago-analytics-usage.1 b/man/lago-analytics-usage.1 index 89374bd..d7517f4 100644 --- a/man/lago-analytics-usage.1 +++ b/man/lago-analytics-usage.1 @@ -10,7 +10,8 @@ lago-analytics-usage - List usage .SH DESCRIPTION -Returns usages. +Returns the usage billed by each billable metric, aggregated over the requested period and time granularity. +This is a premium feature. On a non-premium license the response always covers the last 30 days with a daily granularity, and only the \fBbillable_metric_code\fR filter is applied. .SH OPTIONS @@ -19,7 +20,7 @@ Returns usages. .PP \fB--currency\fP="" - The currency of usage analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of usage analytics. Format must be ISO 4217.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--customer-country\fP="" @@ -55,7 +56,7 @@ Returns usages. .PP \fB--time-granularity\fP="" - The time granularity of usage analytics. Possible values are 'daily', 'weekly', 'monthly', 'yearly'.; one of: daily, weekly, monthly + The time granularity of usage analytics. Possible values are 'daily', 'weekly' and 'monthly'. Defaults to 'daily'.; one of: daily, weekly, monthly .PP \fB--to-date\fP="" diff --git a/man/lago-api-logs-get.1 b/man/lago-api-logs-get.1 index 078bad2..0f01c26 100644 --- a/man/lago-api-logs-get.1 +++ b/man/lago-api-logs-get.1 @@ -2,7 +2,7 @@ .TH "LAGO" "1" "Sep 2026" "Lago CLI" "Lago CLI Manual" .SH NAME -lago-api-logs-get - Retrieve an api log +lago-api-logs-get - Retrieve an API log .SH SYNOPSIS @@ -10,7 +10,7 @@ lago-api-logs-get - Retrieve an api log .SH DESCRIPTION -This endpoint retrieves an existing api log that represents a request made to the API. The api log is identified by its unique request_id. +This endpoint retrieves an existing API log, which represents a request made to Lago's API. The API log is identified by its request id. .SH OPTIONS diff --git a/man/lago-api-logs-list.1 b/man/lago-api-logs-list.1 index 03104d1..4e9abe5 100644 --- a/man/lago-api-logs-list.1 +++ b/man/lago-api-logs-list.1 @@ -2,7 +2,7 @@ .TH "LAGO" "1" "Sep 2026" "Lago CLI" "Lago CLI Manual" .SH NAME -lago-api-logs-list - List all api logs +lago-api-logs-list - List all API logs .SH SYNOPSIS @@ -10,7 +10,7 @@ lago-api-logs-list - List all api logs .SH DESCRIPTION -This endpoint retrieves all existing api logs that represent requests performed to Lago's API. +This endpoint retrieves all existing API logs, which represent the requests made to Lago's API. Logs older than the retention period of your organization are left out. The retention period is 30 days unless another one was set for your organization. .SH OPTIONS @@ -19,11 +19,15 @@ This endpoint retrieves all existing api logs that represent requests performed .PP \fB--api-version\fP="" - Filter results by API version + Filter results by API version. + +.PP +\fB--clients\fP="" + Filter results by the client that issued the request, as reported by its user agent. .PP \fB--from-date\fP="" - Filter api logs from a specific date. + Filter API logs logged at or after this date. .PP \fB-h\fP, \fB--help\fP[=false] @@ -31,11 +35,11 @@ This endpoint retrieves all existing api logs that represent requests performed .PP \fB--http-methods\fP="" - Filter results by HTTP methods + Filter results by HTTP methods. .PP \fB--http-statuses\fP="" - Filter results by HTTP status or by generic request status + Filter results by HTTP status or by generic request status. When 'succeeded' or 'failed' is passed, the numeric values of the filter are ignored. .PP \fB--limit\fP="" @@ -43,19 +47,19 @@ This endpoint retrieves all existing api logs that represent requests performed .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--request-paths\fP="" - Filter results by the path of the request + Filter results by the path of the request. A value containing '*' is matched as a wildcard, otherwise the path must match exactly. .PP \fB--to-date\fP="" - Filter api logs up to a specific date. + Filter API logs logged at or before this date. .PP \fB--watch\fP[=false] diff --git a/man/lago-billable-metrics-create.1 b/man/lago-billable-metrics-create.1 index 10ab87d..cd5453c 100644 --- a/man/lago-billable-metrics-create.1 +++ b/man/lago-billable-metrics-create.1 @@ -27,17 +27,18 @@ This endpoint creates a new billable metric representing a pricing component of .PP \fB--expression\fP="" - Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units. -Accepted function are 'ceil', 'concat' and 'round' as well as '+', '-', '\\' and '*' operations. -Round is accepting an optional second parameter to specify the number of decimal. + Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units. +Event values are read with 'event.code', 'event.timestamp' and 'event.properties.\&'. +Accepted functions are 'ceil', 'concat', 'floor', 'greatest', 'least' and 'round' as well as '+', '-', '/' and '*' operations. +\&'ceil', 'floor' and 'round' accept an optional second parameter to specify the number of decimals. .PP \fB--field-name\fP="" - Property of the billable metric used for aggregating usage data. This field is not required for 'count_agg'. + Property of the billable metric used for aggregating usage data. It is required for every aggregation type except 'count_agg', which ignores it and stores 'null'. .PP \fB--filters\fP="" - API field (array) + List of filters of the billable metric. On update, this list replaces the existing filters: a filter that is not sent is deleted. .PP \fB-h\fP, \fB--help\fP[=false] @@ -60,18 +61,20 @@ If set to 'true': the accumulated number of units calculated from the previous b If set to 'false': the accumulated number of units is reset to 0 at the end of the billing period. .IP \(bu 2 If not defined in the request, default value is 'false'. +.IP \(bu 2 +It cannot be set to 'true' when 'aggregation_type' is 'count_agg', 'max_agg' or 'latest_agg'. .PP \fB--rounding-function\fP="" - Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are 'round', 'ceil' and 'floor'.; one of: ceil, floor, round, + Rounding applied to the aggregated number of units. Possible values are 'round', 'ceil' and 'floor'. When it is not set, the units are not rounded.; one of: ceil, floor, round, .PP \fB--rounding-precision\fP="" - Specifies the number of decimal places to which the 'rounding_function' will be rounded. It can be a positive or negative value. + Number of decimal places kept when 'rounding_function' is applied. It can be a positive or negative value, and it defaults to 0. .PP \fB--weighted-interval\fP="" - Parameter exclusively utilized in conjunction with the 'weighted_sum' aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in 'seconds'.; one of: seconds, + Parameter exclusively utilized in conjunction with the 'weighted_sum_agg' aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. It is required when 'aggregation_type' is 'weighted_sum_agg', and 'seconds' is the only accepted value.; one of: seconds, .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-billable-metrics-evaluate-expression.1 b/man/lago-billable-metrics-evaluate-expression.1 index 863c82d..71c0d32 100644 --- a/man/lago-billable-metrics-evaluate-expression.1 +++ b/man/lago-billable-metrics-evaluate-expression.1 @@ -10,7 +10,7 @@ lago-billable-metrics-evaluate-expression - Evaluate an expression for a billabl .SH DESCRIPTION -Evaluate an expression for a billable metric creation by providing the expression and test data +This endpoint evaluates an expression against a test event. Use it to check an expression before you set it on a billable metric. .SH OPTIONS @@ -19,9 +19,10 @@ Evaluate an expression for a billable metric creation by providing the expressio .PP \fB--expression\fP="" - Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units. -Accepted function are 'ceil', 'concat' and 'round' as well as '+', '-', '\\' and '*' operations. -Round is accepting an optional second parameter to specify the number of decimal. + Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units. +Event values are read with 'event.code', 'event.timestamp' and 'event.properties.\&'. +Accepted functions are 'ceil', 'concat', 'floor', 'greatest', 'least' and 'round' as well as '+', '-', '/' and '*' operations. +\&'ceil', 'floor' and 'round' accept an optional second parameter to specify the number of decimals. .PP \fB-h\fP, \fB--help\fP[=false] diff --git a/man/lago-billable-metrics-list.1 b/man/lago-billable-metrics-list.1 index 84fbc93..458e47c 100644 --- a/man/lago-billable-metrics-list.1 +++ b/man/lago-billable-metrics-list.1 @@ -27,11 +27,11 @@ This endpoint retrieves all existing billable metrics that represent pricing com .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-billable-metrics-update.1 b/man/lago-billable-metrics-update.1 index 3bd07e3..6bdb062 100644 --- a/man/lago-billable-metrics-update.1 +++ b/man/lago-billable-metrics-update.1 @@ -12,6 +12,9 @@ lago-billable-metrics-update - Update a billable metric .SH DESCRIPTION This endpoint updates an existing billable metric representing a pricing component of your application. +.PP +Once the billable metric is used by a plan charge, only \fBname\fR, \fBdescription\fR and \fBfilters\fR are applied. The other fields are ignored. + .SH OPTIONS \fB--aggregation-type\fP="" @@ -27,17 +30,18 @@ This endpoint updates an existing billable metric representing a pricing compone .PP \fB--expression\fP="" - Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units. -Accepted function are 'ceil', 'concat' and 'round' as well as '+', '-', '\\' and '*' operations. -Round is accepting an optional second parameter to specify the number of decimal. + Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units. +Event values are read with 'event.code', 'event.timestamp' and 'event.properties.\&'. +Accepted functions are 'ceil', 'concat', 'floor', 'greatest', 'least' and 'round' as well as '+', '-', '/' and '*' operations. +\&'ceil', 'floor' and 'round' accept an optional second parameter to specify the number of decimals. .PP \fB--field-name\fP="" - Property of the billable metric used for aggregating usage data. This field is not required for 'count_agg'. + Property of the billable metric used for aggregating usage data. It is required for every aggregation type except 'count_agg', which ignores it and stores 'null'. .PP \fB--filters\fP="" - API field (array) + List of filters of the billable metric. On update, this list replaces the existing filters: a filter that is not sent is deleted. .PP \fB-h\fP, \fB--help\fP[=false] @@ -60,18 +64,20 @@ If set to 'true': the accumulated number of units calculated from the previous b If set to 'false': the accumulated number of units is reset to 0 at the end of the billing period. .IP \(bu 2 If not defined in the request, default value is 'false'. +.IP \(bu 2 +It cannot be set to 'true' when 'aggregation_type' is 'count_agg', 'max_agg' or 'latest_agg'. .PP \fB--rounding-function\fP="" - Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are 'round', 'ceil' and 'floor'.; one of: ceil, floor, round, + Rounding applied to the aggregated number of units. Possible values are 'round', 'ceil' and 'floor'. When it is not set, the units are not rounded.; one of: ceil, floor, round, .PP \fB--rounding-precision\fP="" - Specifies the number of decimal places to which the 'rounding_function' will be rounded. It can be a positive or negative value. + Number of decimal places kept when 'rounding_function' is applied. It can be a positive or negative value, and it defaults to 0. .PP \fB--weighted-interval\fP="" - Parameter exclusively utilized in conjunction with the 'weighted_sum' aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in 'seconds'.; one of: seconds, + Parameter exclusively utilized in conjunction with the 'weighted_sum_agg' aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. It is required when 'aggregation_type' is 'weighted_sum_agg', and 'seconds' is the only accepted value.; one of: seconds, .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-billing-entities-create.1 b/man/lago-billing-entities-create.1 index 246ee5c..6928269 100644 --- a/man/lago-billing-entities-create.1 +++ b/man/lago-billing-entities-create.1 @@ -23,15 +23,15 @@ This endpoint is used to create a new billing entity .PP \fB--billing-configuration-document-locale\fP="" - The language of the documents generated for this billing entity + The language of the documents generated for this billing entity, in the ISO 639-1 format. .PP \fB--billing-configuration-invoice-footer\fP="" - The footer text to be displayed on invoices for this billing entity + The footer text to be displayed on invoices for this billing entity (600 characters max). .PP \fB--billing-configuration-invoice-grace-period\fP="" - The grace period (in days) for invoice finalization + The grace period (in days) for invoice finalization. This is a premium feature, the value is ignored without a premium license. .PP \fB--billing-configuration-subscription-invoice-issuing-date-adjustment\fP="" @@ -55,11 +55,11 @@ This endpoint is used to create a new billing entity .PP \fB--default-currency\fP="" - The default currency of the billing entity; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The default currency of the billing entity; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--document-number-prefix\fP="" - The prefix used in document numbers for this billing entity + The prefix used in document numbers for this billing entity (1 to 10 characters). It is upper cased. When it is not provided, Lago builds one from the first three letters of the name and the last four characters of the identifier. .PP \fB--document-numbering\fP="" @@ -69,7 +69,7 @@ This endpoint is used to create a new billing entity .PP \fB--einvoicing\fP="" - Whether e-invoicing is enabled for this billing entity + Whether e-invoicing is enabled for this billing entity. It can only be enabled when the billing entity country is 'FR' or 'DE'. .PP \fB--email\fP="" @@ -77,11 +77,11 @@ This endpoint is used to create a new billing entity .PP \fB--email-settings\fP="" - The email notification settings for this billing entity + The email notification settings for this billing entity. This is a premium feature, the value is ignored without a premium license. .PP \fB--eu-tax-management\fP="" - Whether EU tax management is enabled for this billing entity + Whether EU tax management is enabled for this billing entity. It can only be enabled when the billing entity country is in the European Union. .PP \fB--finalize-zero-amount-invoice\fP="" @@ -105,7 +105,7 @@ This endpoint is used to create a new billing entity .PP \fB--logo\fP="" - The base64 encoded logo image for the billing entity + The base64 encoded logo image for the billing entity. Accepted formats are PNG, JPG and JPEG, up to 800 kB. .PP \fB--name\fP="" @@ -129,7 +129,7 @@ This endpoint is used to create a new billing entity .PP \fB--timezone\fP="" - The timezone of the billing entity; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu + The timezone of the billing entity. This is a premium feature, the value is ignored without a premium license.; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu .PP \fB--zipcode\fP="" diff --git a/man/lago-billing-entities-update.1 b/man/lago-billing-entities-update.1 index 98845d1..34edbf8 100644 --- a/man/lago-billing-entities-update.1 +++ b/man/lago-billing-entities-update.1 @@ -23,15 +23,15 @@ This endpoint is used to update an existing billing entity .PP \fB--billing-configuration-document-locale\fP="" - The language of the documents generated for this billing entity + The language of the documents generated for this billing entity, in the ISO 639-1 format. .PP \fB--billing-configuration-invoice-footer\fP="" - The footer text to be displayed on invoices for this billing entity + The footer text to be displayed on invoices for this billing entity (600 characters max). .PP \fB--billing-configuration-invoice-grace-period\fP="" - The grace period (in days) for invoice finalization + The grace period (in days) for invoice finalization. This is a premium feature, the value is ignored without a premium license. .PP \fB--billing-configuration-subscription-invoice-issuing-date-adjustment\fP="" @@ -51,11 +51,11 @@ This endpoint is used to update an existing billing entity .PP \fB--default-currency\fP="" - The default currency of the billing entity; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The default currency of the billing entity; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--document-number-prefix\fP="" - The prefix used in document numbers for this billing entity + The prefix used in document numbers for this billing entity (1 to 10 characters). It is upper cased. It cannot be removed once the billing entity exists, and sending 'null' returns a '422' error. .PP \fB--document-numbering\fP="" @@ -65,7 +65,7 @@ This endpoint is used to update an existing billing entity .PP \fB--einvoicing\fP="" - Whether e-invoicing is enabled for this billing entity + Whether e-invoicing is enabled for this billing entity. It can only be enabled when the billing entity country is 'FR' or 'DE'. .PP \fB--email\fP="" @@ -73,11 +73,11 @@ This endpoint is used to update an existing billing entity .PP \fB--email-settings\fP="" - The email notification settings for this billing entity + The email notification settings for this billing entity. This is a premium feature, the value is ignored without a premium license. .PP \fB--eu-tax-management\fP="" - Whether EU tax management is enabled for this billing entity + Whether EU tax management is enabled for this billing entity. It can only be enabled when the billing entity country is in the European Union. .PP \fB--finalize-zero-amount-invoice\fP="" @@ -105,7 +105,7 @@ This endpoint is used to update an existing billing entity .PP \fB--logo\fP="" - The base64 encoded logo image for the billing entity. Sending "null" will remove the logo, if any exist. + The base64 encoded logo image for the billing entity. Accepted formats are PNG, JPG and JPEG, up to 800 kB. Sending "null" removes the current logo. .PP \fB--name\fP="" @@ -125,7 +125,7 @@ This endpoint is used to update an existing billing entity .PP \fB--tax-codes\fP="" - The tax codes that should be associated with this billing entity + The tax codes that should be associated with this billing entity. Codes are matched without case sensitivity, and two codes that differ only by case count as one. An unknown code returns a '404' error. .PP \fB--tax-identification-number\fP="" @@ -133,7 +133,7 @@ This endpoint is used to update an existing billing entity .PP \fB--timezone\fP="" - The timezone of the billing entity; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu + The timezone of the billing entity. This is a premium feature, the value is ignored without a premium license.; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu .PP \fB--zipcode\fP="" diff --git a/man/lago-coupons-apply.1 b/man/lago-coupons-apply.1 index 9f4b30b..56e1272 100644 --- a/man/lago-coupons-apply.1 +++ b/man/lago-coupons-apply.1 @@ -15,11 +15,11 @@ This endpoint is used to apply a specific coupon to a customer, before or during .SH OPTIONS \fB--amount-cents\fP="" - The amount of the coupon in cents. This field is required only for coupon with 'fixed_amount' type. + The amount of the coupon in cents. If it is not set, the amount of the coupon is used. .PP \fB--amount-currency\fP="" - The currency of the coupon. This field is required only for coupon with 'fixed_amount' type.; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of the coupon amount. If it is not set, the currency of the coupon is used.; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--coupon-code\fP="" @@ -37,11 +37,14 @@ If set to 'once', the coupon is applicable only for a single use. .IP \(bu 2 If set to 'recurring', the coupon can be used multiple times for recurring billing periods. .IP \(bu 2 -If set to 'forever', the coupon has unlimited usage and can be applied indefinitely.; one of: once, recurring, forever, +If set to 'forever', the coupon has unlimited usage and can be applied indefinitely. + +.PP +If it is not set, the frequency of the coupon is used.; one of: once, recurring, forever, .PP \fB--frequency-duration\fP="" - Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a 'recurring' frequency type + The number of billing periods to which the coupon applies. If it is not set, the frequency duration of the coupon is used. A 'recurring' applied coupon must end up with a frequency duration greater than 0. .PP \fB-h\fP, \fB--help\fP[=false] @@ -53,7 +56,7 @@ If set to 'forever', the coupon has unlimited usage and can be applied indefinit .PP \fB--percentage-rate\fP="" - The percentage rate of the coupon. This field is required only for coupons with a 'percentage' coupon type. + The percentage rate of the coupon. Accepts a number or a decimal string. If it is not set, the percentage rate of the coupon is used. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-coupons-create.1 b/man/lago-coupons-create.1 index 03a8d48..25a1473 100644 --- a/man/lago-coupons-create.1 +++ b/man/lago-coupons-create.1 @@ -19,7 +19,7 @@ This endpoint is used to create a coupon that can be then attached to a customer .PP \fB--amount-currency\fP="" - The currency of the coupon. This field is required only for coupon with 'fixed_amount' type.; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of the coupon. This field is required only for coupon with 'fixed_amount' type.; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--applies-to-billable-metric-codes\fP="" @@ -69,7 +69,7 @@ If set to 'forever', the coupon has unlimited usage and can be applied indefinit .PP \fB--frequency-duration\fP="" - Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a 'recurring' frequency type + Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a 'recurring' frequency type. .PP \fB-h\fP, \fB--help\fP[=false] @@ -85,7 +85,7 @@ If set to 'forever', the coupon has unlimited usage and can be applied indefinit .PP \fB--percentage-rate\fP="" - The percentage rate of the coupon. This field is required only for coupons with a 'percentage' coupon type. + The percentage rate of the coupon. Accepts a number or a decimal string. This field is required only for coupons with a 'percentage' coupon type. .PP \fB--reusable\fP="" diff --git a/man/lago-coupons-list-applied-coupons.1 b/man/lago-coupons-list-applied-coupons.1 index dc84564..e3dbdd7 100644 --- a/man/lago-coupons-list-applied-coupons.1 +++ b/man/lago-coupons-list-applied-coupons.1 @@ -35,11 +35,11 @@ This endpoint is used to list all applied coupons. You can filter by coupon stat .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--status\fP="" diff --git a/man/lago-coupons-list.1 b/man/lago-coupons-list.1 index f7a7f04..15caba0 100644 --- a/man/lago-coupons-list.1 +++ b/man/lago-coupons-list.1 @@ -27,11 +27,11 @@ This endpoint is used to list all existing coupons. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-coupons-update.1 b/man/lago-coupons-update.1 index 98a4570..4053028 100644 --- a/man/lago-coupons-update.1 +++ b/man/lago-coupons-update.1 @@ -12,6 +12,9 @@ lago-coupons-update - Update a coupon .SH DESCRIPTION This endpoint is used to update a coupon that can be then attached to a customer to create a discount. +.PP +Once the coupon has been applied to at least one customer, only \fBname\fR, \fBdescription\fR, \fBexpiration\fR and \fBexpiration_at\fR are updated. The other fields in the payload are ignored. + .SH OPTIONS \fB--amount-cents\fP="" @@ -19,7 +22,7 @@ This endpoint is used to update a coupon that can be then attached to a customer .PP \fB--amount-currency\fP="" - The currency of the coupon. This field is required only for coupon with 'fixed_amount' type.; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of the coupon. This field is required only for coupon with 'fixed_amount' type.; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--applies-to-billable-metric-codes\fP="" @@ -69,7 +72,7 @@ If set to 'forever', the coupon has unlimited usage and can be applied indefinit .PP \fB--frequency-duration\fP="" - Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a 'recurring' frequency type + Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a 'recurring' frequency type. .PP \fB-h\fP, \fB--help\fP[=false] @@ -85,7 +88,7 @@ If set to 'forever', the coupon has unlimited usage and can be applied indefinit .PP \fB--percentage-rate\fP="" - The percentage rate of the coupon. This field is required only for coupons with a 'percentage' coupon type. + The percentage rate of the coupon. Accepts a number or a decimal string. This field is required only for coupons with a 'percentage' coupon type. .PP \fB--reusable\fP="" diff --git a/man/lago-credit-notes-create.1 b/man/lago-credit-notes-create.1 index d1f63eb..0ced7db 100644 --- a/man/lago-credit-notes-create.1 +++ b/man/lago-credit-notes-create.1 @@ -11,6 +11,8 @@ lago-credit-notes-create - Create a credit note .SH DESCRIPTION This endpoint creates a new credit note. +This is a premium feature. +A credit note cannot be issued on an invoice in a \fBpending\fR or \fBfailed\fR status. In that case the endpoint returns a \fB405\fR error with the \fBinvalid_type_or_status\fR code. .SH OPTIONS diff --git a/man/lago-credit-notes-download.1 b/man/lago-credit-notes-download.1 index 7b9007d..9a0f6a3 100644 --- a/man/lago-credit-notes-download.1 +++ b/man/lago-credit-notes-download.1 @@ -10,7 +10,8 @@ lago-credit-notes-download - Download a credit note PDF .SH DESCRIPTION -This endpoint downloads the PDF of an existing credit note. +This endpoint downloads the PDF of an existing credit note. Only \fBfinalized\fR credit notes can be downloaded; any other credit note returns a \fB404\fR error. +When the PDF has already been generated, the credit note object is returned and its \fBfile_url\fR points to the document. When it has not been generated yet, the response is a \fB200\fR with an empty body and the generation starts in the background. Call the endpoint again to get the credit note object with its \fBfile_url\fR\&. .SH OPTIONS diff --git a/man/lago-credit-notes-estimate.1 b/man/lago-credit-notes-estimate.1 index a247021..d11fc46 100644 --- a/man/lago-credit-notes-estimate.1 +++ b/man/lago-credit-notes-estimate.1 @@ -11,6 +11,8 @@ lago-credit-notes-estimate - Estimate amounts for a new credit note .SH DESCRIPTION This endpoint allows you to retrieve amounts for a new credit note creation. +This is a premium feature. +Amounts cannot be estimated on an invoice in a \fBpending\fR or \fBfailed\fR status. In that case the endpoint returns a \fB405\fR error with the \fBinvalid_type_or_status\fR code. .SH OPTIONS diff --git a/man/lago-credit-notes-list.1 b/man/lago-credit-notes-list.1 index c76b300..8a3299a 100644 --- a/man/lago-credit-notes-list.1 +++ b/man/lago-credit-notes-list.1 @@ -10,7 +10,7 @@ lago-credit-notes-list - List all credit notes .SH DESCRIPTION -This endpoint list all existing credit notes. +This endpoint lists all existing credit notes. .SH OPTIONS @@ -63,11 +63,11 @@ This endpoint list all existing credit notes. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--purchase-order-number\fP="" diff --git a/man/lago-customers-applied-coupons.1 b/man/lago-customers-applied-coupons.1 index 6577d21..e1c5b25 100644 --- a/man/lago-customers-applied-coupons.1 +++ b/man/lago-customers-applied-coupons.1 @@ -31,11 +31,11 @@ This endpoint is used to list all applied coupons for a customer. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--status\fP="" diff --git a/man/lago-customers-create.1 b/man/lago-customers-create.1 index 3ee5b8a..a752c10 100644 --- a/man/lago-customers-create.1 +++ b/man/lago-customers-create.1 @@ -10,7 +10,7 @@ lago-customers-create - Create a customer .SH DESCRIPTION -This endpoint creates a new customer. +This endpoint creates a customer. When a customer with the same \fBexternal_id\fR already exists, it is updated instead, and only the fields present in the payload are changed. .SH OPTIONS @@ -20,15 +20,15 @@ This endpoint creates a new customer. - 'partner': the account is a partner. .PP -This field is only applied when revenue share is enabled on your organization; otherwise it is ignored.; one of: customer, partner +This field is only applied when revenue share is enabled on your organization and the customer has no subscription, invoice, add-on, fixed-amount coupon or wallet yet; otherwise it is ignored.; one of: customer, partner .PP \fB--address-line1\fP="" - The first line of the billing address + The first line of the billing address (500 characters max). .PP \fB--address-line2\fP="" - The second line of the billing address + The second line of the billing address (500 characters max). .PP \fB--billing-configuration-document-locale\fP="" @@ -36,12 +36,12 @@ This field is only applied when revenue share is enabled on your organization; o .PP \fB--billing-configuration-invoice-grace-period\fP="" - The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items + The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items. It is null when the customer has no grace period of its own and falls back to the billing entity. This is a premium feature, the value is ignored without a premium license. .PP \fB--billing-configuration-payment-provider\fP="" The payment provider utilized to initiate payments for invoices issued by Lago. -Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'moneyhash' or null. This field is required if you intend to assign a 'provider_customer_id'.; one of: stripe, adyen, cashfree, flutterwave, gocardless, moneyhash +Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'moneyhash' or null. This field is required if you intend to assign a 'provider_customer_id'. Send null to detach the customer from its current payment provider.; one of: stripe, adyen, cashfree, flutterwave, gocardless, moneyhash, .PP \fB--billing-configuration-payment-provider-code\fP="" @@ -77,7 +77,7 @@ Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'mo .PP \fB--city\fP="" - The city of the customer's billing address + The city of the customer's billing address (255 characters max). .PP \fB--country\fP="" @@ -85,7 +85,7 @@ Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'mo .PP \fB--currency\fP="" - Currency of the customer. Format must be ISO 4217; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + Currency of the customer. Format must be ISO 4217; one of: , AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--customer-type\fP="" @@ -114,7 +114,7 @@ Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'mo .PP \fB--firstname\fP="" - First name of the customer + First name of the customer (255 characters max). .PP \fB-h\fP, \fB--help\fP[=false] @@ -126,7 +126,7 @@ Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'mo .PP \fB--integration-customers\fP="" - API field (array) + The integration customers to create or update for this customer. Only one entry per 'integration_type' is accepted; sending two entries with the same type returns a '422' error with 'invalid_count_per_integration_type' on 'integration_customers'. .PP \fB--invoice-custom-section-codes\fP="" @@ -134,11 +134,11 @@ Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'mo .PP \fB--lastname\fP="" - Last name of the customer + Last name of the customer (255 characters max). .PP \fB--legal-name\fP="" - The legal company name of the customer + The legal company name of the customer (255 characters max). .PP \fB--legal-number\fP="" @@ -150,7 +150,7 @@ Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'mo .PP \fB--metadata\fP="" - Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format + Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format. A customer can hold up to 5 key-value pairs. .PP \fB--name\fP="" @@ -166,27 +166,27 @@ Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'mo .PP \fB--shipping-address-address-line1\fP="" - The first line of the billing address + API field (string) .PP \fB--shipping-address-address-line2\fP="" - The second line of the billing address + API field (string) .PP \fB--shipping-address-city\fP="" - The city of the customer's billing address + API field (string) .PP \fB--shipping-address-country\fP="" - Country code of the customer's billing address. Format must be ISO 3166 (alpha-2); one of: , AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW + Country code of the customer's shipping address. Format must be ISO 3166 (alpha-2); one of: , AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW .PP \fB--shipping-address-state\fP="" - The state of the customer's billing address + API field (string) .PP \fB--shipping-address-zipcode\fP="" - The zipcode of the customer's billing address + API field (string) .PP \fB--skip-invoice-custom-sections\fP="" @@ -194,7 +194,7 @@ Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'mo .PP \fB--state\fP="" - The state of the customer's billing address + The state of the customer's billing address (255 characters max). .PP \fB--tax-codes\fP="" @@ -202,11 +202,11 @@ Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'mo .PP \fB--tax-identification-number\fP="" - The tax identification number of the customer + The tax identification number of the customer (255 characters max). .PP \fB--timezone\fP="" - The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone; one of: , UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Godthab, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Rangoon, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kiev, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu + The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone. This is a premium feature, the value is ignored without a premium license.; one of: , UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Godthab, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Rangoon, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kiev, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu .PP \fB--url\fP="" @@ -214,7 +214,7 @@ Accepted values: 'stripe', 'adyen', 'cashfree', 'flutterwave', 'gocardless', 'mo .PP \fB--zipcode\fP="" - The zipcode of the customer's billing address + The zipcode of the customer's billing address (255 characters max). .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-customers-credit-notes.1 b/man/lago-customers-credit-notes.1 index 7b154b7..12c413c 100644 --- a/man/lago-customers-credit-notes.1 +++ b/man/lago-customers-credit-notes.1 @@ -10,7 +10,7 @@ lago-customers-credit-notes - List all customer's credit notes .SH DESCRIPTION -This endpoint list all existing credit notes for a customer. +This endpoint lists all existing credit notes for a customer. .SH OPTIONS @@ -25,9 +25,17 @@ This endpoint list all existing credit notes for a customer. \fB--amount-to\fP="" Filter credit notes up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types. +.PP +\fB--billing-entity-codes\fP="" + Filter credit notes by billing entity codes. + .PP \fB--credit-status\fP="" - Filter credit notes by credit status. Possible values are 'available', 'consumed' or 'voided'.; one of: available, consumed, voided + Filter credit notes by credit status. Possible values are 'available', 'consumed' or 'voided'.; one of: available, consumed, voided + +.PP +\fB--currency\fP="" + Filter credit notes by currency. Possible values ISO 4217 currency codes. .PP \fB-h\fP, \fB--help\fP[=false] @@ -51,11 +59,11 @@ This endpoint list all existing credit notes for a customer. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--purchase-order-number\fP="" @@ -67,7 +75,7 @@ This endpoint list all existing credit notes for a customer. .PP \fB--refund-status\fP="" - Filter credit notes by refund status. Possible values are 'pending', 'succeeded' or 'failed'.; one of: pending, succeeded, failed + Filter credit notes by refund status. Possible values are 'pending', 'succeeded' or 'failed'.; one of: pending, succeeded, failed .PP \fB--search-term\fP="" @@ -77,6 +85,10 @@ This endpoint list all existing credit notes for a customer. \fB--self-billed\fP="" Filter credit notes belonging to a self billed invoice. Possible values are 'true' or 'false'. +.PP +\fB--types\fP="" + Filter credit notes by the kind of amount they carry. 'credit' matches credit notes with a credited amount, 'refund' those with a refunded amount and 'offset' those with an amount deducted from the invoice balance. A credit note can match several types. + .PP \fB--watch\fP[=false] Poll and re-render when the response changes diff --git a/man/lago-customers-current-usage.1 b/man/lago-customers-current-usage.1 index b8fabc9..22b53e0 100644 --- a/man/lago-customers-current-usage.1 +++ b/man/lago-customers-current-usage.1 @@ -51,7 +51,7 @@ This endpoint enables the retrieval of the usage-based billing data for a custom .PP \fB--full-usage\fP="" - When 'true', returns usage since subscription start instead of the current billing period. Requires one of 'charge_id', 'charge_code', 'group' (or their deprecated 'filter\fIby\fP*' equivalents) to be set. + When 'true', returns usage since the subscription started instead of the current billing period. It requires the granular lifetime usage add-on, at least one of 'charge_id', 'charge_code', 'billable_metric_code' or 'group' (or their deprecated 'filter\fIby\fP*' equivalents), and a subscription without prorated charges. The request returns '405' when one of these conditions is not met. .PP \fB--group\fP="" diff --git a/man/lago-customers-export.1 b/man/lago-customers-export.1 index 16e9c89..aa5d12a 100644 --- a/man/lago-customers-export.1 +++ b/man/lago-customers-export.1 @@ -63,11 +63,11 @@ This endpoint retrieves all existing customers. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--search-term\fP="" diff --git a/man/lago-customers-invoices.1 b/man/lago-customers-invoices.1 index 5ceffe9..aacd24c 100644 --- a/man/lago-customers-invoices.1 +++ b/man/lago-customers-invoices.1 @@ -25,6 +25,14 @@ This endpoint is used for retrieving all invoices of a customer. \fB--amount-to\fP="" Filter invoices up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types. +.PP +\fB--billing-entity-codes\fP="" + Filter invoices by billing entity codes. Possible values are the billing entity codes you have created. + +.PP +\fB--currency\fP="" + Filter invoices by currency. Possible values ISO 4217 currency codes. + .PP \fB-h\fP, \fB--help\fP[=false] help for invoices @@ -51,7 +59,11 @@ This endpoint is used for retrieving all invoices of a customer. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + +.PP +\fB--partially-paid\fP="" + Filter invoices that are partially paid. When 'true', only invoices with a non-zero amount paid that is below the total due are returned. When 'false', those invoices are excluded. .PP \fB--payment-dispute-lost\fP="" @@ -65,9 +77,13 @@ This endpoint is used for retrieving all invoices of a customer. \fB--payment-status\fP="" Filter invoices by payment status. Possible values are 'pending', 'failed' or 'succeeded'.; one of: pending, failed, succeeded +.PP +\fB--payment-statuses\fP="" + Filter invoices by payment statuses. Possible values are 'pending', 'failed' or 'succeeded'. + .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--purchase-order-number\fP="" @@ -75,15 +91,23 @@ This endpoint is used for retrieving all invoices of a customer. .PP \fB--search-term\fP="" - Search invoices by id, number, customer name, customer external_id or customer email. + Search the customer's invoices by id or number. Customer attributes are not searched here, because the list is already scoped to one customer. .PP \fB--self-billed\fP="" Filter invoices by self billed. Possible values are 'true' or 'false'. +.PP +\fB--settlements\fP="" + Filter invoices settled by at least one of the given settlement types. 'payment' matches invoices settled by a payment, 'credit_note' matches invoices settled by a credit note. + .PP \fB--status\fP="" - Filter invoices by status. Possible values are 'draft' or 'finalized'.; one of: draft, finalized + Filter invoices by status. Possible values are 'draft', 'failed', 'finalized', 'pending' and 'voided'.; one of: draft, finalized, failed, pending, voided + +.PP +\fB--statuses\fP="" + Filter invoices by statuses. Possible values are 'draft', 'failed', 'finalized', 'pending' and 'voided'. .PP \fB--watch\fP[=false] diff --git a/man/lago-customers-list.1 b/man/lago-customers-list.1 index d679afb..591a771 100644 --- a/man/lago-customers-list.1 +++ b/man/lago-customers-list.1 @@ -63,11 +63,11 @@ This endpoint retrieves all existing customers. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--search-term\fP="" diff --git a/man/lago-customers-past-usage.1 b/man/lago-customers-past-usage.1 index f43b3ab..b470a94 100644 --- a/man/lago-customers-past-usage.1 +++ b/man/lago-customers-past-usage.1 @@ -35,15 +35,15 @@ This endpoint enables the retrieval of the usage-based billing data for a custom .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--periods-count\fP="" - Number of past billing period to returns in the result + Number of past billing periods to return in the result. .PP \fB--watch\fP[=false] diff --git a/man/lago-customers-payment-requests.1 b/man/lago-customers-payment-requests.1 index 870ce44..2ee7390 100644 --- a/man/lago-customers-payment-requests.1 +++ b/man/lago-customers-payment-requests.1 @@ -21,6 +21,10 @@ This endpoint is used to list all existing payment requests of a customer. \fB--billing-entity-codes\fP="" Filter payment requests by billing entity codes. +.PP +\fB--currency\fP="" + Filter the results by currency, expressed as an ISO 4217 code. + .PP \fB-h\fP, \fB--help\fP[=false] help for payment-requests @@ -31,7 +35,7 @@ This endpoint is used to list all existing payment requests of a customer. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--payment-status\fP="" @@ -39,7 +43,7 @@ This endpoint is used to list all existing payment requests of a customer. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-customers-payments.1 b/man/lago-customers-payments.1 index 122b269..fd10791 100644 --- a/man/lago-customers-payments.1 +++ b/man/lago-customers-payments.1 @@ -31,11 +31,11 @@ This endpoint is used to list all payments of a customer .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-customers-portal-url.1 b/man/lago-customers-portal-url.1 index 9170157..e7c8a50 100644 --- a/man/lago-customers-portal-url.1 +++ b/man/lago-customers-portal-url.1 @@ -13,7 +13,10 @@ lago-customers-portal-url - Get a customer portal URL Retrieves an embeddable link for displaying a customer portal. .PP -This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal +This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal. + +.PP +The portal lets the customer update their information and top up their wallets, so when API key permissions are enabled, the API key needs the \fBwrite\fR permission on \fBcustomer\fR\&. .SH OPTIONS diff --git a/man/lago-customers-projected-usage.1 b/man/lago-customers-projected-usage.1 index 09ec500..7a2a199 100644 --- a/man/lago-customers-projected-usage.1 +++ b/man/lago-customers-projected-usage.1 @@ -17,10 +17,30 @@ This endpoint enables the retrieval of the usage-based billing data for a custom \fB--apply-taxes\fP="" Optional flag to determine if taxes should be applied. Defaults to 'true' if not provided or if null. +.PP +\fB--billable-metric-code\fP="" + Filter usage to a specific billable metric by its code. + +.PP +\fB--charge-code\fP="" + Filter usage to a specific charge by its code. + +.PP +\fB--charge-id\fP="" + Filter usage to a specific charge by its Lago ID (UUID). + .PP \fB--external-subscription-id\fP="" The unique identifier of the subscription within your application. +.PP +\fB--filter-by-presentation\fP="" + Filter 'presentation_breakdowns' by a JSON-encoded array of presentation group key values. Only breakdowns matching the provided values will be returned. Pass an empty array to disable 'presentation_breakdowns' entirely. + +.PP +\fB--group\fP="" + Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. 'group[cloud]=aws'. + .PP \fB-h\fP, \fB--help\fP[=false] help for projected-usage diff --git a/man/lago-customers-subscriptions.1 b/man/lago-customers-subscriptions.1 index 1a171bd..bba5045 100644 --- a/man/lago-customers-subscriptions.1 +++ b/man/lago-customers-subscriptions.1 @@ -21,6 +21,14 @@ This endpoint retrieves all active subscriptions for a customer. \fB--billing-entity-codes\fP="" Filter subscriptions by billing entity codes. +.PP +\fB--currency\fP="" + Filter the results by currency, expressed as an ISO 4217 code. + +.PP +\fB--external-id\fP="" + The subscription external unique identifier (provided by your own application). + .PP \fB-h\fP, \fB--help\fP[=false] help for subscriptions @@ -29,13 +37,17 @@ This endpoint retrieves all active subscriptions for a customer. \fB--limit\fP="" Results per page (1-1000) +.PP +\fB--overridden\fP="" + When set, filters subscriptions by whether their plan is an override of a parent plan. 'true' returns only subscriptions on overridden plans; 'false' returns only those on standard (non-overridden) plans. + .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--plan-code\fP="" @@ -43,7 +55,7 @@ This endpoint retrieves all active subscriptions for a customer. .PP \fB--status\fP="" - If the field is not defined, Lago will return only 'active' subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: 'pending', 'canceled', 'terminated', 'active'. + If the field is not defined, Lago will return only 'active' subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: 'pending', 'canceled', 'terminated', 'active', 'incomplete'. .PP \fB--watch\fP[=false] diff --git a/man/lago-entitlements-create.1 b/man/lago-entitlements-create.1 index da47b80..876ba06 100644 --- a/man/lago-entitlements-create.1 +++ b/man/lago-entitlements-create.1 @@ -10,7 +10,7 @@ lago-entitlements-create - Create an entitlement .SH DESCRIPTION -This endpoint creates new entitlements by adding features to a plan. Note that all existing entitlements will be deleted and replaced by the ones provided. To add a new entitlement without removing the existing ones, use PATCH. The feature must exist and all privileges must be valid for the feature. +This endpoint creates new entitlements by adding features to a plan. Note that all existing entitlements will be deleted and replaced by the ones provided. Sending an empty \fBentitlements\fR object, or omitting the key, therefore removes every entitlement of the plan. To add a new entitlement without removing the existing ones, use PATCH. The feature must exist and all privileges must be valid for the feature. .SH OPTIONS diff --git a/man/lago-entitlements-destroy-subscription-entitlement-privilege.1 b/man/lago-entitlements-destroy-subscription-entitlement-privilege.1 index fb5d980..0e6cbf8 100644 --- a/man/lago-entitlements-destroy-subscription-entitlement-privilege.1 +++ b/man/lago-entitlements-destroy-subscription-entitlement-privilege.1 @@ -10,7 +10,7 @@ lago-entitlements-destroy-subscription-entitlement-privilege - Remove a privileg .SH DESCRIPTION -This endpoint removes a specific privilege from a subscription entitlement. The privilege entitlement remains available from the plan. +This endpoint removes a specific privilege from a subscription entitlement. The plan keeps the privilege and other subscriptions are not affected, but this subscription stops getting it. It returns the full list of entitlements remaining on the subscription. .SH OPTIONS @@ -19,7 +19,7 @@ This endpoint removes a specific privilege from a subscription entitlement. The .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-entitlements-destroy-subscription-entitlement.1 b/man/lago-entitlements-destroy-subscription-entitlement.1 index ba89d77..afee364 100644 --- a/man/lago-entitlements-destroy-subscription-entitlement.1 +++ b/man/lago-entitlements-destroy-subscription-entitlement.1 @@ -10,7 +10,7 @@ lago-entitlements-destroy-subscription-entitlement - Remove an entitlement from .SH DESCRIPTION -This endpoint removes a specific feature entitlement from a subscription. The entitlement remains available from the plan. +This endpoint removes a specific feature entitlement from a subscription. The plan keeps the feature and other subscriptions are not affected, but this subscription stops getting it. It returns the full list of entitlements remaining on the subscription. .SH OPTIONS @@ -19,7 +19,7 @@ This endpoint removes a specific feature entitlement from a subscription. The en .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-entitlements-list-subscription-entitlements.1 b/man/lago-entitlements-list-subscription-entitlements.1 index bab2fd2..2227e5c 100644 --- a/man/lago-entitlements-list-subscription-entitlements.1 +++ b/man/lago-entitlements-list-subscription-entitlements.1 @@ -19,7 +19,7 @@ This endpoint retrieves all entitlements for a specific subscription, including .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--watch\fP[=false] diff --git a/man/lago-entitlements-update-subscription-entitlements.1 b/man/lago-entitlements-update-subscription-entitlements.1 index 81accf0..b62cebf 100644 --- a/man/lago-entitlements-update-subscription-entitlements.1 +++ b/man/lago-entitlements-update-subscription-entitlements.1 @@ -10,7 +10,7 @@ lago-entitlements-update-subscription-entitlements - Update subscription entitle .SH DESCRIPTION -This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints. +This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints. .SH OPTIONS @@ -23,7 +23,7 @@ This accepts a list of entitlements to update. If the feature isn't part of the .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-entitlements-update.1 b/man/lago-entitlements-update.1 index 8d2bf18..58f97f5 100644 --- a/man/lago-entitlements-update.1 +++ b/man/lago-entitlements-update.1 @@ -10,7 +10,7 @@ lago-entitlements-update - Partial update of an entitlement .SH DESCRIPTION -This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints. +This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints. .SH OPTIONS diff --git a/man/lago-events-estimate-fees.1 b/man/lago-events-estimate-fees.1 index 3fe4091..2e8ec3e 100644 --- a/man/lago-events-estimate-fees.1 +++ b/man/lago-events-estimate-fees.1 @@ -29,6 +29,10 @@ Estimate the fees that would be created after reception of an event for a billab \fB--input\fP="" Complete JSON request body or @file.json +.PP +\fB--precise-total-amount-cents\fP="" + The precise total amount in cents with precision used by the 'dynamic' pricing model to compute the estimated usage amount. Defaults to '0' when omitted. + .PP \fB--properties\fP="" This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a 'sum_agg', 'max_agg', or 'unique_count_agg' aggregation method. However, when using a simple 'count_agg', this object is not required. Any property of the targeted billable metric can be sent here, in addition to the documented fields below. diff --git a/man/lago-events-get.1 b/man/lago-events-get.1 index 6ea365c..8e52f2b 100644 --- a/man/lago-events-get.1 +++ b/man/lago-events-get.1 @@ -10,7 +10,7 @@ lago-events-get - Retrieve a specific event .SH DESCRIPTION -This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription. +This endpoint is used for retrieving a specific usage measurement event that has been sent to a subscription. .PP Note that transaction_id is unique per external_subscription_id so multiple subscriptions can share the same transaction_id. This endpoint will only return the first event found with the given transaction_id. diff --git a/man/lago-events-list.1 b/man/lago-events-list.1 index d25685a..e066632 100644 --- a/man/lago-events-list.1 +++ b/man/lago-events-list.1 @@ -19,7 +19,7 @@ This endpoint is used for retrieving all events. .PP \fB--code\fP="" - Filter events by its code. + Filter events by code. .PP \fB--external-subscription-id\fP="" @@ -35,11 +35,11 @@ This endpoint is used for retrieving all events. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--timestamp-from\fP="" @@ -47,7 +47,7 @@ This endpoint is used for retrieving all events. .PP \fB--timestamp-from-started-at\fP="" - Requires 'external_subscription_id' to be set. Filter events by timestamp after the subscription started at datetime. + Requires 'external_subscription_id' to be set, and cannot be combined with 'timestamp_from'. Filter events by timestamp after the subscription started at datetime. .PP \fB--timestamp-to\fP="" diff --git a/man/lago-events-send.1 b/man/lago-events-send.1 index fbc305b..d7d4ab3 100644 --- a/man/lago-events-send.1 +++ b/man/lago-events-send.1 @@ -2,7 +2,7 @@ .TH "LAGO" "1" "Sep 2026" "Lago CLI" "Lago CLI Manual" .SH NAME -lago-events-send - Send usage events +lago-events-send - Send a usage event .SH SYNOPSIS @@ -10,7 +10,7 @@ lago-events-send - Send usage events .SH DESCRIPTION -This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription. +This endpoint is used for transmitting a usage measurement event to a subscription. .SH OPTIONS @@ -49,7 +49,7 @@ This endpoint is used for transmitting usage measurement events to either a desi \fB--timestamp\fP="" This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC). If this timestamp is not provided, the API will automatically set it to the time of event reception. -You can also provide miliseconds precision by appending decimals to the timestamp. +You can also provide milliseconds precision by appending decimals to the timestamp. .PP \fB--transaction-id\fP="" diff --git a/man/lago-features-create.1 b/man/lago-features-create.1 index cb0c3e8..ed04ebf 100644 --- a/man/lago-features-create.1 +++ b/man/lago-features-create.1 @@ -15,11 +15,11 @@ This endpoint creates a new feature representing an entitlement component of you .SH OPTIONS \fB--code\fP="" - Unique code used to identify the feature. + Unique code used to identify the feature. Max 255 characters. .PP \fB--description\fP="" - Internal description of the feature. + Internal description of the feature. Max 600 characters. .PP \fB-h\fP, \fB--help\fP[=false] @@ -31,11 +31,11 @@ This endpoint creates a new feature representing an entitlement component of you .PP \fB--name\fP="" - Name of the feature. + Name of the feature. Max 255 characters. .PP \fB--privileges\fP="" - Privileges associated with this feature. Can be empty. + Privileges associated with this feature. Can be empty. Each privilege code must appear only once in the list. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-features-delete-feature-privilege.1 b/man/lago-features-delete-feature-privilege.1 index 9aba427..6c54634 100644 --- a/man/lago-features-delete-feature-privilege.1 +++ b/man/lago-features-delete-feature-privilege.1 @@ -2,7 +2,7 @@ .TH "LAGO" "1" "Sep 2026" "Lago CLI" "Lago CLI Manual" .SH NAME -lago-features-delete-feature-privilege - Delete a privilege. Deleting a privilege removes it from all plans and subscriptions. +lago-features-delete-feature-privilege - Delete a privilege .SH SYNOPSIS @@ -10,7 +10,7 @@ lago-features-delete-feature-privilege - Delete a privilege. Deleting a privileg .SH DESCRIPTION -Delete privilege from feature. Deleting a privilege removes it from all plans and subscriptions. +This endpoint deletes a privilege from a feature. Deleting a privilege removes it from all plans and subscriptions. .SH OPTIONS diff --git a/man/lago-features-list.1 b/man/lago-features-list.1 index 88ce925..673d9d3 100644 --- a/man/lago-features-list.1 +++ b/man/lago-features-list.1 @@ -27,15 +27,15 @@ This endpoint retrieves all existing features that represent entitlement compone .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--search-term\fP="" - Search in name, code and description. + Filter features by search term. The term is matched against the name, the code and the description of the feature. .PP \fB--watch\fP[=false] diff --git a/man/lago-features-update.1 b/man/lago-features-update.1 index ab79da6..9bfb017 100644 --- a/man/lago-features-update.1 +++ b/man/lago-features-update.1 @@ -10,12 +10,12 @@ lago-features-update - Update a feature .SH DESCRIPTION -This endpoint updates an existing feature representing an entitlement component of your application. +This endpoint updates an existing feature representing an entitlement component of your application. Only the fields present in the payload are updated. Privileges are matched by their code, an unknown code adds a new privilege and a known one updates its name and adds the select options of the payload to the existing ones. The value type of an existing privilege cannot be changed. Privileges left out of the payload are kept, use the delete privilege endpoint to remove one. .SH OPTIONS \fB--description\fP="" - Internal description of the feature. + Internal description of the feature. Max 600 characters. .PP \fB-h\fP, \fB--help\fP[=false] @@ -27,11 +27,11 @@ This endpoint updates an existing feature representing an entitlement component .PP \fB--name\fP="" - Name of the feature. + Name of the feature. Max 255 characters. .PP \fB--privileges\fP="" - Privileges associated with this feature. Can be empty. + Privileges associated with this feature. Can be empty. Each privilege code must appear only once in the list. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-fees-list.1 b/man/lago-fees-list.1 index 358999c..6c80d09 100644 --- a/man/lago-fees-list.1 +++ b/man/lago-fees-list.1 @@ -31,7 +31,7 @@ This endpoint is used for retrieving all fees that have been issued. .PP \fB--currency\fP="" - Filter results by the fee's currency.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + Filter results by the fee's currency.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--event-transaction-id\fP="" @@ -67,7 +67,7 @@ This endpoint is used for retrieving all fees that have been issued. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--payment-status\fP="" @@ -75,7 +75,7 @@ This endpoint is used for retrieving all fees that have been issued. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--refunded-at-from\fP="" diff --git a/man/lago-fees-update.1 b/man/lago-fees-update.1 index 66f5b39..d61ee5f 100644 --- a/man/lago-fees-update.1 +++ b/man/lago-fees-update.1 @@ -10,7 +10,7 @@ lago-fees-update - Update a fee .SH DESCRIPTION -This endpoint is used for updating a specific fee that has been issued. +This endpoint is used for updating the payment status of a specific fee. Only a fee that is not attached to an invoice can be updated; once the fee is on an invoice, its payment status follows the invoice and the endpoint returns a \fB405\fR error. .SH OPTIONS diff --git a/man/lago-invoices-create.1 b/man/lago-invoices-create.1 index b1e62d9..2ffc82e 100644 --- a/man/lago-invoices-create.1 +++ b/man/lago-invoices-create.1 @@ -19,7 +19,7 @@ This endpoint is used for issuing a one-off invoice. .PP \fB--currency\fP="" - The currency of the invoice.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of the invoice.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--external-customer-id\fP="" diff --git a/man/lago-invoices-download.1 b/man/lago-invoices-download.1 index 02237d5..b686e30 100644 --- a/man/lago-invoices-download.1 +++ b/man/lago-invoices-download.1 @@ -10,7 +10,8 @@ lago-invoices-download - Download an invoice PDF .SH DESCRIPTION -This endpoint is used for downloading a specific invoice PDF document. +This endpoint is used for downloading a specific invoice PDF document. Only \fBfinalized\fR invoices can be downloaded; any other invoice returns a \fB404\fR error. +When the PDF has already been generated, the invoice object is returned and its \fBfile_url\fR points to the document. When it has not been generated yet, the response is a \fB200\fR with an empty body and the generation starts in the background. Call the endpoint again to get the invoice object with its \fBfile_url\fR\&. .SH OPTIONS diff --git a/man/lago-invoices-list.1 b/man/lago-invoices-list.1 index 1c6ec6e..3ba53da 100644 --- a/man/lago-invoices-list.1 +++ b/man/lago-invoices-list.1 @@ -63,7 +63,7 @@ This endpoint is used for retrieving all invoices. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--partially-paid\fP="" @@ -77,13 +77,17 @@ This endpoint is used for retrieving all invoices. \fB--payment-overdue\fP="" Filter invoices by payment_overdue. Possible values are 'true' or 'false'. +.PP +\fB--payment-status\fP="" + Filter invoices by payment status. Possible values are 'pending', 'failed' or 'succeeded'.; one of: pending, failed, succeeded + .PP \fB--payment-statuses\fP="" Filter invoices by payment statuses. Possible values are 'pending', 'failed' or 'succeeded'. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--purchase-order-number\fP="" @@ -91,7 +95,7 @@ This endpoint is used for retrieving all invoices. .PP \fB--search-term\fP="" - Search invoices by id, number, customer name, customer external_id or customer email. + Search invoices by id, number, purchase order number, or by the name, legal name, first name, last name, external_id or email of the customer. .PP \fB--self-billed\fP="" @@ -101,6 +105,10 @@ This endpoint is used for retrieving all invoices. \fB--settlements\fP="" Filter invoices settled by at least one of the given settlement types. 'payment' matches invoices settled by a payment, 'credit_note' matches invoices settled by a credit note. +.PP +\fB--status\fP="" + Filter invoices by status. Possible values are 'draft', 'failed', 'finalized', 'pending' and 'voided'.; one of: draft, finalized, failed, pending, voided + .PP \fB--statuses\fP="" Filter invoices by statuses. Possible values are 'draft', 'failed', 'finalized', 'pending' and 'voided'. diff --git a/man/lago-invoices-preview.1 b/man/lago-invoices-preview.1 index f75cabd..794d8d1 100644 --- a/man/lago-invoices-preview.1 +++ b/man/lago-invoices-preview.1 @@ -43,7 +43,7 @@ This endpoint is used for generating invoice preview. .PP \fB--currency\fP="" - The currency of the invoice.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of the invoice.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--external-id\fP="" @@ -71,27 +71,27 @@ This endpoint is used for generating invoice preview. .PP \fB--shipping-address-address-line1\fP="" - The first line of the billing address + The first line of the shipping address .PP \fB--shipping-address-address-line2\fP="" - The second line of the billing address + The second line of the shipping address .PP \fB--shipping-address-city\fP="" - The city of the customer's billing address + The city of the customer's shipping address .PP \fB--shipping-address-country\fP="" - Country code of the customer's billing address. Format must be ISO 3166 (alpha-2); one of: , AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW + Country code of the customer's shipping address. Format must be ISO 3166 (alpha-2); one of: , AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW .PP \fB--shipping-address-state\fP="" - The state of the customer's billing address + The state of the customer's shipping address .PP \fB--shipping-address-zipcode\fP="" - The zipcode of the customer's billing address + The zipcode of the customer's shipping address .PP \fB--state\fP="" @@ -121,6 +121,10 @@ This endpoint is used for generating invoice preview. \fB--timezone\fP="" The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu +.PP +\fB--zipcode\fP="" + The zipcode of the customer's billing address. + .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB--api-key\fP="" diff --git a/man/lago-order-forms-list.1 b/man/lago-order-forms-list.1 index 7a0c404..26ee82c 100644 --- a/man/lago-order-forms-list.1 +++ b/man/lago-order-forms-list.1 @@ -56,11 +56,11 @@ This is a premium feature. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--quote-number\fP="" diff --git a/man/lago-orders-list.1 b/man/lago-orders-list.1 index fbf61c0..86a2b9a 100644 --- a/man/lago-orders-list.1 +++ b/man/lago-orders-list.1 @@ -60,11 +60,11 @@ This is a premium feature. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--quote-number\fP="" diff --git a/man/lago-organizations-update.1 b/man/lago-organizations-update.1 index f1ea305..21c97c8 100644 --- a/man/lago-organizations-update.1 +++ b/man/lago-organizations-update.1 @@ -10,7 +10,7 @@ lago-organizations-update - Update your organization .SH DESCRIPTION -This endpoint is used to update your own organization's settings. +This endpoint is used to update your own organization's settings. The same payload is also applied to the default billing entity of your organization. .SH OPTIONS @@ -27,11 +27,11 @@ This endpoint is used to update your own organization's settings. .PP \fB--billing-configuration-invoice-footer\fP="" - The customer invoice message that appears at the bottom of each billing documents. + The customer invoice message that appears at the bottom of each billing documents. It accepts up to 600 characters. .PP \fB--billing-configuration-invoice-grace-period\fP="" - The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period. + The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period. This is a premium feature, the value is ignored without a premium license. .PP \fB--city\fP="" @@ -43,11 +43,11 @@ This endpoint is used to update your own organization's settings. .PP \fB--default-currency\fP="" - The default currency of an organization.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The default currency of an organization.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--document-number-prefix\fP="" - Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four digits of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago. + Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four characters of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago. .PP \fB--document-numbering\fP="" @@ -66,7 +66,7 @@ The default value for 'document_numbering' is set to 'per_customer', meaning tha .PP \fB--email-settings\fP="" - Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values are 'invoice.finalized', 'credit_note.created' and 'payment_receipt.created'. + Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values are 'invoice.finalized', 'credit_note.created' and 'payment_receipt.created'. This is a premium feature, the value is ignored without a premium license. .PP \fB--finalize-zero-amount-invoice\fP="" @@ -94,7 +94,7 @@ The default value for 'document_numbering' is set to 'per_customer', meaning tha .PP \fB--slug\fP="" - A concise and unique identifier for your organization, used as a prefix in customer slugs. + A concise and unique identifier for your organization. It must contain between 3 and 40 characters, limited to lowercase letters, digits and hyphens, and it must start and end with a letter or a digit. Lago trims it and converts it to lowercase before saving it. A value already taken by another organization, or one of the names Lago reserves for its own routes, is rejected. .PP \fB--state\fP="" @@ -106,11 +106,11 @@ The default value for 'document_numbering' is set to 'per_customer', meaning tha .PP \fB--timezone\fP="" - Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu + Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. This is a premium feature, the value is ignored without a premium license.; one of: UTC, Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Nuuk, America/Phoenix, America/Puerto_Rico, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Novosibirsk, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yangon, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Perth, Australia/Sydney, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kyiv, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Europe/Zurich, GMT+12, Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu .PP \fB--webhook-url\fP="" - The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner. + Sets the URL of the first webhook endpoint of your organization. This URL allows your organization to receive important messages, notifications, or data from the Lago system. When your organization has no webhook endpoint yet, this creates one. .PP \fB--zipcode\fP="" diff --git a/man/lago-payment-methods-list-customers-payment-methods.1 b/man/lago-payment-methods-list-customers-payment-methods.1 index 0fdc6d6..7547709 100644 --- a/man/lago-payment-methods-list-customers-payment-methods.1 +++ b/man/lago-payment-methods-list-customers-payment-methods.1 @@ -10,7 +10,7 @@ lago-payment-methods-list-customers-payment-methods - List all customer payment .SH DESCRIPTION -This endpoint retrieves all payment methods of a Customer. +This endpoint retrieves all payment methods of a customer. .SH OPTIONS @@ -27,11 +27,11 @@ This endpoint retrieves all payment methods of a Customer. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-payment-methods-payment-method-set-as-default.1 b/man/lago-payment-methods-payment-method-set-as-default.1 index 1f234d7..2bd84f6 100644 --- a/man/lago-payment-methods-payment-method-set-as-default.1 +++ b/man/lago-payment-methods-payment-method-set-as-default.1 @@ -10,7 +10,7 @@ lago-payment-methods-payment-method-set-as-default - Set the payment method as d .SH DESCRIPTION -Use the payment method as default when not selected a payment method +This endpoint sets a payment method as the customer's default one. It is the payment method Lago uses when a payment is triggered without an explicit one. Any other default payment method of the customer is unset. .SH OPTIONS diff --git a/man/lago-payment-receipts-list.1 b/man/lago-payment-receipts-list.1 index 05a5a6a..456339f 100644 --- a/man/lago-payment-receipts-list.1 +++ b/man/lago-payment-receipts-list.1 @@ -23,7 +23,7 @@ This endpoint is used to list all existing payment receipts. .PP \fB--invoice-id\fP="" - Filter payment receipts by invoice id. + Filter payment receipts by invoice. It returns the receipts of the payments made on this invoice, including the payments made through a payment request that covers it. .PP \fB--limit\fP="" @@ -31,11 +31,11 @@ This endpoint is used to list all existing payment receipts. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-payment-requests-create.1 b/man/lago-payment-requests-create.1 index 30192da..08c06f1 100644 --- a/man/lago-payment-requests-create.1 +++ b/man/lago-payment-requests-create.1 @@ -10,16 +10,16 @@ lago-payment-requests-create - Create a payment request .SH DESCRIPTION -This endpoint is used to create a payment request to collect payments of overdue invoices of a given customer +This endpoint is used to create a payment request to collect the payment of the overdue invoices of a customer. .SH OPTIONS \fB--email\fP="" - The customer's email address used for sending dunning notifications + The email address used for sending dunning notifications. When omitted, the customer's own email address is used. .PP \fB--external-customer-id\fP="" - The customer external unique identifier (provided by your own application) + The customer external unique identifier (provided by your own application). .PP \fB-h\fP, \fB--help\fP[=false] @@ -31,7 +31,7 @@ This endpoint is used to create a payment request to collect payments of overdue .PP \fB--lago-invoice-ids\fP="" - A list of Lago IDs for the customer's overdue invoices to start the dunning process + A list of Lago IDs for the customer's overdue invoices to start the dunning process. .PP \fB--payment-method-payment-method-id\fP="" diff --git a/man/lago-payment-requests-list.1 b/man/lago-payment-requests-list.1 index 8f69c82..f297dc7 100644 --- a/man/lago-payment-requests-list.1 +++ b/man/lago-payment-requests-list.1 @@ -39,7 +39,7 @@ This endpoint is used to list all existing payment requests. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--payment-status\fP="" @@ -47,7 +47,7 @@ This endpoint is used to list all existing payment requests. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-payments-create.1 b/man/lago-payments-create.1 index 9e8684a..ea4fe42 100644 --- a/man/lago-payments-create.1 +++ b/man/lago-payments-create.1 @@ -15,7 +15,7 @@ This endpoint is used to create a manual payment .SH OPTIONS \fB--amount-cents\fP="" - The payment amount in cents + The payment amount in cents. It must be greater than zero. .PP \fB-h\fP, \fB--help\fP[=false] @@ -27,15 +27,15 @@ This endpoint is used to create a manual payment .PP \fB--invoice-id\fP="" - Unique identifier assigned to the invoice + Unique identifier of the invoice the payment is recorded on, created by Lago. .PP \fB--paid-at\fP="" - The date the payment was made + The date the payment was made. It is returned as the payment's 'created_at'. When omitted, the date and time of the request is used. .PP \fB--reference\fP="" - Reference for the payment + Reference for the payment, such as the bank transfer or cheque number. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-payments-list.1 b/man/lago-payments-list.1 index ad56213..c046b84 100644 --- a/man/lago-payments-list.1 +++ b/man/lago-payments-list.1 @@ -35,11 +35,11 @@ This endpoint is used to list all payments .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-plans-charges.1 b/man/lago-plans-charges.1 index 797099c..559a6b1 100644 --- a/man/lago-plans-charges.1 +++ b/man/lago-plans-charges.1 @@ -27,11 +27,11 @@ This endpoint retrieves all charges for a specific plan. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-plans-create-plan-charge-filter.1 b/man/lago-plans-create-plan-charge-filter.1 index e72c745..92258ab 100644 --- a/man/lago-plans-create-plan-charge-filter.1 +++ b/man/lago-plans-create-plan-charge-filter.1 @@ -15,7 +15,7 @@ This endpoint creates a new filter for a specific charge. .SH OPTIONS \fB--cascade-updates\fP="" - This field determines whether the creation of the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. + This field determines whether the creation of the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints. .PP \fB-h\fP, \fB--help\fP[=false] diff --git a/man/lago-plans-create.1 b/man/lago-plans-create.1 index 9808c07..53cdb4a 100644 --- a/man/lago-plans-create.1 +++ b/man/lago-plans-create.1 @@ -19,7 +19,7 @@ This endpoint creates a plan with subscription and usage-based charges. It suppo .PP \fB--amount-currency\fP="" - The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--bill-charges-monthly\fP="" diff --git a/man/lago-plans-filters.1 b/man/lago-plans-filters.1 index f35db39..df5ea76 100644 --- a/man/lago-plans-filters.1 +++ b/man/lago-plans-filters.1 @@ -27,11 +27,11 @@ This endpoint retrieves all filters for a specific charge. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-plans-fixed-charges.1 b/man/lago-plans-fixed-charges.1 index 8c8aeb8..5bc83d9 100644 --- a/man/lago-plans-fixed-charges.1 +++ b/man/lago-plans-fixed-charges.1 @@ -27,11 +27,11 @@ This endpoint retrieves all fixed charges for a specific plan. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-plans-list.1 b/man/lago-plans-list.1 index e29d6a8..743f7e6 100644 --- a/man/lago-plans-list.1 +++ b/man/lago-plans-list.1 @@ -27,11 +27,11 @@ This endpoint retrieves all existing plans. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-plans-update-plan-charge-filter.1 b/man/lago-plans-update-plan-charge-filter.1 index f3980ab..fd247cd 100644 --- a/man/lago-plans-update-plan-charge-filter.1 +++ b/man/lago-plans-update-plan-charge-filter.1 @@ -15,7 +15,7 @@ This endpoint updates a specific filter for a charge. .SH OPTIONS \fB--cascade-updates\fP="" - This field determines whether the changes made to the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. + This field determines whether the changes made to the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints. .PP \fB-h\fP, \fB--help\fP[=false] diff --git a/man/lago-plans-update-plan-charge.1 b/man/lago-plans-update-plan-charge.1 index ea788c9..6c5d9b9 100644 --- a/man/lago-plans-update-plan-charge.1 +++ b/man/lago-plans-update-plan-charge.1 @@ -12,6 +12,12 @@ lago-plans-update-plan-charge - Update a charge .SH DESCRIPTION This endpoint updates a specific charge for a plan. +.PP +The payload replaces the charge configuration: \fBcharge_model\fR must be sent on every update, and \fBinvoice_display_name\fR is cleared when it is left out. + +.PP +Once the plan is attached to a subscription, only \fBinvoice_display_name\fR, \fBproperties\fR, \fBfilters\fR, \fBtax_codes\fR, \fBapplied_pricing_unit\fR and \fBaccepts_target_wallet\fR are applied. The other fields are ignored. + .SH OPTIONS \fB--accepts-target-wallet\fP="" diff --git a/man/lago-plans-update-plan-fixed-charge.1 b/man/lago-plans-update-plan-fixed-charge.1 index f7996e2..17720d6 100644 --- a/man/lago-plans-update-plan-fixed-charge.1 +++ b/man/lago-plans-update-plan-fixed-charge.1 @@ -12,6 +12,12 @@ lago-plans-update-plan-fixed-charge - Update a fixed charge .SH DESCRIPTION This endpoint updates a specific fixed charge for a plan. +.PP +The payload replaces the fixed charge configuration: \fBunits\fR and \fBcharge_model\fR must be sent on every update, and \fBinvoice_display_name\fR is cleared when it is left out. + +.PP +Once the plan is attached to a subscription, \fBcode\fR and \fBcharge_model\fR are ignored. + .SH OPTIONS \fB--add-on-code\fP="" diff --git a/man/lago-plans-update.1 b/man/lago-plans-update.1 index b718e48..b7e3638 100644 --- a/man/lago-plans-update.1 +++ b/man/lago-plans-update.1 @@ -19,7 +19,7 @@ This endpoint updates a specific plan with subscription and usage-based charges. .PP \fB--amount-currency\fP="" - The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--bill-charges-monthly\fP="" diff --git a/man/lago-quotes-list.1 b/man/lago-quotes-list.1 index da2db22..10285d5 100644 --- a/man/lago-quotes-list.1 +++ b/man/lago-quotes-list.1 @@ -49,11 +49,11 @@ This is a premium feature. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--status\fP="" diff --git a/man/lago-quotes-versions.1 b/man/lago-quotes-versions.1 index 3c98528..e77421e 100644 --- a/man/lago-quotes-versions.1 +++ b/man/lago-quotes-versions.1 @@ -29,11 +29,11 @@ This is a premium feature. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-subscriptions-alerts.1 b/man/lago-subscriptions-alerts.1 index 9ced6a2..09b6e76 100644 --- a/man/lago-subscriptions-alerts.1 +++ b/man/lago-subscriptions-alerts.1 @@ -14,12 +14,28 @@ This endpoint enables the retrieval of all alerts for a subscription. .SH OPTIONS +\fB--all\fP[=false] + Fetch every page + +.PP \fB-h\fP, \fB--help\fP[=false] help for alerts +.PP +\fB--limit\fP="" + Results per page (1-1000) + +.PP +\fB--page\fP="" + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + +.PP +\fB--per-page\fP="" + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. + .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--watch\fP[=false] diff --git a/man/lago-subscriptions-charges.1 b/man/lago-subscriptions-charges.1 index 12656b7..147cda8 100644 --- a/man/lago-subscriptions-charges.1 +++ b/man/lago-subscriptions-charges.1 @@ -28,15 +28,15 @@ If the subscription has plan overrides with charge overrides, the overridden cha .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--watch\fP[=false] diff --git a/man/lago-subscriptions-create-subscription-alert.1 b/man/lago-subscriptions-create-subscription-alert.1 index 499cb03..72c77ae 100644 --- a/man/lago-subscriptions-create-subscription-alert.1 +++ b/man/lago-subscriptions-create-subscription-alert.1 @@ -23,7 +23,7 @@ This endpoint allows you to create alerts for a subscription. Send a single aler .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-subscriptions-create-subscription-charge-filter.1 b/man/lago-subscriptions-create-subscription-charge-filter.1 index d03647c..d663180 100644 --- a/man/lago-subscriptions-create-subscription-charge-filter.1 +++ b/man/lago-subscriptions-create-subscription-charge-filter.1 @@ -15,7 +15,7 @@ This endpoint creates a new filter for a specific charge on a subscription. .SH OPTIONS \fB--cascade-updates\fP="" - This field determines whether the creation of the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. + This field determines whether the creation of the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints. .PP \fB-h\fP, \fB--help\fP[=false] @@ -89,7 +89,7 @@ The list of event properties that are used to group the events on the invoice fo .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--values\fP="" diff --git a/man/lago-subscriptions-create.1 b/man/lago-subscriptions-create.1 index df27d6a..be543f6 100644 --- a/man/lago-subscriptions-create.1 +++ b/man/lago-subscriptions-create.1 @@ -91,7 +91,7 @@ This endpoint assigns a plan to a customer, creating or modifying a subscription .PP \fB--plan-overrides-amount-currency\fP="" - The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--plan-overrides-charges\fP="" @@ -109,10 +109,6 @@ This endpoint assigns a plan to a customer, creating or modifying a subscription \fB--plan-overrides-invoice-display-name\fP="" Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name. -.PP -\fB--plan-overrides-metadata\fP="" - Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. - .PP \fB--plan-overrides-minimum-commitment-amount-cents\fP="" The amount of the minimum commitment in cents. diff --git a/man/lago-subscriptions-delete-all-subscription-alerts.1 b/man/lago-subscriptions-delete-all-subscription-alerts.1 index 0f7ff04..3ab4648 100644 --- a/man/lago-subscriptions-delete-all-subscription-alerts.1 +++ b/man/lago-subscriptions-delete-all-subscription-alerts.1 @@ -19,7 +19,7 @@ This endpoint allows you to delete all alerts for a subscription. .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-subscriptions-delete-subscription-alert.1 b/man/lago-subscriptions-delete-subscription-alert.1 index 5840c6d..85edb2a 100644 --- a/man/lago-subscriptions-delete-subscription-alert.1 +++ b/man/lago-subscriptions-delete-subscription-alert.1 @@ -19,7 +19,7 @@ This endpoint allows you to delete an existing alert for a subscription. .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-subscriptions-destroy-subscription-charge-filter.1 b/man/lago-subscriptions-destroy-subscription-charge-filter.1 index 4cf804d..d4cc5db 100644 --- a/man/lago-subscriptions-destroy-subscription-charge-filter.1 +++ b/man/lago-subscriptions-destroy-subscription-charge-filter.1 @@ -19,7 +19,7 @@ This endpoint deletes a specific filter from a charge on a subscription. .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-subscriptions-filters.1 b/man/lago-subscriptions-filters.1 index fc339fb..6bfcd34 100644 --- a/man/lago-subscriptions-filters.1 +++ b/man/lago-subscriptions-filters.1 @@ -27,15 +27,15 @@ This endpoint retrieves all filters for a specific charge on a subscription. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--watch\fP[=false] diff --git a/man/lago-subscriptions-fixed-charges.1 b/man/lago-subscriptions-fixed-charges.1 index e7e9d51..08fede4 100644 --- a/man/lago-subscriptions-fixed-charges.1 +++ b/man/lago-subscriptions-fixed-charges.1 @@ -28,15 +28,15 @@ The \fBunits\fR of each fixed charge reflect any per-subscription unit override .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--watch\fP[=false] diff --git a/man/lago-subscriptions-get-subscription-alert.1 b/man/lago-subscriptions-get-subscription-alert.1 index 198dba8..66dddda 100644 --- a/man/lago-subscriptions-get-subscription-alert.1 +++ b/man/lago-subscriptions-get-subscription-alert.1 @@ -19,7 +19,7 @@ This endpoint enables the retrieval of a specific alert for a subscription. .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--watch\fP[=false] diff --git a/man/lago-subscriptions-get-subscription-charge-filter.1 b/man/lago-subscriptions-get-subscription-charge-filter.1 index 1017954..7deb41a 100644 --- a/man/lago-subscriptions-get-subscription-charge-filter.1 +++ b/man/lago-subscriptions-get-subscription-charge-filter.1 @@ -19,7 +19,7 @@ This endpoint retrieves a specific filter for a charge on a subscription. .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--watch\fP[=false] diff --git a/man/lago-subscriptions-get-subscription-charge.1 b/man/lago-subscriptions-get-subscription-charge.1 index c5ef483..0ef2a2e 100644 --- a/man/lago-subscriptions-get-subscription-charge.1 +++ b/man/lago-subscriptions-get-subscription-charge.1 @@ -20,7 +20,7 @@ If the subscription has a plan override with a charge override, the overridden c .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--watch\fP[=false] diff --git a/man/lago-subscriptions-get-subscription-fixed-charge.1 b/man/lago-subscriptions-get-subscription-fixed-charge.1 index 95f1c70..f30a056 100644 --- a/man/lago-subscriptions-get-subscription-fixed-charge.1 +++ b/man/lago-subscriptions-get-subscription-fixed-charge.1 @@ -20,7 +20,7 @@ The \fBunits\fR reflect any per-subscription unit override applied to the subscr .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--watch\fP[=false] diff --git a/man/lago-subscriptions-get.1 b/man/lago-subscriptions-get.1 index 9bba70d..182a90f 100644 --- a/man/lago-subscriptions-get.1 +++ b/man/lago-subscriptions-get.1 @@ -19,10 +19,10 @@ This endpoint retrieves a specific subscription. .PP \fB--status\fP="" - By default, this endpoint only return 'active' subscriptions. If you want to retrieve a subscription with a different 'status', you can specify it here. + By default, this endpoint only returns 'active' subscriptions. If you want to retrieve a subscription with a different 'status', you can specify it here. .PP -_Note: As there may exists multiple 'canceled' or 'terminated' subscribtions for the same 'external\fIid', it is recommended to use the "List all subscriptions" endpoint to retrieve those subscriptions.\fP; one of: active, terminated, pending, canceled +_Note: As there may exist multiple 'canceled' or 'terminated' subscriptions for the same 'external\fIid', it is recommended to use the "List all subscriptions" endpoint to retrieve those subscriptions.\fP; one of: active, terminated, pending, canceled, incomplete .PP \fB--watch\fP[=false] diff --git a/man/lago-subscriptions-list.1 b/man/lago-subscriptions-list.1 index ea736bf..14a9c57 100644 --- a/man/lago-subscriptions-list.1 +++ b/man/lago-subscriptions-list.1 @@ -19,7 +19,7 @@ This endpoint retrieves all active subscriptions. .PP \fB--billing-entity-codes\fP="" - Filter subscriptions by billing entity codes. + Filter subscriptions by billing entity codes. A code that does not match a billing entity of the organization returns a '404' error. .PP \fB--currency\fP="" @@ -47,11 +47,11 @@ This endpoint retrieves all active subscriptions. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--plan-code\fP="" @@ -59,7 +59,7 @@ This endpoint retrieves all active subscriptions. .PP \fB--status\fP="" - If the field is not defined, Lago will return only 'active' subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: 'pending', 'canceled', 'terminated', 'active'. + If the field is not defined, Lago will return only 'active' subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: 'pending', 'canceled', 'terminated', 'active', 'incomplete'. .PP \fB--watch\fP[=false] diff --git a/man/lago-subscriptions-override-subscription-charge.1 b/man/lago-subscriptions-override-subscription-charge.1 index 5459b1b..fba3c17 100644 --- a/man/lago-subscriptions-override-subscription-charge.1 +++ b/man/lago-subscriptions-override-subscription-charge.1 @@ -110,7 +110,7 @@ The list of event properties that are used to group the events on the invoice fo .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--tax-codes\fP="" diff --git a/man/lago-subscriptions-override-subscription-fixed-charge.1 b/man/lago-subscriptions-override-subscription-fixed-charge.1 index 1e69cd7..91f2faf 100644 --- a/man/lago-subscriptions-override-subscription-fixed-charge.1 +++ b/man/lago-subscriptions-override-subscription-fixed-charge.1 @@ -92,7 +92,7 @@ The list of event properties that are used to group the events on the invoice fo .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--tax-codes\fP="" diff --git a/man/lago-subscriptions-terminate.1 b/man/lago-subscriptions-terminate.1 index 77cde76..b64fd0f 100644 --- a/man/lago-subscriptions-terminate.1 +++ b/man/lago-subscriptions-terminate.1 @@ -26,10 +26,12 @@ This field allows you to control the behavior of the credit note generation: .IP \(bu 2 \&'refund': A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer. .IP \(bu 2 +\&'offset': A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due. +.IP \(bu 2 \&'skip': No credit note is generated for the unused subscription time. .PP -\fINote: This field is only applicable to pay-in-advance plans and is ignored for pay-in-arrears plans.\fP; one of: credit, refund, skip +\fINote: This field is only applicable to pay-in-advance plans and is ignored for pay-in-arrears plans.\fP; one of: credit, refund, offset, skip .PP \fB--on-termination-invoice\fP="" diff --git a/man/lago-subscriptions-update-subscription-alert.1 b/man/lago-subscriptions-update-subscription-alert.1 index 4f4c29f..d92f089 100644 --- a/man/lago-subscriptions-update-subscription-alert.1 +++ b/man/lago-subscriptions-update-subscription-alert.1 @@ -10,7 +10,7 @@ lago-subscriptions-update-subscription-alert - Update a subscription alert .SH DESCRIPTION -This endpoint allows you to update an existing alert for a subscription. +This endpoint allows you to update an existing alert for a subscription. A non-empty \fBthresholds\fR array replaces the whole set of thresholds on the alert. When \fBthresholds\fR is left out, or sent as an empty array, the thresholds already on the alert are kept. A threshold sent with a \fBcode\fR it already had, and without \fBnotify_on\fR, keeps the \fBnotify_on\fR it had. .SH OPTIONS @@ -35,11 +35,11 @@ This endpoint allows you to update an existing alert for a subscription. .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--thresholds\fP="" - Array of thresholds associated with the alert. + Array of thresholds associated with the alert. An alert accepts at most 20 thresholds, and a larger array returns a '422' error with 'too_many_thresholds' on 'thresholds'. Two thresholds cannot share the same value and the same 'recurring' flag. The value of a recurring threshold must be positive. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-subscriptions-update-subscription-charge-filter.1 b/man/lago-subscriptions-update-subscription-charge-filter.1 index 8c48e3a..f03030b 100644 --- a/man/lago-subscriptions-update-subscription-charge-filter.1 +++ b/man/lago-subscriptions-update-subscription-charge-filter.1 @@ -15,7 +15,7 @@ This endpoint updates a specific filter for a charge on a subscription. .SH OPTIONS \fB--cascade-updates\fP="" - This field determines whether the changes made to the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. + This field determines whether the changes made to the filter should be cascaded to the children plans. When set to 'true', the changes will be cascaded into children. Conversely, when set to 'false', the changes will only be applied to the plan itself. If not defined in the request, default value is 'false'. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints. .PP \fB-h\fP, \fB--help\fP[=false] @@ -89,7 +89,7 @@ The list of event properties that are used to group the events on the invoice fo .PP \fB--subscription-status\fP="" - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', or 'canceled'.; one of: pending, active, terminated, canceled + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default 'active' status. Possible values are 'pending', 'active', 'terminated', 'canceled', or 'incomplete'.; one of: pending, active, terminated, canceled, incomplete .PP \fB--values\fP="" diff --git a/man/lago-subscriptions-update.1 b/man/lago-subscriptions-update.1 index ea8ac5e..a99b655 100644 --- a/man/lago-subscriptions-update.1 +++ b/man/lago-subscriptions-update.1 @@ -53,6 +53,29 @@ This endpoint allows you to update a subscription. \fB--name\fP="" The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan. +.PP +\fB--on-termination-credit-note\fP="" + Sets the default credit note behaviour applied when this subscription is later terminated before the end of its billing period: +.IP \(bu 2 +\&'credit': a credit note is generated for the unused subscription time. The unused amount is credited back to the customer. +.IP \(bu 2 +\&'refund': a credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer. +.IP \(bu 2 +\&'offset': a credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due. +.IP \(bu 2 +\&'skip': no credit note is generated for the unused subscription time. + +.PP +\fINote: This field is only applied to pay-in-advance plans and is ignored for pay-in-arrears plans.\fP; one of: credit, refund, offset, skip + +.PP +\fB--on-termination-invoice\fP="" + Sets the default invoice behaviour applied when this subscription is later terminated before the end of its billing period: +.IP \(bu 2 +\&'generate': an invoice is generated for the unbilled usage. +.IP \(bu 2 +\&'skip': no invoice is generated for the unbilled usage.; one of: generate, skip + .PP \fB--payment-method-payment-method-id\fP="" The unique identifier of the payment method (required when using a specific provider payment method). @@ -67,7 +90,7 @@ This endpoint allows you to update a subscription. .PP \fB--plan-overrides-amount-currency\fP="" - The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--plan-overrides-charges\fP="" @@ -85,10 +108,6 @@ This endpoint allows you to update a subscription. \fB--plan-overrides-invoice-display-name\fP="" Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name. -.PP -\fB--plan-overrides-metadata\fP="" - Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. - .PP \fB--plan-overrides-minimum-commitment-amount-cents\fP="" The amount of the minimum commitment in cents. @@ -130,7 +149,7 @@ Set to 'true' to switch progressive billing off for this subscription specifical .PP \fB--status\fP="" - By default, this endpoint only return 'active' subscriptions. If you want to update a subscription with a different 'status', you can specify it here.; one of: active, pending + By default, this endpoint only updates 'active' subscriptions. If you want to update a subscription with a different 'status', you can specify it here.; one of: active, pending .PP \fB--subscription-at\fP="" diff --git a/man/lago-taxes-create.1 b/man/lago-taxes-create.1 index df7471b..d8bf43f 100644 --- a/man/lago-taxes-create.1 +++ b/man/lago-taxes-create.1 @@ -10,12 +10,12 @@ lago-taxes-create - Create a tax .SH DESCRIPTION -This endpoint creates a new tax representing a customizable tax rate applicable to either the organization or a specific customer. +This endpoint creates a new tax representing a customizable tax rate applicable to either a billing entity or a specific customer. .SH OPTIONS \fB--applied-to-organization\fP="" - \fBDeprecated.\fP This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the 'PUT /billing_entities/:code' endpoint instead. + \fBDeprecated.\fP This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. When set to false on an update, it removes the tax from the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the 'PUT /billing_entities/:code' endpoint instead. .PP \fB--code\fP="" @@ -23,7 +23,7 @@ This endpoint creates a new tax representing a customizable tax rate applicable .PP \fB--description\fP="" - Internal description of the tax + Internal description of the tax. .PP \fB-h\fP, \fB--help\fP[=false] @@ -39,7 +39,7 @@ This endpoint creates a new tax representing a customizable tax rate applicable .PP \fB--rate\fP="" - The percentage rate of the tax + The percentage rate of the tax. Accepts a number or a decimal string. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-taxes-get.1 b/man/lago-taxes-get.1 index b77e252..8b5e3ce 100644 --- a/man/lago-taxes-get.1 +++ b/man/lago-taxes-get.1 @@ -2,7 +2,7 @@ .TH "LAGO" "1" "Sep 2026" "Lago CLI" "Lago CLI Manual" .SH NAME -lago-taxes-get - Retrieve a Tax +lago-taxes-get - Retrieve a tax .SH SYNOPSIS @@ -10,7 +10,7 @@ lago-taxes-get - Retrieve a Tax .SH DESCRIPTION -This endpoint retrieves an existing tax representing a customizable tax rate applicable to either the organization or a specific customer. The tax is identified by its unique code. +This endpoint retrieves an existing tax representing a customizable tax rate applicable to either a billing entity or a specific customer. The tax is identified by its unique code. .SH OPTIONS diff --git a/man/lago-taxes-list.1 b/man/lago-taxes-list.1 index 3cab179..43e19f1 100644 --- a/man/lago-taxes-list.1 +++ b/man/lago-taxes-list.1 @@ -10,7 +10,7 @@ lago-taxes-list - List all taxes .SH DESCRIPTION -This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either the organization or a specific customer. +This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either a billing entity or a specific customer. .SH OPTIONS @@ -27,11 +27,11 @@ This endpoint retrieves all existing taxes representing a customizable tax rate .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-taxes-update.1 b/man/lago-taxes-update.1 index ea07829..665a2f6 100644 --- a/man/lago-taxes-update.1 +++ b/man/lago-taxes-update.1 @@ -10,12 +10,12 @@ lago-taxes-update - Update a tax .SH DESCRIPTION -This endpoint updates an existing tax representing a customizable tax rate applicable to either the organization or a specific customer. +This endpoint updates an existing tax representing a customizable tax rate applicable to either a billing entity or a specific customer. .SH OPTIONS \fB--applied-to-organization\fP="" - \fBDeprecated.\fP This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the 'PUT /billing_entities/:code' endpoint instead. + \fBDeprecated.\fP This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. When set to false on an update, it removes the tax from the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the 'PUT /billing_entities/:code' endpoint instead. .PP \fB--code\fP="" @@ -23,7 +23,7 @@ This endpoint updates an existing tax representing a customizable tax rate appli .PP \fB--description\fP="" - Internal description of the tax + Internal description of the tax. .PP \fB-h\fP, \fB--help\fP[=false] @@ -39,7 +39,7 @@ This endpoint updates an existing tax representing a customizable tax rate appli .PP \fB--rate\fP="" - The percentage rate of the tax + The percentage rate of the tax. Accepts a number or a decimal string. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-wallets-create-customer-wallet.1 b/man/lago-wallets-create-customer-wallet.1 index ed5ea1e..0478705 100644 --- a/man/lago-wallets-create-customer-wallet.1 +++ b/man/lago-wallets-create-customer-wallet.1 @@ -31,7 +31,7 @@ This endpoint is used to create a wallet with prepaid credits. .PP \fB--currency\fP="" - The currency of the wallet.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of the wallet. Required when the customer has no currency yet. When omitted, the wallet uses the customer's currency. When provided on a customer without a currency, it also sets the customer's currency.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--expiration-at\fP="" @@ -83,11 +83,11 @@ This endpoint is used to create a wallet with prepaid credits. .PP \fB--paid-top-up-max-amount-cents\fP="" - Maximum amount of cents that can be top-up with a single paid transaction. + The maximum amount, in cents, of a single paid top-up transaction. .PP \fB--paid-top-up-min-amount-cents\fP="" - Minimum amount of cents that can be top-up with a single paid transaction. + The minimum amount, in cents, of a single paid top-up transaction. .PP \fB--payment-method-payment-method-id\fP="" @@ -99,7 +99,7 @@ This endpoint is used to create a wallet with prepaid credits. .PP \fB--priority\fP="" - Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. + Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first. .PP \fB--purchase-order-number\fP="" @@ -111,7 +111,7 @@ This endpoint is used to create a wallet with prepaid credits. .PP \fB--recurring-transaction-rules\fP="" - List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. + List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license. .PP \fB--transaction-metadata\fP="" @@ -121,6 +121,10 @@ This endpoint is used to create a wallet with prepaid credits. \fB--transaction-name\fP="" The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either 'Prepaid credits - {{wallet_name}}' if the wallet name is set, or 'Prepaid credits'. +.PP +\fB--transaction-priority\fP="" + The priority of the wallet transactions triggered when creating the wallet. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. + .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB--api-key\fP="" diff --git a/man/lago-wallets-create-wallet-transaction.1 b/man/lago-wallets-create-wallet-transaction.1 index 4b6d59c..b1e168a 100644 --- a/man/lago-wallets-create-wallet-transaction.1 +++ b/man/lago-wallets-create-wallet-transaction.1 @@ -64,6 +64,10 @@ Note that this name will apply to all transactions ('paid_credits', 'granted_cre \fB--payment-method-payment-method-type\fP="" The type of payment method to use.; one of: provider, manual +.PP +\fB--priority\fP="" + The priority of the wallet transaction. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. + .PP \fB--purchase-order-number\fP="" The purchase order number associated with this wallet transaction. It will be added to invoices generated for the resulting wallet top-up. If not set, falls back to the wallet's 'purchase_order_number'. @@ -72,6 +76,10 @@ Note that this name will apply to all transactions ('paid_credits', 'granted_cre \fB--voided-credits\fP="" The number of voided credits. +.PP +\fB--voided-transaction-id\fP="" + Unique identifier of the inbound wallet transaction to void. Only available on traceable wallets, and the target transaction must still have a remaining amount. + .PP \fB--wallet-id\fP="" Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system. diff --git a/man/lago-wallets-create.1 b/man/lago-wallets-create.1 index 7eacb97..c484d38 100644 --- a/man/lago-wallets-create.1 +++ b/man/lago-wallets-create.1 @@ -31,7 +31,7 @@ This endpoint is used to create a wallet with prepaid credits. .PP \fB--currency\fP="" - The currency of the wallet.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SZL, THB, TJS, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW + The currency of the wallet. Required when the customer has no currency yet. When omitted, the wallet uses the customer's currency. When provided on a customer without a currency, it also sets the customer's currency.; one of: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, ISK, JMD, JPY, KES, KGS, KHR, KMF, KRW, KYD, KZT, LAK, LBP, LKR, LRD, LSL, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLL, SOS, SRD, STD, SYP, SZL, THB, TJS, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW .PP \fB--expiration-at\fP="" @@ -83,11 +83,11 @@ This endpoint is used to create a wallet with prepaid credits. .PP \fB--paid-top-up-max-amount-cents\fP="" - Maximum amount of cents that can be top-up with a single paid transaction. + The maximum amount, in cents, of a single paid top-up transaction. .PP \fB--paid-top-up-min-amount-cents\fP="" - Minimum amount of cents that can be top-up with a single paid transaction. + The minimum amount, in cents, of a single paid top-up transaction. .PP \fB--payment-method-payment-method-id\fP="" @@ -99,7 +99,7 @@ This endpoint is used to create a wallet with prepaid credits. .PP \fB--priority\fP="" - Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. + Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first. .PP \fB--purchase-order-number\fP="" @@ -111,7 +111,7 @@ This endpoint is used to create a wallet with prepaid credits. .PP \fB--recurring-transaction-rules\fP="" - List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. + List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license. .PP \fB--transaction-metadata\fP="" @@ -121,6 +121,10 @@ This endpoint is used to create a wallet with prepaid credits. \fB--transaction-name\fP="" The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either 'Prepaid credits - {{wallet_name}}' if the wallet name is set, or 'Prepaid credits'. +.PP +\fB--transaction-priority\fP="" + The priority of the wallet transactions triggered when creating the wallet. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. + .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB--api-key\fP="" diff --git a/man/lago-wallets-get-customer-wallet-alerts.1 b/man/lago-wallets-get-customer-wallet-alerts.1 index 37ed869..a0103e0 100644 --- a/man/lago-wallets-get-customer-wallet-alerts.1 +++ b/man/lago-wallets-get-customer-wallet-alerts.1 @@ -14,9 +14,25 @@ This endpoint enables the retrieval of all alerts for a wallet. .SH OPTIONS +\fB--all\fP[=false] + Fetch every page + +.PP \fB-h\fP, \fB--help\fP[=false] help for get-customer-wallet-alerts +.PP +\fB--limit\fP="" + Results per page (1-1000) + +.PP +\fB--page\fP="" + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. + +.PP +\fB--per-page\fP="" + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. + .PP \fB--watch\fP[=false] Poll and re-render when the response changes diff --git a/man/lago-wallets-get-wallet-transaction.1 b/man/lago-wallets-get-wallet-transaction.1 index 433ef5c..25f771e 100644 --- a/man/lago-wallets-get-wallet-transaction.1 +++ b/man/lago-wallets-get-wallet-transaction.1 @@ -10,7 +10,7 @@ lago-wallets-get-wallet-transaction - Retrieve a wallet transaction .SH DESCRIPTION -This endpoint is used to retrieve a specific wallet transactions. +This endpoint is used to retrieve a specific wallet transaction. .SH OPTIONS diff --git a/man/lago-wallets-list-customer-wallets.1 b/man/lago-wallets-list-customer-wallets.1 index 4f1817a..2910a86 100644 --- a/man/lago-wallets-list-customer-wallets.1 +++ b/man/lago-wallets-list-customer-wallets.1 @@ -10,7 +10,7 @@ lago-wallets-list-customer-wallets - List all customer's wallets .SH DESCRIPTION -This endpoint is used to list all wallets with prepaid credits of a customer +This endpoint is used to list all wallets with prepaid credits of a customer. .SH OPTIONS @@ -21,6 +21,10 @@ This endpoint is used to list all wallets with prepaid credits of a customer \fB--billing-entity-codes\fP="" Filter wallets by billing entity codes. +.PP +\fB--currency\fP="" + Filter the results by currency, expressed as an ISO 4217 code. + .PP \fB-h\fP, \fB--help\fP[=false] help for list-customer-wallets @@ -31,11 +35,11 @@ This endpoint is used to list all wallets with prepaid credits of a customer .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-wallets-list-wallet-transaction-consumptions.1 b/man/lago-wallets-list-wallet-transaction-consumptions.1 index 3daebe4..e10de48 100644 --- a/man/lago-wallets-list-wallet-transaction-consumptions.1 +++ b/man/lago-wallets-list-wallet-transaction-consumptions.1 @@ -27,11 +27,11 @@ This endpoint is used to list all consumption records for an inbound wallet tran .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-wallets-list-wallet-transaction-fundings.1 b/man/lago-wallets-list-wallet-transaction-fundings.1 index f87ce28..ebaec78 100644 --- a/man/lago-wallets-list-wallet-transaction-fundings.1 +++ b/man/lago-wallets-list-wallet-transaction-fundings.1 @@ -27,11 +27,11 @@ This endpoint is used to list all funding records for an outbound wallet transac .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-wallets-list.1 b/man/lago-wallets-list.1 index bfd24df..fed32b7 100644 --- a/man/lago-wallets-list.1 +++ b/man/lago-wallets-list.1 @@ -39,11 +39,11 @@ This endpoint is used to list all wallets with prepaid credits. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-wallets-update-customer-wallet-alert.1 b/man/lago-wallets-update-customer-wallet-alert.1 index 16f777e..2bfaf8c 100644 --- a/man/lago-wallets-update-customer-wallet-alert.1 +++ b/man/lago-wallets-update-customer-wallet-alert.1 @@ -10,7 +10,7 @@ lago-wallets-update-customer-wallet-alert - Update a wallet alert .SH DESCRIPTION -This endpoint allows you to update an existing alert for a wallet. +This endpoint allows you to update an existing alert for a wallet. A non-empty \fBthresholds\fR array replaces the whole set of thresholds on the alert. When \fBthresholds\fR is left out, or sent as an empty array, the thresholds already on the alert are kept. A threshold sent with a \fBcode\fR it already had, and without \fBnotify_on\fR, keeps the \fBnotify_on\fR it had. .SH OPTIONS @@ -31,7 +31,7 @@ This endpoint allows you to update an existing alert for a wallet. .PP \fB--thresholds\fP="" - Array of thresholds associated with the alert. + Array of thresholds associated with the alert. An alert accepts at most 20 thresholds, and a larger array returns a '422' error with 'too_many_thresholds' on 'thresholds'. Two thresholds cannot share the same value and the same 'recurring' flag. The value of a recurring threshold must be positive. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-wallets-update-customer-wallet.1 b/man/lago-wallets-update-customer-wallet.1 index e8f1384..f34b9f7 100644 --- a/man/lago-wallets-update-customer-wallet.1 +++ b/man/lago-wallets-update-customer-wallet.1 @@ -61,6 +61,14 @@ This endpoint is used to update an existing wallet with prepaid credits. A termi \fB--name\fP="" The name of the wallet. +.PP +\fB--paid-top-up-max-amount-cents\fP="" + The maximum amount, in cents, of a single paid top-up transaction. + +.PP +\fB--paid-top-up-min-amount-cents\fP="" + The minimum amount, in cents, of a single paid top-up transaction. + .PP \fB--payment-method-payment-method-id\fP="" The unique identifier of the payment method (required when using a specific provider payment method). @@ -71,7 +79,7 @@ This endpoint is used to update an existing wallet with prepaid credits. A termi .PP \fB--priority\fP="" - Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. + Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first. .PP \fB--purchase-order-number\fP="" @@ -79,7 +87,7 @@ This endpoint is used to update an existing wallet with prepaid credits. A termi .PP \fB--recurring-transaction-rules\fP="" - List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. + List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-wallets-update.1 b/man/lago-wallets-update.1 index bc839e3..7aa561b 100644 --- a/man/lago-wallets-update.1 +++ b/man/lago-wallets-update.1 @@ -61,6 +61,14 @@ This endpoint is used to update an existing wallet with prepaid credits. A termi \fB--name\fP="" The name of the wallet. +.PP +\fB--paid-top-up-max-amount-cents\fP="" + The maximum amount, in cents, of a single paid top-up transaction. + +.PP +\fB--paid-top-up-min-amount-cents\fP="" + The minimum amount, in cents, of a single paid top-up transaction. + .PP \fB--payment-method-payment-method-id\fP="" The unique identifier of the payment method (required when using a specific provider payment method). @@ -71,7 +79,7 @@ This endpoint is used to update an existing wallet with prepaid credits. A termi .PP \fB--priority\fP="" - Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. + Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first. .PP \fB--purchase-order-number\fP="" @@ -79,7 +87,7 @@ This endpoint is used to update an existing wallet with prepaid credits. A termi .PP \fB--recurring-transaction-rules\fP="" - List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. + List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-wallets-wallet-transactions.1 b/man/lago-wallets-wallet-transactions.1 index 6770db2..0ffae5f 100644 --- a/man/lago-wallets-wallet-transactions.1 +++ b/man/lago-wallets-wallet-transactions.1 @@ -25,17 +25,21 @@ This endpoint is used to list all wallet transactions. \fB--limit\fP="" Results per page (1-1000) +.PP +\fB--metadata[key]\fP="" + Filter wallet transactions by metadata. Replace 'key' with the actual metadata key you want to match, and provide the corresponding value. For example, 'metadata[color]=blue'. + .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--status\fP="" - The status of the wallet transaction. Possible values are 'pending' or 'settled'. + The status of the wallet transaction. Possible values are 'pending', 'settled' or 'failed'. .PP \fB--transaction-status\fP="" diff --git a/man/lago-webhook-endpoints-create.1 b/man/lago-webhook-endpoints-create.1 index 1b32b59..9f0978e 100644 --- a/man/lago-webhook-endpoints-create.1 +++ b/man/lago-webhook-endpoints-create.1 @@ -2,7 +2,7 @@ .TH "LAGO" "1" "Sep 2026" "Lago CLI" "Lago CLI Manual" .SH NAME -lago-webhook-endpoints-create - Create a webhook_endpoint +lago-webhook-endpoints-create - Create a webhook endpoint .SH SYNOPSIS @@ -10,12 +10,12 @@ lago-webhook-endpoints-create - Create a webhook_endpoint .SH DESCRIPTION -This endpoint is used to create a webhook endpoint. +This endpoint is used to create a webhook endpoint. An organization can have at most 10 webhook endpoints. .SH OPTIONS \fB--event-types\fP="" - A list of event types that will trigger the webhook. Passing null means that all event types will be sent. + The list of event types sent to this webhook endpoint. Pass 'null' or '["*"]' to receive every event type. An empty array stops every delivery. .PP \fB-h\fP, \fB--help\fP[=false] @@ -27,15 +27,15 @@ This endpoint is used to create a webhook endpoint. .PP \fB--name\fP="" - The name of the webhook. + The name of the webhook endpoint. .PP \fB--signature-algo\fP="" - The signature used for the webhook. If no value is passed,; one of: jwt, hmac, + The algorithm used to sign the webhook payload. Defaults to 'jwt' when no value is passed.; one of: jwt, hmac, .PP \fB--webhook-url\fP="" - The URL of the webhook endpoint. + The URL of the webhook endpoint. It must be unique within the organization. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-webhook-endpoints-list.1 b/man/lago-webhook-endpoints-list.1 index d55e8e4..fa63d8c 100644 --- a/man/lago-webhook-endpoints-list.1 +++ b/man/lago-webhook-endpoints-list.1 @@ -27,11 +27,11 @@ This endpoint is used to list all webhook endpoints. .PP \fB--page\fP="" - Page number. + Page number. Defaults to 1. A value that is not a positive integer, such as '0', returns the first page. .PP \fB--per-page\fP="" - Number of records per page. + Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a '422' error with 'value_is_out_of_range' on 'per_page'. A value that is not a positive integer, such as '0', returns the default number of records. .PP \fB--watch\fP[=false] diff --git a/man/lago-webhook-endpoints-update.1 b/man/lago-webhook-endpoints-update.1 index bcda57b..e84320c 100644 --- a/man/lago-webhook-endpoints-update.1 +++ b/man/lago-webhook-endpoints-update.1 @@ -15,7 +15,7 @@ This endpoint is used to update an existing webhook endpoint. .SH OPTIONS \fB--event-types\fP="" - A list of event types that will trigger the webhook. Passing null means that all event types will be sent. + The list of event types sent to this webhook endpoint. Pass 'null' or '["*"]' to receive every event type. An empty array stops every delivery. .PP \fB-h\fP, \fB--help\fP[=false] @@ -27,15 +27,15 @@ This endpoint is used to update an existing webhook endpoint. .PP \fB--name\fP="" - The name of the webhook. + The name of the webhook endpoint. .PP \fB--signature-algo\fP="" - The signature used for the webhook. If no value is passed,; one of: jwt, hmac, + The algorithm used to sign the webhook payload. When the field is omitted, the current value is kept.; one of: jwt, hmac, .PP \fB--webhook-url\fP="" - The URL of the webhook endpoint. + The URL of the webhook endpoint. It must be unique within the organization. .SH OPTIONS INHERITED FROM PARENT COMMANDS diff --git a/man/lago-webhooks-json-public-key.1 b/man/lago-webhooks-json-public-key.1 index a2aff24..c73c211 100644 --- a/man/lago-webhooks-json-public-key.1 +++ b/man/lago-webhooks-json-public-key.1 @@ -10,7 +10,7 @@ lago-webhooks-json-public-key - Retrieve webhook public key (JSON) .SH DESCRIPTION -This endpoint is used to retrieve the public key used to verify the webhooks signature, wrapped in a JSON object. Prefer this endpoint over the deprecated GET /webhooks/public_key. +This endpoint is used to retrieve the public key used to verify the webhook signature, wrapped in a JSON object. Prefer this endpoint over the deprecated \fBGET /webhooks/public_key\fR\&. .SH OPTIONS diff --git a/man/lago-webhooks-public-key.1 b/man/lago-webhooks-public-key.1 index b2e77b1..fa3e43b 100644 --- a/man/lago-webhooks-public-key.1 +++ b/man/lago-webhooks-public-key.1 @@ -10,7 +10,7 @@ lago-webhooks-public-key - Retrieve webhook public key .SH DESCRIPTION -This endpoint is used to retrieve the public key used to verify the webhooks signature +\fBDeprecated.\fP Use \fBGET /webhooks/json_public_key\fR instead. This endpoint is used to retrieve the public key used to verify the webhook signature. .SH OPTIONS diff --git a/spec/openapi.yaml b/spec/openapi.yaml index 5e4af33..680238c 100644 --- a/spec/openapi.yaml +++ b/spec/openapi.yaml @@ -2,7 +2,7 @@ openapi: 3.1.0 info: title: Lago API documentation description: Lago API allows your application to push customer information and metrics (events) from your application to the billing application. - version: 1.52.1 + version: 1.57.0 license: name: AGPLv3 url: https://github.com/getlago/lago-openapi/blob/main/LICENSE @@ -171,8 +171,6 @@ paths: $ref: '#/components/schemas/BillingEntityObject' '401': $ref: '#/components/responses/Unauthorized' - '422': - $ref: '#/components/responses/UnprocessableEntity' post: tags: - billing_entities @@ -237,8 +235,6 @@ paths: $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' - '422': - $ref: '#/components/responses/UnprocessableEntity' put: tags: - billing_entities @@ -277,14 +273,14 @@ paths: tags: - activity_logs summary: List all activity logs - description: This endpoint retrieves all existing activity logs that represent actions performed on application resources. + description: This endpoint retrieves all existing activity logs that represent actions performed on application resources. Logs are returned from the most recent to the oldest. operationId: findAllActivityLogs parameters: - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/per_page' - name: from_date in: query - description: Filter activity logs from a specific date. + description: Filter activity logs logged at or after this date. A date or a full ISO 8601 datetime is accepted. required: false explode: true schema: @@ -293,7 +289,7 @@ paths: example: '2022-08-09' - name: to_date in: query - description: Filter activity logs up to a specific date. + description: Filter activity logs logged at or before this date. A date or a full ISO 8601 datetime is accepted. required: false explode: true schema: @@ -302,7 +298,7 @@ paths: example: '2022-08-09' - name: activity_types[] in: query - description: Filter results by activity types + description: Filter results by activity types. required: false explode: true schema: @@ -310,11 +306,11 @@ paths: items: type: string example: - - billing_metric.created - - billing_metric.updated + - billable_metric.created + - billable_metric.updated - name: activity_sources[] in: query - description: Filter results by activity sources + description: Filter results by activity sources. required: false explode: true schema: @@ -330,7 +326,7 @@ paths: - front - name: user_emails[] in: query - description: Filter results by user emails + description: Filter results by the email of the user who performed the activity. required: false explode: true schema: @@ -338,12 +334,12 @@ paths: items: type: string example: - - dinesh@piedpiper.test + - dinesh@piedpiper.example - $ref: '#/components/parameters/external_customer_id' - $ref: '#/components/parameters/external_subscription_id' - name: resource_ids[] in: query - description: Filter results by resources unique identifiers + description: Filter results by the unique identifiers of the resources the actions were applied to. required: false explode: true schema: @@ -356,7 +352,7 @@ paths: - 1a901a90-1a90-1a90-1a90-1a901a901a90 - name: resource_types[] in: query - description: Filter results by resource class types + description: Filter results by resource types. required: false explode: true schema: @@ -375,14 +371,17 @@ paths: $ref: '#/components/schemas/ActivityLogsPaginated' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' /activity_logs/{activity_id}: parameters: - name: activity_id in: path - description: The Activity Id of the existing activity log. + description: The unique identifier of the activity log, created by Lago. required: true schema: type: string + format: uuid example: bdc0eda6-ea52-4f72-a46a-94f47a89b546 get: tags: @@ -392,13 +391,15 @@ paths: operationId: findActivityLog responses: '200': - description: Activity Log + description: Activity log content: application/json: schema: $ref: '#/components/schemas/ActivityLog' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /add_ons: @@ -428,6 +429,8 @@ paths: $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' get: @@ -512,7 +515,7 @@ paths: tags: - add_ons summary: Delete an add-on - description: This endpoint is used to delete an existing add-on. + description: This endpoint is used to delete an existing add-on. The fixed charges that use this add-on are deleted too. operationId: destroyAddOn responses: '200': @@ -531,15 +534,15 @@ paths: get: tags: - api_logs - summary: List all api logs - description: This endpoint retrieves all existing api logs that represent requests performed to Lago's API. + summary: List all API logs + description: This endpoint retrieves all existing API logs, which represent the requests made to Lago's API. Logs older than the retention period of your organization are left out. The retention period is 30 days unless another one was set for your organization. operationId: findAllApiLogs parameters: - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/per_page' - name: from_date in: query - description: Filter api logs from a specific date. + description: Filter API logs logged at or after this date. required: false explode: true schema: @@ -548,7 +551,7 @@ paths: example: '2022-08-09' - name: to_date in: query - description: Filter api logs up to a specific date. + description: Filter API logs logged at or before this date. required: false explode: true schema: @@ -557,7 +560,7 @@ paths: example: '2022-08-09' - name: http_methods[] in: query - description: Filter results by HTTP methods + description: Filter results by HTTP methods. required: false explode: true schema: @@ -567,13 +570,14 @@ paths: enum: - post - put + - patch - delete example: - post - put - name: http_statuses[] in: query - description: Filter results by HTTP status or by generic request status + description: Filter results by HTTP status or by generic request status. When `succeeded` or `failed` is passed, the numeric values of the filter are ignored. required: false explode: true schema: @@ -593,34 +597,51 @@ paths: - 404 - name: api_version in: query - description: Filter results by API version + description: Filter results by API version. required: false explode: true schema: type: string example: v1 - - name: request_paths + - name: request_paths[] in: query - description: Filter results by the path of the request + description: Filter results by the path of the request. A value containing `*` is matched as a wildcard, otherwise the path must match exactly. required: false explode: true schema: - type: string - example: /billable_metrics/ + type: array + items: + type: string + example: + - /api/v1/billable_metrics + - '*billable_metrics*' + - name: clients[] + in: query + description: Filter results by the client that issued the request, as reported by its user agent. + required: false + explode: true + schema: + type: array + items: + type: string + example: + - Lago Ruby v1.26.0 responses: '200': - description: List of api logs + description: List of API logs content: application/json: schema: $ref: '#/components/schemas/ApiLogsPaginated' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' /api_logs/{request_id}: parameters: - name: request_id in: path - description: The Request Id of the existing api log. + description: The unique identifier of the API log, which is the identifier of the request. required: true schema: type: string @@ -628,18 +649,20 @@ paths: get: tags: - api_logs - summary: Retrieve an api log - description: This endpoint retrieves an existing api log that represents a request made to the API. The api log is identified by its unique request_id. + summary: Retrieve an API log + description: This endpoint retrieves an existing API log, which represents a request made to Lago's API. The API log is identified by its request id. operationId: findApiLog responses: '200': - description: Api Log + description: API log content: application/json: schema: $ref: '#/components/schemas/ApiLog' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /analytics/gross_revenue: @@ -647,7 +670,7 @@ paths: tags: - analytics summary: List gross revenue - description: Gross revenue is the sum of monthly `finalized` invoice payments and fees paid in advance that are not invoiceable. This total is calculated after deducting taxes and discounts. + description: Gross revenue is the monthly sum of the totals of `finalized` invoices and of the amounts of the fees paid in advance that are not attached to an invoice. Invoice totals include taxes, are net of coupons, and are reduced by the amounts refunded through credit notes. Self-billed invoices and invoices with a lost payment dispute are excluded. operationId: findAllGrossRevenues parameters: - name: currency @@ -667,6 +690,7 @@ paths: schema: type: string example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba + - $ref: '#/components/parameters/billing_entity_code' - $ref: '#/components/parameters/months' responses: '200': @@ -684,7 +708,9 @@ paths: tags: - analytics summary: List of finalized invoices - description: Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`. + description: |- + Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`. Self-billed invoices and invoices with a lost payment dispute are excluded. + This is a premium feature. operationId: findAllInvoiceCollections parameters: - name: currency @@ -696,6 +722,7 @@ paths: allOf: - $ref: '#/components/schemas/Currency' - example: USD + - $ref: '#/components/parameters/billing_entity_code' - $ref: '#/components/parameters/months' responses: '200': @@ -706,12 +733,14 @@ paths: $ref: '#/components/schemas/InvoiceCollections' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' /analytics/invoiced_usage: get: tags: - analytics summary: List usage revenue - description: Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts. + description: Reports the monthly revenue generated by usage-based fees, broken down by billable metric. It only counts usage that has already been invoiced, so the usage of the current billing period is not included. Amounts exclude taxes and are net of coupons. Fees on self-billed invoices and on invoices with a lost payment dispute are left out. operationId: findAllInvoicedUsages parameters: - name: currency @@ -723,6 +752,7 @@ paths: allOf: - $ref: '#/components/schemas/Currency' - example: USD + - $ref: '#/components/parameters/billing_entity_code' - $ref: '#/components/parameters/months' responses: '200': @@ -733,30 +763,33 @@ paths: $ref: '#/components/schemas/InvoicedUsages' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' /analytics/mrr: get: tags: - analytics summary: List MRR - description: This endpoint is used to list MRR. + description: |- + Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle: + + - Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued. + - Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing). + - Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing). + - Revenue from `semiannual` subscription invoices is distributed evenly over six months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing). + - Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month. operationId: findAllMrrs parameters: - name: currency in: query - description: |- - Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle: - - - Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued. - - Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing). - - Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing). - - Revenue from `semiannual` subscription invoices is distributed evenly over six months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing). - - Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month. + description: The currency of MRR analytics. Format must be ISO 4217. required: false explode: true schema: allOf: - $ref: '#/components/schemas/Currency' - example: USD + - $ref: '#/components/parameters/billing_entity_code' - $ref: '#/components/parameters/months' responses: '200': @@ -774,12 +807,12 @@ paths: tags: - analytics summary: List overdue balance - description: Overdue balance is the total amount associated with overdue invoices (invoices with pending or failed payments which are past their due dates). + description: Overdue balance is the amount still due on invoices that are past their payment due date. Each entry covers one month of payment due dates and sums the invoice totals minus the amounts already paid and minus the credits applied by finalized credit notes. Self-billed invoices are excluded. operationId: findAllOverdueBalances parameters: - name: currency in: query - description: Currency of revenue analytics. Format must be ISO 4217. + description: Filter the overdue balances by the currency of the invoices. Format must be ISO 4217. required: false explode: true schema: @@ -788,12 +821,13 @@ paths: - example: USD - name: external_customer_id in: query - description: The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level. + description: The customer external unique identifier (provided by your own application). Use it to restrict the overdue balances to a single customer. required: false explode: true schema: type: string example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba + - $ref: '#/components/parameters/billing_entity_code' - $ref: '#/components/parameters/months' responses: '200': @@ -811,12 +845,14 @@ paths: tags: - analytics summary: List usage - description: Returns usages. + description: |- + Returns the usage billed by each billable metric, aggregated over the requested period and time granularity. + This is a premium feature. On a non-premium license the response always covers the last 30 days with a daily granularity, and only the `billable_metric_code` filter is applied. operationId: findAllUsages parameters: - name: time_granularity in: query - description: The time granularity of usage analytics. Possible values are 'daily', 'weekly', 'monthly', 'yearly'. + description: The time granularity of usage analytics. Possible values are 'daily', 'weekly' and 'monthly'. Defaults to 'daily'. required: false schema: type: string @@ -824,6 +860,7 @@ paths: - daily - weekly - monthly + default: daily example: monthly - name: currency in: query @@ -938,6 +975,8 @@ paths: $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' + '405': + $ref: '#/components/responses/NotAllowed' '422': $ref: '#/components/responses/UnprocessableEntity' get: @@ -1039,7 +1078,7 @@ paths: tags: - billable_metrics summary: Evaluate an expression for a billable metric - description: Evaluate an expression for a billable metric creation by providing the expression and test data + description: This endpoint evaluates an expression against a test event. Use it to check an expression before you set it on a billable metric. operationId: evaluateBillableMetricExpression requestBody: description: Billable metric expression evaluation payload @@ -1074,7 +1113,10 @@ paths: tags: - billable_metrics summary: Update a billable metric - description: This endpoint updates an existing billable metric representing a pricing component of your application. + description: |- + This endpoint updates an existing billable metric representing a pricing component of your application. + + Once the billable metric is used by a plan charge, only `name`, `description` and `filters` are applied. The other fields are ignored. operationId: updateBillableMetric requestBody: description: Billable metric payload @@ -1157,6 +1199,8 @@ paths: $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' '422': $ref: '#/components/responses/UnprocessableEntity' get: @@ -1170,11 +1214,12 @@ paths: - $ref: '#/components/parameters/per_page' - name: search_term in: query - description: Search in name, code and description. + description: Filter features by search term. The term is matched against the name, the code and the description of the feature. required: false explode: true schema: type: string + example: seats responses: '200': description: List of features @@ -1184,6 +1229,8 @@ paths: $ref: '#/components/schemas/FeaturesPaginated' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' /features/{code}: parameters: - name: code @@ -1197,7 +1244,7 @@ paths: tags: - features summary: Update a feature - description: This endpoint updates an existing feature representing an entitlement component of your application. + description: This endpoint updates an existing feature representing an entitlement component of your application. Only the fields present in the payload are updated. Privileges are matched by their code, an unknown code adds a new privilege and a known one updates its name and adds the select options of the payload to the existing ones. The value type of an existing privilege cannot be changed. Privileges left out of the payload are kept, use the delete privilege endpoint to remove one. operationId: updateFeature requestBody: description: Feature payload @@ -1238,6 +1285,8 @@ paths: $ref: '#/components/schemas/Feature' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' get: @@ -1255,6 +1304,8 @@ paths: $ref: '#/components/schemas/Feature' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /features/{code}/privileges/{privilege_code}: @@ -1276,18 +1327,20 @@ paths: delete: tags: - features - summary: Delete a privilege. Deleting a privilege removes it from all plans and subscriptions. - description: Delete privilege from feature. Deleting a privilege removes it from all plans and subscriptions. + summary: Delete a privilege + description: This endpoint deletes a privilege from a feature. Deleting a privilege removes it from all plans and subscriptions. operationId: deleteFeaturePrivilege responses: '200': - description: Feature with deleted privilege. + description: The feature without the deleted privilege. content: application/json: schema: $ref: '#/components/schemas/Feature' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /coupons: @@ -1315,6 +1368,10 @@ paths: $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + '405': + $ref: '#/components/responses/NotAllowed' '422': $ref: '#/components/responses/UnprocessableEntity' get: @@ -1348,7 +1405,10 @@ paths: tags: - coupons summary: Update a coupon - description: This endpoint is used to update a coupon that can be then attached to a customer to create a discount. + description: |- + This endpoint is used to update a coupon that can be then attached to a customer to create a discount. + + Once the coupon has been applied to at least one customer, only `name`, `description`, `expiration` and `expiration_at` are updated. The other fields in the payload are ignored. operationId: updateCoupon requestBody: description: Coupon payload @@ -1370,6 +1430,8 @@ paths: $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' + '405': + $ref: '#/components/responses/NotAllowed' '422': $ref: '#/components/responses/UnprocessableEntity' get: @@ -1411,7 +1473,10 @@ paths: tags: - credit_notes summary: Create a credit note - description: This endpoint creates a new credit note. + description: |- + This endpoint creates a new credit note. + This is a premium feature. + A credit note cannot be issued on an invoice in a `pending` or `failed` status. In that case the endpoint returns a `405` error with the `invalid_type_or_status` code. operationId: createCreditNote requestBody: description: Credit note payload @@ -1431,13 +1496,19 @@ paths: $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '405': + $ref: '#/components/responses/NotAllowed' '422': $ref: '#/components/responses/UnprocessableEntity' get: tags: - credit_notes summary: List all credit notes - description: This endpoint list all existing credit notes. + description: This endpoint lists all existing credit notes. operationId: findAllCreditNotes parameters: - $ref: '#/components/parameters/page' @@ -1583,6 +1654,8 @@ paths: $ref: '#/components/schemas/CreditNotesPaginated' '401': $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' /credit_notes/{lago_id}: parameters: - name: lago_id @@ -1642,7 +1715,9 @@ paths: tags: - credit_notes summary: Download a credit note PDF - description: This endpoint downloads the PDF of an existing credit note. + description: |- + This endpoint downloads the PDF of an existing credit note. Only `finalized` credit notes can be downloaded; any other credit note returns a `404` error. + When the PDF has already been generated, the credit note object is returned and its `file_url` points to the document. When it has not been generated yet, the response is a `200` with an empty body and the generation starts in the background. Call the endpoint again to get the credit note object with its `file_url`. parameters: - name: lago_id in: path @@ -1669,13 +1744,17 @@ paths: tags: - credit_notes summary: Estimate amounts for a new credit note - description: This endpoint allows you to retrieve amounts for a new credit note creation. + description: |- + This endpoint allows you to retrieve amounts for a new credit note creation. + This is a premium feature. + Amounts cannot be estimated on an invoice in a `pending` or `failed` status. In that case the endpoint returns a `405` error with the `invalid_type_or_status` code. requestBody: description: Credit note estimate payload content: application/json: schema: $ref: '#/components/schemas/CreditNoteEstimateInput' + required: true operationId: estimateCreditNote responses: '200': @@ -1688,6 +1767,12 @@ paths: $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '405': + $ref: '#/components/responses/NotAllowed' '422': $ref: '#/components/responses/UnprocessableEntity' /credit_notes/{lago_id}/void: @@ -1857,7 +1942,7 @@ paths: tags: - customers summary: Create a customer - description: This endpoint creates a new customer. + description: This endpoint creates a customer. When a customer with the same `external_id` already exists, it is updated instead, and only the fields present in the payload are changed. operationId: createCustomer requestBody: description: Customer payload @@ -1877,6 +1962,8 @@ paths: $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' get: @@ -2018,6 +2105,8 @@ paths: $ref: '#/components/schemas/CustomersPaginated' '401': $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' /customers/{external_customer_id}: parameters: - name: external_customer_id @@ -2143,7 +2232,7 @@ paths: - customers - credit_notes summary: List all customer's credit notes - description: This endpoint list all existing credit notes for a customer. + description: This endpoint lists all existing credit notes for a customer. operationId: findAllCustomerCreditNotes parameters: - $ref: '#/components/parameters/external_customer_id_path' @@ -2175,6 +2264,14 @@ paths: schema: type: string example: Jane + - name: currency + in: query + description: Filter credit notes by currency. Possible values ISO 4217 currency codes. + required: false + explode: true + schema: + type: string + example: EUR - name: reason in: query description: Filter credit notes by reasons. Possible values are `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge`, `duplicated_charge` or `other`. @@ -2191,7 +2288,7 @@ paths: - other - name: credit_status in: query - description: Filter credit notes by credit status. Possible values are `available`, `consumed` or `voided`. + description: Filter credit notes by credit status. Possible values are `available`, `consumed` or `voided`. required: false explode: true schema: @@ -2202,7 +2299,7 @@ paths: - voided - name: refund_status in: query - description: Filter credit notes by refund status. Possible values are `pending`, `succeeded` or `failed`. + description: Filter credit notes by refund status. Possible values are `pending`, `succeeded` or `failed`. required: false explode: true schema: @@ -2236,6 +2333,22 @@ paths: schema: type: integer example: 100000 + - name: types[] + in: query + description: Filter credit notes by the kind of amount they carry. `credit` matches credit notes with a credited amount, `refund` those with a refunded amount and `offset` those with an amount deducted from the invoice balance. A credit note can match several types. + required: false + explode: true + schema: + type: array + items: + type: string + enum: + - credit + - refund + - offset + example: + - credit + - refund - name: self_billed in: query description: Filter credit notes belonging to a self billed invoice. Possible values are `true` or `false`. @@ -2244,6 +2357,18 @@ paths: schema: type: boolean example: true + - name: billing_entity_codes[] + in: query + description: Filter credit notes by billing entity codes. + required: false + explode: true + schema: + type: array + items: + type: string + example: + - billing_entity_code_1 + - billing_entity_code_2 responses: '200': description: Credit notes @@ -2303,7 +2428,7 @@ paths: example: '2022-08-09' - name: status in: query - description: Filter invoices by status. Possible values are `draft` or `finalized`. + description: Filter invoices by status. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`. required: false explode: true schema: @@ -2311,6 +2436,24 @@ paths: enum: - draft - finalized + - failed + - pending + - voided + - name: statuses[] + in: query + description: Filter invoices by statuses. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`. + required: false + explode: true + schema: + type: array + items: + type: string + enum: + - draft + - finalized + - failed + - pending + - voided - name: payment_status in: query description: Filter invoices by payment status. Possible values are `pending`, `failed` or `succeeded`. @@ -2322,6 +2465,19 @@ paths: - pending - failed - succeeded + - name: payment_statuses[] + in: query + description: Filter invoices by payment statuses. Possible values are `pending`, `failed` or `succeeded`. + required: false + explode: true + schema: + type: array + items: + type: string + enum: + - pending + - failed + - succeeded - name: payment_overdue in: query description: Filter invoices by payment_overdue. Possible values are `true` or `false`. @@ -2332,7 +2488,7 @@ paths: example: true - name: search_term in: query - description: Search invoices by id, number, customer name, customer external_id or customer email. + description: Search the customer's invoices by id or number. Customer attributes are not searched here, because the list is already scoped to one customer. required: false explode: true schema: @@ -2368,6 +2524,49 @@ paths: schema: type: boolean example: true + - name: currency + in: query + description: Filter invoices by currency. Possible values ISO 4217 currency codes. + required: false + explode: true + schema: + type: string + example: EUR + - name: partially_paid + in: query + description: Filter invoices that are partially paid. When `true`, only invoices with a non-zero amount paid that is below the total due are returned. When `false`, those invoices are excluded. + required: false + explode: true + schema: + type: boolean + example: true + - name: settlements[] + in: query + description: Filter invoices settled by at least one of the given settlement types. `payment` matches invoices settled by a payment, `credit_note` matches invoices settled by a credit note. + required: false + explode: true + schema: + type: array + items: + type: string + enum: + - payment + - credit_note + example: + - payment + - credit_note + - name: billing_entity_codes[] + in: query + description: Filter invoices by billing entity codes. Possible values are the billing entity codes you have created. + required: false + explode: true + schema: + type: array + items: + type: string + example: + - acme_corp + - foo_bar - name: metadata[key] in: query description: Filter invoices by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for invoice without given metadata key. For example, `metadata[color]=blue`. @@ -2421,6 +2620,8 @@ paths: $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' /customers/{external_customer_id}/payment_requests: get: tags: @@ -2433,6 +2634,7 @@ paths: - $ref: '#/components/parameters/external_customer_id_path' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/per_page' + - $ref: '#/components/parameters/currency' - $ref: '#/components/parameters/payment_status' - name: billing_entity_codes[] in: query @@ -2448,7 +2650,7 @@ paths: - billing_entity_code_2 responses: '200': - description: PaymentRequests + description: Payment requests content: application/json: schema: @@ -2465,7 +2667,9 @@ paths: description: |- Retrieves an embeddable link for displaying a customer portal. - This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal + This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal. + + The portal lets the customer update their information and top up their wallets, so when API key permissions are enabled, the API key needs the `write` permission on `customer`. parameters: - name: external_customer_id in: path @@ -2496,6 +2700,8 @@ paths: description: An embeddable link for displaying a customer portal '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /customers/{external_customer_id}/subscriptions: @@ -2510,6 +2716,14 @@ paths: - $ref: '#/components/parameters/external_customer_id_path' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/per_page' + - $ref: '#/components/parameters/currency' + - name: external_id + in: query + description: The subscription external unique identifier (provided by your own application). + required: false + schema: + type: string + example: subscription_premium - name: plan_code in: query description: The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans. @@ -2518,9 +2732,16 @@ paths: schema: type: string example: premium + - name: overridden + in: query + description: When set, filters subscriptions by whether their plan is an override of a parent plan. `true` returns only subscriptions on overridden plans; `false` returns only those on standard (non-overridden) plans. + required: false + schema: + type: boolean + example: true - name: status[] in: query - description: 'If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`.' + description: 'If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`, `incomplete`.' required: false explode: true schema: @@ -2532,6 +2753,7 @@ paths: - canceled - terminated - active + - incomplete example: - active - pending @@ -2587,17 +2809,20 @@ paths: $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' get: tags: - wallets summary: List all customer's wallets - description: This endpoint is used to list all wallets with prepaid credits of a customer + description: This endpoint is used to list all wallets with prepaid credits of a customer. operationId: findAllCustomerWallets parameters: - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/per_page' + - $ref: '#/components/parameters/currency' - name: billing_entity_codes[] in: query description: Filter wallets by billing entity codes. @@ -2817,6 +3042,9 @@ paths: summary: List wallet alerts description: This endpoint enables the retrieval of all alerts for a wallet. operationId: getCustomerWalletAlerts + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/per_page' responses: '200': description: Wallet alerts @@ -2905,7 +3133,7 @@ paths: tags: - wallets summary: Update a wallet alert - description: This endpoint allows you to update an existing alert for a wallet. + description: This endpoint allows you to update an existing alert for a wallet. A non-empty `thresholds` array replaces the whole set of thresholds on the alert. When `thresholds` is left out, or sent as an empty array, the thresholds already on the alert are kept. A threshold sent with a `code` it already had, and without `notify_on`, keeps the `notify_on` it had. operationId: updateCustomerWalletAlert requestBody: description: Update an existing alert for a wallet @@ -3046,7 +3274,7 @@ paths: - name: full_usage in: query description: | - When `true`, returns usage since subscription start instead of the current billing period. Requires one of `charge_id`, `charge_code`, `group` (or their deprecated `filter_by_*` equivalents) to be set. + When `true`, returns usage since the subscription started instead of the current billing period. It requires the granular lifetime usage add-on, at least one of `charge_id`, `charge_code`, `billable_metric_code` or `group` (or their deprecated `filter_by_*` equivalents), and a subscription without prorated charges. The request returns `405` when one of these conditions is not met. required: false schema: type: boolean @@ -3072,6 +3300,8 @@ paths: $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' + '405': + $ref: '#/components/responses/NotAllowed' /customers/{external_customer_id}/projected_usage: get: tags: @@ -3103,34 +3333,79 @@ paths: type: boolean default: true example: true - operationId: findCustomerProjectedUsage - responses: - '200': - description: Customer usage - content: - application/json: - schema: - $ref: '#/components/schemas/CustomerProjectedUsage' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/NotFound' - /customers/{external_customer_id}/past_usage: - get: - tags: - - customers - summary: Retrieve customer past usage - description: This endpoint enables the retrieval of the usage-based billing data for a customer within past periods. - parameters: - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/per_page' - - name: external_customer_id - in: path - description: The customer external unique identifier (provided by your own application). - required: true - schema: + - name: charge_id + in: query + description: Filter usage to a specific charge by its Lago ID (UUID). + required: false + schema: + type: string + format: uuid + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + - name: charge_code + in: query + description: Filter usage to a specific charge by its code. + required: false + schema: + type: string + example: storage + - name: billable_metric_code + in: query + description: Filter usage to a specific billable metric by its code. + required: false + schema: + type: string + example: storage + - name: group + in: query + description: | + Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `group[cloud]=aws`. + required: false + style: deepObject + explode: true + schema: + type: object + additionalProperties: + type: string + example: + cloud: aws + - name: filter_by_presentation + in: query + description: | + Filter `presentation_breakdowns` by a JSON-encoded array of presentation group key values. Only breakdowns matching the provided values will be returned. Pass an empty array to disable `presentation_breakdowns` entirely. + required: false + schema: + type: string + example: '["engineering", "operations"]' + operationId: findCustomerProjectedUsage + responses: + '200': + description: Customer usage + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerProjectedUsage' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '405': + $ref: '#/components/responses/NotAllowed' + /customers/{external_customer_id}/past_usage: + get: + tags: + - customers + summary: Retrieve customer past usage + description: This endpoint enables the retrieval of the usage-based billing data for a customer within past periods. + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/per_page' + - name: external_customer_id + in: path + description: The customer external unique identifier (provided by your own application). + required: true + schema: type: string example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba - name: external_subscription_id @@ -3151,7 +3426,7 @@ paths: example: cpu - name: periods_count in: query - description: Number of past billing period to returns in the result + description: Number of past billing periods to return in the result. required: false explode: true schema: @@ -3209,7 +3484,7 @@ paths: tags: - payment_methods summary: List all customer payment methods - description: This endpoint retrieves all payment methods of a Customer. + description: This endpoint retrieves all payment methods of a customer. operationId: findAllCustomersPaymentMethods parameters: - $ref: '#/components/parameters/external_customer_id_path' @@ -3242,10 +3517,10 @@ paths: - payment_methods operationId: paymentMethodSetAsDefault summary: Set the payment method as default - description: Use the payment method as default when not selected a payment method + description: This endpoint sets a payment method as the customer's default one. It is the payment method Lago uses when a payment is triggered without an explicit one. Any other default payment method of the customer is unset. responses: '200': - description: Return a 200 status to indicate that the data was received successfully + description: Payment method set as default content: application/json: schema: @@ -3254,6 +3529,8 @@ paths: $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' /customers/{external_customer_id}/payment_methods/{lago_id}: parameters: - name: lago_id @@ -3286,8 +3563,8 @@ paths: post: tags: - events - summary: Send usage events - description: This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription. + summary: Send a usage event + description: This endpoint is used for transmitting a usage measurement event to a subscription. operationId: createEvent requestBody: description: Event payload @@ -3323,7 +3600,7 @@ paths: - $ref: '#/components/parameters/external_subscription_id' - name: code in: query - description: Filter events by its code. + description: Filter events by code. required: false explode: true schema: @@ -3331,7 +3608,7 @@ paths: example: event-123 - name: timestamp_from_started_at in: query - description: Requires `external_subscription_id` to be set. Filter events by timestamp after the subscription started at datetime. + description: Requires `external_subscription_id` to be set, and cannot be combined with `timestamp_from`. Filter events by timestamp after the subscription started at datetime. required: false explode: true schema: @@ -3504,7 +3781,7 @@ paths: - events summary: Retrieve a specific event description: | - This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription. + This endpoint is used for retrieving a specific usage measurement event that has been sent to a subscription. Note that transaction_id is unique per external_subscription_id so multiple subscriptions can share the same transaction_id. This endpoint will only return the first event found with the given transaction_id. @@ -3702,7 +3979,7 @@ paths: tags: - fees summary: Update a fee - description: This endpoint is used for updating a specific fee that has been issued. + description: This endpoint is used for updating the payment status of a specific fee. Only a fee that is not attached to an invoice can be updated; once the fee is on an invoice, its payment status follows the invoice and the endpoint returns a `405` error. operationId: updateFee requestBody: description: Fee payload @@ -3710,6 +3987,7 @@ paths: application/json: schema: $ref: '#/components/schemas/FeeUpdateInput' + required: true responses: '200': description: Fee updated @@ -3771,6 +4049,8 @@ paths: $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' get: @@ -3817,6 +4097,19 @@ paths: type: string format: date example: '2022-08-09' + - name: status + in: query + description: Filter invoices by status. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`. + required: false + explode: true + schema: + type: string + enum: + - draft + - finalized + - failed + - pending + - voided - name: statuses[] in: query description: Filter invoices by statuses. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`. @@ -3832,6 +4125,17 @@ paths: - failed - pending - voided + - name: payment_status + in: query + description: Filter invoices by payment status. Possible values are `pending`, `failed` or `succeeded`. + required: false + explode: true + schema: + type: string + enum: + - pending + - failed + - succeeded - name: payment_statuses[] in: query description: Filter invoices by payment statuses. Possible values are `pending`, `failed` or `succeeded`. @@ -3855,7 +4159,7 @@ paths: example: true - name: search_term in: query - description: Search invoices by id, number, customer name, customer external_id or customer email. + description: Search invoices by id, number, purchase order number, or by the name, legal name, first name, last name, external_id or email of the customer. required: false explode: true schema: @@ -3952,6 +4256,10 @@ paths: $ref: '#/components/schemas/InvoicesPaginated' '401': $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' /invoices/{lago_id}: parameters: - $ref: '#/components/parameters/lago_invoice_id' @@ -4028,7 +4336,9 @@ paths: summary: Download an invoice PDF parameters: - $ref: '#/components/parameters/lago_invoice_id' - description: This endpoint is used for downloading a specific invoice PDF document. + description: |- + This endpoint is used for downloading a specific invoice PDF document. Only `finalized` invoices can be downloaded; any other invoice returns a `404` error. + When the PDF has already been generated, the invoice object is returned and its `file_url` points to the document. When it has not been generated yet, the response is a `200` with an empty body and the generation starts in the background. Call the endpoint again to get the invoice object with its `file_url`. operationId: downloadInvoice responses: '200': @@ -4059,6 +4369,8 @@ paths: $ref: '#/components/schemas/Invoice' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /invoices/{lago_id}/lose_dispute: @@ -4101,6 +4413,8 @@ paths: $ref: '#/components/schemas/Invoice' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' /invoices/{lago_id}/retry: @@ -4123,6 +4437,8 @@ paths: $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' + '405': + $ref: '#/components/responses/NotAllowed' /invoices/{lago_id}/payment_url: post: tags: @@ -4166,10 +4482,14 @@ paths: application/json: schema: $ref: '#/components/schemas/Invoice' + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' /invoices/{lago_id}/retry_payment: post: tags: @@ -4226,8 +4546,14 @@ paths: $ref: '#/components/schemas/Invoice' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' + '405': + $ref: '#/components/responses/NotAllowed' + '422': + $ref: '#/components/responses/UnprocessableEntity' /order_forms: get: tags: @@ -4675,7 +5001,7 @@ paths: tags: - organizations summary: Update your organization - description: This endpoint is used to update your own organization's settings. + description: This endpoint is used to update your own organization's settings. The same payload is also applied to the default billing entity of your organization. operationId: updateOrganization requestBody: description: Update an existing organization @@ -4709,29 +5035,33 @@ paths: - $ref: '#/components/parameters/per_page' - name: invoice_id in: query - description: Filter payment receipts by invoice id. + description: Filter payment receipts by invoice. It returns the receipts of the payments made on this invoice, including the payments made through a payment request that covers it. required: false explode: true schema: type: string + format: uuid example: 1a901a90-1a90-1a90-1a90-1a901a901a90 responses: '200': - description: PaymentReceipts + description: Payment receipts content: application/json: schema: $ref: '#/components/schemas/PaymentReceiptsPaginated' '401': $ref: '#/components/responses/Unauthorized' + '422': + $ref: '#/components/responses/UnprocessableEntity' /payment_receipts/{lago_id}: parameters: - name: lago_id in: path - description: Payment receipt ID + description: Unique identifier of the payment receipt. required: true schema: type: string + format: uuid example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba get: tags: @@ -4755,10 +5085,10 @@ paths: tags: - payment_requests summary: Create a payment request - description: This endpoint is used to create a payment request to collect payments of overdue invoices of a given customer + description: This endpoint is used to create a payment request to collect the payment of the overdue invoices of a customer. operationId: createPaymentRequest requestBody: - description: PaymentRequest payload + description: Payment request payload content: application/json: schema: @@ -4766,7 +5096,7 @@ paths: required: true responses: '200': - description: PaymentRequest created + description: Payment request created content: application/json: schema: @@ -4775,6 +5105,12 @@ paths: $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '405': + $ref: '#/components/responses/NotAllowed' '422': $ref: '#/components/responses/UnprocessableEntity' get: @@ -4803,13 +5139,15 @@ paths: - billing_entity_code_2 responses: '200': - description: PaymentRequests + description: Payment requests content: application/json: schema: $ref: '#/components/schemas/PaymentRequestsPaginated' '401': $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' /payment_requests/{lago_id}: parameters: - name: lago_id @@ -4832,7 +5170,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PaymentRequestObject' + $ref: '#/components/schemas/PaymentRequest' '401': $ref: '#/components/responses/Unauthorized' '404': @@ -4862,6 +5200,10 @@ paths: $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' get: @@ -4891,6 +5233,8 @@ paths: $ref: '#/components/schemas/PaymentsPaginated' '401': $ref: '#/components/responses/Unauthorized' + '422': + $ref: '#/components/responses/UnprocessableEntity' /payments/{lago_id}: parameters: - name: lago_id @@ -4913,7 +5257,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PaymentObject' + $ref: '#/components/schemas/Payment' '401': $ref: '#/components/responses/Unauthorized' '404': @@ -5049,7 +5393,7 @@ paths: tags: - entitlements summary: Create an entitlement - description: This endpoint creates new entitlements by adding features to a plan. Note that all existing entitlements will be deleted and replaced by the ones provided. To add a new entitlement without removing the existing ones, use PATCH. The feature must exist and all privileges must be valid for the feature. + description: This endpoint creates new entitlements by adding features to a plan. Note that all existing entitlements will be deleted and replaced by the ones provided. Sending an empty `entitlements` object, or omitting the key, therefore removes every entitlement of the plan. To add a new entitlement without removing the existing ones, use PATCH. The feature must exist and all privileges must be valid for the feature. operationId: createEntitlement requestBody: description: Entitlement payload @@ -5094,7 +5438,7 @@ paths: tags: - entitlements summary: Partial update of an entitlement - description: This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints. + description: This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints. operationId: updateEntitlement requestBody: description: Entitlement payload @@ -5413,7 +5757,12 @@ paths: tags: - plans summary: Update a charge - description: This endpoint updates a specific charge for a plan. + description: |- + This endpoint updates a specific charge for a plan. + + The payload replaces the charge configuration: `charge_model` must be sent on every update, and `invoice_display_name` is cleared when it is left out. + + Once the plan is attached to a subscription, only `invoice_display_name`, `properties`, `filters`, `tax_codes`, `applied_pricing_unit` and `accepts_target_wallet` are applied. The other fields are ignored. operationId: updatePlanCharge requestBody: description: Charge payload @@ -5661,7 +6010,12 @@ paths: tags: - plans summary: Update a fixed charge - description: This endpoint updates a specific fixed charge for a plan. + description: |- + This endpoint updates a specific fixed charge for a plan. + + The payload replaces the fixed charge configuration: `units` and `charge_model` must be sent on every update, and `invoice_display_name` is cleared when it is left out. + + Once the plan is attached to a subscription, `code` and `charge_model` are ignored. operationId: updatePlanFixedCharge requestBody: description: Fixed charge payload @@ -6007,6 +6361,8 @@ paths: $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '422': @@ -6051,7 +6407,7 @@ paths: example: true - name: status[] in: query - description: 'If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`.' + description: 'If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`, `incomplete`.' required: false explode: true schema: @@ -6061,6 +6417,7 @@ paths: enum: - active - canceled + - incomplete - pending - terminated example: @@ -6068,7 +6425,7 @@ paths: - pending - name: billing_entity_codes[] in: query - description: Filter subscriptions by billing entity codes. + description: Filter subscriptions by billing entity codes. A code that does not match a billing entity of the organization returns a `404` error. required: false explode: true schema: @@ -6087,6 +6444,8 @@ paths: $ref: '#/components/schemas/SubscriptionsPaginated' '401': $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' /subscriptions/{external_id}: parameters: - name: external_id @@ -6106,9 +6465,9 @@ paths: - name: status in: query description: | - By default, this endpoint only return `active` subscriptions. If you want to retrieve a subscription with a different `status`, you can specify it here. + By default, this endpoint only returns `active` subscriptions. If you want to retrieve a subscription with a different `status`, you can specify it here. - _Note: As there may exists multiple `canceled` or `terminated` subscribtions for the same `external_id`, it is recommended to use the "List all subscriptions" endpoint to retrieve those subscriptions._ + _Note: As there may exist multiple `canceled` or `terminated` subscriptions for the same `external_id`, it is recommended to use the "List all subscriptions" endpoint to retrieve those subscriptions._ required: false schema: type: string @@ -6117,6 +6476,7 @@ paths: - terminated - pending - canceled + - incomplete example: active default: active responses: @@ -6147,7 +6507,7 @@ paths: - name: status in: query description: | - By default, this endpoint only return `active` subscriptions. If you want to update a subscription with a different `status`, you can specify it here. + By default, this endpoint only updates `active` subscriptions. If you want to update a subscription with a different `status`, you can specify it here. required: false schema: type: string @@ -6162,13 +6522,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Subscription' + $ref: '#/components/schemas/SubscriptionExtended' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' + '405': + $ref: '#/components/responses/NotAllowed' '422': $ref: '#/components/responses/UnprocessableEntity' delete: @@ -6199,6 +6563,7 @@ paths: - `credit`: A credit note is generated for the unused subscription time. The unused amount is credited back to the customer. - `refund`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer. + - `offset`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due. - `skip`: No credit note is generated for the unused subscription time. _Note: This field is only applicable to pay-in-advance plans and is ignored for pay-in-arrears plans._ @@ -6208,6 +6573,7 @@ paths: enum: - credit - refund + - offset - skip example: credit - name: on_termination_invoice @@ -6231,11 +6597,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Subscription' + $ref: '#/components/schemas/SubscriptionExtended' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' + '405': + $ref: '#/components/responses/NotAllowed' '422': $ref: '#/components/responses/UnprocessableEntity' /subscriptions/{external_id}/lifetime_usage: @@ -6309,6 +6677,8 @@ paths: operationId: getSubscriptionAlerts parameters: - $ref: '#/components/parameters/subscription_status' + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/per_page' responses: '200': description: Subscription alerts @@ -6410,7 +6780,7 @@ paths: summary: Update a subscription alert parameters: - $ref: '#/components/parameters/subscription_status' - description: This endpoint allows you to update an existing alert for a subscription. + description: This endpoint allows you to update an existing alert for a subscription. A non-empty `thresholds` array replaces the whole set of thresholds on the alert. When `thresholds` is left out, or sent as an empty array, the thresholds already on the alert are kept. A threshold sent with a `code` it already had, and without `notify_on`, keeps the `notify_on` it had. operationId: updateSubscriptionAlert requestBody: description: Update an existing alert for a subscription @@ -6487,7 +6857,7 @@ paths: summary: Update subscription entitlements parameters: - $ref: '#/components/parameters/subscription_status' - description: This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints. + description: This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints. operationId: updateSubscriptionEntitlements requestBody: description: Subscription entitlements payload @@ -6531,17 +6901,17 @@ paths: tags: - entitlements summary: Remove an entitlement from a subscription - description: This endpoint removes a specific feature entitlement from a subscription. The entitlement remains available from the plan. + description: This endpoint removes a specific feature entitlement from a subscription. The plan keeps the feature and other subscriptions are not affected, but this subscription stops getting it. It returns the full list of entitlements remaining on the subscription. operationId: destroySubscriptionEntitlement parameters: - $ref: '#/components/parameters/subscription_status' responses: '200': - description: Subscription entitlement removed + description: Remaining subscription entitlements content: application/json: schema: - $ref: '#/components/schemas/SubscriptionEntitlement' + $ref: '#/components/schemas/SubscriptionEntitlements' '401': $ref: '#/components/responses/Unauthorized' '404': @@ -6573,17 +6943,17 @@ paths: tags: - entitlements summary: Remove a privilege from a subscription entitlement override - description: This endpoint removes a specific privilege from a subscription entitlement. The privilege entitlement remains available from the plan. + description: This endpoint removes a specific privilege from a subscription entitlement. The plan keeps the privilege and other subscriptions are not affected, but this subscription stops getting it. It returns the full list of entitlements remaining on the subscription. operationId: destroySubscriptionEntitlementPrivilege parameters: - $ref: '#/components/parameters/subscription_status' responses: '200': - description: Subscription entitlement with privilege override removed + description: Remaining subscription entitlements content: application/json: schema: - $ref: '#/components/schemas/SubscriptionEntitlement' + $ref: '#/components/schemas/SubscriptionEntitlements' '400': $ref: '#/components/responses/BadRequest' '401': @@ -6897,7 +7267,7 @@ paths: tags: - taxes summary: Create a tax - description: This endpoint creates a new tax representing a customizable tax rate applicable to either the organization or a specific customer. + description: This endpoint creates a new tax representing a customizable tax rate applicable to either a billing entity or a specific customer. operationId: createTax requestBody: description: Tax creation payload @@ -6923,7 +7293,7 @@ paths: tags: - taxes summary: List all taxes - description: This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either the organization or a specific customer. + description: This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either a billing entity or a specific customer. operationId: findAllTaxes parameters: - $ref: '#/components/parameters/page' @@ -6943,13 +7313,16 @@ paths: description: French standard VAT rate: 20 applied_to_organization: true + applied_to_billing_entities_codes: + - acme_corp created_at: '2023-07-06T14:35:58Z' - lago_id: 2e034a10-6652-4daf-a600-b085184f93ad name: TVA code: french_reduced_vat - description: French reduce VAT + description: French reduced VAT rate: 5 applied_to_organization: false + applied_to_billing_entities_codes: [] created_at: '2023-07-06T14:45:23Z' meta: current_page: 1 @@ -6972,7 +7345,7 @@ paths: tags: - taxes summary: Update a tax - description: This endpoint updates an existing tax representing a customizable tax rate applicable to either the organization or a specific customer. + description: This endpoint updates an existing tax representing a customizable tax rate applicable to either a billing entity or a specific customer. operationId: updateTax requestBody: description: Tax update payload @@ -6999,8 +7372,8 @@ paths: get: tags: - taxes - summary: Retrieve a Tax - description: This endpoint retrieves an existing tax representing a customizable tax rate applicable to either the organization or a specific customer. The tax is identified by its unique code. + summary: Retrieve a tax + description: This endpoint retrieves an existing tax representing a customizable tax rate applicable to either a billing entity or a specific customer. The tax is identified by its unique code. operationId: findTax responses: '200': @@ -7057,6 +7430,8 @@ paths: $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' get: @@ -7100,6 +7475,8 @@ paths: $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' /wallets/{lago_id}: parameters: - name: lago_id @@ -7346,7 +7723,7 @@ paths: parameters: - name: lago_id in: path - description: Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system. + description: Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction's record within the Lago system. required: true schema: type: string @@ -7356,7 +7733,7 @@ paths: tags: - wallets summary: Retrieve a wallet transaction - description: This endpoint is used to retrieve a specific wallet transactions. + description: This endpoint is used to retrieve a specific wallet transaction. operationId: findWalletTransaction responses: '200': @@ -7364,7 +7741,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WalletTransactionObject' + $ref: '#/components/schemas/WalletTransaction' '401': $ref: '#/components/responses/Unauthorized' '403': @@ -7488,7 +7865,7 @@ paths: - $ref: '#/components/parameters/per_page' - name: status in: query - description: The status of the wallet transaction. Possible values are `pending` or `settled`. + description: The status of the wallet transaction. Possible values are `pending`, `settled` or `failed`. required: false explode: true schema: @@ -7510,6 +7887,14 @@ paths: schema: type: string example: inbound + - name: metadata[key] + in: query + description: Filter wallet transactions by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. For example, `metadata[color]=blue`. + required: false + explode: true + schema: + type: string + example: someValue responses: '200': description: Wallet transactions @@ -7528,7 +7913,7 @@ paths: tags: - webhooks summary: Retrieve webhook public key - description: This endpoint is used to retrieve the public key used to verify the webhooks signature + description: '**Deprecated.** Use `GET /webhooks/json_public_key` instead. This endpoint is used to retrieve the public key used to verify the webhook signature.' deprecated: true operationId: fetchPublicKey responses: @@ -7538,7 +7923,19 @@ paths: text/plain: schema: type: string - example: MEgCQQCo9+BpMRYQ/dL3DS2CyJxRF+j6ctbT3/Qp84+KeFhnii7NT7fELilKUSnxS30WAvQCCo2yU1orfgqr41mM70MBAgMBAAE= + description: The RSA public key used to verify webhook signatures. The key is PEM encoded, then Base64 encoded with line breaks. + example: | + LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3 + MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUFyRVBKd3hlZUJwSmRGSXFyRTBO + MQpnTWxUamNaaTRSeGlwN2FsZ0RqQ3B1M2VlUDU5clZ4TUxmb3ZxVnNndENn + aWZYWGp0WmpFc3NnZVJRejh4TW9MCks1YWY5YjhjTjJlaTNMVlRPMDdxaFRF + YjBjakM3NmhON1NabnF1aTVvS3haNGVOVml4MTZCWXNLb3pyamd2eWEKWDB2 + cUtNNDlGNzM3dloyTld5M1luS2w3cXNTaGs5NGM5bVlFM1creUNMMERSUFQ5 + Z1AxYlliQ1FHc0hZdVV3TgpIQjVxdlM3OFhhUFY5d1doUGNsNzBYSWlreXhR + L3BiZGtpOEhoRUhtRTAxVnJwSFhNQW1zNzBXQkQyT0toVTJICm1rdGZaZVpJ + VmROeU5MUXNacGx3TmphUjZOdWxrdUFyOUZnRStWWXVmL01jUEZYZ1ViRUFt + MkM3emU4Ulp1eUkKb1FJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t + Cg== '401': $ref: '#/components/responses/Unauthorized' /webhooks/json_public_key: @@ -7546,7 +7943,7 @@ paths: tags: - webhooks summary: Retrieve webhook public key (JSON) - description: This endpoint is used to retrieve the public key used to verify the webhooks signature, wrapped in a JSON object. Prefer this endpoint over the deprecated GET /webhooks/public_key. + description: This endpoint is used to retrieve the public key used to verify the webhook signature, wrapped in a JSON object. Prefer this endpoint over the deprecated `GET /webhooks/public_key`. operationId: fetchJsonPublicKey responses: '200': @@ -7561,11 +7958,11 @@ paths: post: tags: - webhook_endpoints - summary: Create a webhook_endpoint - description: This endpoint is used to create a webhook endpoint. + summary: Create a webhook endpoint + description: This endpoint is used to create a webhook endpoint. An organization can have at most 10 webhook endpoints. operationId: createWebhookEndpoint requestBody: - description: Webhook Endpoint payload + description: Webhook endpoint payload content: application/json: schema: @@ -7573,7 +7970,7 @@ paths: required: true responses: '200': - description: Webhook Endpoint created + description: Webhook endpoint created content: application/json: schema: @@ -7595,7 +7992,7 @@ paths: - $ref: '#/components/parameters/per_page' responses: '200': - description: WebhookEndpoints + description: Webhook endpoints content: application/json: schema: @@ -7619,7 +8016,7 @@ paths: description: This endpoint is used to update an existing webhook endpoint. operationId: updateWebhookEndpoint requestBody: - description: Webhook Endpoint update payload + description: Webhook endpoint update payload content: application/json: schema: @@ -7627,7 +8024,7 @@ paths: required: true responses: '200': - description: Webhook Endpoint updated + description: Webhook endpoint updated content: application/json: schema: @@ -7648,7 +8045,7 @@ paths: operationId: findWebhookEndpoint responses: '200': - description: WebhookEndpoint + description: Webhook endpoint content: application/json: schema: @@ -7665,7 +8062,7 @@ paths: operationId: destroyWebhookEndpoint responses: '200': - description: Webhook Endpoint deleted + description: Webhook endpoint deleted content: application/json: schema: @@ -7674,20 +8071,18 @@ paths: $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' - '405': - $ref: '#/components/responses/NotAllowed' webhooks: - alert_triggered: + add_on_created: post: - operationId: alertTriggered - summary: A new alert was triggered - description: One or more thresholds defined in the alert were crossed + operationId: addOnCreated + summary: A new add-on has been created + description: A new add-on has been created parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' - $ref: '#/components/parameters/webhook_unique_key' requestBody: - description: Details of the triggered alert + description: Details of the new add-on content: application/json: schema: @@ -7696,37 +8091,37 @@ webhooks: - webhook_type - object_type - organization_id - - triggered_alert + - add_on properties: webhook_type: type: string enum: - - alert.triggered + - add_on.created object_type: type: string enum: - - triggered_alert + - add_on organization_id: type: string format: uuid description: Unique identifier of the organization, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - triggered_alert: - $ref: '#/components/schemas/TriggeredAlertObject' + add_on: + $ref: '#/components/schemas/AddOnObject' responses: '200': description: Return a 200 status to indicate that the data was received successfully - billable_metric_created: + add_on_updated: post: - operationId: billableMetricCreated - summary: A new billable metric has been created - description: A new billable metric has been created + operationId: addOnUpdated + summary: An add-on has been updated + description: An add-on has been updated parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' - $ref: '#/components/parameters/webhook_unique_key' requestBody: - description: Details of the new billable metric + description: Details of the updated add-on content: application/json: schema: @@ -7735,37 +8130,37 @@ webhooks: - webhook_type - object_type - organization_id - - billable_metric + - add_on properties: webhook_type: type: string enum: - - billable_metric.created + - add_on.updated object_type: type: string enum: - - billable_metric + - add_on organization_id: type: string format: uuid description: Unique identifier of the organization, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - billable_metric: - $ref: '#/components/schemas/BillableMetricObject' + add_on: + $ref: '#/components/schemas/AddOnObject' responses: '200': description: Return a 200 status to indicate that the data was received successfully - billable_metric_updated: + add_on_deleted: post: - operationId: billableMetricUpdated - summary: A billable metric has been updated - description: A billable metric has been updated + operationId: addOnDeleted + summary: An add-on has been deleted + description: An add-on has been deleted parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' - $ref: '#/components/parameters/webhook_unique_key' requestBody: - description: Details of the billable metric + description: Details of the add-on content: application/json: schema: @@ -7774,37 +8169,40 @@ webhooks: - webhook_type - object_type - organization_id - - billable_metric + - add_on properties: webhook_type: type: string enum: - - billable_metric.updated + - add_on.deleted object_type: type: string enum: - - billable_metric + - add_on organization_id: type: string format: uuid description: Unique identifier of the organization, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - billable_metric: - $ref: '#/components/schemas/BillableMetricObject' + add_on: + $ref: '#/components/schemas/AddOnObject' responses: '200': description: Return a 200 status to indicate that the data was received successfully - billable_metric_deleted: + alert_resolved: post: - operationId: billableMetricDeleted - summary: A billable metric has been deleted - description: A billable metric has been deleted + operationId: alertResolved + summary: An alert was resolved + description: |- + One or more thresholds that had triggered the alert are no longer in alarm. + + Only thresholds with `resolved` in their `notify_on` are announced, and only when Lago recorded an alarm for their code. A threshold that was already in alarm when it was created or opted in is recorded silently, so its first recovery is announced without an earlier `alert.triggered`. Pairing is by threshold code: a threshold replaced by another one with the same code resolves the alarm the first one raised. parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' - $ref: '#/components/parameters/webhook_unique_key' requestBody: - description: Details of the billable metric + description: Details of the resolved alert content: application/json: schema: @@ -7813,37 +8211,37 @@ webhooks: - webhook_type - object_type - organization_id - - billable_metric + - resolved_alert properties: webhook_type: type: string enum: - - billable_metric.deleted + - alert.resolved object_type: type: string enum: - - billable_metric + - resolved_alert organization_id: type: string format: uuid description: Unique identifier of the organization, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - billable_metric: - $ref: '#/components/schemas/BillableMetricObject' + resolved_alert: + $ref: '#/components/schemas/ResolvedAlertObject' responses: '200': description: Return a 200 status to indicate that the data was received successfully - customer_created: + alert_triggered: post: - operationId: customerCreated - summary: A new customer has been created - description: A new customer has been created + operationId: alertTriggered + summary: A new alert was triggered + description: One or more thresholds defined in the alert were crossed parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' - $ref: '#/components/parameters/webhook_unique_key' requestBody: - description: Details of the new customer + description: Details of the triggered alert content: application/json: schema: @@ -7852,37 +8250,37 @@ webhooks: - webhook_type - object_type - organization_id - - customer + - triggered_alert properties: webhook_type: type: string enum: - - customer.created + - alert.triggered object_type: type: string enum: - - customer + - triggered_alert organization_id: type: string format: uuid description: Unique identifier of the organization, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - customer: - $ref: '#/components/schemas/CustomerObject' + triggered_alert: + $ref: '#/components/schemas/TriggeredAlertObject' responses: '200': description: Return a 200 status to indicate that the data was received successfully - customer_updated: + billable_metric_created: post: - operationId: customerUpdated - summary: A customer has been updated - description: A customer has been updated + operationId: billableMetricCreated + summary: A new billable metric has been created + description: A new billable metric has been created parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' - $ref: '#/components/parameters/webhook_unique_key' requestBody: - description: Details of the customer + description: Details of the new billable metric content: application/json: schema: @@ -7890,7 +8288,164 @@ webhooks: required: - webhook_type - object_type - - customer + - organization_id + - billable_metric + properties: + webhook_type: + type: string + enum: + - billable_metric.created + object_type: + type: string + enum: + - billable_metric + organization_id: + type: string + format: uuid + description: Unique identifier of the organization, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + billable_metric: + $ref: '#/components/schemas/BillableMetricObject' + responses: + '200': + description: Return a 200 status to indicate that the data was received successfully + billable_metric_updated: + post: + operationId: billableMetricUpdated + summary: A billable metric has been updated + description: A billable metric has been updated + parameters: + - $ref: '#/components/parameters/webhook_signature' + - $ref: '#/components/parameters/webhook_signature_algorithm' + - $ref: '#/components/parameters/webhook_unique_key' + requestBody: + description: Details of the billable metric + content: + application/json: + schema: + type: object + required: + - webhook_type + - object_type + - organization_id + - billable_metric + properties: + webhook_type: + type: string + enum: + - billable_metric.updated + object_type: + type: string + enum: + - billable_metric + organization_id: + type: string + format: uuid + description: Unique identifier of the organization, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + billable_metric: + $ref: '#/components/schemas/BillableMetricObject' + responses: + '200': + description: Return a 200 status to indicate that the data was received successfully + billable_metric_deleted: + post: + operationId: billableMetricDeleted + summary: A billable metric has been deleted + description: A billable metric has been deleted + parameters: + - $ref: '#/components/parameters/webhook_signature' + - $ref: '#/components/parameters/webhook_signature_algorithm' + - $ref: '#/components/parameters/webhook_unique_key' + requestBody: + description: Details of the billable metric + content: + application/json: + schema: + type: object + required: + - webhook_type + - object_type + - organization_id + - billable_metric + properties: + webhook_type: + type: string + enum: + - billable_metric.deleted + object_type: + type: string + enum: + - billable_metric + organization_id: + type: string + format: uuid + description: Unique identifier of the organization, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + billable_metric: + $ref: '#/components/schemas/BillableMetricObject' + responses: + '200': + description: Return a 200 status to indicate that the data was received successfully + customer_created: + post: + operationId: customerCreated + summary: A new customer has been created + description: A new customer has been created + parameters: + - $ref: '#/components/parameters/webhook_signature' + - $ref: '#/components/parameters/webhook_signature_algorithm' + - $ref: '#/components/parameters/webhook_unique_key' + requestBody: + description: Details of the new customer + content: + application/json: + schema: + type: object + required: + - webhook_type + - object_type + - organization_id + - customer + properties: + webhook_type: + type: string + enum: + - customer.created + object_type: + type: string + enum: + - customer + organization_id: + type: string + format: uuid + description: Unique identifier of the organization, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + customer: + $ref: '#/components/schemas/CustomerObject' + responses: + '200': + description: Return a 200 status to indicate that the data was received successfully + customer_updated: + post: + operationId: customerUpdated + summary: A customer has been updated + description: A customer has been updated + parameters: + - $ref: '#/components/parameters/webhook_signature' + - $ref: '#/components/parameters/webhook_signature_algorithm' + - $ref: '#/components/parameters/webhook_unique_key' + requestBody: + description: Details of the customer + content: + application/json: + schema: + type: object + required: + - webhook_type + - object_type + - organization_id + - customer properties: webhook_type: type: string @@ -7913,8 +8468,8 @@ webhooks: customer_accounting_provider_created: post: operationId: customerAccountingProviderCreated - summary: A customer was created on an accouting integration - description: A customer was created on an accouting integration + summary: A customer was created on an accounting integration + description: A customer was created on an accounting integration parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' @@ -8368,22 +8923,27 @@ webhooks: type: string enum: - credit_note_payment_provider_refund_error + organization_id: + type: string + format: uuid + description: Unique identifier of the organization, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 credit_note_payment_provider_refund_error: $ref: '#/components/schemas/CreditNotePaymentProviderRefundError' responses: '200': description: Return a 200 status to indicate that the data was received successfully - dunning_campaign_finished: + coupon_created: post: - operationId: dunningCampaignFinished - summary: The dunning campaign has been completed for a customer - description: The dunning campaign has been completed for a customer + operationId: couponCreated + summary: A new coupon has been created + description: A new coupon has been created parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' - $ref: '#/components/parameters/webhook_unique_key' requestBody: - description: Details of the finished dunning campaign and the overdue balance + description: Details of the new coupon content: application/json: schema: @@ -8392,38 +8952,37 @@ webhooks: - webhook_type - object_type - organization_id - - dunning_campaign + - coupon properties: webhook_type: type: string enum: - - dunning_campaign.finished + - coupon.created object_type: type: string enum: - - dunning_campaign + - coupon organization_id: type: string format: uuid description: Unique identifier of the organization, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - dunning_campaign: - $ref: '#/components/schemas/DunningCampaignFinishedObject' + coupon: + $ref: '#/components/schemas/CouponObject' responses: '200': description: Return a 200 status to indicate that the data was received successfully - event_error: + coupon_updated: post: - deprecated: true - operationId: eventError - summary: An error has been detected on an event - description: An error has been detected on an event + operationId: couponUpdated + summary: A coupon has been updated + description: A coupon has been updated parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' - $ref: '#/components/parameters/webhook_unique_key' requestBody: - description: Details of the event and of the error + description: Details of the updated coupon content: application/json: schema: @@ -8432,37 +8991,37 @@ webhooks: - webhook_type - object_type - organization_id - - event_error + - coupon properties: webhook_type: type: string enum: - - event.error + - coupon.updated object_type: type: string enum: - - event_error + - coupon organization_id: type: string format: uuid description: Unique identifier of the organization, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - event_error: - $ref: '#/components/schemas/EventErrorsObject' + coupon: + $ref: '#/components/schemas/CouponObject' responses: '200': description: Return a 200 status to indicate that the data was received successfully - events_errors: + coupon_deleted: post: - operationId: eventsErrors - summary: Errors were encountered while post-processing some events - description: Errors were encountered while post-processing some events + operationId: couponDeleted + summary: A coupon has been deleted + description: A coupon has been deleted parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' - $ref: '#/components/parameters/webhook_unique_key' requestBody: - description: Details of the events errors + description: Details of the coupon content: application/json: schema: @@ -8471,37 +9030,37 @@ webhooks: - webhook_type - object_type - organization_id - - events_errors + - coupon properties: webhook_type: type: string enum: - - events.errors + - coupon.deleted object_type: type: string enum: - - events_errors + - coupon organization_id: type: string format: uuid description: Unique identifier of the organization, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - events_errors: - $ref: '#/components/schemas/EventsErrorsObject' + coupon: + $ref: '#/components/schemas/CouponObject' responses: '200': description: Return a 200 status to indicate that the data was received successfully - feature.created: + coupon_terminated: post: - operationId: featureCreated - summary: A new feature has been created - description: A new feature has been created + operationId: couponTerminated + summary: A coupon has been terminated + description: A coupon has been terminated parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' - $ref: '#/components/parameters/webhook_unique_key' requestBody: - description: Details of the new feature + description: Details of the terminated coupon content: application/json: schema: @@ -8510,37 +9069,37 @@ webhooks: - webhook_type - object_type - organization_id - - feature + - coupon properties: webhook_type: type: string enum: - - feature.created + - coupon.terminated object_type: type: string enum: - - feature + - coupon organization_id: type: string format: uuid description: Unique identifier of the organization, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - feature: - $ref: '#/components/schemas/FeatureObject' + coupon: + $ref: '#/components/schemas/CouponObject' responses: '200': description: Return a 200 status to indicate that the data was received successfully - feature.updated: + dunning_campaign_finished: post: - operationId: featureUpdated - summary: A feature has been updated - description: A feature has been updated + operationId: dunningCampaignFinished + summary: The dunning campaign has been completed for a customer + description: The dunning campaign has been completed for a customer parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' - $ref: '#/components/parameters/webhook_unique_key' requestBody: - description: Details of the feature + description: Details of the finished dunning campaign and the overdue balance content: application/json: schema: @@ -8549,37 +9108,38 @@ webhooks: - webhook_type - object_type - organization_id - - feature + - dunning_campaign properties: webhook_type: type: string enum: - - feature.updated + - dunning_campaign.finished object_type: type: string enum: - - feature + - dunning_campaign organization_id: type: string format: uuid description: Unique identifier of the organization, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - feature: - $ref: '#/components/schemas/FeatureObject' + dunning_campaign: + $ref: '#/components/schemas/DunningCampaignFinishedObject' responses: '200': description: Return a 200 status to indicate that the data was received successfully - feature.deleted: + event_error: post: - operationId: featureDeleted - summary: A feature has been deleted - description: A feature has been deleted + deprecated: true + operationId: eventError + summary: An error has been detected on an event + description: An error has been detected on an event parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' - $ref: '#/components/parameters/webhook_unique_key' requestBody: - description: Details of the feature + description: Details of the event and of the error content: application/json: schema: @@ -8588,37 +9148,37 @@ webhooks: - webhook_type - object_type - organization_id - - feature + - event_error properties: webhook_type: type: string enum: - - feature.deleted + - event.error object_type: type: string enum: - - feature + - event_error organization_id: type: string format: uuid description: Unique identifier of the organization, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - feature: - $ref: '#/components/schemas/FeatureObject' + event_error: + $ref: '#/components/schemas/EventErrorsObject' responses: '200': description: Return a 200 status to indicate that the data was received successfully - fee_created: + events_errors: post: - operationId: feeCreated - summary: A pay in advance fee has been created - description: A pay in advance fee has been created + operationId: eventsErrors + summary: Errors were encountered while post-processing some events + description: Errors were encountered while post-processing some events parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' - $ref: '#/components/parameters/webhook_unique_key' requestBody: - description: Details of the new fee + description: Details of the events errors content: application/json: schema: @@ -8627,7 +9187,163 @@ webhooks: - webhook_type - object_type - organization_id - - fee + - events_errors + properties: + webhook_type: + type: string + enum: + - events.errors + object_type: + type: string + enum: + - events_errors + organization_id: + type: string + format: uuid + description: Unique identifier of the organization, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + events_errors: + $ref: '#/components/schemas/EventsErrorsObject' + responses: + '200': + description: Return a 200 status to indicate that the data was received successfully + feature_created: + post: + operationId: featureCreated + summary: A new feature has been created + description: A new feature has been created + parameters: + - $ref: '#/components/parameters/webhook_signature' + - $ref: '#/components/parameters/webhook_signature_algorithm' + - $ref: '#/components/parameters/webhook_unique_key' + requestBody: + description: Details of the new feature + content: + application/json: + schema: + type: object + required: + - webhook_type + - object_type + - organization_id + - feature + properties: + webhook_type: + type: string + enum: + - feature.created + object_type: + type: string + enum: + - feature + organization_id: + type: string + format: uuid + description: Unique identifier of the organization, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + feature: + $ref: '#/components/schemas/FeatureObject' + responses: + '200': + description: Return a 200 status to indicate that the data was received successfully + feature_updated: + post: + operationId: featureUpdated + summary: A feature has been updated + description: A feature has been updated + parameters: + - $ref: '#/components/parameters/webhook_signature' + - $ref: '#/components/parameters/webhook_signature_algorithm' + - $ref: '#/components/parameters/webhook_unique_key' + requestBody: + description: Details of the feature + content: + application/json: + schema: + type: object + required: + - webhook_type + - object_type + - organization_id + - feature + properties: + webhook_type: + type: string + enum: + - feature.updated + object_type: + type: string + enum: + - feature + organization_id: + type: string + format: uuid + description: Unique identifier of the organization, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + feature: + $ref: '#/components/schemas/FeatureObject' + responses: + '200': + description: Return a 200 status to indicate that the data was received successfully + feature_deleted: + post: + operationId: featureDeleted + summary: A feature has been deleted + description: A feature has been deleted + parameters: + - $ref: '#/components/parameters/webhook_signature' + - $ref: '#/components/parameters/webhook_signature_algorithm' + - $ref: '#/components/parameters/webhook_unique_key' + requestBody: + description: Details of the feature + content: + application/json: + schema: + type: object + required: + - webhook_type + - object_type + - organization_id + - feature + properties: + webhook_type: + type: string + enum: + - feature.deleted + object_type: + type: string + enum: + - feature + organization_id: + type: string + format: uuid + description: Unique identifier of the organization, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + feature: + $ref: '#/components/schemas/FeatureObject' + responses: + '200': + description: Return a 200 status to indicate that the data was received successfully + fee_created: + post: + operationId: feeCreated + summary: A pay in advance fee has been created + description: A pay in advance fee has been created + parameters: + - $ref: '#/components/parameters/webhook_signature' + - $ref: '#/components/parameters/webhook_signature_algorithm' + - $ref: '#/components/parameters/webhook_unique_key' + requestBody: + description: Details of the new fee + content: + application/json: + schema: + type: object + required: + - webhook_type + - object_type + - organization_id + - fee properties: webhook_type: type: string @@ -8766,9 +9482,10 @@ webhooks: description: Return a 200 status to indicate that the data was received successfully invoice_add_on_added: post: + deprecated: true operationId: invoiceAddOnAdded summary: A new add on invoice has been emitted - description: A new add on invoice has been emitted + description: '**Deprecated.** This webhook is no longer emitted by Lago. Use `invoice.one_off_created` for invoices created from add-ons.' parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' @@ -9196,8 +9913,8 @@ webhooks: invoice_resynced: post: operationId: invoiceResynced - summary: An invoice has been resynced with salesforce - description: An invoice has been resynced with salesforce + summary: An invoice has been resynced with Salesforce + description: An invoice has been resynced with Salesforce parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' @@ -9718,8 +10435,8 @@ webhooks: payment_request_created: post: operationId: paymentRequestCreated - summary: An new payment request has been created - description: An new payment request has been created + summary: A new payment request has been created + description: A new payment request has been created parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' @@ -9796,8 +10513,8 @@ webhooks: payment_request_payment_status_updated: post: operationId: paymentRequestPaymentStatusUpdated - summary: The payment status of an invoice has been updated - description: The payment status of an invoice has been updated + summary: The payment status of a payment request has been updated + description: The payment status of a payment request has been updated parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' @@ -10192,8 +10909,8 @@ webhooks: subscription_started: post: operationId: subscriptionStarted - summary: An subscription has started - description: An subscription has started + summary: A subscription has started + description: A subscription has started parameters: - $ref: '#/components/parameters/webhook_signature' - $ref: '#/components/parameters/webhook_signature_algorithm' @@ -10662,7 +11379,7 @@ components: page: name: page in: query - description: Page number. + description: Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page. required: false explode: true schema: @@ -10671,7 +11388,7 @@ components: per_page: name: per_page in: query - description: Number of records per page. + description: Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records. required: false explode: true schema: @@ -10695,6 +11412,15 @@ components: schema: type: string example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba + billing_entity_code: + name: billing_entity_code + in: query + description: Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. + required: false + explode: true + schema: + type: string + example: acme_corp months: name: months in: query @@ -10721,6 +11447,15 @@ components: schema: type: string example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba + currency: + name: currency + in: query + description: Filter the results by currency, expressed as an ISO 4217 code. + required: false + explode: true + schema: + type: string + example: EUR payment_status: name: payment_status in: query @@ -10769,15 +11504,6 @@ components: type: string format: uuid example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - currency: - name: currency - in: query - description: Filter the results by currency, expressed as an ISO 4217 code. - required: false - explode: true - schema: - type: string - example: EUR plan_code: name: code in: path @@ -10833,7 +11559,7 @@ components: name: subscription_status in: query description: | - Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`. + Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`. required: false schema: type: string @@ -10842,6 +11568,7 @@ components: - active - terminated - canceled + - incomplete default: active example: active subscription_external_id_path: @@ -11003,9 +11730,11 @@ components: - SOS - SRD - STD + - SYP - SZL - THB - TJS + - TND - TOP - TRY - TTD @@ -11431,10 +12160,30 @@ components: - default_currency - document_locale - document_numbering + - document_number_prefix - finalize_zero_amount_invoice + - invoice_footer - invoice_grace_period + - subscription_invoice_issuing_date_anchor + - subscription_invoice_issuing_date_adjustment + - is_default - net_payment_term + - address_line1 + - address_line2 + - phone + - city + - state + - country + - zipcode + - email + - legal_name + - legal_number + - tax_identification_number - timezone + - email_settings + - eu_tax_management + - einvoicing + - logo_url - created_at - updated_at properties: @@ -11458,7 +12207,7 @@ components: document_locale: type: string example: en - description: The language of the documents generated for this billing entity + description: The language of the documents generated for this billing entity, in the ISO 639-1 format. document_numbering: type: string enum: @@ -11474,7 +12223,7 @@ components: - string - 'null' example: ABC-123 - description: The prefix used in document numbers for this billing entity + description: The prefix used in document numbers for this billing entity. It is upper cased. When no prefix is given at creation, Lago builds one from the first three letters of the name and the last four characters of the identifier. finalize_zero_amount_invoice: type: boolean example: true @@ -11589,13 +12338,15 @@ components: - payment_receipt.created description: The email notification settings for this billing entity eu_tax_management: - type: boolean + type: + - boolean + - 'null' example: false - description: Whether EU tax management is enabled for this billing entity + description: Whether EU tax management is enabled for this billing entity. It can only be enabled when the billing entity country is in the European Union. einvoicing: type: boolean example: false - description: Whether e-invoicing is enabled for this billing entity + description: Whether e-invoicing is enabled for this billing entity. It can only be enabled when the billing entity country is `FR` or `DE`. logo_url: type: - string @@ -11626,26 +12377,6 @@ components: error: type: string example: Unauthorized - ApiErrorUnprocessableEntity: - type: object - required: - - status - - error - - code - - error_details - properties: - status: - type: integer - format: int32 - example: 422 - error: - type: string - example: Unprocessable entity - code: - type: string - example: validation_errors - error_details: - type: object BillingEntityCreateInput: type: object description: Billing entity create input @@ -11683,8 +12414,10 @@ components: type: - string - 'null' + minLength: 1 + maxLength: 10 example: ABC-123 - description: The prefix used in document numbers for this billing entity + description: The prefix used in document numbers for this billing entity (1 to 10 characters). It is upper cased. When it is not provided, Lago builds one from the first three letters of the name and the last four characters of the identifier. finalize_zero_amount_invoice: type: boolean example: true @@ -11694,16 +12427,17 @@ components: properties: invoice_footer: type: string + maxLength: 600 example: Thank you for your business - description: The footer text to be displayed on invoices for this billing entity + description: The footer text to be displayed on invoices for this billing entity (600 characters max). document_locale: type: string example: en - description: The language of the documents generated for this billing entity + description: The language of the documents generated for this billing entity, in the ISO 639-1 format. invoice_grace_period: type: integer example: 0 - description: The grace period (in days) for invoice finalization + description: The grace period (in days) for invoice finalization. This is a premium feature, the value is ignored without a premium license. subscription_invoice_issuing_date_anchor: type: string description: Defines whether the issuing date follows the current billing period's end date or the next period starting date. @@ -11788,7 +12522,7 @@ components: description: The tax identification number of the billing entity timezone: $ref: '#/components/schemas/Timezone' - description: The timezone of the billing entity + description: The timezone of the billing entity. This is a premium feature, the value is ignored without a premium license. example: UTC email_settings: type: array @@ -11798,22 +12532,22 @@ components: - invoice.finalized - credit_note.created - payment_receipt.created - description: The email notification settings for this billing entity + description: The email notification settings for this billing entity. This is a premium feature, the value is ignored without a premium license. eu_tax_management: type: boolean example: false - description: Whether EU tax management is enabled for this billing entity + description: Whether EU tax management is enabled for this billing entity. It can only be enabled when the billing entity country is in the European Union. einvoicing: type: boolean example: false - description: Whether e-invoicing is enabled for this billing entity + description: Whether e-invoicing is enabled for this billing entity. It can only be enabled when the billing entity country is `FR` or `DE`. logo: type: - string - 'null' format: uri example: data:image/png;base64,... - description: The base64 encoded logo image for the billing entity + description: The base64 encoded logo image for the billing entity. Accepted formats are PNG, JPG and JPEG, up to 800 kB. ApiErrorBadRequest: type: object required: @@ -11844,12 +12578,33 @@ components: code: type: string example: feature_unavailable + ApiErrorUnprocessableEntity: + type: object + required: + - status + - error + - code + - error_details + properties: + status: + type: integer + format: int32 + example: 422 + error: + type: string + example: Unprocessable entity + code: + type: string + example: validation_errors + error_details: + type: object TaxObject: type: object required: - lago_id - name - code + - description - rate - applied_to_organization - created_at @@ -11871,11 +12626,11 @@ components: type: - string - 'null' - description: Internal description of the tax + description: Internal description of the tax. example: French standard VAT rate: type: number - description: The percentage rate of the tax + description: The percentage rate of the tax. example: 20 applied_to_organization: type: boolean @@ -11886,7 +12641,7 @@ components: type: array items: type: string - description: The codes of the billing entities the tax is applied to, sorted alphabetically. It is empty when the tax is only attached to customers. + description: The codes of the billing entities the tax is applied to, sorted alphabetically. It is empty when the tax is only attached to customers. This field is only returned by the tax endpoints, not by taxes nested in another object. example: - acme_corp - foo_bar @@ -12006,11 +12761,11 @@ components: - `per_customer`: document numbers are unique per customer - `per_billing_entity`: document numbers are unique per billing entity document_number_prefix: - type: - - string - - 'null' + type: string + minLength: 1 + maxLength: 10 example: ABC-123 - description: The prefix used in document numbers for this billing entity + description: The prefix used in document numbers for this billing entity (1 to 10 characters). It is upper cased. It cannot be removed once the billing entity exists, and sending `null` returns a `422` error. finalize_zero_amount_invoice: type: boolean example: true @@ -12020,16 +12775,17 @@ components: properties: invoice_footer: type: string + maxLength: 600 example: Thank you for your business - description: The footer text to be displayed on invoices for this billing entity + description: The footer text to be displayed on invoices for this billing entity (600 characters max). document_locale: type: string example: en - description: The language of the documents generated for this billing entity + description: The language of the documents generated for this billing entity, in the ISO 639-1 format. invoice_grace_period: type: integer example: 0 - description: The grace period (in days) for invoice finalization + description: The grace period (in days) for invoice finalization. This is a premium feature, the value is ignored without a premium license. subscription_invoice_issuing_date_anchor: type: string description: Defines whether the issuing date follows the current billing period's end date or the next period starting date. @@ -12114,11 +12870,11 @@ components: description: The tax identification number of the billing entity timezone: $ref: '#/components/schemas/Timezone' - description: The timezone of the billing entity + description: The timezone of the billing entity. This is a premium feature, the value is ignored without a premium license. example: UTC tax_codes: $ref: '#/components/schemas/TaxCodes' - description: The tax codes that should be associated with this billing entity + description: The tax codes that should be associated with this billing entity. Codes are matched without case sensitivity, and two codes that differ only by case count as one. An unknown code returns a `404` error. email_settings: type: array items: @@ -12127,22 +12883,22 @@ components: - invoice.finalized - credit_note.created - payment_receipt.created - description: The email notification settings for this billing entity + description: The email notification settings for this billing entity. This is a premium feature, the value is ignored without a premium license. eu_tax_management: type: boolean example: false - description: Whether EU tax management is enabled for this billing entity + description: Whether EU tax management is enabled for this billing entity. It can only be enabled when the billing entity country is in the European Union. einvoicing: type: boolean example: false - description: Whether e-invoicing is enabled for this billing entity + description: Whether e-invoicing is enabled for this billing entity. It can only be enabled when the billing entity country is `FR` or `DE`. logo: type: - string - 'null' format: uri example: data:image/png;base64,... - description: The base64 encoded logo image for the billing entity. Sending "null" will remove the logo, if any exist. + description: The base64 encoded logo image for the billing entity. Accepted formats are PNG, JPG and JPEG, up to 800 kB. Sending "null" removes the current logo. invoice_custom_section_codes: type: array items: @@ -12157,28 +12913,32 @@ components: - activity_id - activity_source - activity_type + - activity_object + - activity_object_changes + - user_email + - external_customer_id + - external_subscription_id - logged_at - resource_id - resource_type - - organization_id - created_at properties: activity_id: type: string format: uuid example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - description: Unique identifier assigned to the activity log within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the activity log record within the Lago system + description: Unique identifier assigned to the activity log within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the activity log record within the Lago system. user_email: type: - string - 'null' format: email - example: dinesh@piedpiper.test - description: The email of the user who performed the activity + example: dinesh@piedpiper.example + description: The email of the user who performed the activity. It is null when the action was performed with an API key or by the system. activity_type: type: string - example: billing_metric.created - description: This field stores the actitivy action that was performed to the activity_object. + example: billable_metric.created + description: The action that was performed on the resource. activity_source: type: string example: api @@ -12186,30 +12946,23 @@ components: - api - front - system - description: This field represents the source of the activity log, the interaction source that triggered the action. + description: The source that triggered the action. activity_object: - type: - - object - - 'null' - format: object + type: object example: lago_id: dad68bc7-c01a-4ad8-a87b-13e78693a5bc plan_id: b9155544-e261-4e92-b54e-f65d7609294c - description: This field represents the final state of the object that the action was applied. + description: The state of the resource after the action, keyed by top-level attribute name. Nested values are returned JSON-encoded. activity_object_changes: - type: - - object - - 'null' - format: object + type: object example: - plan_id: - - null - - b9155544-e261-4e92-b54e-f65d7609294c + plan_id: '[null,"b9155544-e261-4e92-b54e-f65d7609294c"]' + description: The attributes the action changed, keyed by attribute name. Each value is the JSON-encoded pair of the previous and the new value. It is an empty object when the activity type is not an update. external_customer_id: type: - string - 'null' - description: The customer external unique identifier (provided by your own application) + description: The customer external unique identifier (provided by your own application). example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba external_subscription_id: type: @@ -12219,28 +12972,23 @@ components: example: external_id resource_id: type: string - description: The resource id of the object that the action was applied. + description: The unique identifier of the resource the action was applied to. format: uuid example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba resource_type: type: string - description: The resource type of the resource_id record. + description: The type of the resource the action was applied to. example: BillableMetric - organization_id: - type: string - format: uuid - description: Unique identifier for the organization associated with the activity log. - example: 1a901a90-1a90-1a90-1a90-1a901a901a90 logged_at: type: string format: date-time example: '2025-03-31T12:31:44Z' - description: The logged date of the activity, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application + description: The date when the action happened, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). created_at: type: string format: date-time example: '2022-04-29T08:59:51Z' - description: The creation date of the activity record in the Lago application, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application + description: The creation date of the activity log record in the Lago application, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). PaginationMeta: type: object required: @@ -12302,6 +13050,7 @@ components: - amount_currency - description - created_at + - taxes properties: lago_id: type: string @@ -12316,7 +13065,7 @@ components: type: - string - 'null' - description: Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. + description: Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name. example: Setup Fee (SF1) code: type: string @@ -12369,7 +13118,7 @@ components: type: - string - 'null' - description: Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. + description: Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name. example: Setup Fee (SF1) code: type: string @@ -12377,7 +13126,8 @@ components: example: setup_fee amount_cents: type: integer - description: The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. + minimum: 1 + description: The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. It must be greater than zero. By creating a one-off invoice, you will be able to override this value. example: 50000 amount_currency: $ref: '#/components/schemas/Currency' @@ -12430,6 +13180,7 @@ components: - request_path - created_at - request_id + - request_response properties: api_version: type: string @@ -12438,50 +13189,56 @@ components: client: type: string example: Lago Ruby v1.26.0 - description: The client used to make the request to the API. + description: The client that made the request, as reported by its user agent. http_method: type: string example: post enum: - post - put + - patch - delete - description: This field represents the HTTP method of the request. + description: The HTTP method of the request. Requests made with the GET method are not logged. http_status: type: integer example: 200 - description: This field represents the HTTP status of the requests. + description: The HTTP status Lago returned for the request. logged_at: type: string format: date-time example: '2025-03-31T12:31:44Z' - description: The logged date of the api log, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application + description: The date when the request was logged, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). request_body: - type: string - format: object - example: '{ "billable_metric": { "name": "Storage", "code": "storage" } }' + type: object + additionalProperties: true + description: The parameters of the request, keyed by their top-level name. Nested values are returned JSON-encoded. When the log is too large to be stored, this object is replaced by a `truncated` key set to `"true"` and an `original_bytesize` key holding the size of the log before truncation. + example: + billable_metric: '{"name":"Storage","code":"storage"}' request_origin: type: string - description: This field represents the API origin of the requested URL - example: https://app.lago.dev/ + description: The base URL the request was sent to. + example: https://api.getlago.com request_path: type: string - description: This field represents the API path of the requested URL - example: /billable_metrics + description: The path of the request. + example: /api/v1/billable_metrics created_at: type: string format: date-time example: '2022-04-29T08:59:51Z' - description: The creation date of the api log record in the Lago application, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application + description: The creation date of the API log record in the Lago application, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). request_id: type: string - format: uuid - description: Unique identifier for the api log. + description: Unique identifier of the API log. It is the identifier of the request, taken from the `X-Request-Id` header when the request carries one, and generated by Lago otherwise. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 request_response: - type: string - format: object - example: '{ "lago_id": "b9155544-e261-4e92-b54e-f65d7609294c", ... }' + type: + - object + - 'null' + additionalProperties: true + description: The body Lago returned for the request, keyed by its top-level name. Nested values are returned JSON-encoded. It is `null` when the response had no body. When the log is too large to be stored, this object is replaced by a `truncated` key set to `"true"` and an `original_bytesize` key holding the size of the log before truncation. + example: + billable_metric: '{"lago_id":"b9155544-e261-4e92-b54e-f65d7609294c"}' ApiLogsPaginated: type: object required: @@ -12512,7 +13269,8 @@ components: properties: month: type: string - description: Identifies the month to analyze revenue. + format: date-time + description: The month the revenue is reported for, returned as the first instant of that month in UTC. example: '2023-11-01T00:00:00.000Z' amount_cents: type: integer @@ -12524,7 +13282,7 @@ components: example: USD invoices_count: type: integer - description: Contains invoices count. + description: The number of `finalized` invoices issued during the month. Fees paid in advance that are not attached to an invoice are not counted. example: 10 billing_entity_id: type: string @@ -12544,31 +13302,39 @@ components: type: object required: - month + - payment_status - invoices_count + - amount_cents + - currency properties: month: type: string - description: Identifies the month to analyze revenue. + description: Identifies the month of the invoice issuing date. example: '2023-11-01T00:00:00.000Z' payment_status: - type: string + type: + - string + - 'null' enum: - pending - succeeded - failed - description: The payment status of the invoices. + - null + description: The payment status of the finalized invoices counted in this row. It is `null` for a month without finalized invoices. example: succeeded invoices_count: type: integer - description: Contains invoices count. + description: The number of finalized invoices issued during the month with this payment status. example: 10 amount_cents: type: integer - description: The total amount of revenue for a period, expressed in cents. + description: The total amount of the finalized invoices counted in this row, expressed in cents. example: 50000 currency: - $ref: '#/components/schemas/Currency' - description: The currency of revenue analytics. Format must be ISO 4217. + oneOf: + - $ref: '#/components/schemas/Currency' + - type: 'null' + description: The currency of the finalized invoices counted in this row. Format must be ISO 4217. It is `null` for a month without finalized invoices. example: USD InvoiceCollections: type: object @@ -12583,20 +13349,22 @@ components: type: object required: - month + - code - amount_cents - currency properties: month: type: string - description: Identifies the month to analyze revenue. + format: date-time + description: The month the invoiced usage is reported for, returned as the first instant of that month in UTC. example: '2023-11-01T00:00:00.000Z' code: type: string - description: The code of the usage-based billable metrics. + description: The code of the billable metric the usage fees were charged for. example: code1 amount_cents: type: integer - description: The total amount of revenue for a period, expressed in cents. + description: The total invoiced usage for the month and the billable metric, expressed in cents. It excludes taxes and is net of coupons. example: 50000 currency: $ref: '#/components/schemas/Currency' @@ -12620,15 +13388,20 @@ components: properties: month: type: string - description: Identifies the month to analyze MRR. + format: date-time + description: The month the MRR is reported for, returned as the first instant of that month in UTC. example: '2023-11-01T00:00:00.000Z' amount_cents: - type: integer - description: The total amount of MRR, expressed in cents. + type: + - integer + - 'null' + description: The total amount of MRR, expressed in cents. It is `null` for a month with no subscription fee. example: 50000 currency: - $ref: '#/components/schemas/Currency' - description: The currency of MRR analytics. Format must be ISO 4217. + oneOf: + - $ref: '#/components/schemas/Currency' + - type: 'null' + description: The currency of MRR analytics. Format must be ISO 4217. It is `null` for a month with no subscription fee. example: USD Mrrs: type: object @@ -12650,22 +13423,22 @@ components: properties: month: type: string - description: Identifies the month to analyze revenue. + description: Identifies the month of the payment due date of the overdue invoices. example: '2023-11-01T00:00:00.000Z' amount_cents: type: integer - description: The total amount of revenue for a period, expressed in cents. + description: The amount still due for this month, expressed in cents. It is the total of the overdue invoices minus the amounts already paid and minus the credits applied by finalized credit notes. example: 50000 currency: $ref: '#/components/schemas/Currency' - description: The currency of revenue analytics. Format must be ISO 4217. + description: The currency of the overdue invoices. Format must be ISO 4217. example: USD lago_invoice_ids: type: array items: type: string format: uuid - description: The Lago invoice IDs associated with the revenue. + description: Unique identifiers of the overdue invoices included in this amount, created by Lago. example: - 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba billing_entity_id: @@ -12941,6 +13714,7 @@ components: - organization_id - amount_cents - amount_currency + - is_billable_metric_deleted properties: organization_id: type: string @@ -12976,7 +13750,7 @@ components: example: '1.0' is_billable_metric_deleted: type: boolean - description: Indicates whether the billable metric associated with the usage is deleted. + description: Indicates whether the billable metric associated with the usage has been deleted. It is set on every entry of the response. example: false Usages: type: object @@ -13108,9 +13882,11 @@ components: - SOS - SRD - STD + - SYP - SZL - THB - TJS + - TND - TOP - TRY - TTD @@ -13141,6 +13917,7 @@ components: - external_customer_id - lago_customer_id - status + - coupon_status - frequency - created_at properties: @@ -13162,6 +13939,12 @@ components: type: string description: The name of the coupon. example: Startup Deal + coupon_description: + type: + - string + - 'null' + description: The description of the parent coupon. + example: I am a coupon description coupon_status: type: string enum: @@ -13196,7 +13979,7 @@ components: type: - integer - 'null' - description: The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type. + description: The amount of the coupon in cents. It is set for a coupon with the `fixed_amount` type. example: 2000 amount_cents_remaining: type: @@ -13206,14 +13989,14 @@ components: example: 50 amount_currency: $ref: '#/components/schemas/CurrencyOrNull' - description: The currency of the coupon. This field is required only for coupon with `fixed_amount` type. + description: The currency of the coupon amount. It is set for a coupon with the `fixed_amount` type. example: EUR percentage_rate: type: - string - 'null' pattern: ^[0-9]+.?[0-9]*$ - description: The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type. + description: The percentage rate of the coupon. It is set for a coupon with the `percentage` type. example: null frequency: type: string @@ -13232,7 +14015,7 @@ components: type: - integer - 'null' - description: Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type + description: The number of billing periods to which the coupon applies. It is set when the frequency is `recurring`. example: 3 frequency_duration_remaining: type: @@ -13245,7 +14028,7 @@ components: - string - 'null' format: date-time - description: The date and time after which the coupon will stop applying to customer's invoices. Once the expiration date is reached, the coupon will no longer be applicable, and any further invoices generated for the customer will not include the coupon discount. + description: The date and time after which the coupon will stop applying to customer's invoices. Once the expiration date is reached, the coupon will no longer be applicable, and any further invoices generated for the customer will not include the coupon discount. This value comes from the parent coupon. example: '2022-04-29T08:59:51Z' created_at: type: string @@ -13316,6 +14099,12 @@ components: type: string description: The name of the credit applied. It can be the name of the coupon attached to the credit, the initial invoice's number linked to the credit note or the `progressive_billing` invoice number. example: Startup Deal + description: + type: + - string + - 'null' + description: The description of the credit applied. It is the description of the coupon attached to the credit or the description of the credit note. It is null for a `progressive_billing` invoice. + example: I am a coupon description invoice: type: object required: @@ -13390,29 +14179,32 @@ components: - If set to `once`, the coupon is applicable only for a single use. - If set to `recurring`, the coupon can be used multiple times for recurring billing periods. - If set to `forever`, the coupon has unlimited usage and can be applied indefinitely. + + If it is not set, the frequency of the coupon is used. example: recurring frequency_duration: type: - integer - 'null' - description: Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type + description: The number of billing periods to which the coupon applies. If it is not set, the frequency duration of the coupon is used. A `recurring` applied coupon must end up with a frequency duration greater than 0. example: 3 amount_cents: type: - integer - 'null' - description: The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type. + description: The amount of the coupon in cents. If it is not set, the amount of the coupon is used. example: 2000 amount_currency: $ref: '#/components/schemas/CurrencyOrNull' - description: The currency of the coupon. This field is required only for coupon with `fixed_amount` type. + description: The currency of the coupon amount. If it is not set, the currency of the coupon is used. example: EUR percentage_rate: type: - string + - number - 'null' pattern: ^[0-9]+.?[0-9]*$ - description: The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type. + description: The percentage rate of the coupon. Accepts a number or a decimal string. If it is not set, the percentage rate of the coupon is used. example: null AppliedCoupon: type: object @@ -13421,6 +14213,23 @@ components: properties: applied_coupon: $ref: '#/components/schemas/AppliedCouponObject' + ApiErrorNotAllowed: + type: object + required: + - status + - error + - code + properties: + status: + type: integer + format: int32 + example: 405 + error: + type: string + example: Method Not Allowed + code: + type: string + example: not_allowed BillableMetricFilterObject: type: object description: Values used to apply differentiated pricing based on additional event properties. @@ -13444,9 +14253,16 @@ components: - lago_id - name - code - - aggregation_type + - description - recurring + - rounding_function + - rounding_precision - created_at + - expression + - field_name + - aggregation_type + - weighted_interval + - filters properties: lago_id: type: string @@ -13486,28 +14302,30 @@ components: - round - null example: round - description: Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are `round`, `ceil` and `floor`. + description: Rounding applied to the aggregated number of units. Possible values are `round`, `ceil` and `floor`. When it is not set, the units are not rounded. rounding_precision: type: - integer - 'null' example: 2 - description: Specifies the number of decimal places to which the `rounding_function` will be rounded. It can be a positive or negative value. + description: Number of decimal places kept when `rounding_function` is applied. It can be a positive or negative value, and it defaults to 0. created_at: type: string format: date-time example: '2022-09-14T16:35:31Z' description: Creation date of the billable metric. expression: - type: string - example: round((ended_at - started_at) * units) - description: Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units. + type: + - string + - 'null' + example: round((event.properties.ended_at - event.properties.started_at) * event.properties.units) + description: Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units. field_name: type: - string - 'null' example: gb - description: Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`. + description: Property of the billable metric used for aggregating usage data. It is `null` when `aggregation_type` is `count_agg`. aggregation_type: type: string description: Aggregation method used to compute usage for this billable metric. @@ -13527,7 +14345,7 @@ components: - seconds - null example: seconds - description: Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`. + description: Parameter exclusively utilized in conjunction with the `weighted_sum_agg` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. filters: type: array items: @@ -13560,7 +14378,7 @@ components: items: type: string example: us-east-1 - description: List of possible filter values + description: List of possible filter values. It must hold at least one value. BillableMetricBaseInput: type: object properties: @@ -13587,15 +14405,17 @@ components: - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is `false`. + - It cannot be set to `true` when `aggregation_type` is `count_agg`, `max_agg` or `latest_agg`. expression: type: - string - 'null' - example: round((ended_at - started_at) * units) + example: round((event.properties.ended_at - event.properties.started_at) * event.properties.units) description: | - Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units. - Accepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations. - Round is accepting an optional second parameter to specify the number of decimal. + Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units. + Event values are read with `event.code`, `event.timestamp` and `event.properties.`. + Accepted functions are `ceil`, `concat`, `floor`, `greatest`, `least` and `round` as well as `+`, `-`, `/` and `*` operations. + `ceil`, `floor` and `round` accept an optional second parameter to specify the number of decimals. rounding_function: type: - string @@ -13606,19 +14426,19 @@ components: - round - null example: round - description: Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are `round`, `ceil` and `floor`. + description: Rounding applied to the aggregated number of units. Possible values are `round`, `ceil` and `floor`. When it is not set, the units are not rounded. rounding_precision: type: - integer - 'null' example: 2 - description: Specifies the number of decimal places to which the `rounding_function` will be rounded. It can be a positive or negative value. + description: Number of decimal places kept when `rounding_function` is applied. It can be a positive or negative value, and it defaults to 0. field_name: type: - string - 'null' example: gb - description: Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`. + description: Property of the billable metric used for aggregating usage data. It is required for every aggregation type except `count_agg`, which ignores it and stores `null`. aggregation_type: type: string example: sum_agg @@ -13638,9 +14458,10 @@ components: - seconds - null example: seconds - description: Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`. + description: Parameter exclusively utilized in conjunction with the `weighted_sum_agg` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. It is required when `aggregation_type` is `weighted_sum_agg`, and `seconds` is the only accepted value. filters: type: array + description: 'List of filters of the billable metric. On update, this list replaces the existing filters: a filter that is not sent is deleted.' items: $ref: '#/components/schemas/BillableMetricFilterInput' BillableMetricCreateInput: @@ -13669,16 +14490,14 @@ components: properties: expression: type: string - example: round((ended_at - started_at) * units) + example: round((event.properties.ended_at - event.properties.started_at) * event.properties.units) description: | - Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units. - Accepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations. - Round is accepting an optional second parameter to specify the number of decimal. + Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units. + Event values are read with `event.code`, `event.timestamp` and `event.properties.`. + Accepted functions are `ceil`, `concat`, `floor`, `greatest`, `least` and `round` as well as `+`, `-`, `/` and `*` operations. + `ceil`, `floor` and `round` accept an optional second parameter to specify the number of decimals. event: type: object - required: - - code - - properties properties: code: type: string @@ -13713,11 +14532,9 @@ components: - value properties: value: - anyOf: - - type: string - - type: number - example: 1 - description: Result of evaluating the expression + type: string + example: '2.0' + description: Result of evaluating the expression. A numeric result is returned as a decimal string. BillableMetricUpdateInput: type: object required: @@ -13751,9 +14568,10 @@ components: - string - select example: integer - description: 'Data type of the privilege value. Default: string' + description: Data type of the privilege value. It defaults to `string`. config: type: object + description: Extra configuration of the privilege. It is empty unless the value type is `select`. properties: select_options: type: array @@ -13762,7 +14580,7 @@ components: example: - google - okta - description: Array of string, required only when value_type is `select`. + description: The values the privilege accepts. It is only sent when the value type is `select`. FeatureObject: type: object required: @@ -13837,14 +14655,16 @@ components: type: - string - 'null' + maxLength: 255 example: Number of seats - description: Name of the feature. + description: Name of the feature. Max 255 characters. description: type: - string - 'null' + maxLength: 600 example: Number of users of the account - description: Internal description of the feature. + description: Internal description of the feature. Max 600 characters. privileges: type: array items: @@ -13854,14 +14674,16 @@ components: properties: code: type: string + maxLength: 255 example: max - description: Unique code for the privilege. + description: Unique code for the privilege. Max 255 characters. name: type: - string - 'null' + maxLength: 255 example: Maximum - description: Display name for the privilege. + description: Display name for the privilege. Max 255 characters. value_type: type: string enum: @@ -13870,9 +14692,10 @@ components: - string - select example: integer - description: 'Data type of the privilege value. Default: string' + description: Data type of the privilege value. It defaults to `string`. It cannot be changed once the privilege exists. config: type: object + description: Extra configuration of the privilege. It must be left out unless the value type is `select`. properties: select_options: type: array @@ -13881,7 +14704,7 @@ components: example: - google - okta - description: Array of string, required only when value_type is `select`. + description: The values the privilege accepts. It is required when the value type is `select`, must hold at least one value, and must be left out for the other value types. example: - code: max name: Maximum @@ -13899,7 +14722,7 @@ components: select_options: - google - okta - description: Privileges associated with this feature. Can be empty. + description: Privileges associated with this feature. Can be empty. Each privilege code must appear only once in the list. FeatureCreateInput: type: object required: @@ -13914,8 +14737,9 @@ components: properties: code: type: string + maxLength: 255 example: seats - description: Unique code used to identify the feature. + description: Unique code used to identify the feature. Max 255 characters. Feature: type: object required: @@ -14033,7 +14857,7 @@ components: type: - integer - 'null' - description: Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type + description: Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type. example: 6 expiration: type: string @@ -14122,9 +14946,10 @@ components: percentage_rate: type: - string + - number - 'null' pattern: ^[0-9]+.?[0-9]*$ - description: The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type. + description: The percentage rate of the coupon. Accepts a number or a decimal string. This field is required only for coupons with a `percentage` coupon type. example: null frequency: type: string @@ -14143,7 +14968,7 @@ components: type: - integer - 'null' - description: Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type + description: Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type. example: 6 expiration: type: string @@ -14645,8 +15470,10 @@ components: description: The unit amount of the fee per unit, with precision. example: '312.5' total_aggregated_units: - type: string - description: The total number of units that have been aggregated for this specific fee. + type: + - string + - 'null' + description: The total number of units that have been aggregated for this specific fee. It is `null` on fees that do not aggregate units, such as `subscription`, `add_on` and `credit` fees. example: '0.32' total_amount_cents: type: integer @@ -14675,14 +15502,14 @@ components: - string - 'null' format: date-time - description: The beginning date of the period that the fee covers. It is applicable only to `subscription`, `charge`, `fixed_charge` and `commitment` fees. This field indicates the start date of the billing period or subscription period associated with the fee. + description: The beginning date of the period that the fee covers. It is returned only for `subscription`, `charge`, `add_on` and `fixed_charge` fees. This field indicates the start date of the billing period or subscription period associated with the fee. example: '2022-04-29T08:59:51Z' to_date: type: - string - 'null' format: date-time - description: The ending date of the period that the fee covers. It is applicable only to `subscription`, `charge`, `fixed_charge` and `commitment` fees. This field indicates the end date of the billing period or subscription period associated with the fee. + description: The ending date of the period that the fee covers. It is returned only for `subscription`, `charge`, `add_on` and `fixed_charge` fees. This field indicates the end date of the billing period or subscription period associated with the fee. example: '2022-05-29T08:59:51Z' payment_status: type: string @@ -14759,8 +15586,13 @@ components: - type - code - name + - description + - invoice_display_name + - filters + - filter_invoice_display_name - lago_item_id - item_type + - grouped_by properties: type: type: string @@ -14775,7 +15607,13 @@ components: example: subscription code: type: string - description: The code of the fee item. It can be the code of the `add_on`, the code of the `charge`, the code of the `fixed_charge`, the code of the `credit` or the code of the `subscription`. + description: | + The code of the fee item. The value depends on the type of the fee item: + + - If the fee item is a `charge`, it is the billable metric code. + - If the fee item is an `add_on` or a `fixed_charge`, it is the add-on code. + - If the fee item is a `credit`, it is always `"credit"`. + - For all the other fee items, it is the subscription plan code. example: startup name: type: string @@ -14830,7 +15668,13 @@ components: lago_item_id: type: string example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - description: Unique identifier of the fee item, created by Lago. It can be the identifier of the `add_on`, the `charge`, the `credit`, the `subscription` or the `commitment`. + description: | + Unique identifier of the fee item, created by Lago. The object it points to is given by `item_type`: + + - If the fee item is a `charge`, it is the billable metric identifier. + - If the fee item is an `add_on` or a `fixed_charge`, it is the add-on identifier. + - If the fee item is a `credit`, it is the wallet transaction identifier. + - For all the other fee items, it is the subscription identifier. format: uuid item_type: type: string @@ -14864,6 +15708,7 @@ components: required: - lago_id - amount_cents + - precise_amount_cents - amount_currency - fee properties: @@ -14876,6 +15721,10 @@ components: type: integer description: The credit note's item amount, expressed in cents. example: 100 + precise_amount_cents: + type: string + description: The credit note's item amount, expressed in cents, with precision. + example: '100.0001' amount_currency: $ref: '#/components/schemas/Currency' description: The credit note's item currency. @@ -15043,9 +15892,11 @@ components: description: Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. properties: invoice_grace_period: - type: integer + type: + - integer + - 'null' example: 3 - description: The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items + description: The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items. It is null when the customer has no grace period of its own and falls back to the billing entity. This is a premium feature, the value is ignored without a premium license. subscription_invoice_issuing_date_anchor: type: - string @@ -15069,11 +15920,13 @@ components: - null default: null payment_provider: - type: string + type: + - string + - 'null' example: stripe description: |- The payment provider utilized to initiate payments for invoices issued by Lago. - Accepted values: `stripe`, `adyen`, `cashfree`, `flutterwave`, `gocardless`, `moneyhash` or null. This field is required if you intend to assign a `provider_customer_id`. + Accepted values: `stripe`, `adyen`, `cashfree`, `flutterwave`, `gocardless`, `moneyhash` or null. This field is required if you intend to assign a `provider_customer_id`. Send null to detach the customer from its current payment provider. enum: - stripe - adyen @@ -15081,8 +15934,11 @@ components: - flutterwave - gocardless - moneyhash + - null payment_provider_code: - type: string + type: + - string + - 'null' example: stripe-eu-1 description: Unique code used to identify a payment provider connection. provider_customer_id: @@ -15098,7 +15954,9 @@ components: example: true description: Set this field to `true` if you want to create a customer record in the payment provider's system. This option is applicable only when the `provider_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false` document_locale: - type: string + type: + - string + - 'null' example: fr description: The document locale, specified in the ISO 639-1 format. This field represents the language or locale used for the documents issued by Lago provider_payment_methods: @@ -15119,42 +15977,42 @@ components: - customer_balance Address: type: object - description: Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. + description: The shipping address of the customer. properties: address_line1: type: - string - 'null' example: 5230 Penfield Ave - description: The first line of the billing address + description: The first line of the shipping address address_line2: type: - string - 'null' example: null - description: The second line of the billing address + description: The second line of the shipping address city: type: - string - 'null' example: Woodland Hills - description: The city of the customer's billing address + description: The city of the customer's shipping address country: $ref: '#/components/schemas/CountryOrNull' - description: Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) + description: Country code of the customer's shipping address. Format must be ISO 3166 (alpha-2) example: US state: type: - string - 'null' example: CA - description: The state of the customer's billing address + description: The state of the customer's shipping address zipcode: type: - string - 'null' example: '91364' - description: The zipcode of the customer's billing address + description: The zipcode of the customer's shipping address CustomerMetadata: type: object description: Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format @@ -15194,8 +16052,37 @@ components: - sequential_id - slug - external_id + - billing_entity_code + - address_line1 + - address_line2 - applicable_timezone + - city + - country + - currency + - email + - legal_name + - legal_number + - logo_url + - name + - firstname + - lastname + - account_type + - customer_type + - phone + - state + - tax_identification_number + - timezone + - url + - zipcode + - net_payment_term + - external_salesforce_id - created_at + - updated_at + - finalize_zero_amount_invoice + - skip_invoice_custom_sections + - billing_configuration + - shipping_address + - metadata properties: lago_id: type: string @@ -15252,7 +16139,7 @@ components: - string - 'null' format: email - example: dinesh@piedpiper.test + example: dinesh@piedpiper.example description: The email of the customer legal_name: type: @@ -15308,6 +16195,7 @@ components: - company - individual - null + example: company description: |- The type of the customer. It can have one of the following values: - `company`: the customer is a company. @@ -15398,6 +16286,9 @@ components: - type - external_customer_id - integration_code + - code + - is_default + - category description: Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. properties: lago_id: @@ -15410,10 +16301,11 @@ components: example: netsuite description: |- The integration type used for accounting, tax and CRM syncs. - Accepted values: `netsuite`, `anrok`, `xero`, `hubspot`, `salesforce`. + Accepted values: `netsuite`, `anrok`, `avalara`, `xero`, `hubspot`, `salesforce`. enum: - netsuite - anrok + - avalara - xero - hubspot - salesforce @@ -15421,10 +16313,36 @@ components: type: string example: netsuite-eu-1 description: Unique code used to identify an integration connection. + code: + type: + - string + - 'null' + example: netsuite-eu-1 + description: Unique code identifying this integration customer. It defaults to the code of the integration connection. + is_default: + type: boolean + example: true + description: Whether this integration customer is the default one of its category for the customer. + category: + type: + - string + - 'null' + example: accounting + description: |- + The category of the integration connection. It is derived from the integration type. + Accepted values: `payment`, `tax`, `accounting`, `crm`. + enum: + - payment + - tax + - accounting + - crm + - null external_customer_id: - type: string + type: + - string + - 'null' example: cus_12345 - description: The customer ID within the integration's system. If this field is not provided, Lago has the option to create a new customer record within the integration's system on behalf of the customer. + description: The customer ID within the integration's system. It is `null` when the customer has not been created in the integration's system yet. sync_with_provider: type: - boolean @@ -15445,7 +16363,7 @@ components: type: - string - 'null' - example: dinesh@piedpiper.test + example: dinesh@piedpiper.example description: This optional field is present only when working with `hubspot` connection. CustomerObject: allOf: @@ -15504,20 +16422,29 @@ components: - number - lago_invoice_id - invoice_number + - purchase_order_number - issuing_date + - credit_status + - refund_status - reason + - description - currency - total_amount_cents + - precise_total_amount_cents - credit_amount_cents - refund_amount_cents - offset_amount_cents - balance_amount_cents - taxes_amount_cents + - precise_taxes_amount_cents - taxes_rate - sub_total_excluding_taxes_amount_cents - coupons_adjustment_amount_cents - created_at - updated_at + - file_url + - xml_url + - self_billed properties: lago_id: type: string @@ -15616,9 +16543,7 @@ components: description: The total amount of the credit note, expressed in cents. example: 120 precise_total_amount_cents: - type: - - string - - 'null' + type: string description: The total amount of the credit note, expressed in cents, with precision. example: '120.0001' taxes_amount_cents: @@ -15626,9 +16551,7 @@ components: description: The tax amount of the credit note, expressed in cents. example: 20 precise_taxes_amount_cents: - type: - - string - - 'null' + type: string description: The tax amount of the credit note, expressed in cents, with precision. example: '20.0001' taxes_rate: @@ -15699,9 +16622,8 @@ components: metadata: $ref: '#/components/schemas/MetadataObject' error_details: - type: - - array - - 'null' + type: array + description: The errors raised while the credit note was issued. When the key is present it is always an array, empty when no error was raised. items: $ref: '#/components/schemas/CreditNoteErrorDetailsObject' CreditNotesPaginated: @@ -15828,8 +16750,6 @@ components: properties: credit_note: type: object - required: - - refund_status properties: refund_status: type: string @@ -15932,9 +16852,9 @@ components: description: The tax amount of the credit note, expressed in cents. example: 20 precise_taxes_amount_cents: - type: number + type: string description: The precise tax amount of the credit note, expressed in cents with decimal precision. - example: 20.1 + example: '20.1' taxes_rate: type: number description: The tax rate associated with this specific credit note. @@ -15945,24 +16865,24 @@ components: example: 100 max_creditable_amount_cents: type: integer - description: The credited amount of the credit note, expressed in cents. + description: The maximum amount that can be credited to the customer balance for the requested items, taxes included, expressed in cents. example: 100 max_refundable_amount_cents: type: integer - description: The refunded amount of the credit note, expressed in cents. + description: The maximum amount that can be refunded for the requested items, expressed in cents. It is capped by the amount the customer already paid on the invoice, so it is lower than `max_creditable_amount_cents` on an unpaid invoice. example: 0 max_offsettable_amount_cents: type: integer - description: The ofsetted amount of the credit note, expressed in cents. + description: The maximum amount that can be deducted from the invoice balance for the requested items, expressed in cents. example: 0 coupons_adjustment_amount_cents: type: integer description: The pro-rated amount of the coupons applied to the source invoice. example: 20 precise_coupons_adjustment_amount_cents: - type: number + type: string description: The precise pro-rated amount with decimal precision of the coupons applied to the source invoice. - example: 20.1 + example: '20.1' items: type: array items: @@ -16007,7 +16927,7 @@ components: example: 20 tax_description: type: string - description: Internal description of the taxe + description: Internal description of the tax example: French standard VAT base_amount_cents: type: integer @@ -16020,23 +16940,6 @@ components: $ref: '#/components/schemas/Currency' description: Currency of the tax example: USD - ApiErrorNotAllowed: - type: object - required: - - status - - error - - code - properties: - status: - type: integer - format: int32 - example: 405 - error: - type: string - example: Method Not Allowed - code: - type: string - example: not_allowed CreditNoteMetadataResponse: type: object required: @@ -16129,20 +17032,23 @@ components: type: - string - 'null' + maxLength: 500 example: 5230 Penfield Ave - description: The first line of the billing address + description: The first line of the billing address (500 characters max). address_line2: type: - string - 'null' + maxLength: 500 example: '' - description: The second line of the billing address + description: The second line of the billing address (500 characters max). city: type: - string - 'null' + maxLength: 255 example: Woodland Hills - description: The city of the customer's billing address + description: The city of the customer's billing address (255 characters max). country: $ref: '#/components/schemas/CountryOrNull' description: Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) @@ -16155,14 +17061,15 @@ components: - string - 'null' format: email - example: dinesh@piedpiper.test + example: dinesh@piedpiper.example description: The email of the customer legal_name: type: - string - 'null' + maxLength: 255 example: Coleman-Blair - description: The legal company name of the customer + description: The legal company name of the customer (255 characters max). legal_number: type: - string @@ -16186,14 +17093,16 @@ components: type: - string - 'null' + maxLength: 255 example: Gavin - description: First name of the customer + description: First name of the customer (255 characters max). lastname: type: - string - 'null' + maxLength: 255 example: Belson - description: Last name of the customer + description: Last name of the customer (255 characters max). account_type: type: string enum: @@ -16205,7 +17114,7 @@ components: - `customer`: the account is a customer, default value. - `partner`: the account is a partner. - This field is only applied when revenue share is enabled on your organization; otherwise it is ignored. + This field is only applied when revenue share is enabled on your organization and the customer has no subscription, invoice, add-on, fixed-amount coupon or wallet yet; otherwise it is ignored. customer_type: type: - string @@ -16214,6 +17123,7 @@ components: - company - individual - null + example: company description: |- The type of the customer. It can have one of the following values: - `company`: the customer is a company. @@ -16228,19 +17138,21 @@ components: type: - string - 'null' + maxLength: 255 example: CA - description: The state of the customer's billing address + description: The state of the customer's billing address (255 characters max). tax_codes: $ref: '#/components/schemas/TaxCodes' tax_identification_number: type: - string - 'null' + maxLength: 255 example: EU123456789 - description: The tax identification number of the customer + description: The tax identification number of the customer (255 characters max). timezone: $ref: '#/components/schemas/TimezoneOrNull' - description: The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone + description: The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone. This is a premium feature, the value is ignored without a premium license. url: type: - string @@ -16251,8 +17163,9 @@ components: type: - string - 'null' + maxLength: 255 example: '91364' - description: The zipcode of the customer's billing address + description: The zipcode of the customer's billing address (255 characters max). net_payment_term: type: - integer @@ -16280,9 +17193,23 @@ components: billing_configuration: $ref: '#/components/schemas/CustomerBillingConfiguration' shipping_address: - $ref: '#/components/schemas/Address' + allOf: + - $ref: '#/components/schemas/Address' + - properties: + address_line1: + maxLength: 500 + address_line2: + maxLength: 500 + city: + maxLength: 255 + state: + maxLength: 255 + zipcode: + maxLength: 255 + description: The shipping address of the customer. The address lines accept up to 500 characters, the city, state and zipcode up to 255. integration_customers: type: array + description: The integration customers to create or update for this customer. Only one entry per `integration_type` is accepted; sending two entries with the same type returns a `422` error with `invalid_count_per_integration_type` on `integration_customers`. items: type: object properties: @@ -16308,6 +17235,10 @@ components: type: string example: netsuite-eu-1 description: Unique code used to identify an integration connection. + code: + type: string + example: netsuite-eu-1 + description: Unique code identifying this integration customer. If it is not provided, the code of the integration connection is used. external_customer_id: type: string example: cus_12345 @@ -16328,7 +17259,8 @@ components: description: This optional field is needed only when working with `hubspot` connection. metadata: type: array - description: Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format + maxItems: 5 + description: Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format. A customer can hold up to 5 key-value pairs. items: type: object required: @@ -16342,12 +17274,14 @@ components: description: Identifier for the metadata object, only required when updating a key-value pair key: type: string + maxLength: 20 example: Purchase Order - description: The metadata object key + description: The metadata object key (20 characters max). It must be unique for the customer. value: type: string + maxLength: 100 example: '123456789' - description: The metadata object value + description: The metadata object value (100 characters max). display_in_invoice: type: boolean example: true @@ -16375,8 +17309,14 @@ components: required: - lago_id - billing_entity_code + - sequential_id - number + - purchase_order_number - issuing_date + - payment_dispute_lost_at + - payment_due_date + - payment_overdue + - net_payment_term - invoice_type - status - payment_status @@ -16388,26 +17328,36 @@ components: - taxes_amount_cents - sub_total_including_taxes_amount_cents - prepaid_credit_amount_cents + - prepaid_granted_credit_amount_cents + - prepaid_purchased_credit_amount_cents - progressive_billing_credit_amount_cents - total_amount_cents + - total_paid_amount_cents + - total_offsetted_credit_note_amount_cents + - total_due_amount_cents - version_number + - self_billed + - file_url + - xml_url + - web_url - created_at - updated_at + - voided_at properties: lago_id: type: string format: uuid - description: Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system. + description: Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 billing_entity_code: - type: - - string - - 'null' + type: string example: acme_corp - description: The unique code of the billing entity associated with the invoice + description: The unique code of the billing entity the invoice was issued from. sequential_id: - type: integer - description: This ID helps in uniquely identifying and organizing the invoices associated with a specific customer. It provides a sequential numbering system specific to the customer, allowing for easy tracking and management of invoices within the customer's context. + type: + - integer + - 'null' + description: This ID helps in uniquely identifying and organizing the invoices associated with a specific customer. It provides a sequential numbering system specific to the customer, allowing for easy tracking and management of invoices within the customer's context. It is assigned when the invoice is finalized, so it is `null` on draft invoices. example: 2 number: type: string @@ -16483,7 +17433,7 @@ components: - failed description: |- The status of the payment associated with the invoice. It can have one of the following values: - - `pending`: the payment is pending, waiting for payment processing in Stripe or when the invoice is emitted but users have not updated the payment status through the endpoint. + - `pending`: the payment is pending, waiting for processing by the payment provider, or the invoice has been issued and its payment status has not been updated through the update endpoint. - `succeeded`: the payment of the invoice has been successfully processed. - `failed`: the payment of the invoice has failed or encountered an error during processing. example: succeeded @@ -16510,7 +17460,7 @@ components: This field depends on the version number. Here are the definitions based on the version: - Version 1: is equal to the sum of `fees_amount_cents`, minus `coupons_amount_cents`, and minus `prepaid_credit_amount_cents`. - Version 2: is equal to the `fees_amount_cents`. - - Version 3 & 4: is equal to the `fees_amount_cents`, minus `coupons_amount_cents` + - Version 3 & 4: is equal to the `fees_amount_cents`, minus `coupons_amount_cents`. example: 100 taxes_amount_cents: type: integer @@ -16523,7 +17473,7 @@ components: This field depends on the version number. Here are the definitions based on the version: - Version 1: is equal to the `total_amount_cents`. - Version 2: is equal to the sum of `fees_amount_cents` and `taxes_amount_cents`. - - Version 3 & 4: is equal to the sum `sub_total_excluding_taxes_amount_cents` and `taxes_amount_cents` + - Version 3 & 4: is equal to the sum of `sub_total_excluding_taxes_amount_cents` and `taxes_amount_cents`. example: 120 prepaid_credit_amount_cents: type: integer @@ -16564,6 +17514,7 @@ components: version_number: type: integer example: 3 + description: The version of the invoice calculation rules applied to this invoice. It determines how the subtotals are computed. self_billed: type: boolean example: false @@ -16593,12 +17544,12 @@ components: type: string format: date-time example: '2022-04-29T08:59:51Z' - description: The date of the invoice creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the invoice object was created + description: The date of the invoice creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). It provides a standardized and internationally recognized timestamp for when the invoice object was created. updated_at: type: string format: date-time example: '2022-04-29T08:59:51Z' - description: The date of the invoice update, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The update_date provides a standardized and internationally recognized timestamp for when the invoice object was updated + description: The date of the invoice update, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). It provides a standardized and internationally recognized timestamp for when the invoice object was last updated. voided_at: type: - string @@ -16773,45 +17724,101 @@ components: $ref: '#/components/schemas/InvoiceObject' meta: $ref: '#/components/schemas/PaginationMeta' - PaymentObject: + PaymentMethodObject: type: object required: - lago_id - - lago_customer_id - - external_customer_id - - invoice_ids - - lago_payable_id - - payable_type - - amount_cents - - amount_currency - - status - - payment_status - - type - - reference + - is_default - payment_provider_code + - payment_provider_name - payment_provider_type - - external_payment_id - - provider_payment_id - - provider_customer_id - - next_action + - provider_method_id - created_at properties: lago_id: type: string format: uuid - description: The unique identifier of the payment, created by Lago. + description: The unique identifier of the payment method, created by Lago. example: 4cf085a7-c196-4f07-a543-97c50ec6e8b2 - lago_customer_id: - type: string - format: uuid - description: Unique identifier of the customer, created by Lago. - example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - external_customer_id: - type: string - example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba - description: The customer external unique identifier (provided by your own application) - invoice_ids: - type: array + is_default: + type: boolean + description: Indicates whether this payment method is the default one for the customer. + example: true + payment_provider_code: + type: + - string + - 'null' + description: Code of the payment provider associated with this payment method. + example: stripe_prod + payment_provider_name: + type: + - string + - 'null' + description: Human-readable name of the payment provider. + example: Stripe + payment_provider_type: + type: + - string + - 'null' + description: The type of the payment provider. It is `null` when the payment method is no longer attached to a payment provider. + enum: + - null + - adyen + - cashfree + - gocardless + - stripe + - flutterwave + - moneyhash + example: stripe + provider_method_id: + type: string + description: Unique identifier of the payment method within the payment provider. + example: pm_1N8ZQX2eZvKYlo2CkL9Y8XYZ + created_at: + type: string + format: date-time + description: Timestamp when the payment method was created in Lago's database. + example: '2025-01-21T00:10:29Z' + PaymentObject: + type: object + required: + - lago_id + - lago_customer_id + - external_customer_id + - invoice_ids + - invoice_numbers + - lago_payable_id + - payable_type + - amount_cents + - amount_currency + - status + - payment_status + - type + - reference + - payment_provider_code + - payment_provider_type + - external_payment_id + - provider_payment_id + - provider_customer_id + - next_action + - created_at + properties: + lago_id: + type: string + format: uuid + description: The unique identifier of the payment, created by Lago. + example: 4cf085a7-c196-4f07-a543-97c50ec6e8b2 + lago_customer_id: + type: string + format: uuid + description: Unique identifier of the customer, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + external_customer_id: + type: string + example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba + description: The customer external unique identifier (provided by your own application). + invoice_ids: + type: array description: List of invoice IDs associated with the payment. items: type: string @@ -16845,12 +17852,15 @@ components: example: USD status: type: string - description: The status of the payment within the payment provider. This can be very different from a payment provider to another. + description: The status of the payment within the payment provider. It differs from one payment provider to another. It is always `succeeded` for a manual payment. example: Completed payment_status: - type: string - description: The normalized payment status by Lago. + type: + - string + - 'null' + description: The payment status, normalized by Lago so that it is the same for every payment provider. It is `null` when Lago has not recorded a normalized status for the payment. enum: + - null - succeeded - failed - pending @@ -16864,29 +17874,38 @@ components: - provider example: manual reference: - type: string - description: Reference for the payment. + type: + - string + - 'null' + description: Reference for the payment. Set on manual payments only; it is always `null` for payments collected through a payment provider. example: ref1 payment_provider_code: - type: string - description: Code of the payment provider + type: + - string + - 'null' + description: Code of the payment provider. It is `null` for manual payments, which are not attached to a payment provider. example: stripe_prod payment_provider_type: - type: string + type: + - string + - 'null' enum: + - null - adyen - cashfree - gocardless - stripe - flutterwave - moneyhash - description: The type of payment provider + description: The type of payment provider. It is `null` for manual payments, which are not attached to a payment provider. example: stripe external_payment_id: type: - string - 'null' - description: 'DEPRECATED: use provider_payment_id' + deprecated: true + description: '**Deprecated.** Use `provider_payment_id` instead. It holds the same value.' + example: pi_5eb0285741bc6ba provider_payment_id: type: - string @@ -16894,16 +17913,11 @@ components: description: Unique identifier of the payment within the payment provider (if applicable). example: pi_5eb0285741bc6ba provider_customer_id: - type: string - description: Unique identifier of the customer within the payment provider - example: cus_5eb0285bcf941bc6ba - payment_method_id: type: - string - 'null' - format: uuid - description: The unique identifier of the payment method used for this payment. - example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + description: Unique identifier of the customer within the payment provider. It is `null` for manual payments. + example: cus_5eb0285bcf941bc6ba next_action: type: object additionalProperties: true @@ -16916,8 +17930,11 @@ components: created_at: type: string format: date-time - description: Timestamp when the payment was created in Lago's database, not on the payment provider. + description: Timestamp of the payment in Lago's database, not on the payment provider. On a manual payment recorded with `paid_at`, it holds the `paid_at` value instead of the time the payment was recorded. example: '2025-01-21T00:10:29Z' + payment_method: + $ref: '#/components/schemas/PaymentMethodObject' + description: The payment method used for the payment. It is only sent on the `payment.succeeded` webhook, and only when a payment method is attached to the payment. PaymentsPaginated: type: object required: @@ -16948,13 +17965,15 @@ components: description: Unique identifier of the payment request, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 email: - type: string + type: + - string + - 'null' format: email - example: dinesh@piedpiper.test - description: The customer's email address used for sending dunning notifications + example: dinesh@piedpiper.example + description: The email address used for sending dunning notifications. It defaults to the customer's own email address, and is `null` when the customer has none. amount_cents: type: integer - description: The sum of the total amounts of all the invoices included in the payment request, expressed in cents. + description: The amount the payment request collects, expressed in cents. It is the sum of the amounts still due on the invoices it covers, minus the credit notes offset against those invoices. example: 100 amount_currency: $ref: '#/components/schemas/Currency' @@ -16968,7 +17987,7 @@ components: - failed description: |- The status of the payment associated with the payment request. It can have one of the following values: - - `pending`: the payment is pending, waiting for payment processing in the payment provider or when the invoice is emitted but users have not updated the payment status through the endpoint. + - `pending`: the payment has not been processed yet. A payment request starts with this status. - `succeeded`: the payment of the payment request has been successfully processed. - `failed`: the payment of the payment request has failed or encountered an error during processing. example: succeeded @@ -16982,6 +18001,7 @@ components: description: The customer on which the payment request applies. It refers to the customer account or entity associated with the payment request. invoices: type: array + description: The overdue invoices the payment request collects the payment for. items: $ref: '#/components/schemas/InvoiceBaseObject' PaymentRequestsPaginated: @@ -17044,6 +18064,7 @@ components: - type - timeout_hours - status + - expires_at - created_at - updated_at properties: @@ -17102,8 +18123,12 @@ components: SubscriptionObject: type: object required: + - activated_at + - activation_rules - billing_time - canceled_at + - cancellation_reason + - consolidate_invoice - created_at - current_billing_period_ending_at - current_billing_period_started_at @@ -17117,8 +18142,13 @@ components: - next_plan_code - on_termination_credit_note - on_termination_invoice + - payment_method + - plan_amount_cents + - plan_amount_currency - plan_code - previous_plan_code + - progressive_billing_disabled + - purchase_order_number - started_at - status - subscription_at @@ -17301,7 +18331,7 @@ components: - `generate`: An invoice is generated for the unbilled usage. - `skip`: No invoice is generated for the unbilled usage. applied_invoice_custom_sections: - description: The invoice custom sections applied to invoices generated by this subscription. + description: The invoice custom sections applied to invoices generated by this subscription. Only returned when creating, retrieving, updating or terminating a subscription, not when listing subscriptions and not in subscription webhooks. type: array items: $ref: '#/components/schemas/AppliedInvoiceCustomSectionObject' @@ -17317,6 +18347,14 @@ components: - `true` (default): the subscription is included in the customer's standard invoice grouping (by billing entity, currency and payment method). - `false`: the subscription is excluded from consolidation and always billed on its own dedicated invoice, regardless of other grouping criteria. + progressive_billing_disabled: + type: boolean + default: false + example: false + description: | + Indicates whether progressive billing is switched off for this subscription, regardless of any usage thresholds defined on the plan (including thresholds inherited from a parent plan when the subscription runs on a plan override). + + When `true`, no progressive billing invoice is issued for this subscription. cancellation_reason: type: - string @@ -17372,15 +18410,18 @@ components: - `subscription` - `commitment` - `fixed_charge` + - `credit` enum: - charge - subscription - commitment - fixed_charge + - credit WalletRecurringTransactionRule: type: object description: Object that represents rule for wallet recurring transactions. required: + - applied_invoice_custom_sections - created_at - expiration_at - granted_credits @@ -17391,6 +18432,8 @@ components: - lago_id - method - paid_credits + - payment_method + - purchase_order_number - started_at - status - target_ongoing_balance @@ -17419,14 +18462,17 @@ components: description: The method used for recurring top-up. Possible values are `fixed` or `target`. example: target interval: - type: string + type: + - string + - 'null' enum: - weekly - monthly - quarterly - semiannual - yearly - description: 'The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly`, `semiannual` or `yearly`. Required only if trigger is set to `interval`.' + - null + description: 'The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly`, `semiannual` or `yearly`. It is `null` when the trigger is `threshold` and no interval was set.' example: monthly status: type: string @@ -17474,7 +18520,7 @@ components: type: string format: date-time example: '2022-04-29T08:59:51Z' - description: The date of the metadata object creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the metadata object was created + description: The date of the recurring transaction rule creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). expiration_at: type: - string @@ -17511,7 +18557,7 @@ components: example: Tokens for models 'high-fidelity-boost' ignore_paid_top_up_limits: type: boolean - description: When true, allows rule to topped up wallet with transactions that exceed the paid top-up limits. Defaults to false. + description: When true, this rule can top up the wallet with transactions that exceed the paid top-up limits. Defaults to false. example: false applied_invoice_custom_sections: description: The invoice custom sections applied to invoices generated by this recurring transaction rule. @@ -17533,19 +18579,30 @@ components: - lago_id - lago_customer_id - external_customer_id + - billing_entity_code - status - currency + - name + - code + - purchase_order_number - rate_amount - credits_balance - - balance + - credits_ongoing_balance + - credits_ongoing_usage_balance - balance_cents + - ongoing_balance_cents + - ongoing_usage_balance_cents - consumed_credits - created_at - - ongoing_balance_cents + - expiration_at + - last_balance_sync_at + - last_consumed_credit_at + - terminated_at - invoice_requires_successful_payment - - ongoing_usage_balance_cents - - credits_ongoing_balance - - credits_ongoing_usage_balance + - paid_top_up_min_amount_cents + - paid_top_up_max_amount_cents + - priority + - payment_method properties: lago_id: type: string @@ -17592,7 +18649,7 @@ components: type: integer minimum: 1 maximum: 50 - description: 'Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.' + description: 'Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first.' example: 50 rate_amount: type: string @@ -17644,7 +18701,7 @@ components: - string - 'null' format: date-time - description: The date of terminaison of the wallet. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC). + description: The date of termination of the wallet. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC). example: '2022-09-14T16:35:31Z' invoice_requires_successful_payment: type: boolean @@ -17652,7 +18709,7 @@ components: example: false applies_to: type: object - description: Set wallet limitations to fee types. + description: Limitations that restrict where the wallet credits apply. They can be set on fee types, on billable metrics, or on both. properties: fee_types: type: array @@ -17669,7 +18726,7 @@ components: example: - bm1 recurring_transaction_rules: - description: List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. + description: List of recurring transaction rules. Only one recurring rule is allowed per wallet. Only the rules that are currently active are returned, so a rule that was terminated or that has passed its `expiration_at` is left out. type: array items: $ref: '#/components/schemas/WalletRecurringTransactionRule' @@ -17695,13 +18752,13 @@ components: type: - integer - 'null' - description: Minimum amount of cents that can be top-up with a single paid transaction. + description: The minimum amount, in cents, of a single paid top-up transaction. example: 100 paid_top_up_max_amount_cents: type: - integer - 'null' - description: Maximum amount of cents that can be top-up with a single paid transaction. + description: The maximum amount, in cents, of a single paid top-up transaction. example: 1000 applied_invoice_custom_sections: description: The invoice custom sections applied to invoices generated by this wallet. @@ -17748,12 +18805,13 @@ components: - eu_bank_details WalletCreateInput: type: object + required: + - wallet properties: wallet: type: object required: - rate_amount - - currency - external_customer_id properties: name: @@ -17772,7 +18830,7 @@ components: type: integer minimum: 1 maximum: 50 - description: 'Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.' + description: 'Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first.' example: 50 rate_amount: type: string @@ -17781,7 +18839,7 @@ components: example: '1.5' currency: $ref: '#/components/schemas/Currency' - description: The currency of the wallet. + description: The currency of the wallet. Required when the customer has no currency yet. When omitted, the wallet uses the customer's currency. When provided on a customer without a currency, it also sets the customer's currency. example: USD paid_credits: type: @@ -17841,6 +18899,12 @@ components: - 'null' description: The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`. example: Tokens for models 'high-fidelity-boost' + transaction_priority: + type: integer + minimum: 1 + maximum: 50 + description: 'The priority of the wallet transactions triggered when creating the wallet. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.' + example: 50 purchase_order_number: type: - string @@ -17851,7 +18915,7 @@ components: type: - object - 'null' - description: Set wallet limitations to fee types. + description: Limitations that restrict where the wallet credits apply. They can be set on fee types, on billable metrics, or on both. properties: fee_types: type: @@ -17874,13 +18938,13 @@ components: type: - integer - 'null' - description: Minimum amount of cents that can be top-up with a single paid transaction. + description: The minimum amount, in cents, of a single paid top-up transaction. example: 100 paid_top_up_max_amount_cents: type: - integer - 'null' - description: Maximum amount of cents that can be top-up with a single paid transaction. + description: The maximum amount, in cents, of a single paid top-up transaction. example: 1000 ignore_paid_top_up_limits_on_creation: type: @@ -17894,7 +18958,7 @@ components: type: - array - 'null' - description: List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. + description: List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license. items: type: object description: Object that represents rule for wallet recurring transactions. @@ -18004,7 +19068,7 @@ components: description: The purchase order number associated with this recurring transaction rule. It will be added to invoices generated for the resulting wallet top-ups. If not set, falls back to the wallet's `purchase_order_number`. ignore_paid_top_up_limits: type: boolean - description: When true, allows rule to topped up wallet with transactions that exceed the paid top-up limits. Defaults to false. + description: When true, this rule can top up the wallet with transactions that exceed the paid top-up limits. Defaults to false. example: false invoice_custom_section: $ref: '#/components/schemas/InvoiceCustomSectionInput' @@ -18047,7 +19111,7 @@ components: type: integer minimum: 1 maximum: 50 - description: 'Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.' + description: 'Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first.' example: 50 expiration_at: type: @@ -18060,6 +19124,18 @@ components: type: boolean description: A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false. example: false + paid_top_up_min_amount_cents: + type: + - integer + - 'null' + description: The minimum amount, in cents, of a single paid top-up transaction. + example: 100 + paid_top_up_max_amount_cents: + type: + - integer + - 'null' + description: The maximum amount, in cents, of a single paid top-up transaction. + example: 1000 billing_entity_code: type: string example: default @@ -18074,7 +19150,7 @@ components: $ref: '#/components/schemas/InvoiceCustomSectionInput' recurring_transaction_rules: type: array - description: List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. + description: List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license. items: type: object description: Object that represents rule for wallet recurring transactions. @@ -18187,6 +19263,10 @@ components: - 'null' example: PO-123 description: The purchase order number associated with this recurring transaction rule. It will be added to invoices generated for the resulting wallet top-ups. If not set, falls back to the wallet's `purchase_order_number`. + ignore_paid_top_up_limits: + type: boolean + description: When true, this rule can top up the wallet with transactions that exceed the paid top-up limits. Defaults to false. + example: false invoice_custom_section: $ref: '#/components/schemas/InvoiceCustomSectionInput' payment_method: @@ -18199,7 +19279,7 @@ components: type: - object - 'null' - description: Set wallet limitations to fee types. + description: Limitations that restrict where the wallet credits apply. They can be set on fee types, on billable metrics, or on both. properties: fee_types: type: @@ -18234,12 +19314,25 @@ components: type: - string - 'null' - description: Unique identifier of the usage threshold created by Lago. + description: Code identifying the threshold inside the alert. You set it when you create or update the alert. example: warn + notify_on: + type: array + description: The transitions this threshold notifies on. `triggered` is always included. Opting in to `resolved` additionally sends an `alert.resolved` webhook when the value returns past the threshold, and requires the threshold to carry a code that is unique within the alert. Not available on recurring thresholds. + items: + type: string + enum: + - triggered + - resolved + default: + - triggered + example: + - triggered + - resolved recurring: type: boolean default: false - description: This field when set to `true` indicates that the alert will be retrigger when this threshold is reached after the last non-recurring threshold. Only one recurring threshold per alert allowed. + description: This field when set to `true` indicates that the alert will be retriggered when this threshold is reached after the last non-recurring threshold. Only one recurring threshold per alert allowed. example: false AlertThresholdObject: allOf: @@ -18249,10 +19342,11 @@ components: - code - value - recurring + - notify_on properties: value: type: string - pattern: ^[0-9]+.?[0-9]*$ + pattern: ^-?[0-9]+(\.[0-9]+)?$ description: |- A value that should trigger this alert, formatted as a BigDecimal. @@ -18264,10 +19358,13 @@ components: - lago_id - lago_organization_id - external_subscription_id + - lago_wallet_id + - wallet_code - billable_metric - alert_type - code - name + - direction - previous_value - last_processed_at - thresholds @@ -18285,6 +19382,7 @@ components: example: 1a901a90-1a90-1a90-1a90-1a901a901a90 external_subscription_id: type: 'null' + description: Always null. An alert returned by the wallet endpoints is never attached to a subscription. lago_wallet_id: type: string description: Unique identifier of the wallet, created by Lago. @@ -18295,6 +19393,7 @@ components: example: wallet_code billable_metric: type: 'null' + description: Always null. A wallet alert is never based on a billable metric. alert_type: type: string description: The type of alert. @@ -18316,15 +19415,15 @@ components: example: Wallet Balance Alert direction: type: string - description: Indicates whether the alert is triggered when the monitored metric goes above or below the threshold. + description: Indicates whether the alert is triggered when the monitored metric goes above or below the threshold. Lago sets it from the alert type and you cannot change it. A wallet alert is always `decreasing`. enum: - increasing - decreasing example: decreasing previous_value: - type: number - description: When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds. - example: 1000 + type: string + description: When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds. Returned as a string formatted as a BigDecimal. + example: '1000.0' last_processed_at: type: - string @@ -18362,10 +19461,10 @@ components: properties: value: oneOf: - - type: integer + - type: number - type: string description: |- - A value that should trigger this alert. This can be an integer or a string formatted as a BigDecimal. + A value that should trigger this alert. This can be a number or a string formatted as a BigDecimal. The unit depends on the alert type: `billable_metric_current_usage_units` and `billable_metric_lifetime_usage_units` are expressed in units, `wallet_credits_balance` and `wallet_credits_ongoing_balance` in credits, and all other types in cents. example: 99 @@ -18384,7 +19483,8 @@ components: example: Storage Usage Alert thresholds: type: array - description: Array of thresholds associated with the alert. + maxItems: 20 + description: Array of thresholds associated with the alert. An alert accepts at most 20 thresholds, and a larger array returns a `422` error with `too_many_thresholds` on `thresholds`. Two thresholds cannot share the same value and the same `recurring` flag. The value of a recurring threshold must be positive. items: $ref: '#/components/schemas/AlertThresholdInput' WalletAlertCreateInput: @@ -18505,9 +19605,28 @@ components: type: string example: '0.5' description: The conversion rate from pricing units to the plan's currency. + ChargeModelEnum: + type: string + description: | + Specifies the pricing model used for the calculation of the final fee. It can be any of the following values: + - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic) + - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage) + - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated) + - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package) + - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage) + - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard) + - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume) + enum: + - dynamic + - graduated + - graduated_percentage + - package + - percentage + - standard + - volume CustomerChargeFiltersUsageObject: type: array - description: Array of filter object, representing multiple dimensions for a charge item. + description: Array of filter objects, representing multiple dimensions for a charge item. items: type: object required: @@ -18536,14 +19655,18 @@ components: example: 10 description: The quantity of usage events that have been recorded for a particular charge filter during the specified time period. These events may also be referred to as the number of transactions in some contexts. invoice_display_name: - type: string - description: Specifies the name that will be displayed on an invoice. + type: + - string + - 'null' + description: Specifies the name that will be displayed on an invoice. It is `null` for the entry that holds the usage recorded outside of any charge filter. example: AWS eu-east-1 pricing_unit_details: $ref: '#/components/schemas/UsagePricingUnitDetailsObject' values: - type: object - description: List of filter values applied to the usage. + type: + - object + - 'null' + description: List of filter values applied to the usage. It is `null` for the entry that holds the usage recorded outside of any charge filter. additionalProperties: type: array items: @@ -18634,6 +19757,7 @@ components: description: Object listing all the properties for a specific charge item. required: - lago_id + - code - charge_model properties: lago_id: @@ -18641,16 +19765,12 @@ components: format: uuid example: 1a901a90-1a90-1a90-1a90-1a901a901a90 description: Unique identifier assigned to the charge within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the charge's record within the Lago system. - charge_model: + code: type: string - description: The pricing model applied to this charge. Possible values are standard, `graduated`, `percentage`, `package` or `volume`. - enum: - - standard - - graduated - - package - - percentage - - volume - example: graduated + example: storage + description: The code of the charge, unique within the plan. + charge_model: + $ref: '#/components/schemas/ChargeModelEnum' invoice_display_name: type: - string @@ -18681,7 +19801,7 @@ components: description: The code of the billable metric used for this charge. aggregation_type: type: string - description: The aggregation type of the billable metric used for this charge. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`. + description: The aggregation type of the billable metric used for this charge. enum: - count_agg - sum_agg @@ -18702,6 +19822,8 @@ components: - from_datetime - to_datetime - issuing_date + - lago_invoice_id + - currency - amount_cents - taxes_amount_cents - total_amount_cents @@ -18728,7 +19850,7 @@ components: - 'null' format: uuid example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - description: A unique identifier associated with the invoice related to this particular usage record. + description: A unique identifier associated with the invoice related to this particular usage record. It is `null` for the current usage, which is not attached to an invoice yet. currency: $ref: '#/components/schemas/Currency' description: The currency of the customer's current usage. @@ -18757,9 +19879,36 @@ components: properties: customer_usage: $ref: '#/components/schemas/CustomerUsageObject' + ProjectedUsagePricingUnitDetailsObject: + type: + - object + - 'null' + required: + - amount_cents + - projected_amount_cents + - short_name + - conversion_rate + description: Details about the pricing unit used for charge usage. + properties: + amount_cents: + type: integer + example: 200 + description: The amount in cents in the pricing unit. + projected_amount_cents: + type: integer + example: 400 + description: The projected amount in cents in the pricing unit. + short_name: + type: string + example: CR + description: The short name of the pricing unit. + conversion_rate: + type: string + example: '0.5' + description: The conversion rate from pricing units to the plan's currency. CustomerProjectedChargeFiltersUsageObject: type: array - description: Array of filter object, representing multiple dimensions for a charge item. + description: Array of filter objects, representing multiple dimensions for a charge item. items: type: object required: @@ -18793,14 +19942,18 @@ components: example: 10 description: The quantity of usage events that have been recorded for a particular charge filter during the specified time period. These events may also be referred to as the number of transactions in some contexts. invoice_display_name: - type: string - description: Specifies the name that will be displayed on an invoice. + type: + - string + - 'null' + description: Specifies the name that will be displayed on an invoice. It is `null` for the entry that holds the usage recorded outside of any charge filter. example: AWS eu-east-1 pricing_unit_details: - $ref: '#/components/schemas/UsagePricingUnitDetailsObject' + $ref: '#/components/schemas/ProjectedUsagePricingUnitDetailsObject' values: - type: object - description: List of filter values applied to the usage. + type: + - object + - 'null' + description: List of filter values applied to the usage. It is `null` for the entry that holds the usage recorded outside of any charge filter. additionalProperties: type: array items: @@ -18848,7 +20001,7 @@ components: example: '1.8' description: The projected number of units that can be consumed for a specific group related to a charge item. pricing_unit_details: - $ref: '#/components/schemas/UsagePricingUnitDetailsObject' + $ref: '#/components/schemas/ProjectedUsagePricingUnitDetailsObject' grouped_by: type: object description: Key value list of event properties aggregated by the charge model @@ -18871,7 +20024,7 @@ components: - amount_currency - charge - billable_metric - - groups + - grouped_usage properties: units: type: string @@ -18900,7 +20053,7 @@ components: description: The currency of a usage item consumed by the customer. example: EUR pricing_unit_details: - $ref: '#/components/schemas/UsagePricingUnitDetailsObject' + $ref: '#/components/schemas/ProjectedUsagePricingUnitDetailsObject' charge: type: object description: Object listing all the properties for a specific charge item. @@ -18914,17 +20067,11 @@ components: example: 1a901a90-1a90-1a90-1a90-1a901a901a90 description: Unique identifier assigned to the charge within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the charge's record within the Lago system. charge_model: - type: string - description: The pricing model applied to this charge. Possible values are standard, `graduated`, `percentage`, `package` or `volume`. - enum: - - standard - - graduated - - package - - percentage - - volume - example: graduated + $ref: '#/components/schemas/ChargeModelEnum' invoice_display_name: - type: string + type: + - string + - 'null' description: Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. example: Setup billable_metric: @@ -18951,7 +20098,7 @@ components: description: The code of the billable metric used for this charge. aggregation_type: type: string - description: The aggregation type of the billable metric used for this charge. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`. + description: The aggregation type of the billable metric used for this charge. enum: - count_agg - sum_agg @@ -18974,6 +20121,8 @@ components: - from_datetime - to_datetime - issuing_date + - lago_invoice_id + - currency - amount_cents - projected_amount_cents - taxes_amount_cents @@ -19001,7 +20150,7 @@ components: - 'null' format: uuid example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - description: A unique identifier associated with the invoice related to this particular usage record. + description: A unique identifier associated with the invoice related to this particular usage record. It is always `null` here, because the projected usage is not attached to an invoice. currency: $ref: '#/components/schemas/Currency' description: The currency of the customer's current usage. @@ -19073,57 +20222,7 @@ components: type: string example: https://foo.bar description: The new generated Payment Provider Checkout URL for the Customer. - PaymentMethodObject: - type: object - required: - - lago_id - - is_default - - payment_provider_type - - provider_method_id - - created_at - properties: - lago_id: - type: string - format: uuid - description: The unique identifier of the payment method, created by Lago. - example: 4cf085a7-c196-4f07-a543-97c50ec6e8b2 - is_default: - type: boolean - description: Indicates whether this payment method is the default one for the customer. - example: true - payment_provider_code: - type: - - string - - 'null' - description: Code of the payment provider associated with this payment method. - example: stripe_prod - payment_provider_name: - type: - - string - - 'null' - description: Human-readable name of the payment provider. - example: Stripe - payment_provider_type: - type: string - description: The type of the payment provider. - enum: - - adyen - - cashfree - - gocardless - - stripe - - flutterwave - - moneyhash - example: stripe - provider_method_id: - type: string - description: Unique identifier of the payment method within the payment provider. - example: pm_1N8ZQX2eZvKYlo2CkL9Y8XYZ - created_at: - type: string - format: date-time - description: Timestamp when the payment method was created in Lago's database. - example: '2025-01-21T00:10:29Z' - PaymentMethodsPaginated: + PaymentMethodsPaginated: type: object required: - payment_methods @@ -19177,13 +20276,13 @@ components: type: string format: date-time example: '2022-04-29T08:59:51.123Z' - description: This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC). If this timestamp is not provided, the API will automatically set it to the time of event reception. + description: The date and time at which the event occurred, in ISO 8601 format with millisecond precision and expressed in Coordinated Universal Time (UTC). When no timestamp is sent on the event, it is set to the time of event reception. precise_total_amount_cents: type: - string - 'null' example: '1234.56' - description: The precise total amount that was sent in the event payload. This filed is used by the `dynamic` pricing model. + description: The precise total amount that was sent in the event payload. This field is used by the `dynamic` pricing model. properties: type: object description: This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. @@ -19213,7 +20312,7 @@ components: external_subscription_id: type: string example: sub_1234567890 - description: The unique identifier of the subscription within your application. It is a mandatory field when the customer possesses multiple subscriptions or when the `external_customer_id` is not provided. + description: The unique identifier of the subscription within your application, as sent on the event. It is the value Lago uses to attach the event to a subscription. created_at: type: - string @@ -19266,7 +20365,7 @@ components: description: | This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC). If this timestamp is not provided, the API will automatically set it to the time of event reception. - You can also provide miliseconds precision by appending decimals to the timestamp. + You can also provide milliseconds precision by appending decimals to the timestamp. precise_total_amount_cents: type: - string @@ -19362,6 +20461,12 @@ components: type: string example: sub_1234567890 description: The unique identifier of the subscription within your application. + precise_total_amount_cents: + type: + - string + - 'null' + example: '1234.56' + description: The precise total amount in cents with precision used by the `dynamic` pricing model to compute the estimated usage amount. Defaults to `0` when omitted. properties: type: object description: This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. Any property of the targeted billable metric can be sent here, in addition to the documented fields below. @@ -19387,34 +20492,36 @@ components: type: array items: $ref: '#/components/schemas/FeeObject' + EventEstimateInstantFeesInputObject: + type: object + required: + - code + - external_subscription_id + properties: + code: + type: string + example: storage + description: The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process. + external_subscription_id: + type: string + example: sub_1234567890 + description: The unique identifier of the subscription within your application. + properties: + type: object + description: This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. + transaction_id: + type: + - string + - 'null' + example: transaction_1234567890 + description: This field represents a unique identifier for the event. EventEstimateInstantFeesInput: type: object required: - event properties: event: - type: object - required: - - code - - external_subscription_id - properties: - code: - type: string - example: storage - description: The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process. - external_subscription_id: - type: string - example: sub_1234567890 - description: The unique identifier of the subscription within your application. - properties: - type: object - description: This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. - transaction_id: - type: - - string - - 'null' - example: transaction_1234567890 - description: This field represents a unique identifier for the event. + $ref: '#/components/schemas/EventEstimateInstantFeesInputObject' FeeEstimateObject: type: object required: @@ -19509,7 +20616,7 @@ components: example: 312.5 precise_coupons_amount_cents: type: string - description: The coupon amount applied to the estimated instant fee. It will always returns 0 + description: The coupon amount applied to the estimated instant fee. It is always `0.0`. example: '0.0' total_amount_cents: type: integer @@ -19535,7 +20642,7 @@ components: type: string enum: - pending - description: Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The value will always `pending`. + description: Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The value is always `pending`. example: pending created_at: type: 'null' @@ -19576,8 +20683,10 @@ components: description: The name of the fee item. It will be the name of the `billable_metric`. example: Startup description: - type: string - description: The description of the fee item. It will be the name of the `billable_metric`. + type: + - string + - 'null' + description: The description of the fee item. It will be the description of the `billable_metric`. example: Startup description invoice_display_name: type: string @@ -19607,7 +20716,7 @@ components: type: string enum: - BillableMetric - description: The type of the fee item. Values is `BillableMetric`. + description: The type of the fee item. The value is `BillableMetric`. example: BillableMetric grouped_by: type: object @@ -19631,7 +20740,7 @@ components: events: type: array items: - $ref: '#/components/schemas/EventEstimateInstantFeesInput' + $ref: '#/components/schemas/EventEstimateInstantFeesInputObject' Event: type: object required: @@ -19740,7 +20849,7 @@ components: - number - 'null' pattern: ^[0-9]+.?[0-9]*$ - description: The quantity of units associated with the fee. Accepts a number or a string formatted as a BigDecimal. By default, only 1 unit is added to the invoice. + description: The quantity of units associated with the fee. Accepts a number or a decimal string. By default, only 1 unit is added to the invoice. example: '2.5' description: type: @@ -19811,6 +20920,20 @@ components: format: date-time description: The ending date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the end date of the billing period or subscription period associated with the fees. example: '2022-05-29T08:59:51Z' + fixed_charges_from_datetime: + type: + - string + - 'null' + format: date-time + description: The beginning date of the period that covers the fixed charge fees. It is `null` when the billing period carries no fixed charge, for example on an `advance_charges` invoice. + example: '2022-04-29T08:59:51Z' + fixed_charges_to_datetime: + type: + - string + - 'null' + format: date-time + description: The ending date of the period that covers the fixed charge fees. It is `null` when the billing period carries no fixed charge, for example on an `advance_charges` invoice. + example: '2022-05-29T08:59:51Z' invoicing_reason: type: string enum: @@ -19891,7 +21014,7 @@ components: example: INV-0123456-98765 InvoicePaymentUrl: type: object - description: . + description: The checkout link generated for an invoice, with the customer and invoice it belongs to. properties: invoice_payment_details: type: object @@ -19958,10 +21081,14 @@ components: type: string example: anrok description: |- - The integration type used for accounting and tax syncs. - Accepted values: `anrok`. + The integration type used for accounting, tax and CRM syncs. + Accepted values: `anrok`, `avalara`, `xero`, `hubspot`, `salesforce`. enum: - anrok + - avalara + - xero + - hubspot + - salesforce integration_code: type: string example: anrok1 @@ -19980,6 +21107,10 @@ components: type: string example: CA description: The state of the customer's billing address + zipcode: + type: string + example: '91364' + description: The zipcode of the customer's billing address. tax_identification_number: type: string description: The tax identification number of the customer @@ -20045,6 +21176,19 @@ components: - 'null' pattern: ^[0-9]+.?[0-9]*$ description: The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type. + frequency: + type: string + enum: + - once + - recurring + - forever + description: |- + The frequency of the coupon. It can have three possible values: `once`, `recurring` or `forever`. + + - If set to `once`, the coupon applies to a single invoice. + - If set to `recurring`, the coupon applies to the number of billing periods set in `frequency_duration`. + - If set to `forever`, the coupon applies to every invoice of the subscription. + example: once frequency_duration: type: - integer @@ -21217,11 +22361,11 @@ components: - string - 'null' example: This is my customer footer - description: The customer invoice message that appears at the bottom of each billing documents. + description: The customer invoice message that appears at the bottom of each billing documents. It accepts up to 600 characters. invoice_grace_period: type: integer example: 3 - description: The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period. + description: The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period. This is a premium feature, the value is ignored without a premium license. document_locale: type: string example: en @@ -21231,11 +22375,29 @@ components: required: - lago_id - name + - slug - created_at + - webhook_url + - webhook_urls + - country + - default_currency + - address_line1 + - address_line2 + - state + - zipcode + - email + - city + - legal_name + - legal_number - document_numbering - document_number_prefix + - net_payment_term + - tax_identification_number + - timezone - email_settings - billing_configuration + - finalize_zero_amount_invoice + - events_store properties: lago_id: type: string @@ -21248,25 +22410,19 @@ components: description: The name of your organization. slug: type: string - example: NAME1-1234 - description: A concise and unique identifier for your organization, formed by combining the organization's `name` and `id`. + example: name1 + description: A concise and unique identifier for your organization, derived from its `name`. It contains between 3 and 40 characters, limited to lowercase letters, digits and hyphens, and it starts and ends with a letter or a digit. created_at: - type: - - string - - 'null' + type: string format: date-time example: '2022-05-02T13:04:09Z' description: The date of creation of your organization, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). webhook_url: - type: - - string - - 'null' + type: string example: https://webhook.brex.com - description: The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner. + description: The URL of the first webhook endpoint of your organization. This URL allows your organization to receive important messages, notifications, or data from the Lago system. It is an empty string when your organization has no webhook endpoint yet. webhook_urls: - type: - - array - - 'null' + type: array items: type: string example: @@ -21346,7 +22502,7 @@ components: document_number_prefix: type: string example: ORG-1234 - description: Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four digits of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago. + description: Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four characters of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago. net_payment_term: type: integer example: 30 @@ -21390,6 +22546,7 @@ components: - clickhouse - postgres example: clickhouse + description: The store that holds the events of your organization. It is `clickhouse` when the ClickHouse event store is enabled for your organization, and `postgres` otherwise. Organization: type: object required: @@ -21406,11 +22563,9 @@ components: type: object properties: webhook_url: - type: - - string - - 'null' + type: string example: https://webhook.brex.com - description: The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner. + description: Sets the URL of the first webhook endpoint of your organization. This URL allows your organization to receive important messages, notifications, or data from the Lago system. When your organization has no webhook endpoint yet, this creates one. country: $ref: '#/components/schemas/CountryOrNull' description: The country of your organization. @@ -21484,7 +22639,7 @@ components: document_number_prefix: type: string example: ORG-1234 - description: Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four digits of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago. + description: Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four characters of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago. net_payment_term: type: integer example: 30 @@ -21497,11 +22652,11 @@ components: description: The tax identification number of your organization. timezone: $ref: '#/components/schemas/Timezone' - description: Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. + description: Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. This is a premium feature, the value is ignored without a premium license. example: America/New_York email_settings: type: array - description: Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values are `invoice.finalized`, `credit_note.created` and `payment_receipt.created`. + description: Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values are `invoice.finalized`, `credit_note.created` and `payment_receipt.created`. This is a premium feature, the value is ignored without a premium license. example: - invoice.finalized - credit_note.created @@ -21519,14 +22674,16 @@ components: description: Determines whether invoices with a zero total amount should be finalized. If set to true, zero amount invoices will be finalized. If set to false, zero amount invoices will not be finalized. slug: type: string - example: NAME1-1234 - description: A concise and unique identifier for your organization, used as a prefix in customer slugs. + example: name1 + description: A concise and unique identifier for your organization. It must contain between 3 and 40 characters, limited to lowercase letters, digits and hyphens, and it must start and end with a letter or a digit. Lago trims it and converts it to lowercase before saving it. A value already taken by another organization, or one of the names Lago reserves for its own routes, is rejected. PaymentReceiptObject: type: object required: - lago_id - created_at - number + - file_url + - xml_url - payment properties: lago_id: @@ -21543,6 +22700,18 @@ components: type: string description: The unique number assigned to the payment receipt. example: LAG-1234-001-002 + file_url: + type: + - string + - 'null' + description: The PDF file of the payment receipt. It is `null` while no PDF has been generated. + example: https://getlago.com/payment_receipt/file + xml_url: + type: + - string + - 'null' + description: The e-invoicing XML file of the payment receipt. It is `null` while no XML file has been generated. + example: https://getlago.com/payment_receipt/xml payment: $ref: '#/components/schemas/PaymentObject' PaymentReceiptsPaginated: @@ -21572,24 +22741,24 @@ components: payment_request: type: object required: - - email - external_customer_id - lago_invoice_ids properties: external_customer_id: type: string example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba - description: The customer external unique identifier (provided by your own application) + description: The customer external unique identifier (provided by your own application). email: type: string format: email - example: dinesh@piedpiper.test - description: The customer's email address used for sending dunning notifications + example: dinesh@piedpiper.example + description: The email address used for sending dunning notifications. When omitted, the customer's own email address is used. lago_invoice_ids: type: array - description: A list of Lago IDs for the customer's overdue invoices to start the dunning process + description: A list of Lago IDs for the customer's overdue invoices to start the dunning process. items: type: string + format: uuid example: 1a901a90-1a90-1a90-1a90-1a901a901a90 description: Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system. payment_method: @@ -21616,21 +22785,24 @@ components: properties: invoice_id: type: string + format: uuid example: 486b147a-02a1-4ccf-8603-f3541fc25e7a - description: Unique identifier assigned to the invoice + description: Unique identifier of the invoice the payment is recorded on, created by Lago. amount_cents: type: integer + minimum: 1 example: 100 - description: The payment amount in cents + description: The payment amount in cents. It must be greater than zero. reference: type: string + maxLength: 40 example: ref1 - description: Reference for the payment + description: Reference for the payment, such as the bank transfer or cheque number. paid_at: type: string format: date example: '2025-02-20' - description: The date the payment was made + description: The date the payment was made. It is returned as the payment's `created_at`. When omitted, the date and time of the request is used. Payment: type: object required: @@ -21661,7 +22833,9 @@ components: description: The amount of the minimum commitment in cents. example: 100000 invoice_display_name: - type: string + type: + - string + - 'null' description: Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name. example: Minimum Commitment (C1) interval: @@ -21689,25 +22863,6 @@ components: description: All taxes applied to the minimum commitment. items: $ref: '#/components/schemas/TaxObject' - ChargeModelEnum: - type: string - description: | - Specifies the pricing model used for the calculation of the final fee. It can be any of the following values: - - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic) - - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage) - - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated) - - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package) - - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage) - - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard) - - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume) - enum: - - dynamic - - graduated - - graduated_percentage - - package - - percentage - - standard - - volume ChargeProperties: type: object properties: @@ -21915,6 +23070,15 @@ components: - properties - values properties: + lago_id: + type: string + format: uuid + description: Unique identifier of the charge filter, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + charge_code: + type: string + description: Unique code identifying the charge this filter belongs to. + example: api_requests_charge invoice_display_name: type: - string @@ -21961,9 +23125,7 @@ components: description: Unique identifier of the billable metric created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 code: - type: - - string - - 'null' + type: string description: Unique code identifying the charge within the plan. example: api_requests_charge billable_metric_code: @@ -22049,9 +23211,7 @@ components: description: The conversion rate from pricing units to the plan's currency. example: '0.5' accepts_target_wallet: - type: - - boolean - - 'null' + type: boolean description: |- Specifies whether the charge accepts a target wallet for prepaid credits deduction. When `true`, events may include a `target_wallet_code` in their `properties` to direct credit deduction to a specific wallet. @@ -22168,7 +23328,9 @@ components: description: Unique identifier of the add-on associated with this fixed charge. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 invoice_display_name: - type: string + type: + - string + - 'null' description: Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. example: Setup fee add_on_code: @@ -22209,12 +23371,12 @@ components: $ref: '#/components/schemas/FixedChargeProperties' description: List of all thresholds utilized for calculating the fixed charge. units: - type: number + type: string description: |- - The number of units for the fixed charge. + The number of units for the fixed charge, as a decimal string. When retrieved through a subscription-scoped endpoint (e.g. `GET /subscriptions/{external_id}/fixed_charges`), this reflects the per-subscription unit override when one exists, and falls back to the plan-level units otherwise. Plan-scoped endpoints always return the plan-level units. - example: 1 + example: '1.0' lago_parent_id: type: - string @@ -22227,6 +23389,27 @@ components: description: List of taxes applied to the fixed charge. items: $ref: '#/components/schemas/TaxObject' + ApplicableUsageThreshold: + type: object + required: + - threshold_display_name + - amount_cents + - recurring + properties: + threshold_display_name: + type: + - string + - 'null' + description: The display name of the usage threshold. + example: Threshold 1 + amount_cents: + type: integer + description: The amount to reach to trigger a `progressive_billing` invoice. + example: 10000 + recurring: + type: boolean + description: This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount. + example: true PlanEntitlementPrivilegeObject: allOf: - $ref: '#/components/schemas/FeaturePrivilegeObject' @@ -22325,7 +23508,9 @@ components: description: The name of the plan. example: Startup invoice_display_name: - type: string + type: + - string + - 'null' description: Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name. example: Startup plan created_at: @@ -22348,9 +23533,11 @@ components: - yearly example: monthly description: - type: string + type: + - string + - 'null' description: The description on the plan. - example: '' + example: Plan for early stage startups. amount_cents: type: integer description: The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan. @@ -22360,7 +23547,9 @@ components: description: The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed. example: USD trial_period: - type: number + type: + - number + - 'null' description: The duration in days during which the base cost of the plan is offered for free. example: 5 pay_in_advance: @@ -22379,6 +23568,17 @@ components: - 'null' description: This field, when set to `true`, enables to invoice fixed charges on monthly basis, even if the cadence of the plan is yearly or semiannual. This allows customers to pay fixed charges on a monthly basis. This can be set to true only if the plan's interval is `yearly` or `semiannual`. example: null + parent_id: + type: + - string + - 'null' + format: uuid + description: Unique identifier of the parent plan, created by Lago. It is set on plans that override a parent plan for a single subscription, and `null` on standard plans. + example: null + pending_deletion: + type: boolean + description: This field is set to `true` when the plan is scheduled for deletion but still attached to subscriptions that have to be billed first. + example: false minimum_commitment: $ref: '#/components/schemas/MinimumCommitmentObject' charges: @@ -22497,7 +23697,7 @@ components: filters: [] fixed_charges: type: array - description: List of fixed charges for this plan. + description: List of fixed charges for this plan. Only returned when creating, retrieving, updating or deleting a plan. It is not returned when listing plans, in the plan webhooks, or on the plan nested in a subscription. items: $ref: '#/components/schemas/FixedChargeObject' example: @@ -22512,7 +23712,7 @@ components: prorated: false properties: amount: '500' - units: 1 + units: '1.0' lago_parent_id: null taxes: - lago_id: 3c703c70-3c70-3c70-3c70-3c703c703c70 @@ -22541,7 +23741,7 @@ components: to_value: null per_unit_amount: '1' flat_amount: '300' - units: 1 + units: '1.0' lago_parent_id: null taxes: [] - lago_id: 6f406f40-6f40-6f40-6f40-6f406f406f40 @@ -22563,7 +23763,7 @@ components: to_value: null per_unit_amount: '1' flat_amount: '0' - units: 50 + units: '50.0' lago_parent_id: null taxes: [] taxes: @@ -22576,9 +23776,14 @@ components: description: List of usage thresholds applied to the plan. items: $ref: '#/components/schemas/UsageThresholdObject' + applicable_usage_thresholds: + type: array + description: List of usage thresholds that actually apply to the plan. For an overriding plan these are inherited from its parent plan; for a standard plan they match `usage_thresholds`. It is not returned in the plan webhooks. + items: + $ref: '#/components/schemas/ApplicableUsageThreshold' entitlements: type: array - description: List of all feature entitlements and their privileges available for this plan. + description: List of all feature entitlements and their privileges available for this plan. It is not returned with the `plan.deleted` webhook, nor on the plan nested in a subscription. items: $ref: '#/components/schemas/PlanEntitlement' metadata: @@ -22754,7 +23959,7 @@ components: example: 1a901a90-1a90-1a90-1a90-1a901a901a90 code: type: string - description: Unique code identifying the charge within the plan. + description: Unique code identifying the charge within the plan. If not provided, it is generated from the code of the billable metric. example: api_requests_charge charge_model: $ref: '#/components/schemas/ChargeModelEnum' @@ -22956,6 +24161,11 @@ components: tax_codes: $ref: '#/components/schemas/TaxCodes' description: List of taxes applied to the fixed charge. + apply_units_immediately: + type: boolean + description: When set to `true`, the fixed charge units are applied immediately for active subscriptions. When set to `false`, the units are applied at the next billing period. + example: false + default: false example: - add_on_id: 1a901a90-1a90-1a90-1a90-1a901a901a90 code: setup_fee @@ -22966,6 +24176,7 @@ components: properties: amount: '500' units: 1 + apply_units_immediately: false tax_codes: - french_standard_vat - add_on_id: 4d604d60-4d60-4d60-4d60-4d604d604d60 @@ -23101,7 +24312,7 @@ components: example: 1a901a90-1a90-1a90-1a90-1a901a901a90 code: type: string - description: Unique code identifying the charge within the plan. + description: Unique code identifying the charge within the plan. On a new charge, if not provided, it is generated from the code of the billable metric. example: api_requests_charge charge_model: $ref: '#/components/schemas/ChargeModelEnum' @@ -23156,8 +24367,12 @@ components: $ref: '#/components/schemas/TaxCodes' applied_pricing_unit: type: object - description: Updates the pricing unit conversion rate for this charge. Only applies if the charge has applied pricing unit. + description: The pricing unit of the charge. For an existing charge, only `conversion_rate` is updated, and only if the charge already has an applied pricing unit. For a new charge (no `id`), `code` selects the pricing unit to apply. properties: + code: + type: string + description: The code of the pricing unit. Only used when the charge is created by this request. + example: credits conversion_rate: type: string description: |- @@ -23374,8 +24589,6 @@ components: $ref: '#/components/schemas/PlanEntitlementObject' EntitlementUpdateInput: type: object - required: - - entitlements properties: entitlements: type: object @@ -23394,7 +24607,7 @@ components: root: false sso: provider: okta - description: Feature entitlements with their privilege values. Each key is a feature code, and the value is an object containing privilege codes with their associated values. + description: Feature entitlements with their privilege values. Each key is a feature code, and the value is an object containing privilege codes with their associated values. The key is optional and defaults to an empty object. On the replacing endpoints (POST) an omitted or empty object removes every entitlement. On the partial update endpoints (PATCH) it changes nothing. PlanMetadataResponse: type: object required: @@ -23521,6 +24734,7 @@ components: - required: - billable_metric_id - charge_model + - code - properties: cascade_updates: type: boolean @@ -23619,7 +24833,7 @@ components: properties: cascade_updates: type: boolean - description: This field determines whether the creation of the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`. + description: This field determines whether the creation of the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints. example: true invoice_display_name: type: @@ -23657,7 +24871,7 @@ components: properties: cascade_updates: type: boolean - description: This field determines whether the changes made to the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`. + description: This field determines whether the changes made to the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints. example: true invoice_display_name: type: @@ -23774,6 +24988,9 @@ components: fixed_charge: allOf: - $ref: '#/components/schemas/FixedChargeInput' + - required: + - code + - charge_model - properties: cascade_updates: type: boolean @@ -24144,6 +25361,10 @@ components: type: object description: Updates the pricing unit conversion rate for this charge. Only applies if the charge has applied pricing unit. properties: + code: + type: string + description: The code of the pricing unit. + example: credits conversion_rate: type: string description: |- @@ -24190,8 +25411,6 @@ components: **Deprecated.** Managing usage thresholds through `plan_overrides` is deprecated and its behavior is inconsistent: an empty array does not reliably clear thresholds (it is ignored the first time a subscription is overridden), and it never affects thresholds inherited from a parent plan. Use the top-level `usage_thresholds` array on the subscription instead, or `progressive_billing_disabled` to switch progressive billing off. items: $ref: '#/components/schemas/UsageThresholdInput' - metadata: - $ref: '#/components/schemas/MetadataInput' SubscriptionActivationRuleInput: type: object required: @@ -24323,27 +25542,118 @@ components: $ref: '#/components/schemas/SubscriptionActivationRuleInput' description: | Optional list of activation rules that gate the subscription activation. When a `payment` rule is provided and the plan is paid in advance (and the subscription is not in a trial), the subscription is created in the `incomplete` state and is only activated once the gating payment succeeds. If the payment fails or the rule's `timeout_hours` elapses, the subscription is canceled. - ApplicableUsageThreshold: + SubscriptionEntitlementPrivilegeObject: + allOf: + - $ref: '#/components/schemas/FeaturePrivilegeObject' + - type: object + required: + - value + - plan_value + - override_value + properties: + value: + oneOf: + - type: integer + description: Value for integer type privileges + - type: boolean + description: Value for boolean type privileges + - type: string + description: Value for string or select type privileges + example: 10 + description: Applicable value for this subscription (override_value if set, plan_value otherwise). Type depends on the privilege's value_type. + plan_value: + oneOf: + - type: integer + description: Value for integer type privileges + - type: boolean + description: Value for boolean type privileges + - type: string + description: Value for string or select type privileges + - type: 'null' + description: No plan value set + example: 10 + description: Value assigned to this privilege in the plan. Type depends on the privilege's value_type. Null when the privilege only exists as a subscription override. + override_value: + oneOf: + - type: integer + description: Value for integer type privileges + - type: boolean + description: Value for boolean type privileges + - type: string + description: Value for string or select type privileges + - type: 'null' + description: No override value set + example: 10 + description: Value assigned to this subscription specifically. Type depends on the privilege's value_type. Null if no override is set. + SubscriptionEntitlementObject: type: object required: - - threshold_display_name - - amount_cents - - recurring + - code + - name + - description + - privileges + - overrides properties: - threshold_display_name: + code: + type: string + example: seats + description: Unique code used to identify the feature. Max 255 characters. + name: type: - string - 'null' - description: The display name of the usage threshold. - example: Threshold 1 - amount_cents: - type: integer - description: The amount to reach to trigger a `progressive_billing` invoice. - example: 10000 - recurring: - type: boolean - description: This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount. - example: true + example: Number of seats + description: Name of the feature. Max 255 characters. + description: + type: + - string + - 'null' + example: Number of users of the account + description: Description of the feature. Max 600 characters. + privileges: + type: array + items: + $ref: '#/components/schemas/SubscriptionEntitlementPrivilegeObject' + example: + - code: max + name: Maximum + value_type: integer + config: {} + value: 15 + plan_value: 10 + override_value: 15 + - code: max_admins + name: Max Admins + value_type: integer + config: {} + value: 5 + plan_value: 5 + override_value: null + - code: root + name: Allow root user + value_type: boolean + config: {} + value: true + plan_value: true + override_value: null + - code: provider + name: SSO Provider + value_type: select + value: okta + plan_value: google + override_value: okta + config: + select_options: + - google + - okta + description: Privileges associated with this feature. Each privilege shows the plan value and any subscription override. + overrides: + type: object + additionalProperties: true + example: + max: 15 + provider: okta + description: Privilege values set on this subscription only. Each key is a privilege code and each value is the subscription override. Privileges that use the plan value are not listed. SubscriptionObjectExtended: allOf: - $ref: '#/components/schemas/SubscriptionObject' @@ -24355,7 +25665,12 @@ components: type: array items: $ref: '#/components/schemas/ApplicableUsageThreshold' - description: List of usage thresholds applicable to this subscription. + description: List of usage thresholds applicable to this subscription. Not returned when terminating a subscription. + entitlements: + type: array + items: + $ref: '#/components/schemas/SubscriptionEntitlementObject' + description: The feature entitlements of the subscription. Only returned when creating or retrieving a subscription. SubscriptionExtended: type: object required: @@ -24363,6 +25678,37 @@ components: properties: subscription: $ref: '#/components/schemas/SubscriptionObjectExtended' + authorization: + type: object + description: | + The Stripe payment intent created for the pre-authorization. Only returned when creating a subscription with an `authorization` payload. + required: + - id + - object + - amount + - amount_capturable + - status + properties: + id: + type: string + example: pi_1a901a901a901a901a901a90 + description: The identifier of the Stripe payment intent. + object: + type: string + example: payment_intent + description: The Stripe object type. Always `payment_intent`. + amount: + type: integer + example: 5000 + description: The authorized amount, in cents. + amount_capturable: + type: integer + example: 5000 + description: The amount that can still be captured from the authorization, in cents. + status: + type: string + example: requires_capture + description: The status of the Stripe payment intent. `requires_capture` means the amount is held and about to be released. `requires_action` means 3D Secure was requested, and the subscription is still created. SubscriptionUpdateInput: type: object required: @@ -24377,8 +25723,6 @@ components: description: If the field is not defined and multiple `active` and `pending` subscriptions exists, Lago will update the `active` subscription. However, if you wish to update a `pending` subscription, please ensure that you include the `status` attribute with the `pending` value in your request body. subscription: type: object - required: - - ending_at properties: name: type: @@ -24418,6 +25762,34 @@ components: type: string example: default description: The code of the billing entity associated with the subscription. Updates take effect on future invoices only. + on_termination_credit_note: + type: string + enum: + - credit + - refund + - offset + - skip + example: credit + description: | + Sets the default credit note behaviour applied when this subscription is later terminated before the end of its billing period: + + - `credit`: a credit note is generated for the unused subscription time. The unused amount is credited back to the customer. + - `refund`: a credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer. + - `offset`: a credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due. + - `skip`: no credit note is generated for the unused subscription time. + + _Note: This field is only applied to pay-in-advance plans and is ignored for pay-in-arrears plans._ + on_termination_invoice: + type: string + enum: + - generate + - skip + example: generate + description: | + Sets the default invoice behaviour applied when this subscription is later terminated before the end of its billing period: + + - `generate`: an invoice is generated for the unbilled usage. + - `skip`: no invoice is generated for the unbilled usage. purchase_order_number: type: - string @@ -24446,13 +25818,6 @@ components: $ref: '#/components/schemas/SubscriptionActivationRuleInput' description: | Optional list of activation rules that gate the subscription activation. Activation rules can only be set or modified while the subscription is `pending` (future-dated and not yet activated); the request is rejected for `incomplete`, `active`, or `terminated` subscriptions. - Subscription: - type: object - required: - - subscription - properties: - subscription: - $ref: '#/components/schemas/SubscriptionObject' LifetimeUsageThresholdObject: type: object required: @@ -24527,7 +25892,7 @@ components: description: The recording end date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format. usage_thresholds: type: array - description: Array of usage thresholds attached to the subscription's plan. + description: Array of usage thresholds that apply to the subscription. Thresholds attached to the subscription take precedence over the ones attached to its plan. This array is returned only when at least one threshold applies. items: $ref: '#/components/schemas/LifetimeUsageThresholdObject' LifetimeUsage: @@ -24557,10 +25922,13 @@ components: - lago_id - lago_organization_id - external_subscription_id + - lago_wallet_id + - wallet_code - billable_metric - alert_type - code - name + - direction - previous_value - last_processed_at - thresholds @@ -24577,18 +25945,20 @@ components: description: Unique identifier of the organization, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 external_subscription_id: - type: - - string - - 'null' + type: string description: The subscription external unique identifier (provided by your own application). example: sub_1234567890 lago_wallet_id: type: 'null' + description: Always null. An alert returned by the subscription endpoints is never attached to a wallet. wallet_code: type: 'null' + description: Always null. An alert returned by the subscription endpoints is never attached to a wallet. billable_metric: - $ref: '#/components/schemas/BillableMetricObject' - description: The billable metric associated with the alert. Only for alerts based on a billable metric. + oneOf: + - $ref: '#/components/schemas/BillableMetricObject' + - type: 'null' + description: The billable metric associated with the alert. Null unless the alert type is based on a billable metric. alert_type: type: string description: The type of alert. @@ -24611,15 +25981,15 @@ components: example: Storage Usage Alert direction: type: string - description: Indicates whether the alert is triggered when the monitored metric goes above or below the threshold. + description: Indicates whether the alert is triggered when the monitored metric goes above or below the threshold. Lago sets it from the alert type and you cannot change it. A subscription alert is always `increasing`. enum: - increasing - decreasing example: increasing previous_value: - type: number - description: When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds. - example: 1000 + type: string + description: When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds. Returned as a string formatted as a BigDecimal. + example: '1000.0' last_processed_at: type: - string @@ -24742,115 +26112,6 @@ components: - 'null' description: The code of the billable metric associated with the alert. Only for alerts based on a billable metric. example: storage_usage - SubscriptionEntitlementPrivilegeObject: - allOf: - - $ref: '#/components/schemas/FeaturePrivilegeObject' - - type: object - required: - - value - - plan_value - - override_value - properties: - value: - oneOf: - - type: integer - description: Value for integer type privileges - - type: boolean - description: Value for boolean type privileges - - type: string - description: Value for string or select type privileges - example: 10 - description: Applicable value this this subscription (override_value if set, plan_value otherwise). Type depends on the privilege's value_type. - plan_value: - oneOf: - - type: integer - description: Value for integer type privileges - - type: boolean - description: Value for boolean type privileges - - type: string - description: Value for string or select type privileges - example: 10 - description: Value assigned to this privilege in the plan. Type depends on the privilege's value_type. - override_value: - oneOf: - - type: integer - description: Value for integer type privileges - - type: boolean - description: Value for boolean type privileges - - type: string - description: Value for string or select type privileges - - type: 'null' - description: No override value set - example: 10 - description: Value assigned to this subscription specifically. Type depends on the privilege's value_type. Null if no override is set. - SubscriptionEntitlementObject: - type: object - required: - - code - - name - - description - - privileges - - overrides - properties: - code: - type: string - example: seats - description: Unique code used to identify the feature. Max 255 characters. - name: - type: - - string - - 'null' - example: Number of seats - description: Name of the feature. Max 255 characters. - description: - type: - - string - - 'null' - example: Number of users of the account - description: Description of the feature. Max 600 characters. - privileges: - type: array - items: - $ref: '#/components/schemas/SubscriptionEntitlementPrivilegeObject' - example: - - code: max - name: Maximum - value_type: integer - config: {} - value: 15 - plan_value: 10 - override_value: 15 - - code: max_admins - name: Max Admins - value_type: integer - config: {} - value: 5 - plan_value: 5 - override_value: null - - code: root - name: Allow root user - value_type: boolean - config: {} - value: true - plan_value: true - override_value: null - - code: provider - name: SSO Provider - value_type: select - value: okta - plan_value: google - override_value: okta - config: - select_options: - - google - - okta - description: Privileges associated with this feature. Each privilege shows the plan value and any subscription override. - overrides: - type: object - additionalProperties: true - example: - max: 15 - provider: okta SubscriptionEntitlements: type: object required: @@ -24860,13 +26121,6 @@ components: type: array items: $ref: '#/components/schemas/SubscriptionEntitlementObject' - SubscriptionEntitlement: - type: object - required: - - entitlement - properties: - entitlement: - $ref: '#/components/schemas/SubscriptionEntitlementObject' SubscriptionChargeOverride: type: object required: @@ -24905,20 +26159,22 @@ components: description: Unique code used to identify the tax associated with the API request. example: french_standard_vat rate: - type: string + type: + - string + - number pattern: ^[0-9]+.?[0-9]*$ - description: The percentage rate of the tax + description: The percentage rate of the tax. Accepts a number or a decimal string. example: '20.0' description: type: - string - 'null' - description: Internal description of the tax + description: Internal description of the tax. example: French standard VAT applied_to_organization: type: boolean deprecated: true - description: '**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization''s default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.' + description: '**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization''s default billing entity. When set to false on an update, it removes the tax from the organization''s default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.' example: true TaxCreateInput: type: object @@ -24990,6 +26246,19 @@ components: pattern: ^[0-9]+.?[0-9]*$ description: The number of voided credits. example: '5.0' + voided_transaction_id: + type: + - string + - 'null' + format: uuid + description: Unique identifier of the inbound wallet transaction to void. Only available on traceable wallets, and the target transaction must still have a remaining amount. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + priority: + type: integer + minimum: 1 + maximum: 50 + description: 'The priority of the wallet transaction. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.' + example: 50 invoice_requires_successful_payment: type: boolean description: A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false. @@ -25036,6 +26305,7 @@ components: - lago_invoice_id - lago_credit_note_id - lago_voided_invoice_id + - billing_entity_code - status - source - transaction_status @@ -25052,6 +26322,7 @@ components: - metadata - name - payment_method + - purchase_order_number properties: lago_id: type: string @@ -25063,6 +26334,10 @@ components: format: uuid description: Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + billing_entity_code: + type: string + example: default + description: The code of the billing entity associated with the wallet transaction. Falls back to the wallet's billing entity when the transaction does not carry one. lago_invoice_id: type: - string @@ -25212,17 +26487,27 @@ components: type: array items: $ref: '#/components/schemas/WalletTransactionObject' + WalletTransaction: + type: object + required: + - wallet_transaction + properties: + wallet_transaction: + $ref: '#/components/schemas/WalletTransactionObject' WalletTransactionPaymentUrl: type: object required: - - lago_wallet_transaction_id - - lago_customer_id - - external_customer_id - - payment_provider - description: . + - wallet_transaction_payment_details + description: The payment details generated for a wallet transaction. properties: wallet_transaction_payment_details: type: object + required: + - lago_wallet_transaction_id + - lago_customer_id + - external_customer_id + - payment_provider + - payment_url properties: lago_customer_id: type: string @@ -25356,8 +26641,19 @@ components: properties: public_key: type: string - description: Base64-encoded public key used to verify webhook signatures. - example: MEgCQQCo9+BpMRYQ/dL3DS2CyJxRF+j6ctbT3/Qp84+KeFhnii7NT7fELilKUSnxS30WAvQCCo2yU1orfgqr41mM70MBAgMBAAE= + description: The RSA public key used to verify webhook signatures. The key is PEM encoded, then Base64 encoded with line breaks. + example: | + LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3 + MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUFyRVBKd3hlZUJwSmRGSXFyRTBO + MQpnTWxUamNaaTRSeGlwN2FsZ0RqQ3B1M2VlUDU5clZ4TUxmb3ZxVnNndENn + aWZYWGp0WmpFc3NnZVJRejh4TW9MCks1YWY5YjhjTjJlaTNMVlRPMDdxaFRF + YjBjakM3NmhON1NabnF1aTVvS3haNGVOVml4MTZCWXNLb3pyamd2eWEKWDB2 + cUtNNDlGNzM3dloyTld5M1luS2w3cXNTaGs5NGM5bVlFM1creUNMMERSUFQ5 + Z1AxYlliQ1FHc0hZdVV3TgpIQjVxdlM3OFhhUFY5d1doUGNsNzBYSWlreXhR + L3BiZGtpOEhoRUhtRTAxVnJwSFhNQW1zNzBXQkQyT0toVTJICm1rdGZaZVpJ + VmROeU5MUXNacGx3TmphUjZOdWxrdUFyOUZnRStWWXVmL01jUEZYZ1ViRUFt + MkM3emU4Ulp1eUkKb1FJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t + Cg== WebhookPublicKey: type: object required: @@ -25371,12 +26667,15 @@ components: - lago_id - lago_organization_id - webhook_url + - signature_algo + - name + - event_types - created_at properties: lago_id: type: string format: uuid - description: Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system. + description: Unique identifier assigned to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 lago_organization_id: type: string @@ -25389,7 +26688,7 @@ components: example: https://foo.bar signature_algo: type: string - description: The signature algo for the webhook. + description: The algorithm used to sign the webhook payload. example: hmac enum: - jwt @@ -25398,118 +26697,279 @@ components: type: - string - 'null' - description: The name of the webhook. + description: The name of the webhook endpoint. example: EC2-production event_types: type: - array - 'null' - description: A list of event types that will trigger the webhook. Passing null means that all event types will be sent. + description: The list of event types sent to this webhook endpoint. When the value is `null`, every event type is sent. When the value is an empty array, no event is sent. + items: + type: string + example: + - invoice.voided + - customer.created + created_at: + type: string + format: date-time + description: The date of the webhook endpoint creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). + example: '2022-04-29T08:59:51Z' + WebhookEndpointsPaginated: + type: object + required: + - webhook_endpoints + - meta + properties: + webhook_endpoints: + type: array + items: + $ref: '#/components/schemas/WebhookEndpointObject' + meta: + $ref: '#/components/schemas/PaginationMeta' + WebhookEndpointCreateInput: + type: object + required: + - webhook_endpoint + properties: + webhook_endpoint: + type: object + required: + - webhook_url + properties: + webhook_url: + type: string + description: The URL of the webhook endpoint. It must be unique within the organization. + example: https://foo.bar + signature_algo: + type: + - string + - 'null' + description: The algorithm used to sign the webhook payload. Defaults to `jwt` when no value is passed. + default: jwt + example: hmac + enum: + - jwt + - hmac + - null + name: + type: + - string + - 'null' + description: The name of the webhook endpoint. + example: EC2-production + event_types: + type: + - array + - 'null' + description: The list of event types sent to this webhook endpoint. Pass `null` or `["*"]` to receive every event type. An empty array stops every delivery. + items: + type: string + example: + - invoice.voided + - customer.created + WebhookEndpoint: + type: object + required: + - webhook_endpoint + properties: + webhook_endpoint: + $ref: '#/components/schemas/WebhookEndpointObject' + WebhookEndpointUpdateInput: + type: object + required: + - webhook_endpoint + properties: + webhook_endpoint: + type: object + properties: + webhook_url: + type: string + description: The URL of the webhook endpoint. It must be unique within the organization. + example: https://foo.bar + signature_algo: + type: + - string + - 'null' + description: The algorithm used to sign the webhook payload. When the field is omitted, the current value is kept. + example: hmac + enum: + - jwt + - hmac + - null + name: + type: + - string + - 'null' + description: The name of the webhook endpoint. + example: EC2-production + event_types: + type: + - array + - 'null' + description: The list of event types sent to this webhook endpoint. Pass `null` or `["*"]` to receive every event type. An empty array stops every delivery. + items: + type: string + example: + - invoice.voided + - customer.created + AlertCrossedThresholdObject: + type: object + description: A threshold line of the alert, as it was recorded when the webhook was sent. + required: + - code + - value + - recurring + properties: + code: + type: + - string + - 'null' + description: Code identifying the threshold inside the alert. Null when the threshold has no code. + example: warn + value: + type: string + pattern: ^-?[0-9]+(\.[0-9]+)?$ + description: |- + The value of the threshold line, formatted as a BigDecimal. + + The unit depends on the alert type: `billable_metric_current_usage_units` and `billable_metric_lifetime_usage_units` are expressed in units, `wallet_credits_balance` and `wallet_credits_ongoing_balance` in credits, and all other types in cents. + example: '99.0' + recurring: + type: boolean + description: True when the line comes from the recurring threshold of the alert. A recurring threshold produces one line per step, so several lines can share the same code. + example: false + ResolvedAlertObject: + type: object + required: + - lago_id + - lago_organization_id + - lago_alert_id + - lago_subscription_id + - external_subscription_id + - lago_wallet_id + - external_customer_id + - billable_metric_code + - alert_type + - alert_code + - alert_name + - current_value + - previous_value + - recovered_thresholds + - in_alarm_thresholds + - fully_resolved + - reason + - resolved_at + properties: + lago_id: + type: string + format: uuid + description: Unique identifier of the resolution, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + lago_organization_id: + type: string + format: uuid + description: Unique identifier of the organization, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + lago_alert_id: + type: string + format: uuid + description: Unique identifier of the alert, created by Lago. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + lago_subscription_id: + type: + - string + - 'null' + format: uuid + description: Unique identifier of the subscription, created by Lago. Null when the alert is attached to a wallet. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + external_subscription_id: + type: + - string + - 'null' + description: The subscription external unique identifier (provided by your own application). Null when the alert is attached to a wallet. + example: sub_1234567890 + lago_wallet_id: + type: + - string + - 'null' + format: uuid + description: Unique identifier of the wallet, created by Lago. Null when the alert is attached to a subscription. + example: null + external_customer_id: + type: string + description: The customer external unique identifier (provided by your own application). + example: cust_1234567890 + billable_metric_code: + type: + - string + - 'null' + description: The code of the billable metric associated with the alert. Only for alerts based on a billable metric. + example: storage_usage + alert_type: + type: string + description: The type of the resolved alert. + enum: + - current_usage_amount + - billable_metric_current_usage_amount + - billable_metric_current_usage_units + - lifetime_usage_amount + - billable_metric_lifetime_usage_units + - wallet_balance_amount + - wallet_credits_balance + - wallet_ongoing_balance_amount + - wallet_credits_ongoing_balance + example: billable_metric_current_usage_amount + alert_code: + type: string + description: Unique code used to identify the alert. + example: storage_threshold_alert + alert_name: + type: + - string + - 'null' + description: The name of the alert. + example: Storage Usage Alert + current_value: + type: string + description: The value checked when the alert was resolved. For a resolution caused by an alert update, it is the last value checked before the update. Returned as a string formatted as a BigDecimal. + example: '700.0' + previous_value: + type: string + description: The value checked during the previous run. Returned as a string formatted as a BigDecimal. + example: '1200.0' + recovered_thresholds: + type: array + description: The threshold lines that are no longer in alarm and are announced by this resolution. Recurring thresholds never resolve and are never listed. + items: + $ref: '#/components/schemas/AlertCrossedThresholdObject' + in_alarm_thresholds: + type: array + description: Every threshold of the alert still in alarm after this resolution, whether or not it asked for resolutions, named by its code, or by its value when it has no code. The first line of a recurring threshold is included when it is in alarm. The list is empty exactly when `fully_resolved` is true. items: type: string example: - - invoice.voided - - customer.created - created_at: + - warning + fully_resolved: + type: boolean + description: True when no threshold of the alert is in alarm anymore. A consumer that releases a block only when nothing is in alarm can rely on it. + example: false + reason: + type: string + description: |- + Why the alarm was resolved: + - `recovered`: the checked value moved back to the safe side of the thresholds. + - `threshold_updated`: an update of the alert moved the thresholds, so they are no longer in alarm at the last checked value. Nothing changed in the usage or the balance. + - `threshold_removed`: an update of the alert removed the thresholds. + enum: + - recovered + - threshold_updated + - threshold_removed + example: recovered + resolved_at: type: string format: date-time - description: The date of the webhook endpoint creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). - example: '2022-04-29T08:59:51Z' - WebhookEndpointsPaginated: - type: object - required: - - webhook_endpoints - - meta - properties: - webhook_endpoints: - type: array - items: - $ref: '#/components/schemas/WebhookEndpointObject' - meta: - $ref: '#/components/schemas/PaginationMeta' - WebhookEndpointCreateInput: - type: object - properties: - webhook_endpoint: - type: object - required: - - webhook_url - properties: - webhook_url: - type: string - description: The URL of the webhook endpoint. - example: https://foo.bar - signature_algo: - type: - - string - - 'null' - description: The signature used for the webhook. If no value is passed, - example: hmac - enum: - - jwt - - hmac - - null - name: - type: - - string - - 'null' - description: The name of the webhook. - example: EC2-production - event_types: - type: - - array - - 'null' - description: A list of event types that will trigger the webhook. Passing null means that all event types will be sent. - items: - type: string - example: - - invoice.voided - - customer.created - WebhookEndpoint: - type: object - required: - - webhook_endpoint - properties: - webhook_endpoint: - $ref: '#/components/schemas/WebhookEndpointObject' - WebhookEndpointUpdateInput: - type: object - properties: - webhook_endpoint: - type: object - required: - - webhook_url - properties: - webhook_url: - type: string - description: The URL of the webhook endpoint. - example: https://foo.bar - signature_algo: - type: - - string - - 'null' - description: The signature used for the webhook. If no value is passed, - example: hmac - enum: - - jwt - - hmac - - null - name: - type: - - string - - 'null' - description: The name of the webhook. - example: EC2-production - event_types: - type: - - array - - 'null' - description: A list of event types that will trigger the webhook. Passing null means that all event types will be sent. - items: - type: string - example: - - invoice.voided - - customer.created + description: The date and time in UTC (ISO 8601) when Lago resolved the alert. + example: '2025-05-19T10:04:21Z' TriggeredAlertObject: type: object required: @@ -25518,6 +26978,7 @@ components: - lago_alert_id - lago_subscription_id - external_subscription_id + - lago_wallet_id - external_customer_id - billable_metric_code - alert_type @@ -25531,7 +26992,7 @@ components: lago_id: type: string format: uuid - description: Unique identifier of the alert, created by Lago. + description: Unique identifier of the triggered alert, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 lago_organization_id: type: string @@ -25544,14 +27005,25 @@ components: description: Unique identifier of the alert, created by Lago. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 lago_subscription_id: - type: string + type: + - string + - 'null' format: uuid - description: Unique identifier of the subscription, created by Lago. + description: Unique identifier of the subscription, created by Lago. Null when the alert is attached to a wallet. example: 1a901a90-1a90-1a90-1a90-1a901a901a90 external_subscription_id: - type: string - description: The subscription external unique identifier (provided by your own application). + type: + - string + - 'null' + description: The subscription external unique identifier (provided by your own application). Null when the alert is attached to a wallet. example: sub_1234567890 + lago_wallet_id: + type: + - string + - 'null' + format: uuid + description: Unique identifier of the wallet, created by Lago. Null when the alert is attached to a subscription. + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 external_customer_id: type: string description: The customer external unique identifier (provided by your own application). @@ -25587,25 +27059,23 @@ components: description: The name of the alert triggered. example: Storage Usage Alert current_value: - type: number - description: When the system checked if this alert should be triggered, this value was retrieved and checked if any threshold were crossed between this value and previous value. - example: 1200 + type: string + description: When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds crossed since the previous value. Returned as a string formatted as a BigDecimal. + example: '1200.0' previous_value: - type: number - description: During the previous run, this value was retrieved. - example: 900 + type: string + description: During the previous run, this value was retrieved. Returned as a string formatted as a BigDecimal. + example: '900.0' triggered_at: - type: - - string - - 'null' + type: string format: date-time description: The date and time in UTC (ISO 8601) when the system triggered the alert. example: '2025-05-19T10:04:21Z' crossed_thresholds: type: array - description: Array of thresholds crossed. All the recurring threshold values are present. + description: The threshold lines crossed since the previous check. Every recurring line crossed in that interval is present, so one recurring threshold can appear several times. items: - $ref: '#/components/schemas/AlertThresholdObject' + $ref: '#/components/schemas/AlertCrossedThresholdObject' CustomerIntegrationErrorObject: type: object required: @@ -25630,11 +27100,9 @@ components: - anrok - hubspot - netsuite - - okta - - salesforce - xero - description: The type of accounting provider code - example: anrok + description: The type of provider that failed. The CRM error webhook sends `hubspot` under this same key. + example: netsuite accounting_provider_code: type: string description: Code of the accounting provider @@ -25660,22 +27128,27 @@ components: example: 1a901a90-1a90-1a90-1a90-1a901a901a90 external_customer_id: type: string - description: The customer external unique identifier (provided by your own application) + description: The customer external unique identifier (provided by your own application). example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba payment_provider: type: string enum: - adyen - cashfree + - flutterwave - gocardless + - moneyhash - stripe - description: The type of payment provider + description: The type of payment provider the customer is attached to. example: stripe payment_provider_code: - type: string - description: Code of the payment provider - example: Stripe Prod + type: + - string + - 'null' + description: Code of the payment provider connection. It is `null` when no payment provider connection is recorded on the customer, for example when the connection could not be created. + example: stripe-eu-1 provider_error: + description: The error returned by the payment provider. It carries a `message` and an `error_code` key. oneOf: - type: string - type: object @@ -25701,18 +27174,14 @@ components: tax_provider: type: string enum: - - anrock - - hubspot - - netsuite - - okta - - salesforce - - xero + - anrok + - avalara description: The type of tax provider - example: anrock + example: anrok tax_provider_code: type: string description: Code of the tax provider - example: Stripe Prod + example: Anrok Prod provider_error: oneOf: - type: string @@ -25725,11 +27194,20 @@ components: properties: vies_check: type: object + description: Result of the VIES lookup. When VIES answers with a match, the object also carries the details returned by VIES, such as the country code and the VAT number. properties: valid: type: boolean - description: Whether the VIES check was successful + description: Whether VIES recognises the tax identification number of the customer as a valid VAT number. + example: true + valid_format: + type: boolean + description: Whether the tax identification number of the customer has the format of a VAT number. Sent when VIES returned no match or could not be reached. example: true + error: + type: string + description: Message returned when the VIES service could not be reached. Sent only in that case. + example: 'The VIES web service returned the error: rate limit exceeded' CreditNotePaymentProviderRefundError: type: object required: @@ -25795,6 +27273,7 @@ components: - dunning_campaign_code - overdue_balance_cents - overdue_balance_currency + - overdue_balances properties: external_customer_id: type: string @@ -25802,15 +27281,15 @@ components: example: cus_0987654321 dunning_campaign_code: type: string - description: Identifier of the dunning campaign. + description: Unique code used to identify the dunning campaign that finished. example: dun_code_1234 overdue_balance_cents: type: integer - description: The amount of the overdue balance, expressed in cents. + description: The overdue balance held in the customer currency, expressed in cents. Use `overdue_balances` for the amounts held in the other currencies. example: 120 overdue_balance_currency: $ref: '#/components/schemas/Currency' - description: The currency of the balance. + description: The currency of the customer, which is the currency of `overdue_balance_cents`. example: EUR overdue_balances: type: array @@ -25834,10 +27313,9 @@ components: description: HTTP error description. It will always be "Unprocessable entity" example: Unprocessable entity message: - oneOf: - - type: string - - type: object - additionalProperties: true + type: string + description: The validation errors that were detected on the event, serialized as a JSON string. + example: '{"target_wallet_code":["target_wallet_code_not_found"]}' event: $ref: '#/components/schemas/EventObject' EventsErrorsObject: @@ -25870,11 +27348,14 @@ components: example: - transaction_1234567890 missing_group_key: - type: array + type: + - array + - 'null' items: type: string - description: '**Deprecated.** List of event transaction_id with a missing group key.' + description: '**Deprecated.** List of event transaction_id with a missing group key. The key is always sent, and its value is always `null`.' deprecated: true + example: null FeeTaxProviderErrorObject: type: object required: @@ -25885,8 +27366,8 @@ components: properties: tax_provider_code: type: string - description: Code of the tax provider - example: Stripe Prod + description: Code of the tax provider connection that returned the error. + example: Anrok Prod lago_charge_id: type: - string @@ -25906,22 +27387,28 @@ components: - type: object additionalProperties: true InvoicePaymentDisputeLostObject: - allOf: - - $ref: '#/components/schemas/InvoiceObjectExtended' - - type: object - properties: - provider_error: - oneOf: - - type: string - - type: object - additionalProperties: true + type: object + required: + - invoice + properties: + invoice: + $ref: '#/components/schemas/InvoiceObject' + description: The invoice whose payment dispute was lost. + provider_error: + type: string + description: The dispute reason reported by the payment provider. This key is omitted when the dispute is marked as lost without a reason, which is the case when the dispute is lost through the API endpoint. + example: fraudulent InvoicePaymentFailureObject: type: object required: - lago_invoice_id - lago_customer_id - external_customer_id + - provider_customer_id - payment_provider + - payment_provider_code + - provider_error + - error_details properties: lago_invoice_id: type: string @@ -25938,27 +27425,57 @@ components: description: The customer external unique identifier (provided by your own application) example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba provider_customer_id: - type: string - description: Unique identifier of the customer within the payment provider + type: + - string + - 'null' + description: Unique identifier of the customer within the payment provider. It is `null` when the payment failed before the payment provider was called. example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba payment_provider: - type: string + type: + - string + - 'null' enum: - adyen - cashfree - gocardless + - moneyhash - stripe - description: The type of payment provider code + - null + description: The payment provider of the customer. It is `null` when the customer has no payment provider. example: stripe payment_provider_code: - type: string - description: Code of the payment provider - example: Stripe Prod + type: + - string + - 'null' + description: Code of the payment provider connection of the customer. It is `null` when the customer has no payment provider. + example: stripe-eu-1 provider_error: + description: The error returned by the payment provider. It is `null` when the payment failed before the payment provider was called. oneOf: - - type: string + - type: 'null' - type: object additionalProperties: true + properties: + message: + type: + - string + - 'null' + description: The error message returned by the payment provider. + example: Your card was declined. + error_code: + type: + - string + - 'null' + description: The error code returned by the payment provider. + example: card_declined + error_details: + type: + - object + - 'null' + additionalProperties: true + description: Extra details about the failure. It carries `code` set to `customer_must_have_payment_provider` when a payment is retried for a customer without a payment provider, and the details of the provider exception when one was raised. It is `null` when the failure carries no extra details. + example: + code: customer_must_have_payment_provider IntegrationProviderErrorObject: type: object required: @@ -25993,6 +27510,7 @@ components: - payment_provider_code - provider_error - source + - action properties: lago_payment_provider_id: type: string @@ -26001,25 +27519,26 @@ components: example: 1a901a90-1a90-1a90-1a90-1a901a901a90 payment_provider_name: type: string - description: The name of payment provider + description: The name of the payment provider connection. example: Stripe Prod payment_provider_code: type: string - description: Code of the payment provider + description: Code of the payment provider connection. example: stripe source: type: string enum: - stripe - description: The source of the error + description: The payment provider that raised the error. example: stripe action: type: string enum: - payment_provider.register_webhook - description: The action that was being performed when the error occurred + description: The action that was being performed when the error occurred. example: payment_provider.register_webhook provider_error: + description: The error returned by the payment provider. It carries a `message` and a `code` key. oneOf: - type: string - type: object @@ -26065,8 +27584,9 @@ components: - adyen - cashfree - gocardless + - moneyhash - stripe - description: The type of payment provider code + description: The type of payment provider example: stripe payment_provider_code: type: string @@ -26099,6 +27619,11 @@ components: $ref: '#/components/schemas/PlanObject' customer: $ref: '#/components/schemas/CustomerObject' + entitlements: + type: array + description: The feature entitlements of the subscription. Only sent with the `subscription.started` and `subscription.updated` webhooks. + items: + $ref: '#/components/schemas/SubscriptionEntitlementObject' SubscriptionWithThresholdObject: allOf: - $ref: '#/components/schemas/SubscriptionObject' @@ -26107,6 +27632,7 @@ components: - plan - customer - usage_threshold + - applicable_usage_thresholds properties: plan: $ref: '#/components/schemas/PlanObject' @@ -26123,6 +27649,8 @@ components: allOf: - $ref: '#/components/schemas/WalletTransactionObject' - type: object + required: + - wallet properties: wallet: $ref: '#/components/schemas/WalletObject' @@ -26158,8 +27686,9 @@ components: - adyen - cashfree - gocardless + - moneyhash - stripe - description: The type of payment provider code + description: The type of payment provider example: stripe payment_provider_code: type: string @@ -26170,6 +27699,20 @@ components: - type: string - type: object additionalProperties: true + Subscription: + type: object + required: + - subscription + properties: + subscription: + $ref: '#/components/schemas/SubscriptionObject' + SubscriptionEntitlement: + type: object + required: + - entitlement + properties: + entitlement: + $ref: '#/components/schemas/SubscriptionEntitlementObject' responses: Unauthorized: description: Unauthorized error @@ -26177,12 +27720,6 @@ components: application/json: schema: $ref: '#/components/schemas/ApiErrorUnauthorized' - UnprocessableEntity: - description: Unprocessable entity error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorUnprocessableEntity' BadRequest: description: Bad Request error content: @@ -26195,6 +27732,12 @@ components: application/json: schema: $ref: '#/components/schemas/ApiErrorForbidden' + UnprocessableEntity: + description: Unprocessable entity error + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorUnprocessableEntity' NotFound: description: Not Found error content: diff --git a/spec/operations.json b/spec/operations.json index 1f29c6f..05f5a56 100644 --- a/spec/operations.json +++ b/spec/operations.json @@ -17,7 +17,7 @@ "in": "path", "type": "string", "required": true, - "description": "The Activity Id of the existing activity log." + "description": "The unique identifier of the activity log, created by Lago." } ], "idempotent": true, @@ -32,7 +32,7 @@ "method": "GET", "path": "/activity_logs", "summary": "List all activity logs", - "description": "This endpoint retrieves all existing activity logs that represent actions performed on application resources.", + "description": "This endpoint retrieves all existing activity logs that represent actions performed on application resources. Logs are returned from the most recent to the oldest.", "docs_url": "https://getlago.com/docs/api-reference/audit-logs/activity-logs-object", "parameters": [ { @@ -41,7 +41,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -49,7 +49,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "from_date", @@ -57,7 +57,7 @@ "in": "query", "type": "string", "required": false, - "description": "Filter activity logs from a specific date." + "description": "Filter activity logs logged at or after this date. A date or a full ISO 8601 datetime is accepted." }, { "name": "to_date", @@ -65,7 +65,7 @@ "in": "query", "type": "string", "required": false, - "description": "Filter activity logs up to a specific date." + "description": "Filter activity logs logged at or before this date. A date or a full ISO 8601 datetime is accepted." }, { "name": "activity_types[]", @@ -73,7 +73,7 @@ "in": "query", "type": "array", "required": false, - "description": "Filter results by activity types" + "description": "Filter results by activity types." }, { "name": "activity_sources[]", @@ -81,7 +81,7 @@ "in": "query", "type": "array", "required": false, - "description": "Filter results by activity sources" + "description": "Filter results by activity sources." }, { "name": "user_emails[]", @@ -89,7 +89,7 @@ "in": "query", "type": "array", "required": false, - "description": "Filter results by user emails" + "description": "Filter results by the email of the user who performed the activity." }, { "name": "external_customer_id", @@ -113,7 +113,7 @@ "in": "query", "type": "array", "required": false, - "description": "Filter results by resources unique identifiers" + "description": "Filter results by the unique identifiers of the resources the actions were applied to." }, { "name": "resource_types[]", @@ -121,7 +121,7 @@ "in": "query", "type": "array", "required": false, - "description": "Filter results by resource class types" + "description": "Filter results by resource types." } ], "idempotent": true, @@ -149,7 +149,7 @@ "type": "integer", "required": true, "complex": false, - "description": "The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value." + "description": "The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. It must be greater than zero. By creating a one-off invoice, you will be able to override this value." }, { "path": [ @@ -276,9 +276,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -331,7 +333,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name." + "description": "Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name." }, { "path": [ @@ -368,7 +370,7 @@ "method": "DELETE", "path": "/add_ons/{code}", "summary": "Delete an add-on", - "description": "This endpoint is used to delete an existing add-on.", + "description": "This endpoint is used to delete an existing add-on. The fixed charges that use this add-on are deleted too.", "docs_url": "https://getlago.com/docs/api-reference/add-ons/add-on-object", "parameters": [ { @@ -425,7 +427,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -433,7 +435,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, @@ -471,7 +473,7 @@ "type": "integer", "required": false, "complex": false, - "description": "The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value." + "description": "The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. It must be greater than zero. By creating a one-off invoice, you will be able to override this value." }, { "path": [ @@ -598,9 +600,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -653,7 +657,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name." + "description": "Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name." }, { "path": [ @@ -690,7 +694,7 @@ "method": "GET", "path": "/analytics/gross_revenue", "summary": "List gross revenue", - "description": "Gross revenue is the sum of monthly `finalized` invoice payments and fees paid in advance that are not invoiceable. This total is calculated after deducting taxes and discounts.", + "description": "Gross revenue is the monthly sum of the totals of `finalized` invoices and of the amounts of the fees paid in advance that are not attached to an invoice. Invoice totals include taxes, are net of coupons, and are reduced by the amounts refunded through credit notes. Self-billed invoices and invoices with a lost payment dispute are excluded.", "parameters": [ { "name": "currency", @@ -815,9 +819,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -848,6 +854,14 @@ "required": false, "description": "The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level." }, + { + "name": "billing_entity_code", + "flag": "billing-entity-code", + "in": "query", + "type": "string", + "required": false, + "description": "Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization." + }, { "name": "months", "flag": "months", @@ -869,7 +883,7 @@ "method": "GET", "path": "/analytics/invoice_collection", "summary": "List of finalized invoices", - "description": "Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`.", + "description": "Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`. Self-billed invoices and invoices with a lost payment dispute are excluded.\nThis is a premium feature.", "parameters": [ { "name": "currency", @@ -994,9 +1008,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -1019,6 +1035,14 @@ "ZMW" ] }, + { + "name": "billing_entity_code", + "flag": "billing-entity-code", + "in": "query", + "type": "string", + "required": false, + "description": "Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization." + }, { "name": "months", "flag": "months", @@ -1040,7 +1064,7 @@ "method": "GET", "path": "/analytics/invoiced_usage", "summary": "List usage revenue", - "description": "Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts.", + "description": "Reports the monthly revenue generated by usage-based fees, broken down by billable metric. It only counts usage that has already been invoiced, so the usage of the current billing period is not included. Amounts exclude taxes and are net of coupons. Fees on self-billed invoices and on invoices with a lost payment dispute are left out.", "parameters": [ { "name": "currency", @@ -1165,9 +1189,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -1190,6 +1216,14 @@ "ZMW" ] }, + { + "name": "billing_entity_code", + "flag": "billing-entity-code", + "in": "query", + "type": "string", + "required": false, + "description": "Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization." + }, { "name": "months", "flag": "months", @@ -1211,7 +1245,7 @@ "method": "GET", "path": "/analytics/mrr", "summary": "List MRR", - "description": "This endpoint is used to list MRR.", + "description": "Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle:\n\n- Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued.\n- Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing).\n- Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).\n- Revenue from `semiannual` subscription invoices is distributed evenly over six months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).\n- Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.", "parameters": [ { "name": "currency", @@ -1219,7 +1253,7 @@ "in": "query", "type": "string", "required": false, - "description": "Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle:\n\n- Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued.\n- Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing).\n- Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).\n- Revenue from `semiannual` subscription invoices is distributed evenly over six months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).\n- Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.", + "description": "The currency of MRR analytics. Format must be ISO 4217.", "enum": [ "AED", "AFN", @@ -1336,9 +1370,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -1361,6 +1397,14 @@ "ZMW" ] }, + { + "name": "billing_entity_code", + "flag": "billing-entity-code", + "in": "query", + "type": "string", + "required": false, + "description": "Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization." + }, { "name": "months", "flag": "months", @@ -1382,7 +1426,7 @@ "method": "GET", "path": "/analytics/overdue_balance", "summary": "List overdue balance", - "description": "Overdue balance is the total amount associated with overdue invoices (invoices with pending or failed payments which are past their due dates).", + "description": "Overdue balance is the amount still due on invoices that are past their payment due date. Each entry covers one month of payment due dates and sums the invoice totals minus the amounts already paid and minus the credits applied by finalized credit notes. Self-billed invoices are excluded.", "parameters": [ { "name": "currency", @@ -1390,7 +1434,7 @@ "in": "query", "type": "string", "required": false, - "description": "Currency of revenue analytics. Format must be ISO 4217.", + "description": "Filter the overdue balances by the currency of the invoices. Format must be ISO 4217.", "enum": [ "AED", "AFN", @@ -1507,9 +1551,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -1538,7 +1584,15 @@ "in": "query", "type": "string", "required": false, - "description": "The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level." + "description": "The customer external unique identifier (provided by your own application). Use it to restrict the overdue balances to a single customer." + }, + { + "name": "billing_entity_code", + "flag": "billing-entity-code", + "in": "query", + "type": "string", + "required": false, + "description": "Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization." }, { "name": "months", @@ -1561,7 +1615,7 @@ "method": "GET", "path": "/analytics/usage", "summary": "List usage", - "description": "Returns usages.", + "description": "Returns the usage billed by each billable metric, aggregated over the requested period and time granularity.\nThis is a premium feature. On a non-premium license the response always covers the last 30 days with a daily granularity, and only the `billable_metric_code` filter is applied.", "parameters": [ { "name": "time_granularity", @@ -1569,7 +1623,7 @@ "in": "query", "type": "string", "required": false, - "description": "The time granularity of usage analytics. Possible values are 'daily', 'weekly', 'monthly', 'yearly'.", + "description": "The time granularity of usage analytics. Possible values are 'daily', 'weekly' and 'monthly'. Defaults to 'daily'.", "enum": [ "daily", "weekly", @@ -1699,9 +1753,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -2063,8 +2119,8 @@ "operation_id": "findApiLog", "method": "GET", "path": "/api_logs/{request_id}", - "summary": "Retrieve an api log", - "description": "This endpoint retrieves an existing api log that represents a request made to the API. The api log is identified by its unique request_id.", + "summary": "Retrieve an API log", + "description": "This endpoint retrieves an existing API log, which represents a request made to Lago's API. The API log is identified by its request id.", "docs_url": "https://getlago.com/docs/api-reference/audit-logs/api-logs-object", "parameters": [ { @@ -2073,7 +2129,7 @@ "in": "path", "type": "string", "required": true, - "description": "The Request Id of the existing api log." + "description": "The unique identifier of the API log, which is the identifier of the request." } ], "idempotent": true, @@ -2087,8 +2143,8 @@ "operation_id": "findAllApiLogs", "method": "GET", "path": "/api_logs", - "summary": "List all api logs", - "description": "This endpoint retrieves all existing api logs that represent requests performed to Lago's API.", + "summary": "List all API logs", + "description": "This endpoint retrieves all existing API logs, which represent the requests made to Lago's API. Logs older than the retention period of your organization are left out. The retention period is 30 days unless another one was set for your organization.", "docs_url": "https://getlago.com/docs/api-reference/audit-logs/api-logs-object", "parameters": [ { @@ -2097,7 +2153,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -2105,7 +2161,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "from_date", @@ -2113,7 +2169,7 @@ "in": "query", "type": "string", "required": false, - "description": "Filter api logs from a specific date." + "description": "Filter API logs logged at or after this date." }, { "name": "to_date", @@ -2121,7 +2177,7 @@ "in": "query", "type": "string", "required": false, - "description": "Filter api logs up to a specific date." + "description": "Filter API logs logged at or before this date." }, { "name": "http_methods[]", @@ -2129,7 +2185,7 @@ "in": "query", "type": "array", "required": false, - "description": "Filter results by HTTP methods" + "description": "Filter results by HTTP methods." }, { "name": "http_statuses[]", @@ -2137,7 +2193,7 @@ "in": "query", "type": "array", "required": false, - "description": "Filter results by HTTP status or by generic request status" + "description": "Filter results by HTTP status or by generic request status. When `succeeded` or `failed` is passed, the numeric values of the filter are ignored." }, { "name": "api_version", @@ -2145,15 +2201,23 @@ "in": "query", "type": "string", "required": false, - "description": "Filter results by API version" + "description": "Filter results by API version." }, { - "name": "request_paths", + "name": "request_paths[]", "flag": "request-paths", "in": "query", - "type": "string", + "type": "array", "required": false, - "description": "Filter results by the path of the request" + "description": "Filter results by the path of the request. A value containing `*` is matched as a wildcard, otherwise the path must match exactly." + }, + { + "name": "clients[]", + "flag": "clients", + "in": "query", + "type": "array", + "required": false, + "description": "Filter results by the client that issued the request, as reported by its user agent." } ], "idempotent": true, @@ -2221,7 +2285,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.\nAccepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\\` and `*` operations.\nRound is accepting an optional second parameter to specify the number of decimal.\n" + "description": "Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units.\nEvent values are read with `event.code`, `event.timestamp` and `event.properties.\u003cname\u003e`.\nAccepted functions are `ceil`, `concat`, `floor`, `greatest`, `least` and `round` as well as `+`, `-`, `/` and `*` operations.\n`ceil`, `floor` and `round` accept an optional second parameter to specify the number of decimals.\n" }, { "path": [ @@ -2232,7 +2296,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`." + "description": "Property of the billable metric used for aggregating usage data. It is required for every aggregation type except `count_agg`, which ignores it and stores `null`." }, { "path": [ @@ -2241,7 +2305,8 @@ "flag": "filters", "type": "array", "required": false, - "complex": true + "complex": true, + "description": "List of filters of the billable metric. On update, this list replaces the existing filters: a filter that is not sent is deleted." }, { "path": [ @@ -2261,7 +2326,7 @@ "type": "boolean", "required": false, "complex": false, - "description": "Defines if the billable metric is persisted billing period over billing period.\n\n- If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.\n- If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.\n- If not defined in the request, default value is `false`." + "description": "Defines if the billable metric is persisted billing period over billing period.\n\n- If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.\n- If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.\n- If not defined in the request, default value is `false`.\n- It cannot be set to `true` when `aggregation_type` is `count_agg`, `max_agg` or `latest_agg`." }, { "path": [ @@ -2272,7 +2337,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are `round`, `ceil` and `floor`.", + "description": "Rounding applied to the aggregated number of units. Possible values are `round`, `ceil` and `floor`. When it is not set, the units are not rounded.", "enum": [ "ceil", "floor", @@ -2289,7 +2354,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Specifies the number of decimal places to which the `rounding_function` will be rounded. It can be a positive or negative value." + "description": "Number of decimal places kept when `rounding_function` is applied. It can be a positive or negative value, and it defaults to 0." }, { "path": [ @@ -2300,7 +2365,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`.", + "description": "Parameter exclusively utilized in conjunction with the `weighted_sum_agg` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. It is required when `aggregation_type` is `weighted_sum_agg`, and `seconds` is the only accepted value.", "enum": [ "seconds", "" @@ -2345,7 +2410,7 @@ "method": "POST", "path": "/billable_metrics/evaluate_expression", "summary": "Evaluate an expression for a billable metric", - "description": "Evaluate an expression for a billable metric creation by providing the expression and test data", + "description": "This endpoint evaluates an expression against a test event. Use it to check an expression before you set it on a billable metric.", "docs_url": "https://getlago.com/docs/api-reference/billable-metrics/object", "body": { "fields": [ @@ -2356,7 +2421,7 @@ ], "flag": "code", "type": "string", - "required": true, + "required": false, "complex": false, "description": "The code that identifies a targeted billable metric." }, @@ -2367,7 +2432,7 @@ ], "flag": "properties", "type": "object", - "required": true, + "required": false, "complex": true, "description": "This field represents additional properties associated with the event. They can be used when evaluating the expression." }, @@ -2390,7 +2455,7 @@ "type": "string", "required": true, "complex": false, - "description": "Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.\nAccepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\\` and `*` operations.\nRound is accepting an optional second parameter to specify the number of decimal.\n" + "description": "Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units.\nEvent values are read with `event.code`, `event.timestamp` and `event.properties.\u003cname\u003e`.\nAccepted functions are `ceil`, `concat`, `floor`, `greatest`, `least` and `round` as well as `+`, `-`, `/` and `*` operations.\n`ceil`, `floor` and `round` accept an optional second parameter to specify the number of decimals.\n" } ], "required": true @@ -2440,7 +2505,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -2448,7 +2513,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, @@ -2463,7 +2528,7 @@ "method": "PUT", "path": "/billable_metrics/{code}", "summary": "Update a billable metric", - "description": "This endpoint updates an existing billable metric representing a pricing component of your application.", + "description": "This endpoint updates an existing billable metric representing a pricing component of your application.\n\nOnce the billable metric is used by a plan charge, only `name`, `description` and `filters` are applied. The other fields are ignored.", "docs_url": "https://getlago.com/docs/api-reference/billable-metrics/object", "parameters": [ { @@ -2526,7 +2591,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.\nAccepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\\` and `*` operations.\nRound is accepting an optional second parameter to specify the number of decimal.\n" + "description": "Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units.\nEvent values are read with `event.code`, `event.timestamp` and `event.properties.\u003cname\u003e`.\nAccepted functions are `ceil`, `concat`, `floor`, `greatest`, `least` and `round` as well as `+`, `-`, `/` and `*` operations.\n`ceil`, `floor` and `round` accept an optional second parameter to specify the number of decimals.\n" }, { "path": [ @@ -2537,7 +2602,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`." + "description": "Property of the billable metric used for aggregating usage data. It is required for every aggregation type except `count_agg`, which ignores it and stores `null`." }, { "path": [ @@ -2546,7 +2611,8 @@ "flag": "filters", "type": "array", "required": false, - "complex": true + "complex": true, + "description": "List of filters of the billable metric. On update, this list replaces the existing filters: a filter that is not sent is deleted." }, { "path": [ @@ -2566,7 +2632,7 @@ "type": "boolean", "required": false, "complex": false, - "description": "Defines if the billable metric is persisted billing period over billing period.\n\n- If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.\n- If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.\n- If not defined in the request, default value is `false`." + "description": "Defines if the billable metric is persisted billing period over billing period.\n\n- If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.\n- If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.\n- If not defined in the request, default value is `false`.\n- It cannot be set to `true` when `aggregation_type` is `count_agg`, `max_agg` or `latest_agg`." }, { "path": [ @@ -2577,7 +2643,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are `round`, `ceil` and `floor`.", + "description": "Rounding applied to the aggregated number of units. Possible values are `round`, `ceil` and `floor`. When it is not set, the units are not rounded.", "enum": [ "ceil", "floor", @@ -2594,7 +2660,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Specifies the number of decimal places to which the `rounding_function` will be rounded. It can be a positive or negative value." + "description": "Number of decimal places kept when `rounding_function` is applied. It can be a positive or negative value, and it defaults to 0." }, { "path": [ @@ -2605,7 +2671,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`.", + "description": "Parameter exclusively utilized in conjunction with the `weighted_sum_agg` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. It is required when `aggregation_type` is `weighted_sum_agg`, and `seconds` is the only accepted value.", "enum": [ "seconds", "" @@ -2662,7 +2728,7 @@ "type": "string", "required": false, "complex": false, - "description": "The language of the documents generated for this billing entity" + "description": "The language of the documents generated for this billing entity, in the ISO 639-1 format." }, { "path": [ @@ -2673,7 +2739,7 @@ "type": "string", "required": false, "complex": false, - "description": "The footer text to be displayed on invoices for this billing entity" + "description": "The footer text to be displayed on invoices for this billing entity (600 characters max)." }, { "path": [ @@ -2684,7 +2750,7 @@ "type": "integer", "required": false, "complex": false, - "description": "The grace period (in days) for invoice finalization" + "description": "The grace period (in days) for invoice finalization. This is a premium feature, the value is ignored without a premium license." }, { "path": [ @@ -3125,9 +3191,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -3159,7 +3227,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The prefix used in document numbers for this billing entity" + "description": "The prefix used in document numbers for this billing entity (1 to 10 characters). It is upper cased. When it is not provided, Lago builds one from the first three letters of the name and the last four characters of the identifier." }, { "path": [ @@ -3183,7 +3251,7 @@ "type": "boolean", "required": false, "complex": false, - "description": "Whether e-invoicing is enabled for this billing entity" + "description": "Whether e-invoicing is enabled for this billing entity. It can only be enabled when the billing entity country is `FR` or `DE`." }, { "path": [ @@ -3204,7 +3272,7 @@ "type": "array", "required": false, "complex": true, - "description": "The email notification settings for this billing entity" + "description": "The email notification settings for this billing entity. This is a premium feature, the value is ignored without a premium license." }, { "path": [ @@ -3214,7 +3282,7 @@ "type": "boolean", "required": false, "complex": false, - "description": "Whether EU tax management is enabled for this billing entity" + "description": "Whether EU tax management is enabled for this billing entity. It can only be enabled when the billing entity country is in the European Union." }, { "path": [ @@ -3257,7 +3325,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The base64 encoded logo image for the billing entity" + "description": "The base64 encoded logo image for the billing entity. Accepted formats are PNG, JPG and JPEG, up to 800 kB." }, { "path": [ @@ -3320,7 +3388,7 @@ "type": "string", "required": false, "complex": false, - "description": "The timezone of the billing entity", + "description": "The timezone of the billing entity. This is a premium feature, the value is ignored without a premium license.", "enum": [ "UTC", "Africa/Algiers", @@ -3569,7 +3637,7 @@ "type": "string", "required": false, "complex": false, - "description": "The language of the documents generated for this billing entity" + "description": "The language of the documents generated for this billing entity, in the ISO 639-1 format." }, { "path": [ @@ -3580,7 +3648,7 @@ "type": "string", "required": false, "complex": false, - "description": "The footer text to be displayed on invoices for this billing entity" + "description": "The footer text to be displayed on invoices for this billing entity (600 characters max)." }, { "path": [ @@ -3591,7 +3659,7 @@ "type": "integer", "required": false, "complex": false, - "description": "The grace period (in days) for invoice finalization" + "description": "The grace period (in days) for invoice finalization. This is a premium feature, the value is ignored without a premium license." }, { "path": [ @@ -4022,9 +4090,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -4054,9 +4124,8 @@ "flag": "document-number-prefix", "type": "string", "required": false, - "nullable": true, "complex": false, - "description": "The prefix used in document numbers for this billing entity" + "description": "The prefix used in document numbers for this billing entity (1 to 10 characters). It is upper cased. It cannot be removed once the billing entity exists, and sending `null` returns a `422` error." }, { "path": [ @@ -4080,7 +4149,7 @@ "type": "boolean", "required": false, "complex": false, - "description": "Whether e-invoicing is enabled for this billing entity" + "description": "Whether e-invoicing is enabled for this billing entity. It can only be enabled when the billing entity country is `FR` or `DE`." }, { "path": [ @@ -4101,7 +4170,7 @@ "type": "array", "required": false, "complex": true, - "description": "The email notification settings for this billing entity" + "description": "The email notification settings for this billing entity. This is a premium feature, the value is ignored without a premium license." }, { "path": [ @@ -4111,7 +4180,7 @@ "type": "boolean", "required": false, "complex": false, - "description": "Whether EU tax management is enabled for this billing entity" + "description": "Whether EU tax management is enabled for this billing entity. It can only be enabled when the billing entity country is in the European Union." }, { "path": [ @@ -4164,7 +4233,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The base64 encoded logo image for the billing entity. Sending \"null\" will remove the logo, if any exist." + "description": "The base64 encoded logo image for the billing entity. Accepted formats are PNG, JPG and JPEG, up to 800 kB. Sending \"null\" removes the current logo." }, { "path": [ @@ -4216,7 +4285,7 @@ "type": "array", "required": false, "complex": true, - "description": "The tax codes that should be associated with this billing entity" + "description": "The tax codes that should be associated with this billing entity. Codes are matched without case sensitivity, and two codes that differ only by case count as one. An unknown code returns a `404` error." }, { "path": [ @@ -4237,7 +4306,7 @@ "type": "string", "required": false, "complex": false, - "description": "The timezone of the billing entity", + "description": "The timezone of the billing entity. This is a premium feature, the value is ignored without a premium license.", "enum": [ "UTC", "Africa/Algiers", @@ -4416,7 +4485,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type." + "description": "The amount of the coupon in cents. If it is not set, the amount of the coupon is used." }, { "path": [ @@ -4427,7 +4496,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The currency of the coupon. This field is required only for coupon with `fixed_amount` type.", + "description": "The currency of the coupon amount. If it is not set, the currency of the coupon is used.", "enum": [ "", "AED", @@ -4544,9 +4613,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -4598,7 +4669,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.\n\n- If set to `once`, the coupon is applicable only for a single use.\n- If set to `recurring`, the coupon can be used multiple times for recurring billing periods.\n- If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.", + "description": "The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.\n\n- If set to `once`, the coupon is applicable only for a single use.\n- If set to `recurring`, the coupon can be used multiple times for recurring billing periods.\n- If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.\n\nIf it is not set, the frequency of the coupon is used.", "enum": [ "once", "recurring", @@ -4615,7 +4686,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type" + "description": "The number of billing periods to which the coupon applies. If it is not set, the frequency duration of the coupon is used. A `recurring` applied coupon must end up with a frequency duration greater than 0." }, { "path": [ @@ -4626,7 +4697,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type." + "description": "The percentage rate of the coupon. Accepts a number or a decimal string. If it is not set, the percentage rate of the coupon is used." } ], "required": true @@ -4785,9 +4856,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -4918,7 +4991,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type" + "description": "Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type." }, { "path": [ @@ -4939,7 +5012,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type." + "description": "The percentage rate of the coupon. Accepts a number or a decimal string. This field is required only for coupons with a `percentage` coupon type." }, { "path": [ @@ -5055,7 +5128,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -5063,7 +5136,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, @@ -5087,7 +5160,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -5095,7 +5168,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "status", @@ -5138,7 +5211,7 @@ "method": "PUT", "path": "/coupons/{code}", "summary": "Update a coupon", - "description": "This endpoint is used to update a coupon that can be then attached to a customer to create a discount.", + "description": "This endpoint is used to update a coupon that can be then attached to a customer to create a discount.\n\nOnce the coupon has been applied to at least one customer, only `name`, `description`, `expiration` and `expiration_at` are updated. The other fields in the payload are ignored.", "docs_url": "https://getlago.com/docs/api-reference/coupons/coupon-object", "parameters": [ { @@ -5290,9 +5363,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -5423,7 +5498,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type" + "description": "Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type." }, { "path": [ @@ -5444,7 +5519,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type." + "description": "The percentage rate of the coupon. Accepts a number or a decimal string. This field is required only for coupons with a `percentage` coupon type." }, { "path": [ @@ -5471,7 +5546,7 @@ "method": "POST", "path": "/credit_notes", "summary": "Create a credit note", - "description": "This endpoint creates a new credit note.", + "description": "This endpoint creates a new credit note.\nThis is a premium feature.\nA credit note cannot be issued on an invoice in a `pending` or `failed` status. In that case the endpoint returns a `405` error with the `invalid_type_or_status` code.", "docs_url": "https://getlago.com/docs/api-reference/credit-notes/credit-note-object", "body": { "wrapper": "credit_note", @@ -5640,7 +5715,7 @@ "method": "POST", "path": "/credit_notes/{lago_id}/download", "summary": "Download a credit note PDF", - "description": "This endpoint downloads the PDF of an existing credit note.", + "description": "This endpoint downloads the PDF of an existing credit note. Only `finalized` credit notes can be downloaded; any other credit note returns a `404` error.\nWhen the PDF has already been generated, the credit note object is returned and its `file_url` points to the document. When it has not been generated yet, the response is a `200` with an empty body and the generation starts in the background. Call the endpoint again to get the credit note object with its `file_url`.", "docs_url": "https://getlago.com/docs/api-reference/credit-notes/credit-note-object", "parameters": [ { @@ -5664,7 +5739,7 @@ "method": "POST", "path": "/credit_notes/estimate", "summary": "Estimate amounts for a new credit note", - "description": "This endpoint allows you to retrieve amounts for a new credit note creation.", + "description": "This endpoint allows you to retrieve amounts for a new credit note creation.\nThis is a premium feature.\nAmounts cannot be estimated on an invoice in a `pending` or `failed` status. In that case the endpoint returns a `405` error with the `invalid_type_or_status` code.", "docs_url": "https://getlago.com/docs/api-reference/credit-notes/credit-note-object", "body": { "wrapper": "credit_note", @@ -5690,7 +5765,7 @@ "description": "The list of credit note's items." } ], - "required": false + "required": true }, "idempotent": false, "dangerous": false, @@ -5728,7 +5803,7 @@ "method": "GET", "path": "/credit_notes", "summary": "List all credit notes", - "description": "This endpoint list all existing credit notes.", + "description": "This endpoint lists all existing credit notes.", "docs_url": "https://getlago.com/docs/api-reference/credit-notes/credit-note-object", "parameters": [ { @@ -5737,7 +5812,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -5745,7 +5820,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "external_customer_id", @@ -5985,7 +6060,7 @@ ], "flag": "refund-status", "type": "string", - "required": true, + "required": false, "complex": false, "description": "The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:\n\n- `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.\n- `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.\n- `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.", "enum": [ @@ -6050,7 +6125,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -6058,7 +6133,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "status", @@ -6117,7 +6192,7 @@ "method": "POST", "path": "/customers", "summary": "Create a customer", - "description": "This endpoint creates a new customer.", + "description": "This endpoint creates a customer. When a customer with the same `external_id` already exists, it is updated instead, and only the fields present in the payload are changed.", "docs_url": "https://getlago.com/docs/api-reference/customers/object", "body": { "wrapper": "customer", @@ -6130,7 +6205,7 @@ "type": "string", "required": false, "complex": false, - "description": "The type of the account. It can have one of the following values:\n- `customer`: the account is a customer, default value.\n- `partner`: the account is a partner.\n\nThis field is only applied when revenue share is enabled on your organization; otherwise it is ignored.", + "description": "The type of the account. It can have one of the following values:\n- `customer`: the account is a customer, default value.\n- `partner`: the account is a partner.\n\nThis field is only applied when revenue share is enabled on your organization and the customer has no subscription, invoice, add-on, fixed-amount coupon or wallet yet; otherwise it is ignored.", "enum": [ "customer", "partner" @@ -6145,7 +6220,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The first line of the billing address" + "description": "The first line of the billing address (500 characters max)." }, { "path": [ @@ -6156,7 +6231,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The second line of the billing address" + "description": "The second line of the billing address (500 characters max)." }, { "path": [ @@ -6166,6 +6241,7 @@ "flag": "billing-configuration-document-locale", "type": "string", "required": false, + "nullable": true, "complex": false, "description": "The document locale, specified in the ISO 639-1 format. This field represents the language or locale used for the documents issued by Lago" }, @@ -6177,8 +6253,9 @@ "flag": "billing-configuration-invoice-grace-period", "type": "integer", "required": false, + "nullable": true, "complex": false, - "description": "The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items" + "description": "The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items. It is null when the customer has no grace period of its own and falls back to the billing entity. This is a premium feature, the value is ignored without a premium license." }, { "path": [ @@ -6188,15 +6265,17 @@ "flag": "billing-configuration-payment-provider", "type": "string", "required": false, + "nullable": true, "complex": false, - "description": "The payment provider utilized to initiate payments for invoices issued by Lago.\nAccepted values: `stripe`, `adyen`, `cashfree`, `flutterwave`, `gocardless`, `moneyhash` or null. This field is required if you intend to assign a `provider_customer_id`.", + "description": "The payment provider utilized to initiate payments for invoices issued by Lago.\nAccepted values: `stripe`, `adyen`, `cashfree`, `flutterwave`, `gocardless`, `moneyhash` or null. This field is required if you intend to assign a `provider_customer_id`. Send null to detach the customer from its current payment provider.", "enum": [ "stripe", "adyen", "cashfree", "flutterwave", "gocardless", - "moneyhash" + "moneyhash", + "" ] }, { @@ -6207,6 +6286,7 @@ "flag": "billing-configuration-payment-provider-code", "type": "string", "required": false, + "nullable": true, "complex": false, "description": "Unique code used to identify a payment provider connection." }, @@ -6309,7 +6389,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The city of the customer's billing address" + "description": "The city of the customer's billing address (255 characters max)." }, { "path": [ @@ -6700,9 +6780,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -6797,7 +6879,7 @@ "required": false, "nullable": true, "complex": false, - "description": "First name of the customer" + "description": "First name of the customer (255 characters max)." }, { "path": [ @@ -6806,7 +6888,8 @@ "flag": "integration-customers", "type": "array", "required": false, - "complex": true + "complex": true, + "description": "The integration customers to create or update for this customer. Only one entry per `integration_type` is accepted; sending two entries with the same type returns a `422` error with `invalid_count_per_integration_type` on `integration_customers`." }, { "path": [ @@ -6827,7 +6910,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Last name of the customer" + "description": "Last name of the customer (255 characters max)." }, { "path": [ @@ -6838,7 +6921,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The legal company name of the customer" + "description": "The legal company name of the customer (255 characters max)." }, { "path": [ @@ -6870,7 +6953,7 @@ "type": "array", "required": false, "complex": true, - "description": "Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format" + "description": "Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format. A customer can hold up to 5 key-value pairs." }, { "path": [ @@ -6913,9 +6996,7 @@ "flag": "shipping-address-address-line1", "type": "string", "required": false, - "nullable": true, - "complex": false, - "description": "The first line of the billing address" + "complex": false }, { "path": [ @@ -6925,9 +7006,7 @@ "flag": "shipping-address-address-line2", "type": "string", "required": false, - "nullable": true, - "complex": false, - "description": "The second line of the billing address" + "complex": false }, { "path": [ @@ -6937,9 +7016,7 @@ "flag": "shipping-address-city", "type": "string", "required": false, - "nullable": true, - "complex": false, - "description": "The city of the customer's billing address" + "complex": false }, { "path": [ @@ -6951,7 +7028,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)", + "description": "Country code of the customer's shipping address. Format must be ISO 3166 (alpha-2)", "enum": [ "", "AD", @@ -7213,9 +7290,7 @@ "flag": "shipping-address-state", "type": "string", "required": false, - "nullable": true, - "complex": false, - "description": "The state of the customer's billing address" + "complex": false }, { "path": [ @@ -7225,9 +7300,7 @@ "flag": "shipping-address-zipcode", "type": "string", "required": false, - "nullable": true, - "complex": false, - "description": "The zipcode of the customer's billing address" + "complex": false }, { "path": [ @@ -7248,7 +7321,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The state of the customer's billing address" + "description": "The state of the customer's billing address (255 characters max)." }, { "path": [ @@ -7269,7 +7342,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The tax identification number of the customer" + "description": "The tax identification number of the customer (255 characters max)." }, { "path": [ @@ -7280,7 +7353,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone", + "description": "The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone. This is a premium feature, the value is ignored without a premium license.", "enum": [ "", "UTC", @@ -7440,7 +7513,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The zipcode of the customer's billing address" + "description": "The zipcode of the customer's billing address (255 characters max)." } ], "required": true @@ -7457,7 +7530,7 @@ "method": "GET", "path": "/customers/{external_customer_id}/credit_notes", "summary": "List all customer's credit notes", - "description": "This endpoint list all existing credit notes for a customer.", + "description": "This endpoint lists all existing credit notes for a customer.", "docs_url": "https://getlago.com/docs/api-reference/customers/object", "parameters": [ { @@ -7474,7 +7547,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -7482,7 +7555,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "issuing_date_from", @@ -7508,6 +7581,14 @@ "required": false, "description": "Search credit notes by id, number, customer name, customer external_id or customer email." }, + { + "name": "currency", + "flag": "currency", + "in": "query", + "type": "string", + "required": false, + "description": "Filter credit notes by currency. Possible values ISO 4217 currency codes." + }, { "name": "reason", "flag": "reason", @@ -7530,7 +7611,7 @@ "in": "query", "type": "string", "required": false, - "description": "Filter credit notes by credit status. Possible values are `available`, `consumed` or `voided`.", + "description": "Filter credit notes by credit status. Possible values are `available`, `consumed` or `voided`.", "enum": [ "available", "consumed", @@ -7543,7 +7624,7 @@ "in": "query", "type": "string", "required": false, - "description": "Filter credit notes by refund status. Possible values are `pending`, `succeeded` or `failed`.", + "description": "Filter credit notes by refund status. Possible values are `pending`, `succeeded` or `failed`.", "enum": [ "pending", "succeeded", @@ -7582,6 +7663,14 @@ "required": false, "description": "Filter credit notes up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types." }, + { + "name": "types[]", + "flag": "types", + "in": "query", + "type": "array", + "required": false, + "description": "Filter credit notes by the kind of amount they carry. `credit` matches credit notes with a credited amount, `refund` those with a refunded amount and `offset` those with an amount deducted from the invoice balance. A credit note can match several types." + }, { "name": "self_billed", "flag": "self-billed", @@ -7589,6 +7678,14 @@ "type": "boolean", "required": false, "description": "Filter credit notes belonging to a self billed invoice. Possible values are `true` or `false`." + }, + { + "name": "billing_entity_codes[]", + "flag": "billing-entity-codes", + "in": "query", + "type": "array", + "required": false, + "description": "Filter credit notes by billing entity codes." } ], "idempotent": true, @@ -7692,7 +7789,7 @@ "in": "query", "type": "boolean", "required": false, - "description": "When `true`, returns usage since subscription start instead of the current billing period. Requires one of `charge_id`, `charge_code`, `group` (or their deprecated `filter_by_*` equivalents) to be set.\n" + "description": "When `true`, returns usage since the subscription started instead of the current billing period. It requires the granular lifetime usage add-on, at least one of `charge_id`, `charge_code`, `billable_metric_code` or `group` (or their deprecated `filter_by_*` equivalents), and a subscription without prorated charges. The request returns `405` when one of these conditions is not met.\n" }, { "name": "filter_by_presentation", @@ -7780,7 +7877,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -7788,7 +7885,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "amount_from", @@ -7828,12 +7925,23 @@ "in": "query", "type": "string", "required": false, - "description": "Filter invoices by status. Possible values are `draft` or `finalized`.", + "description": "Filter invoices by status. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`.", "enum": [ "draft", - "finalized" + "finalized", + "failed", + "pending", + "voided" ] }, + { + "name": "statuses[]", + "flag": "statuses", + "in": "query", + "type": "array", + "required": false, + "description": "Filter invoices by statuses. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`." + }, { "name": "payment_status", "flag": "payment-status", @@ -7847,6 +7955,14 @@ "succeeded" ] }, + { + "name": "payment_statuses[]", + "flag": "payment-statuses", + "in": "query", + "type": "array", + "required": false, + "description": "Filter invoices by payment statuses. Possible values are `pending`, `failed` or `succeeded`." + }, { "name": "payment_overdue", "flag": "payment-overdue", @@ -7861,7 +7977,7 @@ "in": "query", "type": "string", "required": false, - "description": "Search invoices by id, number, customer name, customer external_id or customer email." + "description": "Search the customer's invoices by id or number. Customer attributes are not searched here, because the list is already scoped to one customer." }, { "name": "payment_dispute_lost", @@ -7895,6 +8011,38 @@ "required": false, "description": "Filter invoices by self billed. Possible values are `true` or `false`." }, + { + "name": "currency", + "flag": "currency", + "in": "query", + "type": "string", + "required": false, + "description": "Filter invoices by currency. Possible values ISO 4217 currency codes." + }, + { + "name": "partially_paid", + "flag": "partially-paid", + "in": "query", + "type": "boolean", + "required": false, + "description": "Filter invoices that are partially paid. When `true`, only invoices with a non-zero amount paid that is below the total due are returned. When `false`, those invoices are excluded." + }, + { + "name": "settlements[]", + "flag": "settlements", + "in": "query", + "type": "array", + "required": false, + "description": "Filter invoices settled by at least one of the given settlement types. `payment` matches invoices settled by a payment, `credit_note` matches invoices settled by a credit note." + }, + { + "name": "billing_entity_codes[]", + "flag": "billing-entity-codes", + "in": "query", + "type": "array", + "required": false, + "description": "Filter invoices by billing entity codes. Possible values are the billing entity codes you have created." + }, { "name": "metadata[key]", "flag": "metadata[key]", @@ -7933,7 +8081,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -7941,7 +8089,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "external_id", @@ -8065,7 +8213,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -8073,7 +8221,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "external_customer_id", @@ -8105,7 +8253,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of past billing period to returns in the result" + "description": "Number of past billing periods to return in the result." } ], "idempotent": true, @@ -8137,7 +8285,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -8145,7 +8293,15 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." + }, + { + "name": "currency", + "flag": "currency", + "in": "query", + "type": "string", + "required": false, + "description": "Filter the results by currency, expressed as an ISO 4217 code." }, { "name": "payment_status", @@ -8198,7 +8354,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -8206,7 +8362,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "invoice_id", @@ -8229,7 +8385,7 @@ "method": "GET", "path": "/customers/{external_customer_id}/portal_url", "summary": "Get a customer portal URL", - "description": "Retrieves an embeddable link for displaying a customer portal.\n\nThis endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal", + "description": "Retrieves an embeddable link for displaying a customer portal.\n\nThis endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal.\n\nThe portal lets the customer update their information and top up their wallets, so when API key permissions are enabled, the API key needs the `write` permission on `customer`.", "docs_url": "https://getlago.com/docs/api-reference/customers/object", "parameters": [ { @@ -8279,6 +8435,46 @@ "type": "boolean", "required": false, "description": "Optional flag to determine if taxes should be applied. Defaults to `true` if not provided or if null.\n" + }, + { + "name": "charge_id", + "flag": "charge-id", + "in": "query", + "type": "string", + "required": false, + "description": "Filter usage to a specific charge by its Lago ID (UUID)." + }, + { + "name": "charge_code", + "flag": "charge-code", + "in": "query", + "type": "string", + "required": false, + "description": "Filter usage to a specific charge by its code." + }, + { + "name": "billable_metric_code", + "flag": "billable-metric-code", + "in": "query", + "type": "string", + "required": false, + "description": "Filter usage to a specific billable metric by its code." + }, + { + "name": "group", + "flag": "group", + "in": "query", + "type": "object", + "required": false, + "description": "Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `group[cloud]=aws`.\n" + }, + { + "name": "filter_by_presentation", + "flag": "filter-by-presentation", + "in": "query", + "type": "string", + "required": false, + "description": "Filter `presentation_breakdowns` by a JSON-encoded array of presentation group key values. Only breakdowns matching the provided values will be returned. Pass an empty array to disable `presentation_breakdowns` entirely.\n" } ], "idempotent": true, @@ -8310,7 +8506,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -8318,7 +8514,23 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." + }, + { + "name": "currency", + "flag": "currency", + "in": "query", + "type": "string", + "required": false, + "description": "Filter the results by currency, expressed as an ISO 4217 code." + }, + { + "name": "external_id", + "flag": "external-id", + "in": "query", + "type": "string", + "required": false, + "description": "The subscription external unique identifier (provided by your own application)." }, { "name": "plan_code", @@ -8328,13 +8540,21 @@ "required": false, "description": "The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans." }, + { + "name": "overridden", + "flag": "overridden", + "in": "query", + "type": "boolean", + "required": false, + "description": "When set, filters subscriptions by whether their plan is an override of a parent plan. `true` returns only subscriptions on overridden plans; `false` returns only those on standard (non-overridden) plans." + }, { "name": "status[]", "flag": "status", "in": "query", "type": "array", "required": false, - "description": "If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`." + "description": "If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`, `incomplete`." }, { "name": "billing_entity_codes[]", @@ -8357,7 +8577,7 @@ "method": "POST", "path": "/plans/{code}/entitlements", "summary": "Create an entitlement", - "description": "This endpoint creates new entitlements by adding features to a plan. Note that all existing entitlements will be deleted and replaced by the ones provided. To add a new entitlement without removing the existing ones, use PATCH. The feature must exist and all privileges must be valid for the feature.", + "description": "This endpoint creates new entitlements by adding features to a plan. Note that all existing entitlements will be deleted and replaced by the ones provided. Sending an empty `entitlements` object, or omitting the key, therefore removes every entitlement of the plan. To add a new entitlement without removing the existing ones, use PATCH. The feature must exist and all privileges must be valid for the feature.", "docs_url": "https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object", "parameters": [ { @@ -8417,7 +8637,7 @@ "method": "DELETE", "path": "/subscriptions/{external_id}/entitlements/{feature_code}", "summary": "Remove an entitlement from a subscription", - "description": "This endpoint removes a specific feature entitlement from a subscription. The entitlement remains available from the plan.", + "description": "This endpoint removes a specific feature entitlement from a subscription. The plan keeps the feature and other subscriptions are not affected, but this subscription stops getting it. It returns the full list of entitlements remaining on the subscription.", "docs_url": "https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object", "parameters": [ { @@ -8442,12 +8662,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -8463,7 +8684,7 @@ "method": "DELETE", "path": "/subscriptions/{external_id}/entitlements/{feature_code}/privileges/{privilege_code}", "summary": "Remove a privilege from a subscription entitlement override", - "description": "This endpoint removes a specific privilege from a subscription entitlement. The privilege entitlement remains available from the plan.", + "description": "This endpoint removes a specific privilege from a subscription entitlement. The plan keeps the privilege and other subscriptions are not affected, but this subscription stops getting it. It returns the full list of entitlements remaining on the subscription.", "docs_url": "https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object", "parameters": [ { @@ -8496,12 +8717,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -8590,12 +8812,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -8651,7 +8874,7 @@ "method": "PATCH", "path": "/plans/{code}/entitlements", "summary": "Partial update of an entitlement", - "description": "This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.", + "description": "This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.", "docs_url": "https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object", "parameters": [ { @@ -8679,7 +8902,7 @@ "method": "PATCH", "path": "/subscriptions/{external_id}/entitlements", "summary": "Update subscription entitlements", - "description": "This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.", + "description": "This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.", "docs_url": "https://getlago.com/docs/api-reference/entitlements/plan-entitlements/plan-entitlement-object", "parameters": [ { @@ -8696,12 +8919,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -8802,6 +9026,17 @@ "complex": false, "description": "The unique identifier of the subscription within your application." }, + { + "path": [ + "precise_total_amount_cents" + ], + "flag": "precise-total-amount-cents", + "type": "string", + "required": false, + "nullable": true, + "complex": false, + "description": "The precise total amount in cents with precision used by the `dynamic` pricing model to compute the estimated usage amount. Defaults to `0` when omitted." + }, { "path": [ "properties" @@ -8888,7 +9123,7 @@ "method": "GET", "path": "/events/{transaction_id}", "summary": "Retrieve a specific event", - "description": "This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription.\n\nNote that transaction_id is unique per external_subscription_id so multiple subscriptions can share the same transaction_id. This endpoint will only return the first event found with the given transaction_id.\n\nWARNING: If your Lago organization is configured to use the Clickhouse-based event pipeline, multiple events can share the same `transaction_id` (with different timestamps). This endpoint will only return the first event found.\n", + "description": "This endpoint is used for retrieving a specific usage measurement event that has been sent to a subscription.\n\nNote that transaction_id is unique per external_subscription_id so multiple subscriptions can share the same transaction_id. This endpoint will only return the first event found with the given transaction_id.\n\nWARNING: If your Lago organization is configured to use the Clickhouse-based event pipeline, multiple events can share the same `transaction_id` (with different timestamps). This endpoint will only return the first event found.\n", "docs_url": "https://getlago.com/docs/api-reference/events/event-object", "parameters": [ { @@ -8921,7 +9156,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -8929,7 +9164,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "external_subscription_id", @@ -8945,7 +9180,7 @@ "in": "query", "type": "string", "required": false, - "description": "Filter events by its code." + "description": "Filter events by code." }, { "name": "timestamp_from_started_at", @@ -8953,7 +9188,7 @@ "in": "query", "type": "boolean", "required": false, - "description": "Requires `external_subscription_id` to be set. Filter events by timestamp after the subscription started at datetime." + "description": "Requires `external_subscription_id` to be set, and cannot be combined with `timestamp_from`. Filter events by timestamp after the subscription started at datetime." }, { "name": "timestamp_from", @@ -8983,8 +9218,8 @@ "operation_id": "createEvent", "method": "POST", "path": "/events", - "summary": "Send usage events", - "description": "This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription.", + "summary": "Send a usage event", + "description": "This endpoint is used for transmitting a usage measurement event to a subscription.", "docs_url": "https://getlago.com/docs/api-reference/events/event-object", "body": { "wrapper": "event", @@ -9039,7 +9274,7 @@ "type": "string", "required": false, "complex": false, - "description": "This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).\nIf this timestamp is not provided, the API will automatically set it to the time of event reception.\nYou can also provide miliseconds precision by appending decimals to the timestamp.\n" + "description": "This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).\nIf this timestamp is not provided, the API will automatically set it to the time of event reception.\nYou can also provide milliseconds precision by appending decimals to the timestamp.\n" }, { "path": [ @@ -9079,7 +9314,7 @@ "type": "string", "required": true, "complex": false, - "description": "Unique code used to identify the feature." + "description": "Unique code used to identify the feature. Max 255 characters." }, { "path": [ @@ -9090,7 +9325,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Internal description of the feature." + "description": "Internal description of the feature. Max 600 characters." }, { "path": [ @@ -9101,7 +9336,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Name of the feature." + "description": "Name of the feature. Max 255 characters." }, { "path": [ @@ -9111,7 +9346,7 @@ "type": "array", "required": false, "complex": true, - "description": "Privileges associated with this feature. Can be empty." + "description": "Privileges associated with this feature. Can be empty. Each privilege code must appear only once in the list." } ], "required": true @@ -9151,8 +9386,8 @@ "operation_id": "deleteFeaturePrivilege", "method": "DELETE", "path": "/features/{code}/privileges/{privilege_code}", - "summary": "Delete a privilege. Deleting a privilege removes it from all plans and subscriptions.", - "description": "Delete privilege from feature. Deleting a privilege removes it from all plans and subscriptions.", + "summary": "Delete a privilege", + "description": "This endpoint deletes a privilege from a feature. Deleting a privilege removes it from all plans and subscriptions.", "docs_url": "https://getlago.com/docs/api-reference/entitlements/features/feature-object", "parameters": [ { @@ -9217,7 +9452,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -9225,7 +9460,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "search_term", @@ -9233,7 +9468,7 @@ "in": "query", "type": "string", "required": false, - "description": "Search in name, code and description." + "description": "Filter features by search term. The term is matched against the name, the code and the description of the feature." } ], "idempotent": true, @@ -9248,7 +9483,7 @@ "method": "PUT", "path": "/features/{code}", "summary": "Update a feature", - "description": "This endpoint updates an existing feature representing an entitlement component of your application.", + "description": "This endpoint updates an existing feature representing an entitlement component of your application. Only the fields present in the payload are updated. Privileges are matched by their code, an unknown code adds a new privilege and a known one updates its name and adds the select options of the payload to the existing ones. The value type of an existing privilege cannot be changed. Privileges left out of the payload are kept, use the delete privilege endpoint to remove one.", "docs_url": "https://getlago.com/docs/api-reference/entitlements/features/feature-object", "parameters": [ { @@ -9272,7 +9507,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Internal description of the feature." + "description": "Internal description of the feature. Max 600 characters." }, { "path": [ @@ -9283,7 +9518,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Name of the feature." + "description": "Name of the feature. Max 255 characters." }, { "path": [ @@ -9293,7 +9528,7 @@ "type": "array", "required": false, "complex": true, - "description": "Privileges associated with this feature. Can be empty." + "description": "Privileges associated with this feature. Can be empty. Each privilege code must appear only once in the list." } ], "required": true @@ -9367,7 +9602,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -9375,7 +9610,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "external_customer_id", @@ -9524,9 +9759,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -9664,7 +9901,7 @@ "method": "PUT", "path": "/fees/{lago_id}", "summary": "Update a fee", - "description": "This endpoint is used for updating a specific fee that has been issued.", + "description": "This endpoint is used for updating the payment status of a specific fee. Only a fee that is not attached to an invoice can be updated; once the fee is on an invoice, its payment status follows the invoice and the endpoint returns a `405` error.", "docs_url": "https://getlago.com/docs/api-reference/invoices/invoice-object#fee-object", "parameters": [ { @@ -9696,7 +9933,7 @@ ] } ], - "required": false + "required": true }, "idempotent": false, "dangerous": false, @@ -9850,9 +10087,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -10003,7 +10242,7 @@ "method": "POST", "path": "/invoices/{lago_id}/download", "summary": "Download an invoice PDF", - "description": "This endpoint is used for downloading a specific invoice PDF document.", + "description": "This endpoint is used for downloading a specific invoice PDF document. Only `finalized` invoices can be downloaded; any other invoice returns a `404` error.\nWhen the PDF has already been generated, the invoice object is returned and its `file_url` points to the document. When it has not been generated yet, the response is a `200` with an empty body and the generation starts in the background. Call the endpoint again to get the invoice object with its `file_url`.", "docs_url": "https://getlago.com/docs/api-reference/invoices/invoice-object", "parameters": [ { @@ -10084,7 +10323,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -10092,7 +10331,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "external_customer_id", @@ -10134,6 +10373,21 @@ "required": false, "description": "Filter invoices up to a specific date." }, + { + "name": "status", + "flag": "status", + "in": "query", + "type": "string", + "required": false, + "description": "Filter invoices by status. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`.", + "enum": [ + "draft", + "finalized", + "failed", + "pending", + "voided" + ] + }, { "name": "statuses[]", "flag": "statuses", @@ -10142,6 +10396,19 @@ "required": false, "description": "Filter invoices by statuses. Possible values are `draft`, `failed`, `finalized`, `pending` and `voided`." }, + { + "name": "payment_status", + "flag": "payment-status", + "in": "query", + "type": "string", + "required": false, + "description": "Filter invoices by payment status. Possible values are `pending`, `failed` or `succeeded`.", + "enum": [ + "pending", + "failed", + "succeeded" + ] + }, { "name": "payment_statuses[]", "flag": "payment-statuses", @@ -10164,7 +10431,7 @@ "in": "query", "type": "string", "required": false, - "description": "Search invoices by id, number, customer name, customer external_id or customer email." + "description": "Search invoices by id, number, purchase order number, or by the name, legal name, first name, last name, external_id or email of the customer." }, { "name": "currency", @@ -10766,9 +11033,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -10834,7 +11103,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The first line of the billing address" + "description": "The first line of the shipping address" }, { "path": [ @@ -10847,7 +11116,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The second line of the billing address" + "description": "The second line of the shipping address" }, { "path": [ @@ -10860,7 +11129,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The city of the customer's billing address" + "description": "The city of the customer's shipping address" }, { "path": [ @@ -10873,7 +11142,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)", + "description": "Country code of the customer's shipping address. Format must be ISO 3166 (alpha-2)", "enum": [ "", "AD", @@ -11138,7 +11407,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The state of the customer's billing address" + "description": "The state of the customer's shipping address" }, { "path": [ @@ -11151,7 +11420,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The zipcode of the customer's billing address" + "description": "The zipcode of the customer's shipping address" }, { "path": [ @@ -11323,6 +11592,17 @@ "Pacific/Tongatapu" ] }, + { + "path": [ + "customer", + "zipcode" + ], + "flag": "zipcode", + "type": "string", + "required": false, + "complex": false, + "description": "The zipcode of the customer's billing address." + }, { "path": [ "plan_code" @@ -11636,7 +11916,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -11644,7 +11924,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "status[]", @@ -11899,7 +12179,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -11907,7 +12187,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "status[]", @@ -12024,7 +12304,7 @@ "method": "PUT", "path": "/organizations", "summary": "Update your organization", - "description": "This endpoint is used to update your own organization's settings.", + "description": "This endpoint is used to update your own organization's settings. The same payload is also applied to the default billing entity of your organization.", "docs_url": "https://getlago.com/docs/api-reference/organizations/organization-object", "body": { "wrapper": "organization", @@ -12072,7 +12352,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The customer invoice message that appears at the bottom of each billing documents." + "description": "The customer invoice message that appears at the bottom of each billing documents. It accepts up to 600 characters." }, { "path": [ @@ -12083,7 +12363,7 @@ "type": "integer", "required": false, "complex": false, - "description": "The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period." + "description": "The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period. This is a premium feature, the value is ignored without a premium license." }, { "path": [ @@ -12484,9 +12764,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -12517,7 +12799,7 @@ "type": "string", "required": false, "complex": false, - "description": "Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four digits of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago." + "description": "Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four characters of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago." }, { "path": [ @@ -12552,7 +12834,7 @@ "type": "array", "required": false, "complex": true, - "description": "Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values are `invoice.finalized`, `credit_note.created` and `payment_receipt.created`." + "description": "Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values are `invoice.finalized`, `credit_note.created` and `payment_receipt.created`. This is a premium feature, the value is ignored without a premium license." }, { "path": [ @@ -12604,7 +12886,7 @@ "type": "string", "required": false, "complex": false, - "description": "A concise and unique identifier for your organization, used as a prefix in customer slugs." + "description": "A concise and unique identifier for your organization. It must contain between 3 and 40 characters, limited to lowercase letters, digits and hyphens, and it must start and end with a letter or a digit. Lago trims it and converts it to lowercase before saving it. A value already taken by another organization, or one of the names Lago reserves for its own routes, is rejected." }, { "path": [ @@ -12636,7 +12918,7 @@ "type": "string", "required": false, "complex": false, - "description": "Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.", + "description": "Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. This is a premium feature, the value is ignored without a premium license.", "enum": [ "UTC", "Africa/Algiers", @@ -12782,9 +13064,8 @@ "flag": "webhook-url", "type": "string", "required": false, - "nullable": true, "complex": false, - "description": "The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner." + "description": "Sets the URL of the first webhook endpoint of your organization. This URL allows your organization to receive important messages, notifications, or data from the Lago system. When your organization has no webhook endpoint yet, this creates one." }, { "path": [ @@ -12844,7 +13125,7 @@ "method": "GET", "path": "/customers/{external_customer_id}/payment_methods", "summary": "List all customer payment methods", - "description": "This endpoint retrieves all payment methods of a Customer.", + "description": "This endpoint retrieves all payment methods of a customer.", "docs_url": "https://getlago.com/docs/api-reference/payment-methods/payment-method-object", "parameters": [ { @@ -12861,7 +13142,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -12869,7 +13150,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, @@ -12884,7 +13165,7 @@ "method": "PUT", "path": "/customers/{external_customer_id}/payment_methods/{lago_id}/set_as_default", "summary": "Set the payment method as default", - "description": "Use the payment method as default when not selected a payment method", + "description": "This endpoint sets a payment method as the customer's default one. It is the payment method Lago uses when a payment is triggered without an explicit one. Any other default payment method of the customer is unset.", "docs_url": "https://getlago.com/docs/api-reference/payment-methods/payment-method-object", "parameters": [ { @@ -12925,7 +13206,7 @@ "in": "path", "type": "string", "required": true, - "description": "Payment receipt ID" + "description": "Unique identifier of the payment receipt." } ], "idempotent": true, @@ -12949,7 +13230,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -12957,7 +13238,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "invoice_id", @@ -12965,7 +13246,7 @@ "in": "query", "type": "string", "required": false, - "description": "Filter payment receipts by invoice id." + "description": "Filter payment receipts by invoice. It returns the receipts of the payments made on this invoice, including the payments made through a payment request that covers it." } ], "idempotent": true, @@ -12980,7 +13261,7 @@ "method": "POST", "path": "/payment_requests", "summary": "Create a payment request", - "description": "This endpoint is used to create a payment request to collect payments of overdue invoices of a given customer", + "description": "This endpoint is used to create a payment request to collect the payment of the overdue invoices of a customer.", "docs_url": "https://getlago.com/docs/api-reference/payment-requests/payment-request-object", "body": { "wrapper": "payment_request", @@ -12991,9 +13272,9 @@ ], "flag": "email", "type": "string", - "required": true, + "required": false, "complex": false, - "description": "The customer's email address used for sending dunning notifications" + "description": "The email address used for sending dunning notifications. When omitted, the customer's own email address is used." }, { "path": [ @@ -13003,7 +13284,7 @@ "type": "string", "required": true, "complex": false, - "description": "The customer external unique identifier (provided by your own application)" + "description": "The customer external unique identifier (provided by your own application)." }, { "path": [ @@ -13013,7 +13294,7 @@ "type": "array", "required": true, "complex": true, - "description": "A list of Lago IDs for the customer's overdue invoices to start the dunning process" + "description": "A list of Lago IDs for the customer's overdue invoices to start the dunning process." }, { "path": [ @@ -13089,7 +13370,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -13097,7 +13378,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "currency", @@ -13162,7 +13443,7 @@ "type": "integer", "required": true, "complex": false, - "description": "The payment amount in cents" + "description": "The payment amount in cents. It must be greater than zero." }, { "path": [ @@ -13172,7 +13453,7 @@ "type": "string", "required": true, "complex": false, - "description": "Unique identifier assigned to the invoice" + "description": "Unique identifier of the invoice the payment is recorded on, created by Lago." }, { "path": [ @@ -13182,7 +13463,7 @@ "type": "string", "required": false, "complex": false, - "description": "The date the payment was made" + "description": "The date the payment was made. It is returned as the payment's `created_at`. When omitted, the date and time of the request is used." }, { "path": [ @@ -13192,7 +13473,7 @@ "type": "string", "required": true, "complex": false, - "description": "Reference for the payment" + "description": "Reference for the payment, such as the bank transfer or cheque number." } ], "required": true @@ -13242,7 +13523,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -13250,7 +13531,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "external_customer_id", @@ -13298,7 +13579,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -13306,7 +13587,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, @@ -13461,9 +13742,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -13779,7 +14062,7 @@ ], "flag": "code", "type": "string", - "required": false, + "required": true, "complex": false, "description": "Unique code identifying the charge within the plan." }, @@ -14083,7 +14366,7 @@ "type": "boolean", "required": false, "complex": false, - "description": "This field determines whether the creation of the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`." + "description": "This field determines whether the creation of the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints." }, { "path": [ @@ -14340,7 +14623,7 @@ ], "flag": "charge-model", "type": "string", - "required": false, + "required": true, "complex": false, "description": "Specifies the pricing model used for the calculation of the fixed charge fee. It can be any of the following values:\n - `standard`\n - `graduated`\n - `volume`\n", "enum": [ @@ -14355,7 +14638,7 @@ ], "flag": "code", "type": "string", - "required": false, + "required": true, "complex": false, "description": "Unique code identifying the fixed charge within the plan." }, @@ -14840,7 +15123,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -14848,7 +15131,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, @@ -14880,7 +15163,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -14888,7 +15171,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, @@ -15040,7 +15323,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -15048,7 +15331,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, @@ -15269,9 +15552,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -15504,7 +15789,7 @@ "method": "PUT", "path": "/plans/{code}/charges/{charge_code}", "summary": "Update a charge", - "description": "This endpoint updates a specific charge for a plan.", + "description": "This endpoint updates a specific charge for a plan.\n\nThe payload replaces the charge configuration: `charge_model` must be sent on every update, and `invoice_display_name` is cleared when it is left out.\n\nOnce the plan is attached to a subscription, only `invoice_display_name`, `properties`, `filters`, `tax_codes`, `applied_pricing_unit` and `accepts_target_wallet` are applied. The other fields are ignored.", "docs_url": "https://getlago.com/docs/api-reference/plans/object", "parameters": [ { @@ -15917,7 +16202,7 @@ "type": "boolean", "required": false, "complex": false, - "description": "This field determines whether the changes made to the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`." + "description": "This field determines whether the changes made to the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints." }, { "path": [ @@ -16113,7 +16398,7 @@ "method": "PUT", "path": "/plans/{code}/fixed_charges/{fixed_charge_code}", "summary": "Update a fixed charge", - "description": "This endpoint updates a specific fixed charge for a plan.", + "description": "This endpoint updates a specific fixed charge for a plan.\n\nThe payload replaces the fixed charge configuration: `units` and `charge_model` must be sent on every update, and `invoice_display_name` is cleared when it is left out.\n\nOnce the plan is attached to a subscription, `code` and `charge_model` are ignored.", "docs_url": "https://getlago.com/docs/api-reference/plans/object", "parameters": [ { @@ -16540,7 +16825,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -16548,7 +16833,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "status[]", @@ -16635,7 +16920,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -16643,7 +16928,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, @@ -16698,18 +16983,35 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] + }, + { + "name": "page", + "flag": "page", + "in": "query", + "type": "integer", + "required": false, + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." + }, + { + "name": "per_page", + "flag": "per-page", + "in": "query", + "type": "integer", + "required": false, + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, "dangerous": false, - "paginated": false, + "paginated": true, "mutation": false }, { @@ -16736,7 +17038,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -16744,7 +17046,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "subscription_status", @@ -16752,12 +17054,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -17093,9 +17396,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -17166,18 +17471,6 @@ "complex": false, "description": "Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name." }, - { - "path": [ - "subscription", - "plan_overrides", - "metadata" - ], - "flag": "plan-overrides-metadata", - "type": "object", - "required": false, - "complex": true, - "description": "Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null." - }, { "path": [ "subscription", @@ -17342,12 +17635,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -17391,12 +17685,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -17411,7 +17706,7 @@ "type": "boolean", "required": false, "complex": false, - "description": "This field determines whether the creation of the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`." + "description": "This field determines whether the creation of the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints." }, { "path": [ @@ -17624,12 +17919,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -17670,12 +17966,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -17724,12 +18021,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -17770,7 +18068,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -17778,7 +18076,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "subscription_status", @@ -17786,12 +18084,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -17824,7 +18123,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -17832,7 +18131,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "subscription_status", @@ -17840,12 +18139,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -17878,12 +18178,13 @@ "in": "query", "type": "string", "required": false, - "description": "By default, this endpoint only return `active` subscriptions. If you want to retrieve a subscription with a different `status`, you can specify it here.\n\n_Note: As there may exists multiple `canceled` or `terminated` subscribtions for the same `external_id`, it is recommended to use the \"List all subscriptions\" endpoint to retrieve those subscriptions._\n", + "description": "By default, this endpoint only returns `active` subscriptions. If you want to retrieve a subscription with a different `status`, you can specify it here.\n\n_Note: As there may exist multiple `canceled` or `terminated` subscriptions for the same `external_id`, it is recommended to use the \"List all subscriptions\" endpoint to retrieve those subscriptions._\n", "enum": [ "active", "terminated", "pending", - "canceled" + "canceled", + "incomplete" ] } ], @@ -17924,12 +18225,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -17970,12 +18272,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -18024,12 +18327,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -18070,12 +18374,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -18124,7 +18429,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -18132,7 +18437,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "currency", @@ -18180,7 +18485,7 @@ "in": "query", "type": "array", "required": false, - "description": "If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`." + "description": "If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`, `incomplete`." }, { "name": "billing_entity_codes[]", @@ -18188,7 +18493,7 @@ "in": "query", "type": "array", "required": false, - "description": "Filter subscriptions by billing entity codes." + "description": "Filter subscriptions by billing entity codes. A code that does not match a billing entity of the organization returns a `404` error." } ], "idempotent": true, @@ -18228,12 +18533,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -18511,12 +18817,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -18762,10 +19069,11 @@ "in": "query", "type": "string", "required": false, - "description": "When a pay-in-advance subscription is terminated before the end of its billing period, we generate a credit note for the unused subscription time by default.\nThis field allows you to control the behavior of the credit note generation:\n\n- `credit`: A credit note is generated for the unused subscription time. The unused amount is credited back to the customer.\n- `refund`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.\n- `skip`: No credit note is generated for the unused subscription time.\n\n_Note: This field is only applicable to pay-in-advance plans and is ignored for pay-in-arrears plans._\n", + "description": "When a pay-in-advance subscription is terminated before the end of its billing period, we generate a credit note for the unused subscription time by default.\nThis field allows you to control the behavior of the credit note generation:\n\n- `credit`: A credit note is generated for the unused subscription time. The unused amount is credited back to the customer.\n- `refund`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.\n- `offset`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due.\n- `skip`: No credit note is generated for the unused subscription time.\n\n_Note: This field is only applicable to pay-in-advance plans and is ignored for pay-in-arrears plans._\n", "enum": [ "credit", "refund", + "offset", "skip" ] }, @@ -18811,7 +19119,7 @@ "in": "query", "type": "string", "required": false, - "description": "By default, this endpoint only return `active` subscriptions. If you want to update a subscription with a different `status`, you can specify it here.\n", + "description": "By default, this endpoint only updates `active` subscriptions. If you want to update a subscription with a different `status`, you can specify it here.\n", "enum": [ "active", "pending" @@ -18915,6 +19223,38 @@ "complex": false, "description": "The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan." }, + { + "path": [ + "subscription", + "on_termination_credit_note" + ], + "flag": "on-termination-credit-note", + "type": "string", + "required": false, + "complex": false, + "description": "Sets the default credit note behaviour applied when this subscription is later terminated before the end of its billing period:\n\n- `credit`: a credit note is generated for the unused subscription time. The unused amount is credited back to the customer.\n- `refund`: a credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.\n- `offset`: a credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is applied to the invoice reducing its amount due.\n- `skip`: no credit note is generated for the unused subscription time.\n\n_Note: This field is only applied to pay-in-advance plans and is ignored for pay-in-arrears plans._\n", + "enum": [ + "credit", + "refund", + "offset", + "skip" + ] + }, + { + "path": [ + "subscription", + "on_termination_invoice" + ], + "flag": "on-termination-invoice", + "type": "string", + "required": false, + "complex": false, + "description": "Sets the default invoice behaviour applied when this subscription is later terminated before the end of its billing period:\n\n- `generate`: an invoice is generated for the unbilled usage.\n- `skip`: no invoice is generated for the unbilled usage.\n", + "enum": [ + "generate", + "skip" + ] + }, { "path": [ "subscription", @@ -19082,9 +19422,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -19155,18 +19497,6 @@ "complex": false, "description": "Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name." }, - { - "path": [ - "subscription", - "plan_overrides", - "metadata" - ], - "flag": "plan-overrides-metadata", - "type": "object", - "required": false, - "complex": true, - "description": "Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null." - }, { "path": [ "subscription", @@ -19314,7 +19644,7 @@ "method": "PUT", "path": "/subscriptions/{external_id}/alerts/{code}", "summary": "Update a subscription alert", - "description": "This endpoint allows you to update an existing alert for a subscription.", + "description": "This endpoint allows you to update an existing alert for a subscription. A non-empty `thresholds` array replaces the whole set of thresholds on the alert. When `thresholds` is left out, or sent as an empty array, the thresholds already on the alert are kept. A threshold sent with a `code` it already had, and without `notify_on`, keeps the `notify_on` it had.", "docs_url": "https://getlago.com/docs/api-reference/subscriptions/subscription-object", "parameters": [ { @@ -19339,12 +19669,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -19391,7 +19722,7 @@ "type": "array", "required": false, "complex": true, - "description": "Array of thresholds associated with the alert." + "description": "Array of thresholds associated with the alert. An alert accepts at most 20 thresholds, and a larger array returns a `422` error with `too_many_thresholds` on `thresholds`. Two thresholds cannot share the same value and the same `recurring` flag. The value of a recurring threshold must be positive." } ], "required": true @@ -19441,12 +19772,13 @@ "in": "query", "type": "string", "required": false, - "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.\n", + "description": "Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, `canceled`, or `incomplete`.\n", "enum": [ "pending", "active", "terminated", - "canceled" + "canceled", + "incomplete" ] } ], @@ -19461,7 +19793,7 @@ "type": "boolean", "required": false, "complex": false, - "description": "This field determines whether the changes made to the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`." + "description": "This field determines whether the changes made to the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`. This field only applies to plan charge filters and is ignored on the subscription charge filter endpoints." }, { "path": [ @@ -19697,7 +20029,7 @@ "method": "POST", "path": "/taxes", "summary": "Create a tax", - "description": "This endpoint creates a new tax representing a customizable tax rate applicable to either the organization or a specific customer.", + "description": "This endpoint creates a new tax representing a customizable tax rate applicable to either a billing entity or a specific customer.", "docs_url": "https://getlago.com/docs/api-reference/taxes/tax-object", "body": { "wrapper": "tax", @@ -19710,7 +20042,7 @@ "type": "boolean", "required": false, "complex": false, - "description": "**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead." + "description": "**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. When set to false on an update, it removes the tax from the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead." }, { "path": [ @@ -19731,7 +20063,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Internal description of the tax" + "description": "Internal description of the tax." }, { "path": [ @@ -19751,7 +20083,7 @@ "type": "string", "required": true, "complex": false, - "description": "The percentage rate of the tax" + "description": "The percentage rate of the tax. Accepts a number or a decimal string." } ], "required": true @@ -19791,8 +20123,8 @@ "operation_id": "findTax", "method": "GET", "path": "/taxes/{code}", - "summary": "Retrieve a Tax", - "description": "This endpoint retrieves an existing tax representing a customizable tax rate applicable to either the organization or a specific customer. The tax is identified by its unique code.", + "summary": "Retrieve a tax", + "description": "This endpoint retrieves an existing tax representing a customizable tax rate applicable to either a billing entity or a specific customer. The tax is identified by its unique code.", "docs_url": "https://getlago.com/docs/api-reference/taxes/tax-object", "parameters": [ { @@ -19816,7 +20148,7 @@ "method": "GET", "path": "/taxes", "summary": "List all taxes", - "description": "This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either the organization or a specific customer.", + "description": "This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either a billing entity or a specific customer.", "docs_url": "https://getlago.com/docs/api-reference/taxes/tax-object", "parameters": [ { @@ -19825,7 +20157,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -19833,7 +20165,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, @@ -19848,7 +20180,7 @@ "method": "PUT", "path": "/taxes/{code}", "summary": "Update a tax", - "description": "This endpoint updates an existing tax representing a customizable tax rate applicable to either the organization or a specific customer.", + "description": "This endpoint updates an existing tax representing a customizable tax rate applicable to either a billing entity or a specific customer.", "docs_url": "https://getlago.com/docs/api-reference/taxes/tax-object", "parameters": [ { @@ -19871,7 +20203,7 @@ "type": "boolean", "required": false, "complex": false, - "description": "**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead." + "description": "**Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. When set to false on an update, it removes the tax from the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead." }, { "path": [ @@ -19892,7 +20224,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Internal description of the tax" + "description": "Internal description of the tax." }, { "path": [ @@ -19912,7 +20244,7 @@ "type": "string", "required": false, "complex": false, - "description": "The percentage rate of the tax" + "description": "The percentage rate of the tax. Accepts a number or a decimal string." } ], "required": true @@ -19987,7 +20319,7 @@ "type": "string", "required": false, "complex": false, - "description": "The currency of the wallet.", + "description": "The currency of the wallet. Required when the customer has no currency yet. When omitted, the wallet uses the customer's currency. When provided on a customer without a currency, it also sets the customer's currency.", "enum": [ "AED", "AFN", @@ -20104,9 +20436,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -20146,7 +20480,7 @@ ], "flag": "external-customer-id", "type": "string", - "required": false, + "required": true, "complex": false, "description": "The customer external unique identifier (provided by your own application)" }, @@ -20245,7 +20579,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Maximum amount of cents that can be top-up with a single paid transaction." + "description": "The maximum amount, in cents, of a single paid top-up transaction." }, { "path": [ @@ -20256,7 +20590,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Minimum amount of cents that can be top-up with a single paid transaction." + "description": "The minimum amount, in cents, of a single paid top-up transaction." }, { "path": [ @@ -20292,7 +20626,7 @@ "type": "integer", "required": false, "complex": false, - "description": "Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50." + "description": "Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first." }, { "path": [ @@ -20311,7 +20645,7 @@ ], "flag": "rate-amount", "type": "string", - "required": false, + "required": true, "complex": false, "description": "The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction." }, @@ -20324,7 +20658,7 @@ "required": false, "nullable": true, "complex": true, - "description": "List of recurring transaction rules. Currently, we only allow one recurring rule per wallet." + "description": "List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license." }, { "path": [ @@ -20347,6 +20681,16 @@ "nullable": true, "complex": false, "description": "The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`." + }, + { + "path": [ + "transaction_priority" + ], + "flag": "transaction-priority", + "type": "integer", + "required": false, + "complex": false, + "description": "The priority of the wallet transactions triggered when creating the wallet. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50." } ], "required": true @@ -20431,7 +20775,7 @@ "type": "string", "required": false, "complex": false, - "description": "The currency of the wallet.", + "description": "The currency of the wallet. Required when the customer has no currency yet. When omitted, the wallet uses the customer's currency. When provided on a customer without a currency, it also sets the customer's currency.", "enum": [ "AED", "AFN", @@ -20548,9 +20892,11 @@ "SOS", "SRD", "STD", + "SYP", "SZL", "THB", "TJS", + "TND", "TOP", "TRY", "TTD", @@ -20590,7 +20936,7 @@ ], "flag": "external-customer-id", "type": "string", - "required": false, + "required": true, "complex": false, "description": "The customer external unique identifier (provided by your own application)" }, @@ -20689,7 +21035,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Maximum amount of cents that can be top-up with a single paid transaction." + "description": "The maximum amount, in cents, of a single paid top-up transaction." }, { "path": [ @@ -20700,7 +21046,7 @@ "required": false, "nullable": true, "complex": false, - "description": "Minimum amount of cents that can be top-up with a single paid transaction." + "description": "The minimum amount, in cents, of a single paid top-up transaction." }, { "path": [ @@ -20736,7 +21082,7 @@ "type": "integer", "required": false, "complex": false, - "description": "Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50." + "description": "Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first." }, { "path": [ @@ -20755,7 +21101,7 @@ ], "flag": "rate-amount", "type": "string", - "required": false, + "required": true, "complex": false, "description": "The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction." }, @@ -20768,7 +21114,7 @@ "required": false, "nullable": true, "complex": true, - "description": "List of recurring transaction rules. Currently, we only allow one recurring rule per wallet." + "description": "List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license." }, { "path": [ @@ -20791,6 +21137,16 @@ "nullable": true, "complex": false, "description": "The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`." + }, + { + "path": [ + "transaction_priority" + ], + "flag": "transaction-priority", + "type": "integer", + "required": false, + "complex": false, + "description": "The priority of the wallet transactions triggered when creating the wallet. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50." } ], "required": true @@ -20959,6 +21315,16 @@ "manual" ] }, + { + "path": [ + "priority" + ], + "flag": "priority", + "type": "integer", + "required": false, + "complex": false, + "description": "The priority of the wallet transaction. It drives the order in which credits are consumed. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50." + }, { "path": [ "purchase_order_number" @@ -20981,6 +21347,17 @@ "complex": false, "description": "The number of voided credits." }, + { + "path": [ + "voided_transaction_id" + ], + "flag": "voided-transaction-id", + "type": "string", + "required": false, + "nullable": true, + "complex": false, + "description": "Unique identifier of the inbound wallet transaction to void. Only available on traceable wallets, and the target transaction must still have a remaining amount." + }, { "path": [ "wallet_id" @@ -21352,11 +21729,27 @@ "type": "string", "required": true, "description": "A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided." + }, + { + "name": "page", + "flag": "page", + "in": "query", + "type": "integer", + "required": false, + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." + }, + { + "name": "per_page", + "flag": "per-page", + "in": "query", + "type": "integer", + "required": false, + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, "dangerous": false, - "paginated": false, + "paginated": true, "mutation": false }, { @@ -21366,7 +21759,7 @@ "method": "GET", "path": "/wallet_transactions/{lago_id}", "summary": "Retrieve a wallet transaction", - "description": "This endpoint is used to retrieve a specific wallet transactions.", + "description": "This endpoint is used to retrieve a specific wallet transaction.", "docs_url": "https://getlago.com/docs/api-reference/wallets/wallet-object", "parameters": [ { @@ -21375,7 +21768,7 @@ "in": "path", "type": "string", "required": true, - "description": "Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system." + "description": "Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction's record within the Lago system." } ], "idempotent": true, @@ -21399,7 +21792,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -21407,7 +21800,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "currency", @@ -21446,7 +21839,7 @@ "method": "GET", "path": "/customers/{external_customer_id}/wallets", "summary": "List all customer's wallets", - "description": "This endpoint is used to list all wallets with prepaid credits of a customer", + "description": "This endpoint is used to list all wallets with prepaid credits of a customer.", "docs_url": "https://getlago.com/docs/api-reference/wallets/wallet-object", "parameters": [ { @@ -21463,7 +21856,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -21471,7 +21864,15 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." + }, + { + "name": "currency", + "flag": "currency", + "in": "query", + "type": "string", + "required": false, + "description": "Filter the results by currency, expressed as an ISO 4217 code." }, { "name": "billing_entity_codes[]", @@ -21511,7 +21912,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -21519,7 +21920,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, @@ -21551,7 +21952,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -21559,7 +21960,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, @@ -21850,6 +22251,28 @@ "complex": false, "description": "The name of the wallet." }, + { + "path": [ + "paid_top_up_max_amount_cents" + ], + "flag": "paid-top-up-max-amount-cents", + "type": "integer", + "required": false, + "nullable": true, + "complex": false, + "description": "The maximum amount, in cents, of a single paid top-up transaction." + }, + { + "path": [ + "paid_top_up_min_amount_cents" + ], + "flag": "paid-top-up-min-amount-cents", + "type": "integer", + "required": false, + "nullable": true, + "complex": false, + "description": "The minimum amount, in cents, of a single paid top-up transaction." + }, { "path": [ "payment_method", @@ -21884,7 +22307,7 @@ "type": "integer", "required": false, "complex": false, - "description": "Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50." + "description": "Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first." }, { "path": [ @@ -21905,7 +22328,7 @@ "type": "array", "required": false, "complex": true, - "description": "List of recurring transaction rules. Currently, we only allow one recurring rule per wallet." + "description": "List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license." } ], "required": true @@ -22054,6 +22477,28 @@ "complex": false, "description": "The name of the wallet." }, + { + "path": [ + "paid_top_up_max_amount_cents" + ], + "flag": "paid-top-up-max-amount-cents", + "type": "integer", + "required": false, + "nullable": true, + "complex": false, + "description": "The maximum amount, in cents, of a single paid top-up transaction." + }, + { + "path": [ + "paid_top_up_min_amount_cents" + ], + "flag": "paid-top-up-min-amount-cents", + "type": "integer", + "required": false, + "nullable": true, + "complex": false, + "description": "The minimum amount, in cents, of a single paid top-up transaction." + }, { "path": [ "payment_method", @@ -22088,7 +22533,7 @@ "type": "integer", "required": false, "complex": false, - "description": "Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50." + "description": "Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50. Wallets with the same priority are applied by expiration date, soonest first, with wallets without an expiration date last, then by creation date, oldest first." }, { "path": [ @@ -22109,7 +22554,7 @@ "type": "array", "required": false, "complex": true, - "description": "List of recurring transaction rules. Currently, we only allow one recurring rule per wallet." + "description": "List of recurring transaction rules. Only one recurring rule is allowed per wallet. This is a premium feature, the rules are ignored without a premium license." } ], "required": true @@ -22126,7 +22571,7 @@ "method": "PUT", "path": "/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}", "summary": "Update a wallet alert", - "description": "This endpoint allows you to update an existing alert for a wallet.", + "description": "This endpoint allows you to update an existing alert for a wallet. A non-empty `thresholds` array replaces the whole set of thresholds on the alert. When `thresholds` is left out, or sent as an empty array, the thresholds already on the alert are kept. A threshold sent with a `code` it already had, and without `notify_on`, keeps the `notify_on` it had.", "docs_url": "https://getlago.com/docs/api-reference/wallets/wallet-object", "parameters": [ { @@ -22186,7 +22631,7 @@ "type": "array", "required": false, "complex": true, - "description": "Array of thresholds associated with the alert." + "description": "Array of thresholds associated with the alert. An alert accepts at most 20 thresholds, and a larger array returns a `422` error with `too_many_thresholds` on `thresholds`. Two thresholds cannot share the same value and the same `recurring` flag. The value of a recurring threshold must be positive." } ], "required": true @@ -22244,7 +22689,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -22252,7 +22697,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." }, { "name": "status", @@ -22260,7 +22705,7 @@ "in": "query", "type": "string", "required": false, - "description": "The status of the wallet transaction. Possible values are `pending` or `settled`." + "description": "The status of the wallet transaction. Possible values are `pending`, `settled` or `failed`." }, { "name": "transaction_status", @@ -22277,6 +22722,14 @@ "type": "string", "required": false, "description": "The transaction type of the wallet transaction. Possible values are `inbound` (increasing the wallet balance) or `outbound` (decreasing the wallet balance)." + }, + { + "name": "metadata[key]", + "flag": "metadata[key]", + "in": "query", + "type": "string", + "required": false, + "description": "Filter wallet transactions by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. For example, `metadata[color]=blue`." } ], "idempotent": true, @@ -22290,8 +22743,8 @@ "operation_id": "createWebhookEndpoint", "method": "POST", "path": "/webhook_endpoints", - "summary": "Create a webhook_endpoint", - "description": "This endpoint is used to create a webhook endpoint.", + "summary": "Create a webhook endpoint", + "description": "This endpoint is used to create a webhook endpoint. An organization can have at most 10 webhook endpoints.", "docs_url": "https://getlago.com/docs/api-reference/webhook-endpoints/webhook-endpoint-object", "body": { "wrapper": "webhook_endpoint", @@ -22305,7 +22758,7 @@ "required": false, "nullable": true, "complex": true, - "description": "A list of event types that will trigger the webhook. Passing null means that all event types will be sent." + "description": "The list of event types sent to this webhook endpoint. Pass `null` or `[\"*\"]` to receive every event type. An empty array stops every delivery." }, { "path": [ @@ -22316,7 +22769,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The name of the webhook." + "description": "The name of the webhook endpoint." }, { "path": [ @@ -22327,7 +22780,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The signature used for the webhook. If no value is passed,", + "description": "The algorithm used to sign the webhook payload. Defaults to `jwt` when no value is passed.", "enum": [ "jwt", "hmac", @@ -22340,9 +22793,9 @@ ], "flag": "webhook-url", "type": "string", - "required": false, + "required": true, "complex": false, - "description": "The URL of the webhook endpoint." + "description": "The URL of the webhook endpoint. It must be unique within the organization." } ], "required": true @@ -22416,7 +22869,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Page number." + "description": "Page number. Defaults to 1. A value that is not a positive integer, such as `0`, returns the first page." }, { "name": "per_page", @@ -22424,7 +22877,7 @@ "in": "query", "type": "integer", "required": false, - "description": "Number of records per page." + "description": "Number of records per page. Defaults to 100. The maximum is 200, unless another maximum is configured for your organization. A value above the maximum returns a `422` error with `value_is_out_of_range` on `per_page`. A value that is not a positive integer, such as `0`, returns the default number of records." } ], "idempotent": true, @@ -22463,7 +22916,7 @@ "required": false, "nullable": true, "complex": true, - "description": "A list of event types that will trigger the webhook. Passing null means that all event types will be sent." + "description": "The list of event types sent to this webhook endpoint. Pass `null` or `[\"*\"]` to receive every event type. An empty array stops every delivery." }, { "path": [ @@ -22474,7 +22927,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The name of the webhook." + "description": "The name of the webhook endpoint." }, { "path": [ @@ -22485,7 +22938,7 @@ "required": false, "nullable": true, "complex": false, - "description": "The signature used for the webhook. If no value is passed,", + "description": "The algorithm used to sign the webhook payload. When the field is omitted, the current value is kept.", "enum": [ "jwt", "hmac", @@ -22500,7 +22953,7 @@ "type": "string", "required": false, "complex": false, - "description": "The URL of the webhook endpoint." + "description": "The URL of the webhook endpoint. It must be unique within the organization." } ], "required": true @@ -22517,7 +22970,7 @@ "method": "GET", "path": "/webhooks/json_public_key", "summary": "Retrieve webhook public key (JSON)", - "description": "This endpoint is used to retrieve the public key used to verify the webhooks signature, wrapped in a JSON object. Prefer this endpoint over the deprecated GET /webhooks/public_key.", + "description": "This endpoint is used to retrieve the public key used to verify the webhook signature, wrapped in a JSON object. Prefer this endpoint over the deprecated `GET /webhooks/public_key`.", "docs_url": "https://getlago.com/docs/api-reference/webhooks/format---signature#1-retrieve-the-public-key", "idempotent": true, "dangerous": false, @@ -22531,7 +22984,7 @@ "method": "GET", "path": "/webhooks/public_key", "summary": "Retrieve webhook public key", - "description": "This endpoint is used to retrieve the public key used to verify the webhooks signature", + "description": "**Deprecated.** Use `GET /webhooks/json_public_key` instead. This endpoint is used to retrieve the public key used to verify the webhook signature.", "docs_url": "https://getlago.com/docs/api-reference/webhooks/format---signature#1-retrieve-the-public-key", "idempotent": true, "dangerous": false, @@ -22539,6 +22992,6 @@ "mutation": false } ], - "spec_sha256": "ce82ac3701caa4ab59bb35557a4e592adb0b81ce69fa37549fde391fc241aa1a", - "spec_version": "1.52.1" + "spec_sha256": "0548d030b8384508d3638203c453f704565a7df954f4db9e42deadd554b5069e", + "spec_version": "1.57.0" } From ff321b1d0bd54d219f8ba8448140128a42b745d2 Mon Sep 17 00:00:00 2001 From: "Yohan R." <7434196+groyoh@users.noreply.github.com> Date: Thu, 5 Nov 2026 17:14:44 +0100 Subject: [PATCH 2/3] test: Follow the spec version of the generated manifest Three tests compared the embedded spec version with the literal `1.52.1`, so a drift that changes the version failed them. They now read `generated.SpecVersion`; `TestGeneratedManifestEmbedsPinnedSpecIdentity` still checks the generated code against `spec/operations.json`. The body types test skipped body fields that share a name with a path parameter. Path parameters are positional arguments, so a required body field such as `--code` on `POST /plans/{code}/charges` keeps its own flag and must be passed. Only query and header parameters are skipped now. --- cmd/lago/main_test.go | 3 ++- internal/cli/body_types_test.go | 6 +++++- internal/cli/cli_test.go | 3 ++- internal/generated/types_test.go | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cmd/lago/main_test.go b/cmd/lago/main_test.go index 88ceac9..df34960 100644 --- a/cmd/lago/main_test.go +++ b/cmd/lago/main_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/getlago/lago-cli/internal/cli" + "github.com/getlago/lago-cli/internal/generated" ) func TestVersionEntrypointContract(t *testing.T) { @@ -14,7 +15,7 @@ func TestVersionEntrypointContract(t *testing.T) { if code := cli.ExecuteArgs([]string{"version", "--output", "json"}, strings.NewReader(""), &stdout, &stderr); code != 0 { t.Fatalf("exit=%d stderr=%s", code, stderr.String()) } - if !strings.Contains(stdout.String(), `"spec_version": "1.52.1"`) { + if !strings.Contains(stdout.String(), `"spec_version": "`+generated.SpecVersion+`"`) { t.Fatalf("version output lacks embedded spec identity: %s", stdout.String()) } } diff --git a/internal/cli/body_types_test.go b/internal/cli/body_types_test.go index 970cbfe..662c345 100644 --- a/internal/cli/body_types_test.go +++ b/internal/cli/body_types_test.go @@ -78,7 +78,11 @@ func TestQA_TypeCoercion_GeneratedBodiesSendSpecTypes(t *testing.T) { } parameterFlags := map[string]bool{} for _, parameter := range operation.Parameters { - parameterFlags[parameter.Flag] = true + // Path parameters are positional arguments, so a body field with the same + // name (`--code` on /plans/{code}/charges) still has its own flag. + if parameter.In != "path" { + parameterFlags[parameter.Flag] = true + } if parameter.In == "query" && parameter.Required { arguments = append(arguments, "--"+parameter.Flag, syntheticValue(parameter.Type, parameter.Enum)) } diff --git a/internal/cli/cli_test.go b/internal/cli/cli_test.go index 495aa89..308472f 100644 --- a/internal/cli/cli_test.go +++ b/internal/cli/cli_test.go @@ -19,6 +19,7 @@ import ( "time" "github.com/getlago/lago-cli/internal/config" + "github.com/getlago/lago-cli/internal/generated" "github.com/getlago/lago-cli/internal/transport" ) @@ -315,7 +316,7 @@ func TestConfiguredAliasExpandsWithoutShadowingBuiltins(t *testing.T) { if code := ExecuteArgs([]string{"v"}, strings.NewReader(""), &stdout, io.Discard); code != 0 { t.Fatalf("exit=%d", code) } - if !strings.Contains(stdout.String(), `"spec_version": "1.52.1"`) { + if !strings.Contains(stdout.String(), `"spec_version": "`+generated.SpecVersion+`"`) { t.Fatalf("alias output=%s", stdout.String()) } } diff --git a/internal/generated/types_test.go b/internal/generated/types_test.go index ca1f773..4871711 100644 --- a/internal/generated/types_test.go +++ b/internal/generated/types_test.go @@ -4,7 +4,7 @@ import "testing" func TestPinnedOperationsLoaded(t *testing.T) { t.Parallel() - if SpecVersion != "1.52.1" || len(SpecSHA256) != 64 || len(Operations) != 217 { + if SpecVersion == "" || len(SpecSHA256) != 64 || len(Operations) == 0 { t.Fatalf("spec=%s sha=%s operations=%d", SpecVersion, SpecSHA256, len(Operations)) } } From d9f58a5148f7a1e98d028220b3de4a0146c8430f Mon Sep 17 00:00:00 2001 From: "Yohan R." <7434196+groyoh@users.noreply.github.com> Date: Thu, 5 Nov 2026 17:21:18 +0100 Subject: [PATCH 3/3] test: Drop the pinned spec check of the generated package `TestPinnedOperationsLoaded` only checked that the generated package has a version, a SHA-256 and operations. `TestGeneratedManifestEmbedsPinnedSpecIdentity` already checks them against `spec/operations.json`, and the parity test keeps the operation-count guard. --- internal/generated/types_test.go | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 internal/generated/types_test.go diff --git a/internal/generated/types_test.go b/internal/generated/types_test.go deleted file mode 100644 index 4871711..0000000 --- a/internal/generated/types_test.go +++ /dev/null @@ -1,10 +0,0 @@ -package generated - -import "testing" - -func TestPinnedOperationsLoaded(t *testing.T) { - t.Parallel() - if SpecVersion == "" || len(SpecSHA256) != 64 || len(Operations) == 0 { - t.Fatalf("spec=%s sha=%s operations=%d", SpecVersion, SpecSHA256, len(Operations)) - } -}