Skip to main content

Get Invoice

Retrieve a specific invoice from your store.

By default the response contains the invoice's fields, its line items, the bill-to details, a link to the PDF, and — for Polish invoices — the KSeF delivery status. Use the include query parameter to expand the related transaction, order, customer, and any correction documents in the same call.

Request

GET /invoices/{id}

Path Parameters

ParameterTypeRequiredDescription
idstringYesInvoice UUID

Query Parameters

ParameterTypeRequiredDescription
includestringNoComma-separated list of sections to expand. Allowed values: transaction, order, customer, corrections. Unknown values are ignored.
note

A section that is not requested is returned as null — the key is always present, so the response shape stays stable. The line items, billing details, PDF link, and KSeF block are always present and are not controlled by include.

Example Request

curl -X GET "https://cart.easy.tools/api/v1/invoices/5b2c0f2e-1d4a-4c8b-9f3a-7e1a2b3c4d5e?include=transaction,order,customer" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Response

Success Response (200)

Returns a single invoice. The example below is a Polish invoice reported to KSeF, with the transaction, order, and customer sections requested.

{
"id": "5b2c0f2e-1d4a-4c8b-9f3a-7e1a2b3c4d5e",
"number": "EASY/2026/06/123",
"type": "invoice",
"status": "issued",
"total": 12300,
"net_total": 10000,
"tax_total": 2300,
"currency": "pln",
"customer_email": "anna.kowalska@example.com",
"issued_at": "2026-06-05T10:20:00+00:00",
"remote_id": "884512",
"download_url": "https://cart.easy.tools/api/v1/invoices/5b2c0f2e-1d4a-4c8b-9f3a-7e1a2b3c4d5e/download?expires=1749384000&signature=abc123",
"correction_of": null,
"corrected_amount": null,
"ksef": {
"gov_id": "5660000000-20260605-0A1B2C3D4E5F-12",
"status": "ok",
"error": null
},
"line_items": [
{
"name": "Vue.js Course — annual access",
"amount": 12300,
"net_amount": 10000,
"tax_amount": 2300,
"tax_rate": 23.0,
"quantity": 1,
"currency": "pln",
"reverse_charge": false,
"exempt": false
}
],
"billing_data": {
"name": "Anna Kowalska",
"email": "anna.kowalska@example.com",
"tax_id": "PL7010001234",
"address": "ul. Przykładowa 12/3",
"city": "Warszawa",
"post_code": "00-001",
"country": "PL",
"country_state": null
},
"transaction": {
"id": "1f0a9b8c-7d6e-5f4a-3b2c-1d0e9f8a7b6c",
"remote_id": "pi_3QabcXYZ",
"total": 12300,
"currency": "pln",
"paid_at": "2026-06-05T10:19:42+00:00"
},
"order": {
"id": "e4d3c2b1-a0f9-4e8d-7c6b-5a4f3e2d1c0b",
"product_name": "Vue.js Course",
"status": "completed"
},
"customer": {
"id": "0c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
"email": "anna.kowalska@example.com",
"name": "Anna Kowalska"
},
"corrections": null
}

An invoice not reported to KSeF has ksef set to null. A lean read (no include) returns the always-present sections with transaction, order, customer, and corrections set to null:

{
"id": "b3d3fbf4-1de9-4f0c-9a43-7143a0a9d592",
"number": "EASY/2026/06/42",
"type": "invoice",
"status": "issued",
"total": 4212,
"net_total": 3900,
"tax_total": 312,
"currency": "pln",
"customer_email": "buyer@example.com",
"issued_at": "2026-06-01T09:00:00+00:00",
"remote_id": "509353518",
"download_url": "https://cart.easy.tools/api/v1/invoices/b3d3fbf4-1de9-4f0c-9a43-7143a0a9d592/download?expires=1749384000&signature=abc123",
"correction_of": null,
"corrected_amount": null,
"ksef": null,
"line_items": [
{
"name": "Server add-on",
"amount": 4212,
"net_amount": 3900,
"tax_amount": 312,
"tax_rate": 8.0,
"quantity": 1,
"currency": "pln",
"reverse_charge": false,
"exempt": false
}
],
"billing_data": {
"name": "Jan Nowak",
"email": "buyer@example.com",
"tax_id": "PL5251234560",
"address": "123 Main Street",
"city": "Springfield",
"post_code": "90210",
"country": "US",
"country_state": null
},
"transaction": null,
"order": null,
"customer": null,
"corrections": null
}

Response Fields

FieldTypeNullableDescription
idstringNoUnique identifier for the invoice (UUID)
numberstringYesInvoice number. Null until the invoice has a number assigned.
typestringNoDocument type: invoice or correction.
statusstringNoDerived status: issued, pending, or error.
totalintegerNoGross total in minor units (e.g. cents/grosze)
net_totalintegerYesNet total in minor units. Null when the invoice has no line items.
tax_totalintegerYesTax total in minor units. Null when the invoice has no line items.
currencystringNoLowercase ISO currency code (e.g. "pln")
customer_emailstringYesBilling email recorded on the invoice
issued_atstringYesWhen the invoice was issued (ISO 8601 format). Null while pending.
remote_idstringYesThe invoice's id with the issuing service
download_urlstringNoA temporary signed link to download the invoice PDF. It needs no Authorization header and expires about an hour after the read.
correction_ofstringYesFor a correction, the id (UUID) of the invoice it corrects. Null otherwise.
corrected_amountintegerYesFor a correction, the corrected gross amount in minor units. Null otherwise.
ksefobjectYesKSeF delivery status. null for non-Polish invoices.
line_itemsarrayNoThe invoice's line items
billing_dataobjectNoThe bill-to details
transactionobjectYesThe payment the invoice was issued for. null unless transaction is included.
orderobjectYesThe order the payment belongs to. null unless order is included.
customerobjectYesThe customer the invoice was issued to. null unless customer is included.
correctionsarrayYesCorrection documents issued against this invoice. null unless corrections is included.

line_items[]

FieldTypeNullableDescription
namestringYesLine item name
amountintegerNoGross amount in minor units
net_amountintegerYesNet amount in minor units
tax_amountintegerYesTax amount in minor units
tax_ratenumberNoTax rate as a percentage (e.g. 23.0)
quantityintegerNoQuantity
currencystringNoLowercase ISO currency code
reverse_chargebooleanNoWhether the line uses the reverse-charge mechanism
exemptbooleanNoWhether the line is tax-exempt

billing_data

FieldTypeNullableDescription
namestringYesBill-to name
emailstringYesBill-to email
tax_idstringYesBill-to tax identifier
addressstringYesStreet address
citystringYesCity
post_codestringYesPostal code
countrystringYesISO-2 country code (e.g. "PL")
country_statestringYesState/province code, when set

ksef

Present only for invoices reported to the KSeF system; null for all others.

FieldTypeNullableDescription
gov_idstringYesThe reference number assigned by the government tax system
statusstringYesDelivery status. See KSeF status for the full list.
errorstringYesThe delivery error message, when the document was not accepted by the government system

transaction

FieldTypeNullableDescription
idstringNoTransaction identifier (UUID)
remote_idstringYesThe provider's own transaction id
totalintegerNoCaptured amount in minor units
currencystringNoLowercase ISO currency code
paid_atstringYesWhen the payment was settled (ISO 8601 format)

order

FieldTypeNullableDescription
idstringNoOrder identifier (UUID)
product_namestringNoPrimary product name, cached at purchase time
statusstringYesOrder status: created, awaiting_payment, processing, completed, canceled, or refunded. Null for legacy orders without a status.

customer

Resolved from the order's account. When the account no longer exists, id is null and the email/name fall back to the bill-to details.

FieldTypeNullableDescription
idstringYesCustomer identifier (UUID). Null when there is no linked account.
emailstringYesCustomer email
namestringYesCustomer full name

corrections[]

Correction documents that point back at this invoice. Empty array when there are none.

FieldTypeNullableDescription
idstringNoCorrection identifier (UUID)
numberstringYesCorrection number
issued_atstringYesWhen the correction was issued (ISO 8601 format)
corrected_amountintegerYesThe corrected gross amount in minor units

Error Responses

Bad Request (400)

{
"message": "Invalid invoice ID"
}

Invoice Not Found (404)

{
"message": "Invoice with ID <UUID> not found"
}

Unauthorized (401)

{
"message": "Unauthenticated."
}

Unavailable (422)

Returned when your store does not issue invoices through EasyTools invoicing.

{
"message": "Invoices are only available for stores using Easybilling."
}