Bookkeeping & Invoicing/eAccounting API news

Hey! 👋
It’s been a while since our last update, but we haven’t been idle. With the first snow of the season comes a freshly baked release.

🆕 Added

  • New endpoint for getting a customer invoice draft as a PDF. The draft is rendered as the invoice it would become when converted, without an invoice number, and it is not bookkept or changed.
    • GET /v2/customerinvoicedrafts/{customerInvoiceDraftId}/print Get a PDF preview of a customer invoice draft. Optional query parameters: keepOriginalDraftDate and overrideCompanyKeepOriginalDraftDate.

❗Changed

  • VAT codes on accounts now follow the same rules as in the program. Affected endpoint: PUT /v2/accounts/{fiscalyearId}/{accountNumber} .
    • The VAT code can’t be changed on an account that is used in an article account coding.
    • An account of the cash and bank type can’t get a VAT code.
    • A VAT code change that these rules don’t allow is ignored. The account keeps its current VAT code, the other fields are still updated and the request isn’t rejected.
  • Companies on the Solo product variant can now read bank transactions and allocation periods. Writing is still not available for Solo. Affected endpoints: GET /v2/banktransactions/{bankAccountId}/matched, GET /v2/banktransactions/{bankAccountId}/unmatched, GET /v2/banktransactions/{bankAccountId}/{bankTransactionId}, GET /v2/allocationperiods
  • Customers for companies on the Solo product variant are now validated against what Solo supports. A customer with a foreign CurrencyCode or InvoiceCountryCode is rejected with the new error code 4045 (ForeignCustomerNotAllowedForProductVariant). Affected endpoints: POST /v2/customers, PUT /v2/customers/{customerId} .

🐛Fixed

  • Fixed GET /v2/customers sometimes returning ForceBookkeepVat = true for Swedish and Finnish companies where the setting isn’t available. The endpoint also responds faster on large customer lists.
  • Fixed the wrong VAT rate being used, for example 21% instead of 25%, when an order or a quote was converted to an invoice. The VAT is now taken from the invoice date, OSS VAT included. Affected endpoints: POST /v2/orders/{id}/convert, POST /v2/quotes/{id}/converttocustomerinvoice
  • Fixed filtering on PaymentStatus only working with eq and a single condition. Other operators and combined conditions now work. Affected endpoint: GET /v2/customerinvoices .

Happy coding! đŸ’»