---
title: "Update purchase order line"
method: PATCH
path: "/v1/purchase-orders/{purchaseOrderId}/lines/{lineId}"
tags: ["v1 - Purchase Orders"]
---

# Update purchase order line

`PATCH /v1/purchase-orders/{purchaseOrderId}/lines/{lineId}`

## Request

- Base URL: `https://light.inc` (the document declares no server; this is the origin it was published from)
- URL: `https://light.inc/v1/purchase-orders/{purchaseOrderId}/lines/{lineId}`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer

Updates a purchase order line item

## Path parameters

- `purchaseOrderId` string, uuid, required
- `lineId` string, uuid, required

## Request body

- ExternalUpdatePurchaseOrderLineRequestV1Model
  - `customProperties` ExternalSetCustomPropertyRequestV1Model[], nullable
    - `groupId` string, uuid: ID of the custom property group.
    - `valueIds` string[]: IDs of the selected custom property values. It behaves as a PUT operation, so if empty the existing ones will be effectively deleted.
    - `inlineValues` string[], nullable: Inline custom property values (used for TEXT/NUMERIC/DATE/etc. groups). It behaves as a PUT operation, so if empty or null the existing ones will be effectively deleted.
  - `description` string, nullable
  - `costCenterId` string, uuid, nullable
  - `accountId` string, uuid, nullable
  - `taxCodeId` string, uuid, nullable
  - `quantity` number, nullable
  - `unitPrice` integer, nullable

## Response `default`

default response

- ExternalPurchaseOrderLineV1Model
  - `id` string, uuid
  - `companyId` string, uuid
  - `purchaseOrderId` string, uuid
  - `description` string
  - `costCenterId` string, uuid
  - `accountId` string, uuid
  - `taxCodeId` string, uuid
  - `quantity` number
  - `unitPrice` integer
  - `amount` integer
  - `netAmount` integer
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `customProperties` ExternalCustomPropertyV1Model[]
    - `groupId` string, uuid: ID of the custom property group
    - `groupInternalName` string: Internal name of the custom property group
    - `values` ExternalCustomPropertyValueV1Model[]: List of values. Note that this will be a single value unless the group input type supports multiple values
      - `id` string, uuid: Unique identifier for the object
      - `groupId` string, uuid: ID of the custom property group
      - `groupInternalName` string: Internal name of the custom property group
      - `companyId` string, uuid: ID of the company
      - `internalName` string: Internal name of the custom property value
      - `label` string: Label of the custom property value
      - `context` string, nullable: Context/description of the custom property value
      - `createdAt` string, date-time: Timestamp when the custom property value was created
      - `updatedAt` string, date-time: Timestamp when the custom property value was last updated

---

[API](https://skmtc.dev/light/apis/light-api.md) - [All operations](https://skmtc.dev/light/apis/light-api/llms.txt) - [OpenAPI document](https://skmtc.dev/light/apis/light-api/revisions/84f51306f648?raw)
