---
title: "Update Purchase Order"
method: PATCH
path: "/purchase_orders/{number}"
tags: ["Purchase Orders"]
---

# Update Purchase Order

`PATCH /purchase_orders/{number}`

## Request

- Base URL: `https://secure.fleetio.com/api`
- URL: `https://secure.fleetio.com/api/purchase_orders/{number}`
- 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/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update a Purchase Order

## Path parameters

- `number` string, required

## Request body

- object
  - `description` string, nullable
  - `label_list` string: A comma separated list of tags associated with this record. The only delimiter allowed is a comma (`,`). Please remove any commas from your labels before saving the record.
  - `vendor_id` integer
  - `part_location_id` integer: The Fleetio ID of the [Part Location](/docs/api/v-1-part-locations-index) for the [Part](/docs/api/parts) being purchased.
  - `number` integer: Must be unique within the scope of your Account. You can either generate your own number or leave it blank and Fleetio will generate one for you. Fleetio will use the next number in the sequence based on your existing Purchase Orders. This becomes the unique identifier, even in endpoints. Id is never used.
  - `discount_type` 'fixed' | 'percentage', nullable: The type of discount applied to this record.
  - `discount_percentage` number, float: The discount percentage. This field should be present when `discount_type` is set to `percentage`.
  - `discount` number: The actual value of the discount
  - `shipping` number: The cost of shipping
  - `tax_1_percentage` number: The primary tax percentage amount. This field should be present when `tax_1_type` is set to `percentage`.
  - `tax_1` number, float: The primary tax amount.
  - `tax_1_type` 'fixed' | 'percentage', nullable: The type of tax to apply to this record.
  - `tax_2_percentage` number: The secondary tax percentage amount. This field should be present when `tax_2_type` is set to `percentage`. Note that this secondary tax must be configured in your [Account Settings](https://help.fleetio.com/s/article/Account-Settings#tax).
  - `tax_2` number, float: The secondary tax amount. Note that this secondary tax must be configured in your [Account Settings](https://help.fleetio.com/s/article/Account-Settings#tax).
  - `tax_2_type` 'fixed' | 'percentage', nullable: The type of tax to apply to this record.
  - `custom_fields` CustomFields, nullable: *Full details on working with Custom Fields [here](/docs/overview/custom-fields).
  - `purchase_order_line_items_attributes` object[]
    - `part_id` integer: The Fleetio ID of the [Part](/docs/api/parts) being purchased.
    - `quantity` integer: How many of this `Part` to be purchased.
    - `unit_cost` number, float: The cost of this `Part` (per unit).

## Response `204`

OK

## Other responses

- `401`: Request could not be authenticated
- `403`: Insufficient permission to perform this operation
- `404`: The requested resource could not be located
- `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)
