Giter VIP home page Giter VIP logo

fortnox-api's Introduction

CircleCI npm version

Fortnox Javascript API wrapper

Unofficial Javascript wrapper for Fortnox API http://developer.fortnox.se/getting-started/

Installation

$ npm install fortnox or yarn install fortnox

Get a developer account

First of all you need to register as a developer.

To register you just need to fill out this form.

Get your Access Token

You’ve got your Authorization-Code and your Client-Secret. These will be the keys to get the final Access-Token.

The Authorization-Code is valid for seven days before becoming invalid and can only be used once to retrieve the Access-Token.

If the Authorization-Code is used again after an Access-Token has been retrieved the Authorization-Code will become invalid and the integration will become deactivated.

The Access-Token combined with the Client-Secret is unique for your application and connects to a specific Fortnox account.

To retrieve your Access-Token you simply send a request to our API using the headers “Authorization-Code” and “Client-Secret”.

Here’s an example using cURL

curl -X "GET" "https://api.fortnox.se/3/" \
     -H "Authorization-Code: YOUR_AUTHORIZATION_CODE" \
     -H "Client-Secret: YOUR_CLIENT_SECRET" \
     -H "Content-Type: application/json" \
     -H "Accept: application/json"

Usage

Create a new fortnox api instance

const fortnox = require('fortnox')
const client = new Fortnox('secret', 'accessToken')

Get Customers

const customers = await client.getCustomers()    

fortnox-api's People

Contributors

simskii avatar christofferekblom avatar trograin avatar dellaak avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.