1.1.6 • Published 4 months ago

economic-api-client v1.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

economic-api-client

An API client that interfaces with the Visma E-conomic REST API. Uses the ZOD library to validate responses and ensure type safety, trying to stay as true as possible to the JSON schemas provided by e-conomic, although some assumptions are made about the responses such as always expecting some values that are not specified as required in the JSON schema but are always present, such as customerNumber, draftInvoiceNumber and bookedInvoiceNumber.

Currently implemented endpoints

/customers

  • GET /customers
  • GET /customers/:customerNumber
  • POST /customers
  • DELETE /customers/:customerNumber

/invoices/drafts

  • GET /invoices/drafts
  • GET /invoices/drafts/:draftInvoiceNumber
  • GET /invoices/drafts/:draftInvoiceNumber/pdf
  • POST /invoices/drafts
  • PUT /invoices/drafts
  • DELETE /invoices/drafts/:draftInvoiceNumber

/invoices/booked

  • GET /invoices/booked
  • GET /invoices/booked/:bookedInvoiceNumber
  • GET /invoices/booked/:bookedInvoiceNumber/pdf
  • POST /invoices/booked/

Usage example

const economicClient = new EconomicClient(process.env.X_APP_SECRET_TOKEN, process.env.X_AGREEMENT_GRANT_TOKEN);

economicClient.customers.get().then((res) => {
  console.log(res);
});
1.1.6

4 months ago

1.1.5

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago