Lago Invoices API

Everything about Invoice collection

Operations 12

POST /invoices Lago Create a one-off invoice #
GET /invoices Lago List all invoices #
PUT /invoices/{lago_id} Lago Update an invoice #
GET /invoices/{lago_id} Lago Retrieve an invoice #
POST /invoices/{lago_id}/download Lago Download an invoice PDF #
PUT /invoices/{lago_id}/finalize Lago Finalize a draft invoice #
POST /invoices/{lago_id}/lose_dispute Lago Mark an invoice payment dispute as lost #
PUT /invoices/{lago_id}/refresh Lago Refresh a draft invoice #
POST /invoices/{lago_id}/retry Lago Retry generation of a failed invoice #
POST /invoices/{lago_id}/payment_url Lago Generate a payment URL #
POST /invoices/{lago_id}/retry_payment Lago Retry an invoice payment #
POST /invoices/{lago_id}/void Lago Void an invoice #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lago-invoices-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lago-invoices-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lago API documentation Add_ons Invoices API
  description: Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
  version: 1.15.0
  license:
    name: AGPLv3
    identifier: AGPLv3
  contact:
    email: tech@getlago.com
servers:
- url: https://api.getlago.com/api/v1
  description: US Lago cluster
- url: https://api.eu.getlago.com/api/v1
  description: EU Lagos cluster
security:
- bearerAuth: []
tags:
- name: Invoices
  description: Everything about Invoice collection
  externalDocs:
    description: Find out more
    url: https://doc.getlago.com/docs/api/invoices/invoice-object
paths:
  /invoices:
    post:
      tags:
      - Invoices
      summary: Lago Create a one-off invoice
      description: This endpoint is used for issuing a one-off invoice.
      operationId: createInvoice
      requestBody:
        description: Invoice payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceOneOffCreateInput'
        required: true
      responses:
        '200':
          description: Invoice created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
    get:
      tags:
      - Invoices
      summary: Lago List all invoices
      description: This endpoint is used for retrieving all invoices.
      operationId: findAllInvoices
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per_page'
      - $ref: '#/components/parameters/external_customer_id'
      - name: issuing_date_from
        in: query
        description: Filter invoices starting from a specific date.
        required: false
        explode: true
        schema:
          type: string
          format: date
          example: '2022-07-08'
      - name: issuing_date_to
        in: query
        description: Filter invoices up to a specific date.
        required: false
        explode: true
        schema:
          type: string
          format: date
          example: '2022-08-09'
      - name: status
        in: query
        description: Filter invoices by status. Possible values are `draft` or `finalized`.
        required: false
        explode: true
        schema:
          type: string
          enum:
          - draft
          - finalized
      - 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_overdue
        in: query
        description: Filter invoices by payment_overdue. Possible values are `true` or `false`.
        required: false
        explode: true
        schema:
          type: boolean
          example: true
      - name: search_term
        in: query
        description: Search invoices by id, number, customer name, customer external_id or customer email.
        required: false
        explode: true
        schema:
          type: string
          example: Jane
      - name: currency
        in: query
        description: Filter invoices by currency in. Possible values ISO 4217 currency codes.
        required: false
        explode: true
        schema:
          type: string
          example: EUR
      - name: payment_dispute_lost
        in: query
        description: Filter invoices with a payment dispute lost. Possible values are `true` or `false`.
        required: false
        explode: true
        schema:
          type: boolean
          example: true
      - name: invoice_type
        in: query
        description: Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off` or `advance_charges`
        required: false
        explode: true
        schema:
          type: string
          enum:
          - subscription
          - add_on
          - credit
          - one_off
          - advance_charges
      responses:
        '200':
          description: Invoices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoicesPaginated'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /invoices/{lago_id}:
    parameters:
    - $ref: '#/components/parameters/lago_invoice_id'
    put:
      tags:
      - Invoices
      summary: Lago Update an invoice
      description: This endpoint is used for updating an existing invoice.
      operationId: updateInvoice
      requestBody:
        description: Update an existing invoice
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceUpdateInput'
        required: true
      responses:
        '200':
          description: Invoice updated
          content:
            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'
    get:
      tags:
      - Invoices
      summary: Lago Retrieve an invoice
      description: This endpoint is used for retrieving a specific invoice that has been issued.
      operationId: findInvoice
      responses:
        '200':
          description: Invoice
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /invoices/{lago_id}/download:
    post:
      tags:
      - Invoices
      summary: Lago Download an invoice PDF
      parameters:
      - $ref: '#/components/parameters/lago_invoice_id'
      description: This endpoint is used for downloading a specific invoice PDF document.
      operationId: downloadInvoice
      responses:
        '200':
          description: Invoice PDF
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /invoices/{lago_id}/finalize:
    put:
      tags:
      - Invoices
      summary: Lago Finalize a draft invoice
      description: This endpoint is used for finalizing a draft invoice.
      parameters:
      - $ref: '#/components/parameters/lago_invoice_id'
      operationId: finalizeInvoice
      responses:
        '200':
          description: Invoice finalized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /invoices/{lago_id}/lose_dispute:
    post:
      tags:
      - Invoices
      summary: Lago Mark an invoice payment dispute as lost
      description: This endpoint is used for setting invoice's payment dispute as lost.
      parameters:
      - $ref: '#/components/parameters/lago_invoice_id'
      operationId: loseDisputeInvoice
      responses:
        '200':
          description: Invoice payment dispute lost
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/NotAllowed'
  /invoices/{lago_id}/refresh:
    put:
      tags:
      - Invoices
      summary: Lago Refresh a draft invoice
      description: This endpoint is used for refreshing a draft invoice.
      parameters:
      - $ref: '#/components/parameters/lago_invoice_id'
      operationId: refreshInvoice
      responses:
        '200':
          description: Invoice refreshed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /invoices/{lago_id}/retry:
    post:
      tags:
      - Invoices
      summary: Lago Retry generation of a failed invoice
      description: This endpoint is used for retrying to generate a failed invoice.
      parameters:
      - $ref: '#/components/parameters/lago_invoice_id'
      operationId: retryInvoice
      responses:
        '200':
          description: Invoice generation has been retried
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /invoices/{lago_id}/payment_url:
    post:
      tags:
      - Invoices
      summary: Lago Generate a payment URL
      description: This endpoint generates a checkout link for a specific invoice.
      parameters:
      - $ref: '#/components/parameters/lago_invoice_id'
      operationId: invoicePaymentUrl
      responses:
        '200':
          description: Payment URL has been generated
          content:
            application/json:
              schema:
                type: object
                description: .
                properties:
                  invoice_payment_details:
                    type: object
                    properties:
                      lago_customer_id:
                        type: string
                        example: 1a901a90-1a90-1a90-1a90-1a901a901a90
                        description: Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
                      lago_invoice_id:
                        type: string
                        example: 1e501a90-1a90-1a90-1a90-1a901a901a80
                        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
                      external_customer_id:
                        type: string
                        example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba
                        description: The customer external unique identifier (provided by your own application)
                      payment_provider:
                        type: string
                        example: stripe
                        description: The Payment Provider name linked to the Customer.
                      payment_url:
                        type: string
                        example: https://foo.bar
                        description: The generated Payment URL for the Invoice.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /invoices/{lago_id}/retry_payment:
    post:
      tags:
      - Invoices
      summary: Lago Retry an invoice payment
      description: This endpoint resends an invoice for collection and retry a payment.
      parameters:
      - $ref: '#/components/parameters/lago_invoice_id'
      operationId: retryPayment
      responses:
        '200':
          description: Invoice payment retried
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/NotAllowed'
  /invoices/{lago_id}/void:
    post:
      tags:
      - Invoices
      summary: Lago Void an invoice
      description: This endpoint is used for voiding an invoice. You can void an invoice only when it's in a `finalized` status, and the payment status is not `succeeded`.
      parameters:
      - $ref: '#/components/parameters/lago_invoice_id'
      operationId: voidInvoice
      responses:
        '200':
          description: Invoice voided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Timezone:
      type: string
      example: America/Los_Angeles
      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
    Invoice:
      type: object
      required:
      - invoice
      properties:
        invoice:
          $ref: '#/components/schemas/InvoiceObjectExtended'
    ApiErrorBadRequest:
      type: object
      required:
      - status
      - error
      properties:
        status:
          type: integer
          format: int32
          example: 400
        error:
          type: string
          example: Bad request
    InvoiceObjectExtended:
      allOf:
      - $ref: '#/components/schemas/InvoiceObject'
      - type: object
        properties:
          credits:
            type: array
            items:
              $ref: '#/components/schemas/CreditObject'
          fees:
            type: array
            items:
              $ref: '#/components/schemas/FeeObject'
          subscriptions:
            type: array
            items:
              $ref: '#/components/schemas/SubscriptionObject'
          error_details:
            type: array
            items:
              type: object
              required:
              - lago_id
              - error_code
              - details
              properties:
                lago_id:
                  type: string
                  format: uuid
                  nullable: true
                  description: Unique identifier assigned to the error_detail within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the error's record within the Lago system.
                  example: 1a901a90-1a90-1a90-1a90-1a901a901a90
                error_code:
                  type: string
                  description: Code that specifies part of the application / connection, where the error originally happened
                  example: tax_error
                details:
                  type: object
                  description: Key value list of more elaborated error detail, where by the key of error_code an external service error details are stored
                  example:
                    tax_error: taxDateTooFarInFuture
    InvoiceOneOffCreateInput:
      type: object
      required:
      - invoice
      properties:
        invoice:
          type: object
          required:
          - external_customer_id
          - fees
          properties:
            external_customer_id:
              type: string
              description: Unique identifier assigned to the customer in your application.
              example: hooli_1234
            currency:
              allOf:
              - $ref: '#/components/schemas/Currency'
              - description: The currency of the invoice.
                example: EUR
            fees:
              type: array
              items:
                type: object
                required:
                - add_on_code
                properties:
                  add_on_code:
                    type: string
                    description: The code of the add-on used as invoice item.
                    example: setup_fee
                  invoice_display_name:
                    type: string
                    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 (SF1)
                  unit_amount_cents:
                    type: integer
                    nullable: true
                    description: The amount of the fee per unit, expressed in cents. By default, the amount of the add-on is used.
                    example: 12000
                  units:
                    type: string
                    pattern: ^[0-9]+.?[0-9]*$
                    nullable: true
                    description: The quantity of units associated with the fee. By default, only 1 unit is added to the invoice.
                    example: '2.5'
                  description:
                    type: string
                    nullable: true
                    example: The description of the fee line item in the invoice. By default, the description of the add-on is used.
                    description: This is a description
                  tax_codes:
                    type: array
                    items:
                      type: string
                    description: List of unique code used to identify the taxes.
                    example:
                    - french_standard_vat
    SubscriptionObject:
      type: object
      required:
      - lago_id
      - lago_customer_id
      - billing_time
      - external_customer_id
      - created_at
      - subscription_at
      - plan_code
      - external_id
      - status
      properties:
        lago_id:
          type: string
          format: uuid
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
          description: Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
        external_id:
          type: string
          example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba
          description: The subscription external unique identifier (provided by your own application).
        lago_customer_id:
          type: string
          format: uuid
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
          description: Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
        external_customer_id:
          type: string
          example: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba
          description: The customer external unique identifier (provided by your own application).
        billing_time:
          type: string
          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).
          example: anniversary
          enum:
          - calendar
          - anniversary
        name:
          type: string
          example: Repository A
          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.
          nullable: true
        plan_code:
          type: string
          example: premium
          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.
        status:
          type: string
          description: 'The status of the subscription, which can have the following values:

            - `pending`: a previous subscription has been downgraded, and the current one is awaiting automatic activation at the end of the billing period.

            - `active`: the subscription is currently active and applied to the customer.

            - `terminated`: the subscription is no longer active.

            - `canceled`: the subscription has been stopped before its activation. This can occur when two consecutive downgrades have been applied to a customer or when a subscription with a pending status is terminated.'
          example: active
          enum:
          - active
          - pending
          - terminated
          - canceled
        created_at:
          type: string
          format: date-time
          example: '2022-08-08T00:00:00Z'
          description: The creation date of the subscription, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). This date provides a timestamp indicating when the subscription was initially created.
        canceled_at:
          type: string
          format: date-time
          example: '2022-09-14T16:35:31Z'
          description: The cancellation date of the subscription. This field is not null when the subscription is `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
          nullable: true
        started_at:
          type: string
          format: date-time
          example: '2022-08-08T00:00:00Z'
          description: The effective start date of the subscription. This field can be null if the subscription is `pending` or `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
          nullable: true
        ending_at:
          type: string
          format: date-time
          example: '2022-10-08T00:00:00Z'
          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).
        subscription_at:
          type: string
          format: date-time
          example: '2022-08-08T00:00:00Z'
          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).
        terminated_at:
          type: string
          format: date-time
          example: '2022-09-14T16:35:31Z'
          description: The termination date of the subscription. This field is not null when the subscription is `terminated`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC)
          nullable: true
        previous_plan_code:
          type: string
          example: null
          description: The code identifying the previous plan associated with this subscription.
          nullable: true
        next_plan_code:
          type: string
          example: null
          description: The code identifying the next plan in the case of a downgrade.
          nullable: true
        downgrade_plan_date:
          type: string
          format: date
          example: '2022-04-30'
          description: The date when the plan will be downgraded, represented in ISO 8601 date format.
          nullable: true
        trial_ended_at:
          type: string
          format: date-time
          example: '2022-08-08T00:00:00Z'
          description: The date when the free trial is ended, represented in ISO 8601 date format.
          nullable: true
        current_billing_period_started_at:
          type: string
          format: date-time
          example: '2022-08-08T00:00:00Z'
          description: The date and time when the current billing period started, represented in ISO 8601 date format.
          nullable: true
        current_billing_period_ending_at:
          type: string
          format: date-time
          example: '2022-09-08T00:00:00Z'
          description: The date and time when the current billing period ends, represented in ISO 8601 date format.
          nullable: true
    ApiErrorNotFound:
      type: object
      required:
      - status
      - error
      - code
      properties:
        status:
          type: integer
          format: int32
          example: 404
        error:
          type: string
          example: Not Found
        code:
          type: string
          example: object_not_found
    IntegrationCustomer:
      type: object
      description: Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments.
      properties:
        lago_id:
          type: string
          format: uuid
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
          description: A unique identifier for the integration customer object in the Lago application.
        type:
          type: string
          example: netsuite
          description: 'The integration type used for accounting and tax syncs.

            Accepted values: `netsuite, anrok`.'
          enum:
          - netsuite
          - anrok
        integration_code:
          type: string
          example: netsuite-eu-1
          description: Unique code used to identify an integration connection.
        external_customer_id:
          type: string
          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.
        sync_with_provider:
          type: boolean
          example: true
          description: Set this field to `true` if you want to create a customer record in the integration's system. This option is applicable only when the `external_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
        subsidiary_id:
          type: string
          example: '2'
          description: This optional field is needed only when working with `netsuite` connection.
    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
    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.
      properties:
        address_line1:
          type: string
          example: 5230 Penfield Ave
          description: The first line of the billing address
          nullable: true
        address_line2:
          type: string
          example: null
          description: The second line of the billing address
          nullable: true
        city:
          type: string
          example: Woodland Hills
          description: The city of the customer's billing address
          nullable: true
        country:
          allOf:
          - $ref: '#/components/schemas/Country'
          - nullable: true
            description: Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
            example: US
        state:
          type: string
          example: CA
          description: The state of the customer's billing address
          nullable: true
        zipcode:
          type: string
          example: '91364'
          description: The zipcode of the customer's billing address
          nullable: true
    Country:
      type: string
      example: US
      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
      - I

# --- truncated at 32 KB (89 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lago/refs/heads/main/openapi/lago-invoices-api-openapi.yml