Help
/
nlfren
Sign in
HomeGetting startedDocumentsBankInvoicesVATFor accountantsSecurityDevelopers

Developers

Developer overviewAuthenticationThe am CLIConnect an agent over MCPErrors and rate limits

Activity

Export an entity's activityAn entity's activityA firm's activityAn organisation's activity

Artifacts

Finalize an uploadRead an artifactList artifactsPresign an uploadRead an artifact againMake a file's view again

Ask

Ask AmanucciDelete an Ask threadAsk threadsAsk thread

Assignments

Assign or unassign a firm personWho works this client

Bank

Allocate a park to an itemConfirm a matchThe bank rows' figuresBank statementsBank transactionsOne bank transactionReject a match

Bank accounts

Register a bank accountList bank accounts

Cases

Accept Amanucci's proposalAnswer a questionAnswer a grant askRecord a firm ruleRecord a precedentAsk the clientConfirm a caseCorrect a caseCorrect a document's kindCorrect an eventDeduct a receipt's VAT on evidenceDismiss a caseKeep one of two documentsCasesClient requestsCorrectionsA firm's rulesA client's notesPrecedentsMerge two parties through a caseOne caseRemind the clientAsk for a grantRe-run a case under reviewWrite a note

Controls

Control runsOne control run

Decisions

Decision runsOne decision run

Documents

Cancel a draftCompose a documentSet up a recurring planAdd an itemDownload a payment fileEnd a recurring planFinalize a documentOne documentA blank draft's templateThe head figures of a document listRead what a line may be composed withA supplier invoice's payment QRRead a recurring planDownload a renditionRead an itemKeep one of an invoice's filesPick the invoice a credit note correctsThe document listList recurring plansList itemsPause a recurring planPreview a document's sendDownload a document's preview PDFPreview a payment fileCorrect a numbered document's email addressRecord a quote's outcomeResume a recurring planRevise a draftSend a documentSupersede a finalized documentChange a recurring planChange an item

Events

The events' countsEventsAn event's related bookingsOne event

Filings

Generate a filingRead a filingDownload a filing's payloadThe filings' figuresFiling formsList filingsRecord that a planned external filing was madeRead a grid's linesRecord an external filingRecord a filing's proofReplace a filingSign a filing's submission

Grants

Grant or revoke a capabilityEngage a firmRead my firm's switchesWhich doors are openTake your books elsewhere

Intake

Add a mail senderBlock a held mailGet the books' mail addressGet an intake batchList the books' mailList the books' mail sendersList intake batchesRelease a held mailRemove a mail senderSet the books' mail address

Law

Release a pack lock

Ledger

Close a fiscal yearThe journal's countsThe fixed-asset registerThe journalLock a periodLock a period over argued red checksMark provisional entries reviewedPost an entryPost the opening balanceWithhold on a payment for worksBalancesOne entryReopen a period

Matching

Match groupsAgingOne match group

Migrations

Abandon a switch-in migrationA switch-in migrationA switched-in client's documentsA firm's switch-in migrationsResume a switch-in's stopped replaySign a switch-in migrationStage a switched-in client's documentsStage a switch-in dropSubmit a switched-in client's documentsSubmit a switch-in dropSet a switch-in's last filed period

Overview

The digestThe Overview

Parties

Register a partyRead a partyList partiesPropose a merge of two contactsSet a party's national numberEdit a party

People

Walk through the doorAppend a firm seat versionAppend an organisation seat versionOpen the firm's doorOpen the client's doorSave a presetDelete a presetThe one paint callWho has been invited to this firmWho works at this firmA firm's notesWho has been invited to this organisationWho is in this organisationA list's presetsRead an invite before accepting itOffboard a firm seatShut a pending doorSend feedbackChange a presetSet your profileWrite a firm note

Queue

Queue health

Reports

An entity's annual accountsA firm's portfolioAn entity's statements

Settings

Remap a semantic accountConfirm the activity profileElect the entity's configSet the entity's invoicingElect the entity's policyDecide what owners may sign, by defaultRecord the import licenceDecide what this organisation's owners may signElect the entity's VAT deduction method for a yearRegister a vehicleSet a vehicle's VAT use for a yearAdd a shelfOpen a set of booksCreate an organisationCut a periodThe activity profileThe KBO's proposed activity profileThe entity's configThe entity's invoicing settingsThe entity's policyWhat owners may sign, by defaultThe import licenceWhat owners of this organisation may signThe entity's VAT deduction method for a yearA vehicle of the registerA vehicle's VAT use for a yearThe semantic-to-shelf mapThe chartWhich books are in this organisationThe calendarLook up a contractor's debtsOne set of booksRecord a contractor's debt checkSet the entity's IBANSet the entity's identitySet the entity's VAT number

Step up

Ask for a codeProve you are here
Help·Developers

One document

One document, whole, read in ONE snapshot: the header, its lines under their ids in `line_no` order, its standing, its paper, its findings, the acts this caller may take on it now, and its head revision with the `revisionSeq` a subsequent edit pins against. A document in ANOTHER entity is the same 404 as one that does not exist — a caller who could tell them apart could walk a competitor's invoice ids one uuid at a time.

PreviousFinalize a documentNextA blank draft's template
GET
/v1/entities/{entityId}/documents/{documentId}

One document, whole, read in ONE snapshot: the header, its lines under their ids in line_no order, its standing, its paper, its findings, the acts this caller may take on it now, and its head revision with the revisionSeq a subsequent edit pins against. A document in ANOTHER entity is the same 404 as one that does not exist — a caller who could tell them apart could walk a competitor's invoice ids one uuid at a time.

Authorization

headerx-api-key<token>

A per-user API key. x-api-key takes precedence over every session cookie when both are sent. Omit this header to use a session, including for signed-act presence.

Path Parameters

documentId*string
Formatuuid
entityId*string
Formatuuid

Response Body

The document.

application/json
  1. response
  1. response
  2. …
artifactId*|

The document's shown file (document_shown_file: the readable file its page paints, an outbound row's PDF), else, on a document that came only as a UBL, its earliest agreed structured file; null when it has neither.

Formatuuid
currency*string|null
derivedFromId*|
Formatuuid
direction*string

outbound for everything this API originates; the column exists because one table holds both directions.

docNo*|

Minted at finalize from document_counter — sequential and gap-free per entity per kind per year, which is a legal requirement rather than a nicety. null on a draft.

finalized*boolean
id*string
Formatuuid
issueDate*|
Formatdate
kind*string
Value in"quote""invoice""credit_note"
partyId*|
Formatuuid
paymentRef*|

The structured reference stamped at finalize, minted by the PACK's scheme (xxref here). It travels as UBL PaymentID and lands VERBATIM on the receivable open item — the join that makes inbound payment matching a lookup rather than a search.

readingState*|

The 'received, reading…' rendering: processing while the row's artifact has an extract work item queued or running (a re-read), recorded once the reading finished, null on outbound rows. An artifact with no row yet lists under inFlight, not here. Derived at read from rows the upload already minted — no stored upload status.

Value in"processing""recorded"null
supersededBy*|

Set once, NULL→id: on a quote, when its revision (supersedeDocument's draft) is finalized while the quote is unanswered; on an inbound row, when a duplicate-document case names it the loser. The old row keeps its number and its artifacts; superseded_by IS NULL is what a live-document list filters on.

Formatuuid
totals*|

The frozen arithmetic, as STRINGS. Outbound: computed by computeTotals per EN 16931's rate-group rounding — never re-derived per line, because a per-line re-derivation can differ by a cent and then the entry no longer equals the artifact. Inbound: the reading's projection (class ii); a row whose reading did not carry all three members renders totals: null until one does.

warnings*array<>

What the document warns of now, derived at read and never stored (document_warnings); empty on most documents, a draft and an inbound row. peppol_expected: an invoice or credit note that Belgium's structured e-invoicing mandate puts in scope (a supply not exempt under art. 44) reached its customer by email or download with Peppol never tried. The send went through: it is a warning, never a refusal, and it stays when the customer later gains a Peppol endpoint.

eventId*|

Inbound: document.event_id. Outbound: the event of sale_event_version_id. null until an event exists.

Formatuuid
liveCase*|

The live case on the document's event head version, else on its artifact. A client seat sees it only while it waits on them, without its kind.

open*|

document_open at the business day, at the currency's scale: what still moves on a finalized outbound invoice (what the customer still owes, net of its credit notes) or credit note (what goes back),, and on an inbound one with a status, a payable (what the entity still owes its supplier, net of the credit notes linked to it, an unposted bill at its projected total; what a supplier's credit note still gives back, (b)); null on a draft, a quote and an inbound row with no status.

overdueDays*|

document_overdue_days at the business day: the days an invoice that still owes, net of its credit notes, is past its due date (a finalized outbound one's, or the one an inbound one's supplier printed), whatever its status, so a partly paid late invoice reads both and a credited one only credited; null when nothing is late and on every other row. Overdue is a facet beside the status, never a status.

payability*string

Whether Pay pays it, judged beside status: payable, a supplier's invoice still to pay (to_pay, partially_paid) in euro with an account printed and a name to pay; else why not, Pay's own refusal: not_payable (outbound, a credit note, a quote, or an invoice with no status, paid or credited), contested (a file of it states another invoice and waits for a person), rebooking (its booking is being changed: its event's head books another total than the entry still posted, whose re-post waits for a person, (p)), currency_not_sepa, missing_payee_account, missing_payee_name. The one answer a list's picking, the document's pay and Pay read.

Value in"payable""not_payable""contested""rebooking""currency_not_sepa""missing_payee_account""missing_payee_name"
status*|

What a document is now, document_status at the business day by its kind's precedence: outbound, invoice draft · credited · paid · partially_paid · sent · ready, credit note draft · settled · sent · ready, quote draft · invoiced · accepted · declined · expired · sent · ready; inbound, a payable ( (b)), invoice credited · paid · partially_paid · to_pay, credit note settled · open. Derived at read, never stored. null on an inbound row with none (still being read, a duplicate's loser, a quote), which readingState and liveCase describe.

Value in"draft""ready""sent""partially_paid""paid""credited""settled""accepted""declined""expired""invoiced""to_pay""open"null
buyerReference*string|null
consignmentDispatchCountry*string|null
consignmentExcise*boolean|null
consignmentIntrinsicValue*string|null
deliverToCountry*string|null
deliveryDate*|
Formatdate
invoicePeriodEnd*|
Formatdate
invoicePeriodStart*|
Formatdate
supplyKind*|
Value in"goods_dispatched""goods_collected""goods_installed""service""tbe_service""service_at_place"null
vatExemptionCode*string|null
vatExemptionReason*string|null
acts*array<>

Exactly the verbs this caller may take on the document now: a draft edit (reviseDocument), finalize, cancel (cancelDraft) and, but a credit note, duplicate (createDocument from it as copy); a finalized document no delivery reached yet (ready) send (sendDocument; a draft's send is its finalize), first; a finalized invoice credit (createDocument of a credit note from it as derive) until fully credited, and duplicate; a waiting quote accept and decline (recordDocumentOutcome; an expired one decline alone) and supersede (supersedeDocument) while nothing superseded it, and duplicate (a quote a newer one replaced is answered, revised and sent no more); an accepted quote whose derived invoice was cancelled create_invoice (createDocument of an invoice from it as derive); a supplier's invoice still to pay (to_pay, partially_paid) pay (previewPaymentFile, downloadPaymentFile, getPaymentQr) for a client seat and a firm hat the owner granted payments.prepare; a received document with a contested file keep (keepDocumentFile) for a firm hat granted ledger.manage, never a client seat ( (q)). [] to a caller who may read but neither issue nor pay here.

correctsNumber*|

Inbound: the number of the invoice it says it corrects, as printed (BT-25), which the document-link ladder matches against its supplier's invoices; null when it prints none, and outbound.

discount*|

A percent above 0 and at most 100, or an amount above 0 at the currency's places. A document carries one or its lines do, never both at finalize (discount_two_levels).

dueDate*|
Formatdate
email*|

Its own email: one subject, a body per language it prints in and maybe its own address, copied from the entity's templates for its kind when it was made, edited on it alone, frozen at finalize save its address, which a numbered document nothing has reached may still correct (readdressDocument); what its send fills and sends. null inbound.

emailPlaceholders*array<>

The placeholders its kind's email may name: docNo, amount, customer, an invoice's dueDate, a quote's validUntil. Its own text naming another is refused (422 invalid_composition).

files*array<>

Its files, the live ones in the order they joined, a rejected one too: outbound, the finalize's PDF and, for an invoice or a credit note, its UBL; inbound, every file it came as, by any rail. At most one is shown, the one a page paints. [] on a draft.

findings*array<|>

Every finding a finalize of this draft would refuse, in reading order (checkDraft); [] once finalized and on an inbound row.

invoiceId*|

A quote's invoice, the live one derived from it (one at most): the draft its accept made, then that invoice finalized. null on every other row, and on a quote whose derived draft was cancelled.

Formatuuid
language*|

The FIRST language, the seller's legal one; null inbound, and on a draft no compose door wrote.

Value in"nl""fr""de""en"null
lines*array<>
mayLinkInvoice*boolean

Whether this caller may pick the invoice this supplier credit note corrects now (linkCorrectedInvoice): an inbound credit note with a status, its supplier known and linked to no invoice, for a client seat or a firm hat holding ledger.manage. false on every other document.

note*string|null
paper*|

The paper of an outbound document; null on an inbound row.

party*|null
payeeBic*|

Inbound: the BIC the supplier printed beside its account (BT-86), 8 or 11; null outbound and where none was printed.

payeeIban*|

Inbound: the account the supplier printed for payment (BT-84), stored only when its mod-97 holds; what Pay pays to. null outbound and where none was read.

printedReference*|

paymentRef as its scheme prints it (a structured communication's +++090/9337/55493+++), the form a person reads and types; null with none, or in a scheme this API does not know.

revision*|

The head revision, who wrote it and when (, (b)); null for a document no compose door ever revised (an inbound row).

revisionSeq*integer

The head revision, handed back WITH the document rather than left to a second request: §0's pinned-row discipline is only usable if reading the row and reading the version it is at are one fact. 0 means no revisions yet, which is exactly what a first expectedRevisionSeq sends.

secondLanguage*|
Value in"nl""fr""de""en"null
sendInFlight*boolean

An attempt to deliver it is still waiting for its rail's answer: it may have reached the customer, so acts offer no send and a new send is 409 send_in_flight until the answer is recorded.

sends*array<>

Its send log: every delivery attempt in the order made, so a reader says how its delivery stands — sent by which rail to whom and when, refused, failed or in flight — from the record, a reload alike. [] on a draft and an inbound row.

supplierNumber*|

Inbound: the number the supplier printed on its document (BT-1), never unique; null outbound (its number is docNo).

termsText*|

Its own terms sentence, printed once at its paper's foot: copied from the entity's (Settings › Invoicing) when it was made, edited on it alone, frozen at finalize. null prints none: inbound, a draft whose entity had none, or one a revise cleared.

validUntil*|
Formatdate
Example Request
curl -X GET 'https://api.amanucci.com/v1/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{
  "artifactId": "706a3f1e-c357-4634-b1bf-20c221b5bb4e",
  "currency": "string",
  "derivedFromId": "2cb5b4f3-5821-410f-9083-c613266656dd",
  "direction": "string",
  "docNo": "string",
  "finalized": true,
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "issueDate": "2019-08-24",
  "kind": "quote",
  "partyId": "950a3d1f-4657-4e7b-87db-3ff5fa95b5c0",
  "paymentRef": "string",
  "readingState": "processing",
  "supersededBy": "608778cc-35f6-47d1-a540-9bcbfdf24101",
  "totals": {
    "lineExtensionAmount": "string",
    "taxAmount": "string",
    "taxInclusiveAmount": "string",
    "property1": null,
    "property2": null
  },
  "warnings": [
    "peppol_expected"
  ],
  "eventId": "d6703cc8-9e79-415d-ac03-a4dc7f6ab43c",
  "liveCase": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "kind": "missing_coverage",
    "openedAt": "2019-08-24T14:15:22Z",
    "status": "open"
  },
  "open": "string",
  "overdueDays": 0,
  "payability": "payable",
  "status": "draft",
  "buyerReference": "string",
  "consignmentDispatchCountry": "string",
  "consignmentExcise": true,
  "consignmentIntrinsicValue": "string",
  "deliverToCountry": "string",
  "deliveryDate": "2019-08-24",
  "invoicePeriodEnd": "2019-08-24",
  "invoicePeriodStart": "2019-08-24",
  "supplyKind": "goods_dispatched",
  "vatExemptionCode": "string",
  "vatExemptionReason": "string",
  "acts": [
    "edit"
  ],
  "correctsNumber": "string",
  "discount": {
    "kind": "amount",
    "value": "string"
  },
  "dueDate": "2019-08-24",
  "email": {
    "bodies": {
      "de": "string",
      "en": "string",
      "fr": "string",
      "nl": "string"
    },
    "subject": "string",
    "to": "string"
  },
  "emailPlaceholders": [
    "amount"
  ],
  "files": [
    {
      "artifactId": "706a3f1e-c357-4634-b1bf-20c221b5bb4e",
      "decided": {
        "at": "2019-08-24T14:15:22Z",
        "by": "string",
        "how": "corrected"
      },
      "figures": true,
      "kind": "office_document",
      "name": "string",
      "reading": {
        "currency": "string",
        "lines": [
          {
            "description": "string",
            "lineTotal": "string",
            "quantity": "string",
            "unitPrice": "string",
            "vatRate": "string"
          }
        ],
        "paymentRef": "string",
        "totals": {
          "lineExtensionAmount": "string",
          "taxAmount": "string",
          "taxInclusiveAmount": "string",
          "property1": null,
          "property2": null
        }
      },
      "receivedAt": "2019-08-24T14:15:22Z",
      "role": "readable",
      "shown": true,
      "source": "peppol",
      "standing": "agreed",
      "stated": {
        "account": "string",
        "currency": "string",
        "differs": [
          "total"
        ],
        "total": "string"
      }
    }
  ],
  "findings": [
    {
      "detail": "string",
      "field": "party",
      "lineNo": 0,
      "code": "party_incomplete",
      "party": {
        "missing": "party",
        "side": "buyer"
      }
    }
  ],
  "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec",
  "language": "nl",
  "lines": [
    {
      "description": "string",
      "detail": "string",
      "discount": {
        "kind": "amount",
        "value": "string"
      },
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "itemId": "f11b669d-7201-4c21-88af-d85092f0c005",
      "lineNo": 0,
      "lineTotal": "string",
      "quantity": "string",
      "unitCode": "string",
      "unitPrice": "string",
      "vatCategory": "string",
      "vatRate": "string"
    }
  ],
  "mayLinkInvoice": true,
  "note": "string",
  "paper": {
    "blocks": [
      {
        "seller": {
          "lines": [
            "string"
          ],
          "name": "string"
        },
        "title": {
          "first": "string",
          "second": "string"
        },
        "type": "head"
      }
    ],
    "currency": "string",
    "kind": "quote",
    "languages": {
      "first": "nl",
      "second": "nl"
    },
    "scale": 0
  },
  "party": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string"
  },
  "payeeBic": "string",
  "payeeIban": "string",
  "printedReference": "string",
  "revision": {
    "actor": {
      "display": "string",
      "id": "string",
      "kind": "human"
    },
    "at": "2019-08-24T14:15:22Z",
    "seq": 1,
    "yours": true
  },
  "revisionSeq": 0,
  "secondLanguage": "nl",
  "sendInFlight": true,
  "sends": [
    {
      "at": "2019-08-24T14:15:22Z",
      "outcome": "delivered",
      "rail": "peppol",
      "reason": "not_live",
      "recipient": "string",
      "sendId": "98079182-77f0-4075-97da-b6e925fc22cb",
      "settledAt": "2019-08-24T14:15:22Z"
    }
  ],
  "supplierNumber": "string",
  "termsText": "string",
  "validUntil": "2019-08-24"
}