Skip to content

webcoreinteractive/serpro-nfe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serpro NFE Integration

Install

Using yarn

yarn add @webcoreinteractive/serpro-nfe

Using npm

npm i -S @webcoreinteractive/serpro-nfe

Usage

const serpro = new Serpro(yourKey, yourSecret)

const token = await serpro.getNewToken()

const data = await serpro.searchNFE('00000000000000000000000000000000000000000000') // NFe model 55

Doc

getNewToken

This function returns a Promise that resolves to a new token, valid for 1 hour. It also keeps an internal variable to use in other functions like ‎Serpro.searchNFE.

serpro.getNewToken()

searchNFE

Allows you to search for a NFe model 55.

This function returns a Promise that resolves to the data related to the provided NFe's access key.

You can either use it with a space every 4 chars:

serpro.searchNFE('0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000')

Or not:

serpro.searchNFE('00000000000000000000000000000000000000000000')

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published