{"id":20958320,"url":"https://github.com/enricodeleo/fattura24","last_synced_at":"2025-05-14T06:32:06.483Z","repository":{"id":48034204,"uuid":"127689932","full_name":"enricodeleo/fattura24","owner":"enricodeleo","description":"👨‍💻Programmatically manage 📝invoices and customers with node.js and Fattura24 🧾","archived":false,"fork":false,"pushed_at":"2023-04-23T22:25:56.000Z","size":355,"stargazers_count":10,"open_issues_count":4,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T15:40:12.185Z","etag":null,"topics":["api","integration","invoices","nodejs","sdk"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enricodeleo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"enricodeleo"}},"created_at":"2018-04-02T02:05:12.000Z","updated_at":"2025-03-15T22:54:25.000Z","dependencies_parsed_at":"2024-11-19T01:46:48.478Z","dependency_job_id":"df5c8e97-0ec5-46bc-ab8d-a5fc0af3aeea","html_url":"https://github.com/enricodeleo/fattura24","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enricodeleo%2Ffattura24","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enricodeleo%2Ffattura24/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enricodeleo%2Ffattura24/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enricodeleo%2Ffattura24/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enricodeleo","download_url":"https://codeload.github.com/enricodeleo/fattura24/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254084662,"owners_count":22011920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","integration","invoices","nodejs","sdk"],"created_at":"2024-11-19T01:46:37.782Z","updated_at":"2025-05-14T06:32:01.475Z","avatar_url":"https://github.com/enricodeleo.png","language":"JavaScript","funding_links":["https://patreon.com/enricodeleo"],"categories":[],"sub_categories":[],"readme":"# Fattura24 Node.js SDK\n\n💻 Interact programmatically with 📃[Fattura24](https://www.fattura24.com) APIs with node.js.\n\n## Offically recognized by Fattura24\n[Original post](https://www.fattura24.com/node-js-modulo-fatturazione/)\n\n## You don't have a Fattura24 account, yet?\n\n[![Fattura24](http://www.fattura24.com/banner/fattura24_640x200.jpg)](http://www.fattura24.com/?src=ab80977)\n\n## Usage\nThis module exposes an object you can interact to with all the supported methods of Fattura24's api.\n\n### Create a new customer\n\n```js\nvar fattura24 = new Fattura24({ apiKey: 'weejeighaGushuz7Megeisheij6oogh3' });\n\nfattura24.saveCustomer({\n    CustomerName: 'MARIO ROSSI',\n    CustomerAddress: 'Via Alberti 8',\n    CustomerPostcode: '06122',\n    CustomerCity: 'Perugia',\n    CustomerProvince: 'PG',\n    CustomerCountry: '',\n    CustomerFiscalCode: 'MARROS66C44G217W',\n    CustomerVatCode: '03912377542',\n    CustomerCellPhone: '335123456789',\n    CustomerEmail: 'info@rossi.it'\n}).then(function( customer ) {\n    console.log( customer );\n}).catch(function( error ) {\n    console.error( error );\n});\n```\n\n\n#### Create a new customer with special chars\n\nIn case of special chars, like the ampersand (\u0026) Fattura24 requires to escape them in an XML cdata.\nOne way to do it is to pass a subobject with the _cdata field to the properties.\n\nRight now the project automatically converts the _cdata returning from the xml, but doesn't autoconvert properties while\nsending them, therefore it's advised to add the _cdata in all needed fields.\n\nExample:\n```js\nvar fattura24 = new Fattura24({ apiKey: 'weejeighaGushuz7Megeisheij6oogh3' });\n\nfattura24.saveCustomer({\n    CustomerName: { _cdata: 'MARIO ROSSI \u0026 Figli' },\n    CustomerAddress: { _cdata: 'Via Alberti 8' },\n    CustomerPostcode: '06122',\n    CustomerCity: 'Perugia',\n    CustomerProvince: 'PG',\n    CustomerCountry: '',\n    CustomerFiscalCode: 'MARROS66C44G217W',\n    CustomerVatCode: '03912377542',\n    CustomerCellPhone: '335123456789',\n    CustomerEmail: 'info@rossi.it'\n}).then(function( customer ) {\n    console.log( customer );\n}).catch(function( error ) {\n    console.error( error );\n});\n```\n\n### Create a new invoice\n\n```js\nvar fattura24 = new Fattura24({ apiKey: 'weejeighaGushuz7Megeisheij6oogh3' });\n\nfattura24.saveDocument({\n  TotalWithoutTax: 29.10,\n  VatAmount: 0,\n  DocumentType: 'FE',\n  SendEmail: false,\n  FeVatNature: 'N4',\n  Object: 'Handmade products export',\n  Total: 29.10,\n  Payments: {\n    Payment: {\n      Date: '2018-12-14',\n      Paid: true,\n      Amount: 29.10\n    }\n  },\n  CustomerName: 'John Doe',\n  CustomerAddress: '29, 5th Avenue',\n  CustomerPostcode: 'AA12345',\n  CustomerCity: 'NYC',\n  CustomerCountry: 'USA',\n  CustomerCellPhone: '+15551234567',\n  CustomerEmail: 'mail@example.com',\n  FootNotes: 'Grazie per aver acquistato da noi',\n  Rows: [\n    {\n      Row: {\n        Code: '001',\n        Description: 'Wooden Chair',\n        Price: 29.10,\n        VatCode: 0,\n        VatDescription: '0%',\n        Qty: 1\n      },\n    },\n  ],\n})\n.then(console.log)\n.catch(console.log);\n```\n\n## Methods\nThis module reflects **API version v0.3.3** methods. Further details are available on [official documentation](https://www.fattura24.com/api-documentazione/).\n\n|Method   |Purpose   |\n|---|---|\n|testKey   |Verify that the ApiKey is valid   |\n|saveCustomer   |Create a new customer   |\n|saveDocument   |Create a document   |\n|getFile   |Retrieve a document as PDF   |\n|getTemplate   |Get a list of available custom document templates   |\n|getPdc   |Get the chart of accounts   |\n|getNumerator   |Get accounting branches   |\n|getProduct   |Get a product or a service   |\n|saveItem   |Create a credit   |\n\n## CHANGELOG\n#### v0.2.1 - 31/01/2019\nFix for non-xml parameters such as in /getFile and /GetProduct\n\n#### v0.2.0 - 30/01/2019\nSupport for \u003c![CDATA[ fields\n\n#### v0.1.3 - 21/12/2018\n[New License](https://creativecommons.org/licenses/by-nc/4.0/) added.\n\n#### v0.1.2 - 14/12/2018\nUpdate README.\n\n#### v0.1.0 - 14/12/2018\nUpdate dependencies with security fixes.\n\n#### v0.0.7 - 25/03/2018\nDo not throw error when unknown method is invoked.\n\n#### v0.0.6 - 25/03/2018\nFixed an issue with npm publication.\n\n#### v0.0.5 - 25/03/2018\nTranspile es6 to es5 for wider nodejs compatibility (babel targeted to 4.0.0).\n\n#### v0.0.2 - 22/03/2018\nInitial release.\n\n## Author\n[Enrico Deleo](https://enricodeleo.com/)\n\n## Contributors\n[Andrea Grassi](http://andreagrassi.me/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenricodeleo%2Ffattura24","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenricodeleo%2Ffattura24","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenricodeleo%2Ffattura24/lists"}