---
title: "Close"
method: PATCH
path: "/billing_new/billing_periods/close/v1/{billing_period_id}"
tags: ["/billing_new", "/billing_new/billing_periods"]
---

# Close

`PATCH /billing_new/billing_periods/close/v1/{billing_period_id}`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/billing_new/billing_periods/close/v1/{billing_period_id}`
- Auth: HTTP bearer

Closes an open billing period and creates one approved line item without assigning an invoice. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (BillingPeriodCloseRes)

## Path parameters

- `billing_period_id` string, required

## Response `200`

Successful Response

- BillingPeriodCloseRes
  - `billing_period` BillingPeriod1, required
    - `schema_version` 1, required
    - `invoice_type` 'accounts_receivable' | 'accounts_payable', required
    - `currency_code` 'USD' | 'CAD' | 'EUR' | 'GBP' | 'MXN' | 'AUD' | 'JPY' | 'CNY' | 'CHF' | 'INR', required
    - `name` string, nullable
    - `description` string, required
    - `amount` number, required
    - `counterparty_org_id` string, nullable: Must be a string starting with `org_`
    - `counterparty_off_chrt_org_data_id` string, nullable
    - `counterparty_driver_id` string, nullable
    - `shipper_account_id` string, nullable
    - `period_start_at_timestamp` string, date-time, required
    - `period_end_at_timestamp` string, date-time, required
    - `cycle` 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'yearly', required
    - `task_group_ids` string[]
    - `owned_by_org_id` string, required: Must be a string starting with `org_`
    - `status` 'open' | 'closed'
    - `created_by_user_id` string, required: Must be a string starting with `user_`
    - `created_at_timestamp` string, date-time, required
    - `last_edited_by_user_id` string, required: Must be a string starting with `user_`
    - `last_edited_at_timestamp` string, date-time, required
    - `closed_by_user_id` string, nullable: Must be a string starting with `user_`
    - `closed_at_timestamp` string, date-time, nullable
    - `_id` string, required
  - `invoice_line_item` InvoiceLineItem1, required
    - `schema_version` 1, required
    - `invoice_type` 'accounts_receivable' | 'accounts_payable', required
    - `description` string, required
    - `quantity` number, required
    - `unit` 'each' | 'shipment' | 'hour' | 'day' | 'mile' | 'kilometer' | 'pound' | 'kilogram'
    - `unit_price` number, required
    - `currency_code` 'USD' | 'CAD' | 'EUR' | 'GBP' | 'MXN' | 'AUD' | 'JPY' | 'CNY' | 'CHF' | 'INR', required
    - `line_item_type` 'base_rate' | 'additional_mileage' | 'long_distance_mileage' | 'fuel' | 'extra_stop' | 'wait_time' | 'attempt' | 'pick_and_hold' | 'parking' | 'tolls' | 'additional_fee' | 'dispute' | 'equipment' | 'dangerous_goods' | 'special_vehicle' | 'after_hours' | 'weekend' | 'holiday' | 'air_waybill' | 'insurance' | 'off_network_carrier' | 'obc_day_rate' | 'flight_ticket' | 'tracking_device_label' | 'tracking_device_tag' | 'tracking_device_other' | 'tax' | 'other', required
    - `tax_percentage` number, nullable
    - `counterparty_org_id` string, nullable: Must be a string starting with `org_`
    - `counterparty_off_chrt_org_data_id` string, nullable
    - `counterparty_driver_id` string, nullable
    - `shipper_account_id` string, nullable
    - `awb_number` string, nullable: IATA Air Waybill number: 3-digit airline prefix + 8-digit serial, e.g. '020-12345678'.
    - `export_ref__sage__item_id` string, nullable
    - `order_id` string, nullable
    - `task_group_id` string, nullable
    - `billing_period_id` string, nullable
    - `invoice_id` string, nullable
    - `rate_sheet_id` string, nullable
    - `currency_conversion` InvoiceLineItemCurrencyConversion1
      - `source_unit_price` number, required
      - `source_currency_code` 'USD' | 'CAD' | 'EUR' | 'GBP' | 'MXN' | 'AUD' | 'JPY' | 'CNY' | 'CHF' | 'INR', required
      - `conversion_rate` number, required: Units of the target currency per one unit of source_currency_code. unit_price = source_unit_price * conversion_rate.
      - `description` string, nullable
    - `status` 'draft' | 'approved' | 'finalized'
    - `owned_by_org_id` string, required: Must be a string starting with `org_`
    - `created_by_user_id` string, required: Must be a string starting with `user_`
    - `created_at_timestamp` string, date-time, required
    - `last_edited_by_user_id` string, required: Must be a string starting with `user_`
    - `last_edited_at_timestamp` string, date-time, required
    - `_id` string, required
    - `total_amount` number, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-21** `9a30893d8db1`: 1 breaking, 1 warning, 33 info
  - the `invoice_line_item` response's property type changed from no type to `object` for status `200`
  - removed the optional property `invoice` from the response with the `200` status
  - api tag `/billing_new/billing_periods` added
  - added the optional property `invoice_line_item/awb_number` to the response with the `200` status
  - …31 more

[Operation history](https://skmtc.dev/chrt/apis/chrt-fastapi/changes/billing_new/billing_periods/close/v1/:billing_period_id/patch.md)

---

[API](https://skmtc.dev/chrt/apis/chrt-fastapi.md) - [All operations](https://skmtc.dev/chrt/apis/chrt-fastapi/llms.txt) - [OpenAPI document](https://skmtc.dev/chrt/apis/chrt-fastapi/revisions/6f428e2e2b98?raw)
