Mifiel
NodeJS SDK for Mifiel API. Please read our documentation for instructions on how to start using the API.
Installation
NPM
npm install mifiel --save
Yarn
yarn add mifiel
Usage
For your convenience Mifiel offers a Sandbox environment where you can confidently test your code.
To start using the API in the Sandbox environment you need to first create an account at sandbox.mifiel.com.
Once you have an account you will need an APP_ID and an APP_SECRET which you can generate in sandbox.mifiel.com/access_tokens.
Then you can configure the library with:
// for ES5var Mifiel = default MifielConfig// for sandbox useMifielConfigurl = 'https://sandbox.mifiel.com/api/v1'
All methods return promises
Document methods
- Find:
MifielModelsDocument
- Find all:
MifielModelsDocumentall
- Create:
Use only hash if you dont want us to have the file.
Either file or hash must be provided.
const document = file: 'path/to/my-file.pdf' signatories: name: 'Signer 1' email: 'signer1@email.com' tax_id: 'AAA010101AAA' name: 'Signer 2' email: 'signer2@email.com' tax_id: 'AAA010102AAA' document // if you dont want us to have the PDF, you can just send us // the original_hash and the name of the document. Both are required const document = hash: Digest::SHA256 name: 'my-file.pdf' signatories: ...
- Save Document related files
// save the original file document // save the signed file (original file + signatures page) document // save the signed xml file document
-
Delete
MifielModelsDocument
Certificate methods
-
Sat Certificates
MifielModeslCertificate -
Find:
MifielModelsCertificate
- Find all:
MifielModelsDocumentall
-
Create
const certificate =file: "path/to/my-certificate.cer"certificate -
Delete
MifielModelsCertificate
User methods
-
Setup Widget
const args =email: 'some@email.com'tax_id: 'AAA010101AAA'callback_url: 'http://some-callback.url'MifielModelsUser
Contributing
- Fork it ( https://github.com/[my-github-username]/mifiel/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request