Create default posting rules
POST
Creates the standard posting rules against the default chart of accounts. Safe to repeat: existing rules and missing accounts are skipped.
How to use it
- Make sure the standard chart of accounts exists (check List ledger accounts); rules whose accounts are missing are skipped.
- Call this once; event types that already have a rule are left as they are, so repeating it is safe.
- Check createdCount and skippedCount, then review the result with Get posting rules and event catalog and adjust with Update posting rules.
BearerAuthheader
AuthorizationBearer <JWT>X-TenantID*stringYour merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.
OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request worked, ERROR when it did not.
message*stringShort human-readable message describing the result, for logs or display; do not parse it.
data?How many default rules were created or skipped, and the resulting rules.
Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/accounting/posting-rules/seed-defaults' \ -H 'X-TenantID: your-tenant-code'Example Response
{ "status": "string", "message": "string", "data": { "createdCount": 0, "skippedCount": 0, "rules": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "eventType": "string", "name": "string", "active": true, "lines": [ { "direction": "DEBIT", "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "accountCode": "string", "accountName": "string", "amountSource": "GRAND_TOTAL" } ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ] }}