Skip to content

Creates a new bookkeeping rule for the specified client. The rule defines how transactions are processed and mapped to generate vouchers based on the client's requirements.

Request

Path
clientIdstring, (uuid)required
Body
displayNamestring

Sets the display name for the bookkeeping rule.

bookkeepingSettingIdstring, (uuid)

Specifies the ID of the settings to link to. If no settings exist, create them before proceeding.

autoUpdateboolean

Sets if the voucher is automatically updated in the erp-system.

isFeeRuleboolean

True if the rule is a fee rule, false otherwise.

minOptionalMatchesinteger, (int32)

Gets or sets the minimum number of filters that must match for the bookkeeping rule to apply. This property works in combination with the 'at least FilterCriteria' logic to determine applicability.

transactionPostingModestring(TransactionPostingMode)
Enum:"CombineIntoSingleVoucher""PostAsSeparateVouchers""MultiLinedVoucher""MultiLinedVoucherWithUnmatched"
filtersArray of objects(TransactionFilterDto)

Gets or sets the collection of filters applied to the bookkeeping rule. These filters are used to determine the conditions under which the rule is applied.

fieldMappingsArray of objects(FieldMappingDto)

Defines a set of dynamic mappings that extract values from transaction fields and apply them to batch line fields.

unitsArray of objects(BookkeepingUnitDto)

Gets or sets the collection of units associated with the bookkeeping rule.

{ "displayName": "string", "bookkeepingSettingId": "07af9850-9db1-4b77-ba9e-74c705771ff8", "autoUpdate": true, "isFeeRule": true, "minOptionalMatches": 0, "transactionPostingMode": "CombineIntoSingleVoucher", "filters": [ { … } ], "fieldMappings": [ { … } ], "units": [ { … } ] }

Responses

OK

Bodyapplication/json
clientIdstring, (uuid)
ruleIdstring, (uuid)
Response
{ "links": { "property1": { … }, "property2": { … } }, "clientId": "5e505642-9024-474d-9434-e5a44f505cc5", "ruleId": "70af3071-65d9-4ec3-b3cb-5283e8d55dac" }