Skip to content

Get an e-invoice

The einvoices.get operation: GET /api/v1/einvoices/{id} in the REST API and the einvoices_get tool in the MCP server.

GET/api/v1/einvoices/{id}

Returns one e-invoice (einv_…): the invoice or credit note it was generated from, the route it was sent by (country, transaction type, provider, format), its status and history, the provider's ID, the stored document (its SHA-256 and the generator version) and, when it failed or was rejected, the reason. E-invoices of another brand or mode are resource_not_found.

At a glance

  • REST: GET /api/v1/einvoices/{id}
  • MCP tool: einvoices_get
  • Operation ID: einvoices.get
  • Scope: Brand
  • Permission: invoices:read
  • Risk tier: read
  • Dry run: Not supported
  • Idempotency: Not needed (read only)
  • Modes: Test and live
  • Authentication: API key with the invoices:read scope
  • Since: M13

Request

Path parameters

FieldTypeDescription
ideinv_… ID

Query parameters

This operation takes no query parameters.

Response

200 OK with a JSON object:

FieldTypeDescription
ideinv_… ID
object"einvoice"
livemodeboolean
orgIdorg_… ID
entityIdent_… ID
brandIdbrd_… ID
documentKindone of invoice, credit_note
documentIdstringThe invoice (inv_…) or credit note (cn_…) it was generated from.
documentNumberstring
customerIdstring or null
countrystring
transactionTypeone of b2b, b2g, b2c
providerstring
formatone of UBL_2_1_PEPPOL_BIS_3, CII, national
statusone of pending, queued, delivered, accepted, rejected, failedpending (queued for sending), queued (the provider took it), delivered, accepted, rejected (by the receiver) or failed (couldn't be generated or sent).
externalIdstring or nullThe provider's ID of the transmission.
buyerEndpointstring or null
sellerEndpointstring or null
buyerReferencestring or null
fileobject or nullThe generated document as stored (UBL XML) and the generator version that wrote it.
errorobject or null
attemptsinteger
sentAtdate-time or null
lastCheckedAtdate-time or null
historyarray of object
history[].statusone of pending, queued, delivered, accepted, rejected, failed
history[].atdate-time
history[].reasonstring or null
createdAtdate-time
updatedAtdate-time

Examples

An accepted e-invoice

HTTP
GET /api/v1/einvoices/einv_01jbxa6qk3f0v8w9zq2y7k5n70
Authorization: Bearer or_test_…

Response (200):

JSON
{
  "id": "einv_01jbxa6qk3f0v8w9zq2y7k5n70",
  "object": "einvoice",
  "livemode": false,
  "orgId": "org_01jacq4m3xf0v8w9zq2y7k5n6a",
  "entityId": "ent_01jacq4m3xf0v8w9zq2y7k5n6h",
  "brandId": "brd_01jacq4m3xf0v8w9zq2y7k5n6j",
  "documentKind": "invoice",
  "documentId": "inv_01jacq4m3xf0v8w9zq2y7k5n70",
  "documentNumber": "ACME-2026-000101",
  "customerId": "cus_01jacq4m3xf0v8w9zq2y7k5n6k",
  "country": "HR",
  "transactionType": "b2b",
  "provider": "fake",
  "format": "UBL_2_1_PEPPOL_BIS_3",
  "status": "accepted",
  "externalId": "fake_einv_000001_inv_01jacq4m3xf0v8w9zq2y7k5n70",
  "buyerEndpoint": null,
  "sellerEndpoint": null,
  "buyerReference": null,
  "file": {
    "fileId": "file_01jbxa6qk3f0v8w9zq2y7k5n71",
    "sha256": "3f0c1e9b7a2d4c6e8f0a1b3c5d7e9f1a2b4c6d8e0f1a3b5c7d9e1f2a4b6c8d0e",
    "size": 4211,
    "generator": "ubl_peppol_bis_3@1"
  },
  "error": null,
  "attempts": 1,
  "sentAt": "2026-10-14T09:31:02.000Z",
  "lastCheckedAt": "2026-10-14T09:45:00.000Z",
  "history": [
    {
      "status": "pending",
      "at": "2026-10-14T09:30:05.000Z",
      "reason": null
    },
    {
      "status": "queued",
      "at": "2026-10-14T09:31:02.000Z",
      "reason": null
    },
    {
      "status": "accepted",
      "at": "2026-10-14T09:45:00.000Z",
      "reason": null
    }
  ],
  "createdAt": "2026-10-14T09:30:05.000Z",
  "updatedAt": "2026-10-14T09:45:00.000Z"
}

An e-invoice that couldn't be sent

HTTP
GET /api/v1/einvoices/einv_01jbxa6qk3f0v8w9zq2y7k5n70
Authorization: Bearer or_test_…

Response (200):

JSON
{
  "id": "einv_01jbxa6qk3f0v8w9zq2y7k5n70",
  "object": "einvoice",
  "livemode": false,
  "orgId": "org_01jacq4m3xf0v8w9zq2y7k5n6a",
  "entityId": "ent_01jacq4m3xf0v8w9zq2y7k5n6h",
  "brandId": "brd_01jacq4m3xf0v8w9zq2y7k5n6j",
  "documentKind": "invoice",
  "documentId": "inv_01jacq4m3xf0v8w9zq2y7k5n70",
  "documentNumber": "ACME-2026-000101",
  "customerId": "cus_01jacq4m3xf0v8w9zq2y7k5n6k",
  "country": "HR",
  "transactionType": "b2b",
  "provider": "fake",
  "format": "UBL_2_1_PEPPOL_BIS_3",
  "status": "failed",
  "externalId": null,
  "buyerEndpoint": null,
  "sellerEndpoint": null,
  "buyerReference": null,
  "file": null,
  "error": {
    "code": "einvoice_endpoint_missing",
    "message": "The buyer has no electronic address: set the customer's `einvoice_endpoint` metadata (<scheme>:<identifier>).",
    "at": "2026-10-14T09:31:02.000Z"
  },
  "attempts": 1,
  "sentAt": null,
  "lastCheckedAt": null,
  "history": [
    {
      "status": "pending",
      "at": "2026-10-14T09:30:05.000Z",
      "reason": null
    },
    {
      "status": "failed",
      "at": "2026-10-14T09:31:02.000Z",
      "reason": "The buyer has no electronic address: set the customer's `einvoice_endpoint` metadata (<scheme>:<identifier>)."
    }
  ],
  "createdAt": "2026-10-14T09:30:05.000Z",
  "updatedAt": "2026-10-14T09:31:02.000Z"
}

Errors

CodeHTTP statusWhenWhat to do
resource_not_found404No such e-invoice for this brand in this mode.Check the ID and that your credentials are scoped to the right organization, entity, brand and mode.
scope_required400The request names no brand.Call the operation with credentials or a target at its level: an organization, a legal entity, a brand or the platform (details.required_scope).
permission_denied403You can't see this brand's invoices.Ask an organization owner or admin for a role or scope that allows this action.

It can also return these common errors: validation_failed, api_version_unsupported, authentication_required, api_key_invalid, dry_run_not_supported, rate_limited, internal_error.