Generate accounting periods for a year
Creates 12 monthly accounting periods for a fiscal year starting at startMonth. Idempotent: if the year already has periods, they are returned unchanged. Fails if a new period would overlap an existing one.
How to use it
- Send the fiscalYear and the startMonth the fiscal year begins in (1-12).
- Twelve monthly OPEN periods are created and returned; if the year already has periods they are returned unchanged.
- Journal entries can now be posted for dates in those months; the call fails if a month would overlap an existing period.
BearerAuthAuthorizationBearer <JWT>X-TenantID*stringYour merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.
application/json- body
fiscalYear*integerFiscal year to create periods for, between 1970 and 2999. The first period starts in this calendar year.
int32startMonth*integerCalendar month the fiscal year starts in, 1 (January) to 12 (December). Defaults to 1.
int32OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request was processed; otherwise an error status.
message*stringShort human-readable message describing the outcome, e.g. which record was saved or why the call failed.
data?array<>|The accounting periods, each with its dates and open or closed status.
curl -X POST 'https://beta.iotoms.com/api/v1/accounting/periods' \ -H 'X-TenantID: your-tenant-code' \ -H 'Content-Type: application/json' \ -d '{ "fiscalYear": 0, "startMonth": 0}'{ "status": "string", "message": "string", "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "fiscalYear": 0, "name": "string", "startDate": "2019-08-24", "endDate": "2019-08-24", "status": "OPEN" } ]}