Unofficial API Client for Fortnox. For more details about Fortnox API, please see https://developer.fortnox.se/documentation/
Built from Unofficial OpenAPI Specification at https://github.com/rsystem-se/fortnox_openapi
The documentation for FortnoxEx can be found at https://hexdocs.pm/fortnox_ex
Please see the specification at https://github.com/rsystem-se/fortnox_openapi before opening any issues in this repository.
Not used in production. Untested to most degree. Help wanted. Rate limiting is tested. Use with caution.
To install the required dependencies and to build the elixir project, run:
mix local.hex --force
mix do deps.get, compile
If available in Hex, the package can be installed
by adding fortnox_ex to your list of dependencies in mix.exs:
def deps do
[{:fortnox_ex, "~> 0.4.2"}]
endFortnoxEx.Connection.get_access_token(client_secret, authorization_code)
{:ok, "65cc2c87-de81-45d6-c792-aad68528ff17"}
connection = FortnoxEx.Connection.new("1234", "567890")
customer = FortnoxEx.Api.Default.get_customer_by_customer_number(connection, "1")
IO.puts("Customer name is: #{customer."Name"}")
Note that the keys of the models are PascalCase and therefore needs to be
accessed like this: model."KeyName" instead of just model.KeyName