---
title: "Open one calendar month for an assigned customer"
method: POST
path: "/accountant/companies/{customerId}/gl-periods"
tags: ["Accountant Portal"]
---

# Open one calendar month for an assigned customer

`POST /accountant/companies/{customerId}/gl-periods`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/gl-periods`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

#3516. An assigned accountant (signed in, or the agent service token) opens one whole calendar month, including a month before the customer's first period, so a migration can post source-dated history. The period is created `open`; close, reopen and the locks are unchanged. Refused: anything but the 1st through the month's last day of a year from 1900 to 2100 (422); a month in a calendar year that holds a filing-locked period, or starting on or before the end of the latest filing-locked period (422, `GL_PERIOD_FILED_BOOKS`); a month starting before the customer's QuickBooks cutoff (422, `GL_PERIOD_BEFORE_QUICKBOOKS_CUTOFF`); and a month overlapping a period, including a concurrent create of the same month (409). The audit row records the acting person, or the service key's `source` and `apiKeyId`. An unassigned customer is 403.

## Request body

- CreateGlPeriodInput
  - `startDate` string, date, required
  - `endDate` string, date, required

## Response `201`

The new open period

- GlPeriodResponse
  - `success` boolean
  - `data` GlPeriod
    - `id` string, uuid
    - `companyId` string, uuid
    - `startDate` string, date
    - `endDate` string, date
    - `status` 'open' | 'closed'
    - `closedAt` string, date-time, nullable
    - `closedByUserId` string, uuid, nullable
    - `filingLockedAt` string, date-time, nullable
    - `filingLockedByUserId` string, uuid, nullable

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `409`: Request conflicts with the durable onboarding state
- `422`: Request failed validation

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
