External Entries

External entries are entries that are created in an external accounting system and then imported into Core. These entries are separate from core’s internal entries and are displayed in their own table. They can be created as standalone, or you may include flags during creation that will also create entries in Core.

Exporting to Core

If you set CreateEntry or CreateEntryDraft to true the EntryDefinitionId provided will be used to determine credit and debit accounts. DebitNumber and CreditNumber will not be used when creating the internal entries in Core. They are only used for the external entry you want to create.

To export entries from an external accounting system into Core, you can use the following endpoint:

POST /flow/api/Economics/ExternalEntries

Body

{
  "CaseId": 0,
  "EntryNumber": 0,
  "SupplierName": "string",
  "Comment": "string",
  "PostingDate": "2024-04-24T09:50:13.496Z",
  "EntryDate": "2024-04-24T09:50:13.496Z",
  "Amount": 0,
  "DebitNumber": 0,
  "CreditNumber": 0, 
  // The id of the entry definition if you want to create an internal entry in Core.
  // Required if CreateEntry or CreateEntryDraft is true.
  "EntryDefinitionId": 0,
  // An optional URL for more information about the external entry.  
  "Url": "string",
  // If an entry *draft* should be created (EntryDefinitionId is required if this field is true).  
  "CreateEntryDraft": true,
  // If an entry should be created (EntryDefinitionId is required if this field is true).
  "CreateEntry": true
}

Sample response:

{
    "Id": 0,
    "CaseId": 0,
    "CaseName": "string",
    "CreatedById": 0,
    "EntryNumber": 0,
    "SupplierName": "string",
    "Comment": "string",
    "Info": "string",
    "PostingDate": "2024-04-24T09:50:13.496Z",
    "EntryDate": "2024-04-24T09:50:13.496Z",
    "Amount": 0,
    "DebitNumber": 0,
    "CreditNumber": 0,
    "EntryDefinitionId": 0,
    "EntryId": 0,
    "EntryDraftId": 0,
    "Urls": [
        "string"
    ],
    "SkipAccounting": true
}

Entries imported via this endpoint will be added to its own table in Core.

The request provides several options for how the entry should be handled in Core. If you set the flag CreateEntry or CreateEntryDraft you must provide a specific EntryDefinitionId.

Entry Definitions

This means that before exporting to Core the correct entry definition must be selected. Available entry definitions that can be used on a specific case can be fetched using:

GET /flow/api/Economics/{caseCategory}/EntryDefinitions

Parameters

Unknown,
PropertyForSale,
Industry,
Construction,
Plot,
HolidayHome,
ResidentialApartment,
Condominium,
Local,
PropertyForRent

Sample response

[
  {
    "Id": 0,
    "Name": "string",
    "Description": "string",
    "DefaultAmount": 0,
    "VAT": 0,
    "CreditAccountId": 0,
    "DebitAccountId": 0
  }
]

Accounts

The entry definition models include information about the entry definition, but not much about the accounts used. To get more information about the accounts, you can use the following endpoint:

GET /flow/api/Offices/{id}/Accounts

Parameters

id: ContactId of the office you want to get accounts for.

Sample response

[
  {
    "ClientAccountInterestRateGroupId": 0,
    "DefaultAccount": true,
    "CreatedFromOffice": true,
    "AccountId": 0,
    "ClientInterestAccountId": 0,
    "Id": 0,
    "AccountNumber": "string",
    "Description": "string",
    "BrokerCompanyId": 0,
    "IsDeleted": true
  }
]