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

Send a document

Send a document: a draft is finalized first, as `finalizeDocument` would, then each rail of the plan is tried until one delivers — Peppol, falling back to the email when it refuses or fails; `rail` starts the plan there (`email`), or names `download` alone. Each attempt is one row, recorded before its rail is asked; a refused or failed delivery is an answer (200), the document then `ready` to be sent again. Judged before anything is written, so a draft nobody can receive is never numbered: Peppol for a quote is 422 `rail_not_for_kind`, no rail at all 422 `no_recipient`; finalize's own refusals as `finalizeDocument` answers them. Idempotent by `sendId`: a replay answers the same send, writing nothing; a send id another document's send holds is 409 `send_id_conflict`. A quote a newer one replaces is 409 `quote_superseded`; a document revised after `expectedRevisionSeq`, 409 `revision_conflict`; nothing written for either. While an attempt of the document is in flight (its rail's answer not yet recorded, as after `send_unsettled`), a new send is 409 `send_in_flight`, its rail never asked: that answer may have reached the customer.

PreviousRevise a draftNextSupersede a finalized document
POST
/v1/entities/{entityId}/documents/{documentId}/send

Send a document: a draft is finalized first, as finalizeDocument would, then each rail of the plan is tried until one delivers — Peppol, falling back to the email when it refuses or fails; rail starts the plan there (email), or names download alone. Each attempt is one row, recorded before its rail is asked; a refused or failed delivery is an answer (200), the document then ready to be sent again. Judged before anything is written, so a draft nobody can receive is never numbered: Peppol for a quote is 422 rail_not_for_kind, no rail at all 422 no_recipient; finalize's own refusals as finalizeDocument answers them. Idempotent by sendId: a replay answers the same send, writing nothing; a send id another document's send holds is 409 send_id_conflict. A quote a newer one replaces is 409 quote_superseded; a document revised after expectedRevisionSeq, 409 revision_conflict; nothing written for either. While an attempt of the document is in flight (its rail's answer not yet recorded, as after send_unsettled), a new send is 409 send_in_flight, its rail never asked: that answer may have reached the customer.

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

Request Body

application/json
  1. body
  1. body
  2. …
expectedRevisionSeq?integer

The draft's head revision the sender reviewed (getDocument's revisionSeq): a document revised since is 409 revision_conflict, nothing written, so a revise from another tab never goes out unseen; a finalized document's head is frozen with it, so the read's revisionSeq still names it (Send again). An email attempt goes only to the address its document names as it stands (document_send_recipient_current): a readdress that lands between the plan and its email attempt is 409 revision_conflict too, after the draft was numbered or a Peppol attempt was recorded, which stay; the document is then numbered and not sent, to be reviewed and sent again. Absent: no revision is pinned.

Range0 <= value
rail?string

A delivery rail (document_send_rail_vocabulary): peppol (the customer's endpoint, from the entity's participant id, over the deployment's Peppol rail: the not-live one refuses every attempt in fixed words and the email follows, the demo one a deployment without real clients may wire answers delivered without sending anything), email (the customer's first address) or download (delivered once its attempt is recorded).

Value in"peppol""email""download"
sendId*string

A uuid v7 the client mints for this send: its idempotency key, and its first attempt's id.

Formatuuid

Response Body

The send's attempts and the document's first delivery.

application/json
  1. response
  1. response
  2. …
attempts*array<>

The send's attempts in order (Peppol, then the email it falls back to), the first named by sendId. A replay of the send id answers exactly these, writing nothing.

docNo*string

The document's number: a draft takes it from the send.

documentId*string
Formatuuid
sentAt*|

The document's FIRST delivery (document.sent_at), ISO-8601 UTC; null until one, and unchanged by any later send.

sentVia*|

The first delivery's rail; null until one.

Value in"peppol""email""download"null
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.

Example Request
curl -X POST 'https://api.amanucci.com/v1/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/send' \
  -H 'Content-Type: application/json' \
  -d '{
  "sendId": "98079182-77f0-4075-97da-b6e925fc22cb"
}'
Example Response
{
  "attempts": [
    {
      "detail": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "outcome": "delivered",
      "providerRef": "string",
      "rail": "peppol",
      "recipient": "string"
    }
  ],
  "docNo": "string",
  "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",
  "sentAt": "string",
  "sentVia": "peppol",
  "warnings": [
    "peppol_expected"
  ]
}