---
title: "Update a purchaseorder"
method: PUT
path: "/accounting/{connection_id}/purchaseorder/{id}"
tags: ["accounting", "purchaseorder"]
---

# Update a purchaseorder

`PUT /accounting/{connection_id}/purchaseorder/{id}`

## Path parameters

- `connection_id` string, required
- `id` string, required

## Query parameters

- `fields` string[]
- `raw` string

## Request body

- AccountingPurchaseorder
  - `id` string
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `posted_at` string, date-time
  - `contact_id` string
  - `account_id` string
  - `currency` string
  - `total_amount` number
  - `shipping_address` PropertyAccountingPurchaseorderShippingAddress
    - `address1` string
    - `address2` string
    - `city` string
    - `region` string
    - `region_code` string
    - `postal_code` string
    - `country` string
    - `country_code` string
  - `billing_address` PropertyAccountingPurchaseorderBillingAddress
    - `address1` string
    - `address2` string
    - `city` string
    - `region` string
    - `region_code` string
    - `postal_code` string
    - `country` string
    - `country_code` string
  - `status` 'DRAFT' | 'VOIDED' | 'AUTHORIZED' | 'PAID' | 'PARTIALLY_PAID' | 'PARTIALLY_REFUNDED' | 'REFUNDED' | 'SUBMITTED' | 'DELETED'
  - `lineitems` AccountingLineitem[]
    - `id` string
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `refunded_at` string, date-time
    - `total_amount` number
    - `refund_amount` number
    - `discount_amount` number
    - `tax_amount` number
    - `item_id` string
    - `unit_amount` number
    - `unit_quantity` number
    - `item_sku` string
    - `item_name` string
    - `item_description` string
    - `notes` string
    - `taxrate_id` string
    - `account_id` string
    - `category_ids` string[]
    - `locations` AccountingReference[]
      - `id` string
      - `name` string
    - `item_variants` AccountingReference[]
      - `id` string
      - `name` string
    - `fees` AccountingFee[]
      - `type` 'TAX' | 'DISCOUNT' | 'PROMOTION' | 'SHIPPING' | 'GIFT_WRAP' | 'COD' | 'SURCHARGE' | 'OTHER', required
      - `original_type` string
      - `amount` number, required
      - `currency` string
    - `contact_id` string
  - `organization_id` string
  - `category_ids` string[]
  - `raw` object

## Response `200`

Successful

- AccountingPurchaseorder
  - `id` string
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `posted_at` string, date-time
  - `contact_id` string
  - `account_id` string
  - `currency` string
  - `total_amount` number
  - `shipping_address` PropertyAccountingPurchaseorderShippingAddress
    - `address1` string
    - `address2` string
    - `city` string
    - `region` string
    - `region_code` string
    - `postal_code` string
    - `country` string
    - `country_code` string
  - `billing_address` PropertyAccountingPurchaseorderBillingAddress
    - `address1` string
    - `address2` string
    - `city` string
    - `region` string
    - `region_code` string
    - `postal_code` string
    - `country` string
    - `country_code` string
  - `status` 'DRAFT' | 'VOIDED' | 'AUTHORIZED' | 'PAID' | 'PARTIALLY_PAID' | 'PARTIALLY_REFUNDED' | 'REFUNDED' | 'SUBMITTED' | 'DELETED'
  - `lineitems` AccountingLineitem[]
    - `id` string
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `refunded_at` string, date-time
    - `total_amount` number
    - `refund_amount` number
    - `discount_amount` number
    - `tax_amount` number
    - `item_id` string
    - `unit_amount` number
    - `unit_quantity` number
    - `item_sku` string
    - `item_name` string
    - `item_description` string
    - `notes` string
    - `taxrate_id` string
    - `account_id` string
    - `category_ids` string[]
    - `locations` AccountingReference[]
      - `id` string
      - `name` string
    - `item_variants` AccountingReference[]
      - `id` string
      - `name` string
    - `fees` AccountingFee[]
      - `type` 'TAX' | 'DISCOUNT' | 'PROMOTION' | 'SHIPPING' | 'GIFT_WRAP' | 'COD' | 'SURCHARGE' | 'OTHER', required
      - `original_type` string
      - `amount` number, required
      - `currency` string
    - `contact_id` string
  - `organization_id` string
  - `category_ids` string[]
  - `raw` object

---

[API](https://skmtc.net/unified/apis/unified-to-api.md) · [All operations](https://skmtc.net/unified/apis/unified-to-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unified/unified-to-api/versions/1f72720916e4/schema)
