# Creating a new Line Item Lock

A line item lock will be created on your account at the specified lock date. On successful creation of a
line item lock, a representation of it will be returned to you.

If your account requires time to be approved, creation will fail unless all time entries before the
specified lock date have been approved. The Kantata OX UI has an auto approval tool for your convenience
if you find yourself in this scenario.


This endpoint returns structured Line Item Lock objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the line_item_locks top-level JSON key.
Please see our Response Format section for more information.

Endpoint: POST /line_item_locks
Version: 1.0.0

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.
- creator (User) - The user that set the line item lock on the account.

## Request fields (application/json):

  - `line_item_lock` (object)

  - `line_item_lock.locked_to` (string, required)
    Specify the date before which no one on the account will be able to submit or edit time entries.
(note: This must be a Saturday.) If any Line Item Locks previously existed on your account,
this must be set to a later date than said preexisting lock. The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

  - `line_item_locks` (object)

  - `users` (object)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)


