POST
/
invoices
/
{lago_id}
/
download
Authorization
Path
LAGO_URL="https://api.getlago.com"
INVOICE_ID="__YOUR_INVOICE_ID__"
API_KEY="__YOUR_API_KEY__"

curl --location --request POST "$LAGO_URL/api/v1/invoices/$INVOICE_ID/download" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json'
{
  "invoice": {
    "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "sequential_id": 2,
    "number": "LAG-1234-001-002",
    "issuing_date": "2022-04-30",
    "payment_due_date": "2022-04-30",
    "net_payment_term": 30,
    "invoice_type": "subscription",
    "status": "finalized",
    "payment_status": "succeeded",
    "currency": "EUR",
    "fees_amount_cents": 100,
    "coupons_amount_cents": 10,
    "credit_notes_amount_cents": 10,
    "sub_total_excluding_taxes_amount_cents": 100,
    "taxes_amount_cents": 20,
    "sub_total_including_taxes_amount_cents": 120,
    "prepaid_credit_amount_cents": 123,
    "total_amount_cents": 100,
    "version_number": 3,
    "file_url": "https://getlago.com/invoice/file",
    "customer": {
      "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "sequential_id": 1,
      "slug": "LAG-1234-001",
      "external_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
      "applicable_timezone": "America/Los_Angeles",
      "created_at": "2022-04-29T08:59:51Z"
    },
    "metadata": [],
    "applied_taxes": [],
    "credits": [],
    "fees": [],
    "subscriptions": []
  }
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

lago_id
string
required

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.

Response

200 - application/json
invoice
object
required