The Accounting Period object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

period_name string required
start_date string required
end_date string required
company string required
disabled boolean

Default: false

exempted_role string
The Accounting Period object
{
  "id": "accounting-period_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "period_name": "period_name_example",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "company": "Example Corp",
  "disabled": false,
  "exempted_role": "exempted_role_example"
}
GET /api/accounts/accounting-period/{id}

Retrieve a accounting period

Retrieves the details of an existing accounting period. Supply the unique accounting period ID that was returned from a previous request.

Path parameters

id string required

The identifier of the accounting period to retrieve.

Returns

Returns the accounting period object if a valid identifier was provided.

GET /api/accounts/accounting-period/{id}
curl https://api.overplane.dev/api/accounts/accounting-period/accounting-period_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "accounting-period_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "period_name": "period_name_example",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "company": "Example Corp",
  "disabled": false,
  "exempted_role": "exempted_role_example"
}
GET /api/accounts/accounting-period

List all accounting periods

Returns a list of accounting periods. The results are sorted by creation date, with the most recently created appearing first.

Query parameters

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of accounting period objects.

GET /api/accounts/accounting-period
curl https://api.overplane.dev/api/accounts/accounting-period \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "accounting-period_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "period_name": "period_name_example",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "company": "Example Corp",
      "disabled": false,
      "exempted_role": "exempted_role_example"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/accounting-period

Create a accounting period

Creates a new accounting period object.

Body parameters

period_name string required
start_date string required
end_date string required
company string required
disabled boolean

Default: false

exempted_role string

Returns

Returns the newly created accounting period object if the call succeeded.

POST /api/accounts/accounting-period
curl https://api.overplane.dev/api/accounts/accounting-period \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"period_name":"period_name_example","start_date":"2024-01-15","end_date":"2024-01-15","company":"Example Corp"}'
Response
{
  "id": "accounting-period_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "period_name": "period_name_example",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "company": "Example Corp",
  "disabled": false,
  "exempted_role": "exempted_role_example"
}
PATCH /api/accounts/accounting-period/{id}

Update a accounting period

Updates the specified accounting period by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the accounting period to update.

Body parameters

period_name string
start_date string
end_date string
company string
disabled boolean

Default: false

exempted_role string

Returns

Returns the updated accounting period object.

PATCH /api/accounts/accounting-period/{id}
curl https://api.overplane.dev/api/accounts/accounting-period/accounting-period_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"period_name":"period_name_example","start_date":"2024-01-15"}'
Response
{
  "id": "accounting-period_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "period_name": "period_name_example",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "company": "Example Corp",
  "disabled": false,
  "exempted_role": "exempted_role_example"
}
DELETE /api/accounts/accounting-period/{id}

Delete a accounting period

Permanently deletes a accounting period. This cannot be undone.

Path parameters

id string required

The identifier of the accounting period to delete.

Returns

Returns a confirmation that the accounting period has been deleted.

DELETE /api/accounts/accounting-period/{id}
curl https://api.overplane.dev/api/accounts/accounting-period/accounting-period_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "accounting-period_abc123",
  "deleted": true
}

Line items

Child objects that belong to this accounting period. These are accessed via the parent's ID.

Closed Document

Attributes

idx integer
accounting_period_id string required
document_type string required
closed boolean

Endpoints

GET /api/accounts/closed-document?parent_id={id}
POST /api/accounts/closed-document
PATCH /api/accounts/closed-document/{id}
DELETE /api/accounts/closed-document/{id}
POST /api/accounts/closed-document/reorder
Closed Document object
{
  "id": "closed-document_abc123",
  "idx": 1,
  "accounting_period_id": "accounting_period_id_example",
  "document_type": "document_type_example",
  "closed": false
}