API Endpoints
Asperion has made an API available for third party software developers that intend to connect their commercial applications to the Asperion accounting software platform. Herewith an overview of all available endpoints with the opportunities and impossibilities.
The documentation is enriched with additional information, which you could take into account with this API.
For more general information about this API and the authorization via oAuth, see: Asperion REST API
More technical information can be found in the online Swagger docs: https://api-sandbox.asperion.nl/swagger/
Administrations
/v1/administrations (readonly)
List with available adminstrations (tenants) and details about an administration.
A user can access 1 or more administrations.
After retrieving an access token, the default administration of the client is selected.
You can retrieve the data of another administration (Tenant) by adding a parameter X-TenantId in the header.
Approvalroutes
List with available approvalroutes. If this option is activated in the administration, this will be a mandatory option when creating Purchase Invoices.
This is the list with the available routes for the selected administration.
Articles
/v1/articles (read/write)
Articles management. Overviews of the articles can be retrieved with this endpoint and articles can be created and updated.
Attributes like the current stock (currentStock) can’t be edited, since this would have accounting consequences. This can only be done via the Asperion Application.
An article can be active or inactive. Default the GET endpoints will only return active articles. If you need to search the inactive articles as well please use the ActiveState property.
If trade applications are used in Asperion (inTrade pack), the stock can be edited by creating new orders via the endpoint: /v1/SalesOrderWithLines/
Attribute "SalesTypeId" refers to the different sales types. (See endpoint: /v1/salestypes)
This determines the ledger calculation, where the sales of this article are based on.
ArticleLocations
/v1/articlelocations (readonly)
/v1/articlelocations/{id}/ (readonly)
This option is limited to inTrade users who manage inventory.
Items can be stored in different locations (warehouses). An item can be linked to a location where this item can be found in the order picking process. This endpoint returns all available locations.
CostCenters
/v1/costcenters(readonly)
List of available costcenters that can be used with invoices or journal entries if the administration used costcenters.
CostUnits
/v1/costunits (readonly)
List of available cost units that can be used with invoices or journal entries if the administration used cost units.
CostUnitTypes
/v1/costunittypes (readonly)
/v1/costunittypes/{id} (readonly)
List of available cost unit types. A cost unit type can be used to characterize and filter cost units.
Countries
/v1/countries (readonly)
List with available countries that can be used when creating the master data of debtor/creditor or (concept) invoices.
All countries of this list are supported by Asperion.
Creditors
/v1/creditors (read/write)
Management of creditors (Suppliers). Can be used for the retrieval of creditor information, creating or updating the creditor information.
Can also be needed when creating a purchase invoice.
A creditor has to be member of a creditor kind attr: creditorKindId. (see endpoint: creditorkinds)
Creditorkinds
/v1/creditorkinds (readonly)
Characterization / group of a creditor. Determines the contra account for the creditor payment in the ledger in Asperion.
A creditor has a required creditor kind.
Debtors
/v1/debtors (read/write)
Management of the debtors/clients. Can be used when retrieving, creating or editing the debtor information.
Can also be needed when creating a sales invoice (SalesInvoice / DraftSalesInvoice) or sales order (SalesOrderWithLines)
A debtor has to be member of a debtor kind. (See: debtorkinds)
Debtors - Mandates
/v1/debtors/{debtorId}/mandates (read/write)
Management of SEPA debtor mandates.
Mandates are needed to generate debtor mandates in Asperion.
Special attention to the following fields:
- IBAN
Is copied from the regarding debtor. - typeId
1 = One-time Authorization, 2 = Continuous Authorization - sddType
1 = Core Collection, 2 = B2B Collection
PUT endpoint suitable for updating the signdate.
Debtorkinds
/v1/debtorkinds(readonly)
Characterization / group of a debtor. Determines the contra account for the debtor payment in the ledger in Asperion.
A debtor has a required debtor kind.
DraftSalesInvoices
/v1/draftsalesinvoices(read/write)
Draft Invoices. Creating and editing invoices in Asperion module Invoicing. If invoices are created here, you can make them final and provide them with an invoice number and layout. This endpoint will be the header of the invoice. Invoice lines are made with endpoint: /v1/draftsalesinvoices/{invoiceId}/lines
To create invoices with all the lines in one post, see endpoint: DraftSalesInvoicesWithLines
Invoice lines:
The invoice lines can consist of the types: (bookingType) "A" = Article, "V" = Sales type, "G" = Ledger Account or "T" = Text.
- BookingType "A"
If the field bookingType "A" = Article is used, the field ArticleSku (Article number) is also required.
The unit price (unitPrice) field is in this case optional. If leaved empty the unitprice is fetched from the selected article. - BookingType "V"
If the field bookingType "V" = Sales Type is used, the field salesTypeId is also required.
The available SalesTypes can be retrieved via the endpoint: /v1/SalesTypes (GET) - BookingType "T"
The bookingType "T" = text is meant for additional text lines. There aren’t any other required options.
These lines are only meant for text. Specified prices, amounts etc. won’t be calculated through in the total of the invoice.
- BookingType "G"
If the field bookingType "G" = Ledger account is used, the field ledgerAccountId is also required.
The available LedgerAccounts can be retrieved via the endpoint: /v1/LedgerAccounts (GET).
Be careful! The type ledger account. Only ledger accounts for sales can be used in this case. Filter on the type of endpoint ledger accounts on: 9 "Turnover". (Also see endpoint: ledgeraccounts)
Including or Excluding the VAT
When the origin system stored the line amounts including VAT end when calling the API rounding differences may occur when converting to exclusive amounts. In this case, you can also specify the unit price (unitPrice) including VAT. For this you pass the parameter unitPriceIncludingVat = true.
DraftSalesInvoicesWithLines
/v1/draftsalesinvoiceswithlines (read/write)
Draft invoices (Module Invoicing). Creating invoices in Asperion module Invoicing with all lines. This way, a draft invoice can immediately be created.
Also see endpoint: DraftSalesInvoices.
Files
/v1/files (readonly)
Downloading PDF files based on the id. Like the scan of the purchase invoice or receipt.
InboxFiles
/v1/inboxfiles (POST / GET)
InboxFiles is the central list with documents that still need to be processed into the administration.
These inboxfiles can also be (scans of) purchase invoices, sales invoices or receipts for further processing of Asperion.
Downloading PDF files from the inbox file list based on the id. (GET)
Adding PDF files tot he inbox, max. 5mb (POST)
Journals
/v1/journals (readonly)
Journals used by the Administration. This can be used for the retrieval of the available journals.
Among others needed for the creation of journal entries (JournalEntries)
The following types of journals are available. (M = Memorial, K = Cash Registration)
Journalentries
/v1/journalentries (read/write)
/v1/journalentrieswithlines (read/write)
Endpoint for the creation of Journal entries and Journal entries with lines. Journal entries enter Asperion as a draft, ready to process.
A journal entry always consists of a valid:
- Bookyear and Bookperiod.
- Journal (JournalId). (See endpoint: Journals)
- Document number: (sourceDocumentNumber)
Furthermore, a description can be added, like “Ledger June 2021”, and a Date.
The creation of journal posts is limited to the types: (M) Memorial or (K) Cash Registration.
Memorial journal posts (lines) have to be balanced. (Debit sum = Credit sum)
Treasury journal posts have to be provided with an opening balance and closing balance. (openingBalance / closingBalance) differences between these balances have to be documented as line(s).
JournalEntryLog
/v1/journalentrylog (readonly)
/v1/journalentrylog/{id}/ (readonly)
Endpoint to get the changelog of Journalentries. Usefull to get all changed journnalentries in a date/time range.
There a 2 type op registration actions. 1 = added en 2 = reverted journalentries.
LedgeraccountClassifications
/v1/ledgeraccountclassifications (readonly)
Structure of the list of accounts. Ledger accounts and compaction structure of the administration, including RGS coding.
Usage with reportsoftware like PowerBI, for the retrieval of the classification and compaction structure. See endpoint LedgerGrouped for the actual ledger data
Ledgeraccounts
/v1/ledgeraccounts (readonly)
/v1/ledgeraccounts/{id} (readonly)
List of available ledger accounts in the selected administration (tenant). Or the details of a ledger account like the description, Type, RGS code etc.
A ledger account follows a certain type. In order to filter for the use.
Filter on Type
- 1 = BalanceSheetOther (Balance)
- 2 = ProfitAndLossOther (Profit and Loss)
- 3 = CashRegister (Cash Register)
- 4 = Bank (Bank)
- 5 = Giro (Bank)
- 6 = Sales (Debtors)
- 7 = Purchase (Creditors)
- 8 = SuspenseAccount (Suspense Accounts)
- 9 = Turnover (Sales / Turnover)
- 10 = Costs (Costs/ Purchase)
- 12 = PaymentDifferenceDiscount (Payment Differences)
- 13 = NeutralAccount (Balance Neutral)
- 14 = VatAccount (VAT accounts)
- 15 = ResultAccountAnnualClose (Results/ Annual Close)
LedgerAccountTypes
/v1/ledgeraccounttypes (readonly)
/v1/ledgeraccounttypes/{id} (readonly)
List with available ledger account types. Also see endpoint: Ledgeraccounts.
LedgerGrouped
/v1/ledgergrouped (readonly)
List with balance per ledger account for a specified period (bookyear = required).
Extra options to group per journal, etc.
This is meant for exporting the booking data from Asperion for an administration for the use of report software or other sort of reporting applications.
Furthermore, a couple of fields are available to filter the results.
An important thing to take into account is the filter on BalanceOrProfitLoss
- B = Balance (Balance Accounts)
- P = ProfitLoss (Profit- and Loss Accounts)
LedgerLines
/v1/ledgerlines (readonly)
Endpoint to retrieve a selection of ledger transactions. Various filter options to select the right mutations. Fiscal year is a mandatory parameter. Can be used, for example, to collect payments on an invoice.
OutstandingPurchaseInvoices
/v1/outstandingpurchaseinvoices (readonly)
List with all outstanding purchase invoices from the selected administration (tenant).
Including the information from the invoice (outstanding sum, date, age and days till expiry) and information about the creditor. (Name, number and ID)
A couple of fields are available to filter the results on.
OutstandingSalesInvoices
/v1/outstandingsalesinvoices (readonly)
List with outstanding sales invoices from the selected administration.
Including the information of the invoice (outstanding sum, date, age and days till expiry) and information about the debtor. (Name, number and ID)
A couple of fields are available to filter the results on.
Paymentconditions
/v1/paymentconditions (readonly)
Payment conditions available in the administration.
Can be used with the DraftSalesInvoice, DraftSalesInvoiceWithLines, SalesInvoices and SalesInvoicesWithLines
PaymentMethod
/v1/paymentmethod (readonly)
List with available payment methods.
Can be used with the DraftSalesInvoice and DraftSalesInvoiceWithLines endpoints.
Examples: IDEAL, PayPal, Invoice, Bol.com, Creditcard etc.
PurchaseInvoices
/v1/purchaseinvoices (read/write)
/v1/purchaseinvoiceswithlines (read/write)
Creating or retrieving of purchase invoices from the administration (tenant).
Seperately creating the header and invoice lines via endpoint /v1/purchaseinvoices
Or the complete invoice including lines via endpoint: /v1/purchaseinvoiceswithline
This endpoint is used when adding purchase invoices that have already been coded in another pack. These are already provided with the correct ledger account coding, correct creditor, etc.
The purchase invoices will be filled in ready-made via these API.
If there aren’t assigned any ledger accounts, the invoice will be read via the PDF scan via the endpoint /v1/InboxFiles.
Via the GET endpoints, the purchase invoice details can be retrieved.
You can also add an invoice scan (PDF) to the purchase invoice with the endpoint: /v1/purchaseinvoices/{id}/file [POST]
SalesInvoices
/v1/salesinvoices (read/write)
/v1/salesinvoiceswithlines (read/write)
Creating or retrieving of sales invoices from the administration.
Seperately creating the header and invoice lines via endpoint /v1/salesinvoices
Or the complete invoice including the lines via endpoint: /v1/salesinvoiceswithline
This endpoint can be used for the creation of sales invoices that have already been coded in another pack. These have already been provided with the correct ledger account coding, correct debtor, etc.
The sales invoices will be entered “ready-made” via this API.
If there aren’t assigned any ledger accounts, the invoice will be read via the PDF scan via the endpoint /v1/InboxFiles.
Via the GET endpoints, the details of sales invoices can be retrieved.
You can also add an invoice scan (PDF) to the purchase invoice with the endpoint: /v1/salesinvoices/{id}/file [POST]
SalesOrders
/v1/salesorders(read/write)
Creating and editing of sales orders.
* There are only applicable if the administration has the inTrade pack or the module sales order.
Sales order endpoint can be used for retrieving order information or updating the order. For example, a shipping date or address.
To manage the orderlines see endpoint SalesOrderWithLines
SalesOrderWithLines
/v1/salesorderwithlines (read/write)
Creating and editing of sales orders with lines.
* There are only applicable if the administration has the inTrade pack or the module sales order.
The sales order lines can only be of types: (bookingType) "A" = Article or "T" = contains text.
This concerns the enpoint for the creation of sales orders, meant for the distribution of ordered products.
A sales order has to consist of at least 1 line with the bookingType "A".
If the field bookingType "A" Article is used, the field ArticleSku (Article number) would also be required. The bookingType "T" is for additional lines of text.
SalesTypes
/v1/SalesTypes (readonly)
List with available sales types from the administration (tenant).
For the use in DraftSalesInvoices*, SalesInvoices* endpoints.
VatCodes
/v1/vatcodes (readonly)
List with available VAT codes from the administration.
For the use in DraftSalesInvoices*, SalesInvoices*, PurchaseInvoices* endpoints.
Use the field: salesCode (bool) as a filter to retrieve either the sales codes or purchase codes.