iotoms Docs

Reverse a journal entry

POST
/api/v1/accounting/journal-entries/{id}/reverse

Reverses a posted entry by creating an offsetting entry dated today and marking the original as reversed. Drafts cannot be reversed; calling it again on a reversed entry returns the existing reversal.

How to use it

  1. Take the ID of a POSTED entry from List journal entries; drafts cannot be reversed.
  2. A new posted entry with the same lines and flipped directions is created, dated today; today must be in an open accounting period.
  3. The original is marked REVERSED and the reversal is returned. Calling again returns the same reversal.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string

ID of the record (UUID).

Formatuuid

Header Parameters

X-TenantID*string

Your merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when it worked, ERROR when it failed.

message*string

Short human-readable message describing the outcome, for example "Vendor created". Do not parse it.

data?

The journal entry, including all of its lines.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/accounting/journal-entries/497f6eca-6276-4993-bfeb-53cbbbba6f08/reverse' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "externalId": "string",    "sourceSystem": "string",    "eventType": "string",    "effectiveAt": "2019-08-24",    "postedAt": "2019-08-24T14:15:22Z",    "periodId": "7cc85576-6d6b-4609-a8e6-020187b27a09",    "status": "DRAFT",    "currency": "string",    "memo": "string",    "reversalOfId": "91205805-6131-4e22-87c1-99e3bbb30d9b",    "correlationId": "string",    "metadata": "string",    "createdAt": "2019-08-24T14:15:22Z",    "lines": [      {        "id": 0,        "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",        "accountCode": "string",        "accountName": "string",        "direction": "DEBIT",        "amountMinor": 0,        "currency": "string"      }    ]  }}