AccountService

This is the API used for doing accounting tasks.

Please note: This is a reference to the latest version of the AccountService. If you have used our previous version, we strongly recommend you to use this version which has some critical bug fixes and additional features.

Account Service
Account Service WDSL

Data types

Saving accounting entries

The method SaveBundleList is used for saving financial transactions. The default is 4 decimal places. If you want to increase accuracy, you have to increase the CurrencyUnit from the default of 1 to e.g. 100.

The general setup is like this:

The Bundlelist has the following properties:

AllowDifference (boolean)
Allow difference in credit/debit balance. This is only applicable when saving journal data (see SaveOption) below. Default value is false.

DirectLedger (boolean)
If set to false use customer ledger. If set to true use account that is set directly. Default value is false.

SaveOption (unsigned byte)
Can be either 1 or 0. Setting 1 saves the bundle as a journal which can then be reviewed and edited on the 24SevenOffice web site. Setting 0 saves the bundle directly to the ledger. Default value is 1.

DefaultCustomerId (int)
Default CustomerId that is used if CustomerId is not set on one or more entries.

The Bundle has the following properties:

YearId The YearId is set to the current year of the bundle. e.g. 2017.

Sort Can be defined for either Bundle or Voucher. This is an entry type. The No property from GetTransactionTypes is used.

Name The name of the bundle.

BundleDirectAccounting (boolean)
If set to false it automatically calculates VAT. If set to true it does not calculate VAT. This is only applicable when saving journal data (see SaveOption).

The Voucher has the following properties:

TransactionNo
This the transaction number of the voucher. You can get the next available number by sending a request to GetEntryId. The GetEntryId method takes a Date property which must be some date within the given fiscal year of the voucher. It also takes a SortNo property, here you must provide an EntrySeriesId property value, which you can get by sending a request to GetTypeList.

TIP

Please note that the EntryNo property is not set and does not need to be set in your request to GetEntryId.

Sort Can be defined for either Bundle or Voucher. This is an entry type. The No property from GetTransactionTypes is used.

The Entry has the following properties:

  • SequenceId – integer, can be set to define the order of entries when using SaveOption 1.
  • CustomerId – use CompanyId from GetCompanies
  • AccountId – use AccountNo (sic) from GetAccountList
  • Date – DateTime
  • DueDate – DateTime
  • Amount – use e.g. 123 for debit and -123 for credit
  • CurrencyId – use e.g. NOK, USD. Get a list of client’s currencies from GetCurrencyList
  • CurrencyRate – current Rate of the currency.
  • CurrencyUnit – set the Unit of the currency. Default is 1.0. If you want to increase decimal accuracy, you have to increase the CurrencyUnit from the default of 1 to e.g. 100.
  • DepartmentId – Get a list of departments from GetDepartmentList
  • ProjectId – See for example GetProjectList
  • InvoiceReferenceNo – The Invoice number.
  • InvoiceOcr – The OCR/KID number.
  • TaxNo – the VAT type, see GetTaxCodeList
  • Period – This usually follows the current month. Will be set automatically if omitted.
  • Comment – A comment that appears on the entry line
  • StampNo – An Id that acts as a link to any inbound invoices/documents that are sent to 24SevenOffice
  • BankAccountNo – Bank Account number
  • LinkId – a GUID you can specify yourself if you wish to link internally in the bundle
  • Links – LinkId: this is used for internal linking in the bundle, i.e. you reference the LinkId specified in another entry in the bundle you are submitting
  • LineId – This is for linking to existing entries. You get the LineId from the TransactionService GetTransactions

Optional: Difference Options will add a new entry if there is a difference on the voucher is inside a threshold defined by the user. If the difference is higher or lower than the threshold the user will get an exception as before and the bundle is not saved in the system.

Example:

<DifferenceOptions>
    <Threshold>0.5</Threshold>
    <AccountNo>1005</AccountNo>
    <CustomerId>100</CustomerId>
    <DueDate>2019-04-12T00:00:00</DueDate>
    <Date>2019-04-10T00:00:00</Date>
    <Comment>Øreavrunding</Comment>
    <Period>4</Period>
    <DepartmentId>1</DepartmentId>
    <ProjectId>1</ProjectId>
    <InvoiceOcr>1111111111</InvoiceOcr>
    <LinkId>DE61E682-C44C-42F4-8C25-0B1BC9BA7F89</LinkId>
    <BankAccountNo>11111111</BankAccountNo>
</DifferenceOptions>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  • Threshold: (Decimal) If the sum of the voucher have a difference inside the threshold there will be added a new entry with the value. This can a negative number.
  • AccountNo: (Int32) The account where the entry will point to.
  • CustomerId: (Int32) Use CompanyId from GetCompanies.
  • InvoiceOcr: (String) The OCR/KID number.
  • LinkId: (GUID) A GUID you can specify yourself if you wish to link internally in the bundle.
  • DepartmentId:(Int32) Get a list of departments from GetDepartmentList.
  • ProjectId: (Int32) See for example GetProjectList.
  • Period: (Int16) This usually follows the current month.
  • DueDate: (DateTime)
  • Date: (DateTime)
  • BankAccountNo: (String) Bank Account number.
  • Comment: (String) Comment.

Methods

Method Input type Input name Return type Description
CheckAccountNo AccountData[] accountList AccountDataErrors[]
GetAccountList AccountData[]
GetTaxCodeList TaxCodeElement[]
GetTypeList TypeData[]
SaveBundleList BundleList bundlelist saveResponse
GetEntryId EntryId argEntryId GetEntryIdResult