openapi: 3.1.0
info:
title: Rillet Accounting API Key Books periods API
version: v4.0
servers:
- url: https://api.rillet.com
description: Production server url
- url: https://sandbox.api.rillet.com
description: Test server url
security:
- bearerAuth: []
tags:
- name: Books periods
paths:
/books/periods/last-closed:
get:
tags:
- Books periods
operationId: retrieve-last-book-closed-period
summary: Retrieves last book closed period
description: 'Returns the most recently closed accounting period for book-close workflows, including closed-on timestamps your automation can cache.
When no period has ever been closed the API responds with HTTP 404, so treat a missing resource as "not yet closed" rather than an outage.
'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Book'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
parameters: []
components:
schemas:
Book:
type: object
required:
- id
- start
- end
- status
- closed_on
properties:
id:
type: string
format: uuid
start:
type: string
format: date
description: Book period start date (inclusive)
example: '2025-06-01'
end:
type: string
format: date
description: Book period end date (inclusive)
example: '2025-06-30'
status:
enum:
- OPEN
- CLOSED
example: CLOSED
closed_on:
type: string
format: date
description: Date on which book was closed
example: '2025-07-05'
Error:
type: object
required:
- type
- title
properties:
type:
type: string
format: uri
description: A URI reference that identifies the error type.
example: https://rillet.io/forbidden
title:
type: string
description: Summary of the problem.
example: Forbidden
status:
type: integer
description: The HTTP status code generated by the origin server for this occurrence of the error.
example: 403
detail:
type: string
description: Explanation specific to this occurrence of the error.
example: User does not have rights to perform this operation.
securitySchemes:
bearerAuth:
type: http
scheme: bearer
x-mcp-ready: true
x-readme:
headers:
- key: X-Rillet-API-Version
value: '4'