Periods
Accounting periods and close workflow
Authorization
bearerAuth Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....
In: header
Query Parameters
uuiduuidResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/periods?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08&bookId=497f6eca-6276-4993-bfeb-53cbbbba6f08"[ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5", "bookId": "710266f4-0087-48f9-97e1-4b13ac48f353", "name": "string", "startDate": "2019-08-24", "endDate": "2019-08-24", "status": "OPEN", "closedAt": "2019-08-24T14:15:22Z" }]{ "error": "string"}{ "error": "string"}Authorization
bearerAuth Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/periods/close" \ -H "Content-Type: application/json" \ -d '{ "periodId": "7cc85576-6d6b-4609-a8e6-020187b27a09", "action": "SOFT_CLOSE" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5", "bookId": "710266f4-0087-48f9-97e1-4b13ac48f353", "name": "string", "startDate": "2019-08-24", "endDate": "2019-08-24", "status": "OPEN", "closedAt": "2019-08-24T14:15:22Z"}{ "error": "string"}{ "error": "string"}Authorization
bearerAuth Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/periods/reopen" \ -H "Content-Type: application/json" \ -d '{ "periodId": "7cc85576-6d6b-4609-a8e6-020187b27a09" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5", "bookId": "710266f4-0087-48f9-97e1-4b13ac48f353", "name": "string", "startDate": "2019-08-24", "endDate": "2019-08-24", "status": "OPEN", "closedAt": "2019-08-24T14:15:22Z"}{ "error": "string"}{ "error": "string"}Authorization
bearerAuth Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....
In: header
Query Parameters
uuidResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/periods/snapshot?periodId=497f6eca-6276-4993-bfeb-53cbbbba6f08"[ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "periodId": "7cc85576-6d6b-4609-a8e6-020187b27a09", "version": 0, "snapshotHash": "string", "balances": {}, "createdAt": "2019-08-24T14:15:22Z" }]{ "error": "string"}{ "error": "string"}