{"_id":"flowie-exchange","_rev":"2-8122f72cc035da0f6ee37f05ae33ea64","name":"flowie-exchange","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"flowie-exchange","version":"0.1.0","keywords":["e-invoicing","peppol","invoice","einvoicing","flowie","factur-x","fatturapa","vida","api"],"author":{"url":"https://get-flowie.com","name":"Flowie","email":"support@flowie.fr"},"license":"MIT","_id":"flowie-exchange@0.1.0","maintainers":[{"name":"yannrs","email":"yann@flowie.fr"}],"homepage":"https://docs.get-flowie.com","bugs":{"url":"https://github.com/FlowieAI/exchange-api/issues"},"dist":{"shasum":"df93c74ca3647f7a03103cd4b83040b284d30021","tarball":"https://registry.npmjs.org/flowie-exchange/-/flowie-exchange-0.1.0.tgz","fileCount":4,"integrity":"sha512-1C1qxuCuWYOe9LIlt9DWtEoCD7f+YfZ7sOFCvnToFr1BZGrfwXLE8dvNhZSm3hqa1K/OUCkLRw7wI4BJJQkdwA==","signatures":[{"sig":"MEQCIAFzUCGFMYKYThwN3DrqIETDAROC3Z2t8LZQpCN2DMUWAiAxcczJCOUnmNcrCB/TfmMfFOBDnq7tWcn396IlsL0y2w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16165},"main":"./index.js","type":"module","types":"./index.d.ts","engines":{"node":">=18"},"gitHead":"baaed5d579b3349a9afaa208cebe8f809fb49ddc","_npmUser":{"name":"yannrs","email":"yann@flowie.fr"},"repository":{"url":"git+https://github.com/FlowieAI/exchange-api.git","type":"git","directory":"sdk/js"},"_npmVersion":"11.6.2","description":"Official JavaScript/TypeScript SDK for the Flowie Exchange API — compliant e-invoicing across 47 countries (Peppol, France PA/PPF, Italy SDI, Saudi Fatoora, India GST IRP, Malaysia MyInvois).","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/flowie-exchange_0.1.0_1786008953227_0.9354009982046487","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"flowie-exchange","version":"0.1.1","description":"Official JavaScript/TypeScript SDK for the Flowie Exchange API — compliant e-invoicing across 47 countries (Peppol, France PA/PPF, Italy SDI, Saudi Fatoora, India GST IRP, Malaysia MyInvois).","keywords":["flowie","flowie-exchange","e-invoicing","einvoicing","peppol","invoice","api","sdk","facturation-electronique","factur-x","fatturapa","vida","ppf","chorus-pro","sdi","fatoora","myinvois","gst","e-invoice"],"homepage":"https://docs.get-flowie.com","repository":{"type":"git","url":"git+https://github.com/FlowieAI/exchange-api.git","directory":"sdk/js"},"bugs":{"url":"https://github.com/FlowieAI/exchange-api/issues"},"license":"MIT","author":{"name":"Flowie","email":"support@flowie.fr","url":"https://get-flowie.com"},"type":"module","main":"./index.js","types":"./index.d.ts","engines":{"node":">=18"},"gitHead":"baaed5d579b3349a9afaa208cebe8f809fb49ddc","_id":"flowie-exchange@0.1.1","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-DdGijgIcofiCo0DXSrPMB+5XFMGaDRVlUVoypCCLdwUNHrgZec0P6TRD/mzv+ijgFfUKgxRP5sA7661bTDmwjQ==","shasum":"e4fa4d52d41d2f7862d4db21a0bc66346c8e8fea","tarball":"https://registry.npmjs.org/flowie-exchange/-/flowie-exchange-0.1.1.tgz","fileCount":4,"unpackedSize":16330,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDupJIZc6AEyX//3l2+CWLxop6BinRn564oz9y/GnoNUwIgJt52AmyxTmLZBBqFfF7s7u8ZJOqqbH/C+qUJcCE0feQ="}]},"_npmUser":{"name":"yannrs","email":"yann@flowie.fr"},"directories":{},"maintainers":[{"name":"yannrs","email":"yann@flowie.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/flowie-exchange_0.1.1_1786013571655_0.2098853483997949"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-06T09:35:53.141Z","modified":"2026-08-06T10:52:51.952Z","0.1.0":"2026-08-06T09:35:53.359Z","0.1.1":"2026-08-06T10:52:51.798Z"},"bugs":{"url":"https://github.com/FlowieAI/exchange-api/issues"},"author":{"name":"Flowie","email":"support@flowie.fr","url":"https://get-flowie.com"},"license":"MIT","homepage":"https://docs.get-flowie.com","keywords":["flowie","flowie-exchange","e-invoicing","einvoicing","peppol","invoice","api","sdk","facturation-electronique","factur-x","fatturapa","vida","ppf","chorus-pro","sdi","fatoora","myinvois","gst","e-invoice"],"repository":{"type":"git","url":"git+https://github.com/FlowieAI/exchange-api.git","directory":"sdk/js"},"description":"Official JavaScript/TypeScript SDK for the Flowie Exchange API — compliant e-invoicing across 47 countries (Peppol, France PA/PPF, Italy SDI, Saudi Fatoora, India GST IRP, Malaysia MyInvois).","maintainers":[{"name":"yannrs","email":"yann@flowie.fr"}],"readme":"# flowie-exchange\n\nOfficial JavaScript/TypeScript SDK for the **Flowie Exchange API** — one REST API\nfor compliant electronic invoicing across 47 countries and every major network:\nPeppol, France PA/PPF, Italy SDI, Saudi Fatoora, Israel ITA, India GST IRP,\nMalaysia MyInvois.\n\n- Documentation: <https://docs.get-flowie.com>\n- Developer portal: <https://docs.get-flowie.com/developers/>\n- OpenAPI 3.1 contract: <https://docs.get-flowie.com/openapi.json>\n\n## Install\n\n```bash\nnpm install flowie-exchange\n```\n\nNode 18+ (uses the built-in `fetch`).\n\n## Get a key with no signup\n\nOne unauthenticated call mints a working sandbox key and a seeded company, so you\ncan send a document within a minute — no sales call, no signup form. This is also\nwhy an autonomous agent can integrate unattended.\n\n```js\nimport { FlowieExchange } from \"flowie-exchange\";\n\nconst flowie = await FlowieExchange.bootstrapSandbox();\nconsole.log(flowie.bootstrap.company.peppolId);\n```\n\nOr use a key you already have:\n\n```js\nconst flowie = new FlowieExchange({\n  apiKey: process.env.FLOWIE_API_KEY,   // flw_live_… / flw_test_… / JWT\n  environment: \"production\",             // default: \"sandbox\"\n});\n```\n\n## Send an invoice\n\nNote the field is `number`, not `invoiceNumber` — the API validates on\n`document.number`.\n\n```js\nconst doc = await flowie.sendDocument({\n  type: \"invoice\",                       // credit-note | debit-note | purchase-order | …\n  from: \"0208:0000000001\",\n  to: \"0208:0000000002\",\n  document: {\n    number: \"INV-001\",\n    issueDate: \"2026-08-06\",\n    currency: \"EUR\",\n    lines: [{ description: \"Consulting\", quantity: 1, unitPrice: 1000, vatRate: 20 }],\n  },\n});\n\nconsole.log(doc.id, doc.status);         // doc_… \"sent\"\n```\n\n## Check reachability before you promise delivery\n\n```js\nconst reach = await flowie.verifyRecipient({ recipient: \"0208:0000000002\", documentType: \"invoice\" });\n```\n\n## Track and advance the lifecycle\n\nIn several countries the transition **is** the receiver's statutory reporting\nobligation, not bookkeeping — it is forwarded to the national platform where one\nrequires it.\n\n```js\nawait flowie.setLifecycle(doc.id, \"approved\");\nawait flowie.setLifecycle(doc.id, \"paid\");\n\nconst history = await flowie.getLifecycle(doc.id);\nconsole.log(history.currentStatus);      // \"paid\"\n```\n\n## List documents\n\n```js\nconst { documents } = await flowie.listDocuments({ companyId: \"…\", limit: 25 });\n```\n\n## Register a company on Peppol\n\n```js\nawait flowie.registerCompany(companyId);\n```\n\n## Errors\n\nEvery failure throws a `FlowieError` carrying the API's own code and, crucially,\nthe `requestId`. Any 4xx/5xx is replayable by that id through the request\ninspector, which is faster than reconstructing a failure from logs.\n\n```js\nimport { FlowieError } from \"flowie-exchange\";\n\ntry {\n  await flowie.getDocument(\"doc_missing\");\n} catch (err) {\n  if (err instanceof FlowieError) {\n    console.error(err.status, err.code, err.requestId);\n  }\n}\n```\n\n## Anything else in the contract\n\nThe named methods cover the operations that carry real traffic. `request()`\nreaches all 112:\n\n```js\nawait flowie.request(\"GET\", \"/v1/compliance/status\", { query: { country: \"FR\" } });\n```\n\n## For AI agents\n\nThe API is callable natively over two agent protocols, and the documentation is\npublished in machine-readable form:\n\n| Surface | URL |\n|---|---|\n| MCP (product, 40 tools) | `https://back.flowie.ink/exchange/mcp` |\n| MCP (documentation) | `https://docs.get-flowie.com/mcp` |\n| A2A (JSON-RPC 2.0) | `https://back.flowie.ink/exchange/a2a` |\n| Agent Card | <https://docs.get-flowie.com/.well-known/agent-card.json> |\n| Auth walkthrough | <https://docs.get-flowie.com/auth.md> |\n| Page index for LLMs | <https://docs.get-flowie.com/llms.txt> |\n\nTo let an agent act on your account without handing it your API key, mint a\nsingle-use, scoped, expiring link at <https://docs.get-flowie.com/share-access>.\n\n## License\n\nMIT © [Flowie](https://get-flowie.com)\n","readmeFilename":"README.md"}