Lago · Capability

Lago API documentation

Lago API allows your application to push customer information and metrics (events) from your application to the billing application.

Run with Naftiko LagoAPI

What You Can Do

POST
Createaddon — Lago Create an add-on
/add_ons
GET
Findalladdons — Lago List all add-ons
/add_ons
PUT
Updateaddon — Lago Update an add-on
/add_ons/{code}
GET
Findaddon — Lago Retrieve an add-on
/add_ons/{code}
DELETE
Destroyaddon — Lago Delete an add-on
/add_ons/{code}
GET
Findallgrossrevenues — Lago List gross revenue
/analytics/gross_revenue
GET
Findallinvoicecollections — Lago List of finalized invoices
/analytics/invoice_collection
GET
Findallinvoicedusages — Lago List usage revenue
/analytics/invoiced_usage
GET
Findallmrrs — Lago List MRR
/analytics/mrr
GET
Findalloverduebalances — Lago List overdue balance
/analytics/overdue_balance
POST
Applycoupon — Lago Apply a coupon to a customer
/applied_coupons
GET
Findallappliedcoupons — Lago List all applied coupons
/applied_coupons
POST
Createbillablemetric — Lago Create a billable metric
/billable_metrics
GET
Findallbillablemetrics — Lago List all billable metrics
/billable_metrics
POST
Evaluatebillablemetricexpression — Lago Evaluate an expression for a billable metric
/billable_metrics/evaluate_expression
PUT
Updatebillablemetric — Lago Update a billable metric
/billable_metrics/{code}
DELETE
Destroybillablemetric — Lago Delete a billable metric
/billable_metrics/{code}
GET
Findbillablemetric — Lago Retrieve a billable metric
/billable_metrics/{code}
POST
Createcoupon — Lago Create a coupon
/coupons
GET
Findallcoupons — Lago List all coupons
/coupons
PUT
Updatecoupon — Lago Update a coupon
/coupons/{code}
GET
Findcoupon — Lago Retrieve a coupon
/coupons/{code}
DELETE
Destroycoupon — Lago Delete a coupon
/coupons/{code}
POST
Createcreditnote — Lago Create a credit note
/credit_notes
GET
Findallcreditnotes — Lago List all credit notes
/credit_notes
PUT
Updatecreditnote — Lago Update a credit note
/credit_notes/{lago_id}
GET
Findcreditnote — Lago Retrieve a credit note
/credit_notes/{lago_id}
POST
Downloadcreditnote — Lago Download a credit note PDF
/credit_notes/{lago_id}/download
POST
Estimatecreditnote — Lago Estimate amounts for a new credit note
/credit_notes/estimate
PUT
Voidcreditnote — Lago Void available credit
/credit_notes/{lago_id}/void
POST
Createcustomer — Lago Create a customer
/customers
GET
Findallcustomers — Lago List all customers
/customers
GET
Findcustomer — Lago Retrieve a customer
/customers/{external_id}
DELETE
Destroycustomer — Lago Delete a customer
/customers/{external_id}
DELETE
Deleteappliedcoupon — Lago Delete an applied coupon
/customers/{external_customer_id}/applied_coupons/{applied_coupon_id}
GET
Getcustomerportalurl — Lago Get a customer portal URL
/customers/{external_customer_id}/portal_url
GET
Findcustomercurrentusage — Lago Retrieve customer current usage
/customers/{external_customer_id}/current_usage
GET
Findallcustomerpastusage — Lago Retrieve customer past usage
/customers/{external_customer_id}/past_usage
POST
Generatecustomercheckouturl — Lago Generate a Customer Payment Provider Checkout URL
/customers/{external_customer_id}/checkout_url
POST
Createevent — Lago Send usage events
/events
GET
Findallevents — Lago List all events
/events
POST
Createbatchevents — Lago Batch multiple events
/events/batch
POST
Eventestimatefees — Lago Estimate fees for a pay in advance charge
/events/estimate_fees
GET
Findevent — Lago Retrieve a specific event
/events/{transaction_id}
GET
Findallfees — Lago List all fees
/fees
GET
Findfee — Lago Retrieve a specific fee
/fees/{lago_id}
PUT
Updatefee — Lago Update a fee
/fees/{lago_id}
DELETE
Deletefee — Lago Delete a fee
/fees/{lago_id}
POST
Createinvoice — Lago Create a one-off invoice
/invoices
GET
Findallinvoices — Lago List all invoices
/invoices
PUT
Updateinvoice — Lago Update an invoice
/invoices/{lago_id}
GET
Findinvoice — Lago Retrieve an invoice
/invoices/{lago_id}
POST
Downloadinvoice — Lago Download an invoice PDF
/invoices/{lago_id}/download
PUT
Finalizeinvoice — Lago Finalize a draft invoice
/invoices/{lago_id}/finalize
POST
Losedisputeinvoice — Lago Mark an invoice payment dispute as lost
/invoices/{lago_id}/lose_dispute
PUT
Refreshinvoice — Lago Refresh a draft invoice
/invoices/{lago_id}/refresh
POST
Retryinvoice — Lago Retry generation of a failed invoice
/invoices/{lago_id}/retry
POST
Invoicepaymenturl — Lago Generate a payment URL
/invoices/{lago_id}/payment_url
POST
Retrypayment — Lago Retry an invoice payment
/invoices/{lago_id}/retry_payment
POST
Voidinvoice — Lago Void an invoice
/invoices/{lago_id}/void

MCP Tools

createaddon

Lago Create an add-on

findalladdons

Lago List all add-ons

read-only idempotent
updateaddon

Lago Update an add-on

idempotent
findaddon

Lago Retrieve an add-on

read-only idempotent
destroyaddon

Lago Delete an add-on

idempotent
findallgrossrevenues

Lago List gross revenue

read-only idempotent
findallinvoicecollections

Lago List of finalized invoices

read-only idempotent
findallinvoicedusages

Lago List usage revenue

read-only idempotent
findallmrrs

Lago List MRR

read-only idempotent
findalloverduebalances

Lago List overdue balance

read-only idempotent
applycoupon

Lago Apply a coupon to a customer

findallappliedcoupons

Lago List all applied coupons

read-only idempotent
createbillablemetric

Lago Create a billable metric

findallbillablemetrics

Lago List all billable metrics

read-only idempotent
evaluatebillablemetricexpression

Lago Evaluate an expression for a billable metric

updatebillablemetric

Lago Update a billable metric

idempotent
destroybillablemetric

Lago Delete a billable metric

idempotent
findbillablemetric

Lago Retrieve a billable metric

read-only idempotent
createcoupon

Lago Create a coupon

findallcoupons

Lago List all coupons

read-only idempotent
updatecoupon

Lago Update a coupon

idempotent
findcoupon

Lago Retrieve a coupon

read-only idempotent
destroycoupon

Lago Delete a coupon

idempotent
createcreditnote

Lago Create a credit note

findallcreditnotes

Lago List all credit notes

read-only idempotent
updatecreditnote

Lago Update a credit note

idempotent
findcreditnote

Lago Retrieve a credit note

read-only idempotent
downloadcreditnote

Lago Download a credit note PDF

estimatecreditnote

Lago Estimate amounts for a new credit note

voidcreditnote

Lago Void available credit

idempotent
createcustomer

Lago Create a customer

findallcustomers

Lago List all customers

read-only idempotent
findcustomer

Lago Retrieve a customer

read-only idempotent
destroycustomer

Lago Delete a customer

idempotent
deleteappliedcoupon

Lago Delete an applied coupon

idempotent
getcustomerportalurl

Lago Get a customer portal URL

read-only idempotent
findcustomercurrentusage

Lago Retrieve customer current usage

read-only idempotent
findallcustomerpastusage

Lago Retrieve customer past usage

read-only idempotent
generatecustomercheckouturl

Lago Generate a Customer Payment Provider Checkout URL

createevent

Lago Send usage events

findallevents

Lago List all events

read-only idempotent
createbatchevents

Lago Batch multiple events

eventestimatefees

Lago Estimate fees for a pay in advance charge

findevent

Lago Retrieve a specific event

read-only idempotent
findallfees

Lago List all fees

read-only idempotent
findfee

Lago Retrieve a specific fee

read-only idempotent
updatefee

Lago Update a fee

idempotent
deletefee

Lago Delete a fee

idempotent
createinvoice

Lago Create a one-off invoice

findallinvoices

Lago List all invoices

read-only idempotent
updateinvoice

Lago Update an invoice

idempotent
findinvoice

Lago Retrieve an invoice

read-only idempotent
downloadinvoice

Lago Download an invoice PDF

finalizeinvoice

Lago Finalize a draft invoice

idempotent
losedisputeinvoice

Lago Mark an invoice payment dispute as lost

refreshinvoice

Lago Refresh a draft invoice

idempotent
retryinvoice

Lago Retry generation of a failed invoice

invoicepaymenturl

Lago Generate a payment URL

retrypayment

Lago Retry an invoice payment

voidinvoice

Lago Void an invoice

Capability Spec

lago-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Lago API documentation
  description: Lago API allows your application to push customer information and metrics (events) from your application to
    the billing application.
  tags:
  - Lago
  - API
  created: '2026-05-06'
  modified: '2026-05-06'
capability:
  consumes:
  - type: http
    namespace: lago
    baseUri: https://api.getlago.com/api/v1
    description: Lago API documentation HTTP API.
    authentication:
      type: bearer
      token: '{{LAGO_TOKEN}}'
    resources:
    - name: add-ons
      path: /add_ons
      operations:
      - name: createaddon
        method: POST
        description: Lago Create an add-on
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: findalladdons
        method: GET
        description: Lago List all add-ons
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: add-ons-code
      path: /add_ons/{code}
      operations:
      - name: updateaddon
        method: PUT
        description: Lago Update an add-on
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: findaddon
        method: GET
        description: Lago Retrieve an add-on
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: destroyaddon
        method: DELETE
        description: Lago Delete an add-on
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: analytics-gross-revenue
      path: /analytics/gross_revenue
      operations:
      - name: findallgrossrevenues
        method: GET
        description: Lago List gross revenue
        inputParameters:
        - name: currency
          in: query
          type: string
          description: Currency of revenue analytics. Format must be ISO 4217.
        - name: external_customer_id
          in: query
          type: string
          description: The customer external unique identifier (provided by your own application). Use it to filter revenue
            analytics at the customer level.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: analytics-invoice-collection
      path: /analytics/invoice_collection
      operations:
      - name: findallinvoicecollections
        method: GET
        description: Lago List of finalized invoices
        inputParameters:
        - name: currency
          in: query
          type: string
          description: The currency of revenue analytics. Format must be ISO 4217.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: analytics-invoiced-usage
      path: /analytics/invoiced_usage
      operations:
      - name: findallinvoicedusages
        method: GET
        description: Lago List usage revenue
        inputParameters:
        - name: currency
          in: query
          type: string
          description: The currency of invoiced usage analytics. Format must be ISO 4217.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: analytics-mrr
      path: /analytics/mrr
      operations:
      - name: findallmrrs
        method: GET
        description: Lago List MRR
        inputParameters:
        - name: currency
          in: query
          type: string
          description: Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated
            post-application of applicable taxes and deduction of an
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: analytics-overdue-balance
      path: /analytics/overdue_balance
      operations:
      - name: findalloverduebalances
        method: GET
        description: Lago List overdue balance
        inputParameters:
        - name: currency
          in: query
          type: string
          description: Currency of revenue analytics. Format must be ISO 4217.
        - name: external_customer_id
          in: query
          type: string
          description: The customer external unique identifier (provided by your own application). Use it to filter revenue
            analytics at the customer level.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: applied-coupons
      path: /applied_coupons
      operations:
      - name: applycoupon
        method: POST
        description: Lago Apply a coupon to a customer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: findallappliedcoupons
        method: GET
        description: Lago List all applied coupons
        inputParameters:
        - name: status
          in: query
          type: string
          description: The status of the coupon. Can be either `active` or `terminated`.
        - name: external_customer_id
          in: query
          type: string
          description: The customer external unique identifier (provided by your own application)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: billable-metrics
      path: /billable_metrics
      operations:
      - name: createbillablemetric
        method: POST
        description: Lago Create a billable metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: findallbillablemetrics
        method: GET
        description: Lago List all billable metrics
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: billable-metrics-evaluate-expression
      path: /billable_metrics/evaluate_expression
      operations:
      - name: evaluatebillablemetricexpression
        method: POST
        description: Lago Evaluate an expression for a billable metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: billable-metrics-code
      path: /billable_metrics/{code}
      operations:
      - name: updatebillablemetric
        method: PUT
        description: Lago Update a billable metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: destroybillablemetric
        method: DELETE
        description: Lago Delete a billable metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: findbillablemetric
        method: GET
        description: Lago Retrieve a billable metric
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: coupons
      path: /coupons
      operations:
      - name: createcoupon
        method: POST
        description: Lago Create a coupon
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: findallcoupons
        method: GET
        description: Lago List all coupons
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: coupons-code
      path: /coupons/{code}
      operations:
      - name: updatecoupon
        method: PUT
        description: Lago Update a coupon
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: findcoupon
        method: GET
        description: Lago Retrieve a coupon
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: destroycoupon
        method: DELETE
        description: Lago Delete a coupon
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: credit-notes
      path: /credit_notes
      operations:
      - name: createcreditnote
        method: POST
        description: Lago Create a credit note
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: findallcreditnotes
        method: GET
        description: Lago List all credit notes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: credit-notes-lago-id
      path: /credit_notes/{lago_id}
      operations:
      - name: updatecreditnote
        method: PUT
        description: Lago Update a credit note
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: findcreditnote
        method: GET
        description: Lago Retrieve a credit note
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: credit-notes-lago-id-download
      path: /credit_notes/{lago_id}/download
      operations:
      - name: downloadcreditnote
        method: POST
        description: Lago Download a credit note PDF
        inputParameters:
        - name: lago_id
          in: path
          type: string
          required: true
          description: The credit note unique identifier, created by Lago.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: credit-notes-estimate
      path: /credit_notes/estimate
      operations:
      - name: estimatecreditnote
        method: POST
        description: Lago Estimate amounts for a new credit note
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: credit-notes-lago-id-void
      path: /credit_notes/{lago_id}/void
      operations:
      - name: voidcreditnote
        method: PUT
        description: Lago Void available credit
        inputParameters:
        - name: lago_id
          in: path
          type: string
          required: true
          description: The credit note unique identifier, created by Lago.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: customers
      path: /customers
      operations:
      - name: createcustomer
        method: POST
        description: Lago Create a customer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: findallcustomers
        method: GET
        description: Lago List all customers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: customers-external-id
      path: /customers/{external_id}
      operations:
      - name: findcustomer
        method: GET
        description: Lago Retrieve a customer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: destroycustomer
        method: DELETE
        description: Lago Delete a customer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: customers-external-customer-id-applied-coupons-a
      path: /customers/{external_customer_id}/applied_coupons/{applied_coupon_id}
      operations:
      - name: deleteappliedcoupon
        method: DELETE
        description: Lago Delete an applied coupon
        inputParameters:
        - name: external_customer_id
          in: path
          type: string
          required: true
          description: The customer external unique identifier (provided by your own application)
        - name: applied_coupon_id
          in: path
          type: string
          required: true
          description: Unique identifier of the applied coupon, created by Lago.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: customers-external-customer-id-portal-url
      path: /customers/{external_customer_id}/portal_url
      operations:
      - name: getcustomerportalurl
        method: GET
        description: Lago Get a customer portal URL
        inputParameters:
        - name: external_customer_id
          in: path
          type: string
          required: true
          description: External ID of the existing customer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: customers-external-customer-id-current-usage
      path: /customers/{external_customer_id}/current_usage
      operations:
      - name: findcustomercurrentusage
        method: GET
        description: Lago Retrieve customer current usage
        inputParameters:
        - name: external_customer_id
          in: path
          type: string
          required: true
          description: The customer external unique identifier (provided by your own application).
        - name: external_subscription_id
          in: query
          type: string
          required: true
          description: The unique identifier of the subscription within your application.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: customers-external-customer-id-past-usage
      path: /customers/{external_customer_id}/past_usage
      operations:
      - name: findallcustomerpastusage
        method: GET
        description: Lago Retrieve customer past usage
        inputParameters:
        - name: external_customer_id
          in: path
          type: string
          required: true
          description: The customer external unique identifier (provided by your own application).
        - name: external_subscription_id
          in: query
          type: string
          required: true
          description: The unique identifier of the subscription within your application.
        - name: billable_metric_code
          in: query
          type: string
          description: Billable metric code filter to apply to the charge usage
        - name: periods_count
          in: query
          type: integer
          description: Number of past billing period to returns in the result
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: customers-external-customer-id-checkout-url
      path: /customers/{external_customer_id}/checkout_url
      operations:
      - name: generatecustomercheckouturl
        method: POST
        description: Lago Generate a Customer Payment Provider Checkout URL
        inputParameters:
        - name: external_customer_id
          in: path
          type: string
          required: true
          description: The customer external unique identifier (provided by your own application).
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: events
      path: /events
      operations:
      - name: createevent
        method: POST
        description: Lago Send usage events
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: findallevents
        method: GET
        description: Lago List all events
        inputParameters:
        - name: code
          in: query
          type: string
          description: Filter events by its code.
        - name: timestamp_from
          in: query
          type: string
          description: Filter events by timestamp starting from a specific date.
        - name: timestamp_to
          in: query
          type: string
          description: Filter events by timestamp up to a specific date.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: events-batch
      path: /events/batch
      operations:
      - name: createbatchevents
        method: POST
        description: Lago Batch multiple events
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: events-estimate-fees
      path: /events/estimate_fees
      operations:
      - name: eventestimatefees
        method: POST
        description: Lago Estimate fees for a pay in advance charge
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: events-transaction-id
      path: /events/{transaction_id}
      operations:
      - name: findevent
        method: GET
        description: Lago Retrieve a specific event
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: fees
      path: /fees
      operations:
      - name: findallfees
        method: GET
        description: Lago List all fees
        inputParameters:
        - name: currency
          in: query
          type: string
          description: Filter results by fee's currency.
        - name: fee_type
          in: query
          type: string
          description: The fee type. Possible values are `add-on`, `charge`, `credit` or `subscription`.
        - name: billable_metric_code
          in: query
          type: string
          description: Filter results by the `code` of the billable metric attached to the fee. Only applies to `charge` types.
        - name: payment_status
          in: query
          type: string
          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 `pendin
        - name: created_at_from
          in: query
          type: string
          description: Filter results created after creation date and time in UTC.
        - name: created_at_to
          in: query
          type: string
          description: Filter results created before creation date and time in UTC.
        - name: succeeded_at_from
          in: query
          type: string
          description: Filter results with payment success after creation date and time in UTC.
        - name: succeeded_at_to
          in: query
          type: string
          description: Filter results with payment success after creation date and time in UTC.
        - name: failed_at_from
          in: query
          type: string
          description: Filter results with payment failure after creation date and time in UTC.
        - name: failed_at_to
          in: query
          type: string
          description: Filter results with payment failure after creation date and time in UTC.
        - name: refunded_at_from
          in: query
          type: string
          description: Filter results with payment refund after creation date and time in UTC.
        - name: refunded_at_to
          in: query
          type: string
          description: Filter results with payment refund after creation date and time in UTC.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: fees-lago-id
      path: /fees/{lago_id}
      operations:
      - name: findfee
        method: GET
        description: Lago Retrieve a specific fee
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatefee
        method: PUT
        description: Lago Update a fee
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: deletefee
        method: DELETE
        description: Lago Delete a fee
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: invoices
      path: /invoices
      operations:
      - name: createinvoice
        method: POST
        description: Lago Create a one-off invoice
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: findallinvoices
        method: GET
        description: Lago List all invoices
        inputParameters:
        - name: issuing_date_from
          in: query
          type: string
          description: Filter invoices starting from a specific date.
        - name: issuing_date_to
          in: query
          type: string
          description: Filter invoices up to a specific date.
        - name: status
          in: query
          type: string
          description: Filter invoices by status. Possible values are `draft` or `finalized`.
        - name: payment_status
          in: query
          type: string
          description: Filter invoices by payment status. Possible values are `pending`, `failed` or `succeeded`.
        - name: payment_overdue
          in: query
          type: boolean
          description: Filter invoices by payment_overdue. Possible values are `true` or `false`.
        - name: search_term
          in: query
          type: string
          description: Search invoices by id, number, customer name, customer external_id or customer email.
        - name: currency
          in: query
          type: string
          description: Filter invoices by currency in. Possible values ISO 4217 currency codes.
        - name: payment_dispute_lost
          in: query
          type: boolean
          description: Filter invoices with a payment dispute lost. Possible values are `true` or `false`.
        - name: invoice_type
          in: query
          type: string
          description: Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off`
            or `advance_charges`
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: invoices-lago-id
      path: /invoices/{lago_id}
      operations:
      - name: updateinvoice
        method: PUT
        description: Lago Update an invoice
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: findinvoice
        method: GET
        description: Lago Retrieve an invoice
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: invoices-lago-id-download
      path: /invoices/{lago_id}/download
      operations:
      - name: downloadinvoice
        method: POST
        description: Lago Download an invoice PDF
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: invoices-lago-id-finalize
      path: /invoices/{lago_id}/finalize
      operations:
      - name: finalizeinvoice
        method: PUT
        description: Lago Finalize a draft invoice
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: invoices-lago-id-lose-dispute
      path: /invoices/{lago_id}/lose_dispute
      operations:
      - name: losedisputeinvoice
        method: POST
        description: Lago Mark an invoice payment dispute as lost
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: invoices-lago-id-refresh
      path: /invoices/{lago_id}/refresh
      operations:
      - name: refreshinvoice
        method: PUT
        description: Lago Refresh a draft invoice
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: invoices-lago-id-retry
      path: /invoices/{lago_id}/retry
      operations:
      - name: retryinvoice
        method: POST
        description: Lago Retry generation of a failed invoice
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: invoices-lago-id-payment-url
      path: /invoices/{lago_id}/payment_url
      operations:
      - name: invoicepaymenturl
        method: POST
        description: Lago Generate a payment URL
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: invoices-lago-id-retry-payment
      path: /invoices/{lago_id}/retry_payment
      operations:
      - name: retrypayment
        method: POST
        description: Lago Retry an invoice payment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: invoices-lago-id-void
      path: /invoices/{lago_id}/void
      operations:
      - name: voidinvoice
        method: POST
        description: Lago Void an invoice
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    port: 8080
    namespace: lago-rest
    description: REST adapter for Lago API documentation.
    resources:
    - path: /add_ons
      name: createaddon
      operations:
      - method: POST
        name: createaddon
        description: Lago Create an add-on
        call: lago.createaddon
        outputParameters:
        - type: object
          mapping: $.
    - path: /add_ons
      name: findalladdons
      operations:
      - method: GET
        name: findalladdons
        description: Lago List all add-ons
        call: lago.findalladdons
        outputParameters:
        - type: object
          mapping: $.
    - path: /add_ons/{code}
      name: updateaddon
      operations:
      - method: PUT
        name: updateaddon
        description: Lago Update an add-on
        call: lago.updateaddon
        outputParameters:
        - type: object
          mapping: $.
    - path: /add_ons/{code}
      name: findaddon
      operations:
      - method: GET
        name: findaddon
        description: Lago Retrieve an add-on
        call: lago.findaddon
        outputParameters:
        - type: object
          mapping: $.
    - path: /add_ons/{code}
      name: destroyaddon
      operations:
      - method: DELETE
        name: destroyaddon
        description: Lago Delete an add-on
        call: lago.destroyaddon
        outputParameters:
        - type: object
          mapping: $.
    - path: /analytics/gross_revenue
      name: findallgrossrevenues
      operations:
      - method: GET
        name: findallgrossrevenues
        description: Lago List gross revenue
        call: lago.findallgrossrevenues
        outputParameters:
        - type: object
          mapping: $.
    - path: /analytics/invoice_collection
      name: findallinvoicecollections
      operations:
      - method: GET
        name: findallinvoicecollections
        description: Lago List of finalized invoices
        call: lago.findallinvoicecollections
        outputParameters:
        - type: object
          mapping: $.
    - path: /analytics/invoiced_usage
      name: findallinvoicedusages
      operations:
      - method: GET
        name: findallinvoicedusages
        description: Lago List usage revenue
        call: lago.findallinvoicedusages
        outputParameters:
        - type: object
          mapping: $.
    - path: /analytics/mrr
      name: findallmrrs
      operations:
      - method: GET
        name: findallmrrs
        description: Lago List MRR
        call: lago.findallmrrs
        outputParameters:
        - type: object
          mapping: $.
    - path: /analytics/overdue_balance
      name: findalloverduebalances
      operations:
      - method: GET
        name: findalloverduebalances
        description: Lago List overdue balance
        call: lago.findalloverduebalances
        outputParameters:
        - type: object
          mapping: $.
    - path: /applied_coupons
      name: applycoupon
      operations:
      - method: POST
        name: applycoupon
        description: Lago Apply a coupon to a customer
        call: lago.applycoupon
        outputParameters:
        - type: object
          mapping: $.
    - path: /applied_coupons
      name: findallappliedcoupons
      operations:
      - method: GET
        name: findallappliedcoupons
        description: Lago List all applied coupons
        call: lago.findallappliedcoupons
        outputParameters:
        - type: object
          mapping: $.
    - path: /billable_metrics
      name: createbillablemetric
      operations:
      - method: POST
        name: createbillablemetric
        description: Lago Create a billable metric
        call: lago.createbillablemetric
        outputParameters:
        - type: object
          mapping: $.
    - path: /billable_metrics
      name: findallbillablemetrics
      operations:
      - method: GET
        name: findallbillablemetrics
        description: Lago List all billable metrics
        call: lago.findallbillablemetrics
        outputParameters:
        - type: object
          mapping: $.
    - path: /billable_metrics/evaluate_expression
      name: evaluatebillablemetricexpression
      operations:
      - method: POST
        name: evaluatebillablemetricexpression
        description: Lago Evaluate an expression for a billable metric
        call: lago.evaluatebillablemetricexpression
        outputParameters:
        - type: object
          mapping: $.
    - path: /billable_metrics/{code}
      name: updatebillablemetric
      operations:
      - method: PUT
        name: updatebillablemetric
        description: Lago Update a billable metric
        call: lago.updatebillablemetric
        outputParameters:
        - type: object
          mapping: $.
    - path: /billable_metrics/{code}
      name: destroybillablemetric
      operations:
      - method: DELETE
        name: destroybillablemetric
        description: Lago Delete a billable metric
        call: lago.destroybillablemetric
        outputParameters:
        - type: object
          mapping: $.
    - path: /billable_metrics/{code}
      name: findbillablemetric
      operations:
      - method: GET
        name: findbillablemetric
        description: Lago Retrieve a billable metric
        call: lago.findbillablemetric
        outputParameters:
        - type: object
          mapping: $.
    - path: /coupons
      name: createcoupon
      operations:
      - method: POST
        name: createcoupon
        description: Lago Create a coupon
        call: lago.createcoupon
        outputParameters:
        - type: object
          mapping: $.
    - path: /coupons
      name: findallcoupons
      operations:
      - method: GET
        name: findallcoupons
        description: Lago List all coupons
        call: lago.findallcoupons
        outputParameters:
        - type: object
          mapping: $.
    - path: /coupons/{code}
      name: updatecoupon
      operations:
      - method: PUT
        name: updatecoupon
        description: Lago Update a coupon
        call: lago.updatecoupon
        outputParameters:
        - type: object
          mapping: $.
    - path: /coupons/{code}
      name: findcoupon
      operations:
      - method: GET
        name: findcoupon
        description: Lago Retrieve a coupon
        call: lago.findcoupon
        outputParameters:
        - type: object
          mapping: $.
    - path: /coupons/{code}
      name: destroycoupon
      operations:
      - method: DELETE
        name: destroycoupon
        description: Lago Delete a coupon
        call: lago.destroycoupon
        outputParameters:
        - type: object
          mapping: $.
    - path: /credit_notes
      name: createcreditnote
      operations:
      - method: POST
        na

# --- truncated at 32 KB (67 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lago/refs/heads/main/capabilities/lago-capability.yaml