---
title: "Create Purchase Order Line Item"
method: POST
path: "/purchase_orders/{number}/purchase_order_line_items"
tags: ["Purchase Orders"]
---

# Create Purchase Order Line Item

`POST /purchase_orders/{number}/purchase_order_line_items`

## Request

- Base URL: `https://secure.fleetio.com/api`
- URL: `https://secure.fleetio.com/api/purchase_orders/{number}/purchase_order_line_items`
- Auth: API key in header `Authorization` and API key in header `Account-Token`
- TypeScript: <https://skmtc.dev/fleetio/apis/fleetio-developer-api/docs/purchase_orders/:number/purchase_order_line_items/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new Line Item for the associated Purchase Order

## Path parameters

- `number` string, required

## Request body

- object
  - `part_id` integer, required: The Fleetio ID of the [Part](/docs/api/parts) being purchased.
  - `quantity` integer, required: How many of this `Part` to be purchased.
  - `unit_cost` number, float, required: The cost of this `Part` (per unit).

## Response `201`

OK

- PurchaseOrderLineItemCreated, nullable: A Purchase Order Line Item
  - `id` integer, required
  - `created_at` string, date-time: The date and time at which this record was created.
  - `updated_at` string, date-time: The date and time at which this record was most recently updated.
  - `account_id` integer
  - `purchase_order_id` integer
  - `part_id` integer: The Fleetio ID of the [Part](/docs/api/parts) being purchased.
  - `quantity` string, nullable: The quantity of this `Part` to be purchased.
  - `total_quantity_received` string, nullable: The quantity of this `Part` which was received.
  - `unit_cost` string, nullable: The cost of this `Part` (per unit).
  - `subtotal_cents` integer, nullable: The pre-tax subtotal amount.

## Other responses

- `401`: Request could not be authenticated
- `403`: Insufficient permission to perform this operation
- `422`: Unprocessable Entity
- `500`: Something unexpected happened

---

[API](https://skmtc.dev/fleetio/apis/fleetio-developer-api.md) - [All operations](https://skmtc.dev/fleetio/apis/fleetio-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fleetio/apis/fleetio-developer-api/revisions/49558d744bd7?raw)
