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

# Update a salesorder

`PATCH /accounting/{connection_id}/salesorder/{id}`

## Path parameters

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

## Query parameters

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

## Request body

- AccountingSalesorder
  - `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` PropertyAccountingSalesorderShippingAddress
    - `address1` string
    - `address2` string
    - `city` string
    - `region` string
    - `region_code` string
    - `postal_code` string
    - `country` string
    - `country_code` string
  - `billing_address` PropertyAccountingSalesorderBillingAddress
    - `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' | 'OPEN' | 'COMPLETED' | 'CANCELED'
  - `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' | 'TIP' | 'SERVICE_CHARGE' | 'OTHER', required
      - `original_type` string
      - `amount` number, required
      - `currency` string
    - `contact_id` string
  - `sales_channel` string
  - `organization_id` string
  - `fees` AccountingFee[]
    - `type` 'TAX' | 'DISCOUNT' | 'PROMOTION' | 'SHIPPING' | 'GIFT_WRAP' | 'COD' | 'SURCHARGE' | 'TIP' | 'SERVICE_CHARGE' | 'OTHER', required
    - `original_type` string
    - `amount` number, required
    - `currency` string
  - `category_ids` string[]
  - `metadata` AccountingMetadata[]
    - `id` string
    - `slug` string
    - `value` union
      - object
      - string
      - number
      - boolean
      - union[]
        - union
          - object
          - string
          - number
          - boolean
    - `namespace` string
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'FILE' | 'TEXTAREA' | 'SINGLE_SELECT' | 'MULTIPLE_SELECT' | 'MEASUREMENT' | 'PRICE' | 'YES_NO' | 'CURRENCY' | 'URL'
    - `extra_data` union
      - object
      - string
      - number
      - boolean
      - union[]
        - union
          - object
          - string
          - number
          - boolean
  - `order_number` string
  - `location_id` string
  - `employee_user_id` string
  - `device_id` string
  - `fulfillment_type` 'DINE_IN' | 'TAKEOUT' | 'DELIVERY' | 'PICKUP' | 'CURBSIDE' | 'SHIPPING' | 'DIGITAL' | 'OTHER'
  - `guest_count` number
  - `subtotal_amount` number
  - `tax_amount` number
  - `discount_amount` number
  - `tip_amount` number
  - `service_charge_amount` number
  - `refunded_amount` number
  - `closed_at` string, date-time
  - `subscription_id` string
  - `payments` AccountingPaymentReference[] — read-only reciprocal of PaymentPayment.allocations; payments applied to this sales order
    - `payment_id` string
    - `amount` number
    - `allocated_at` string, date-time
  - `raw` object

## Response `200`

Successful

- AccountingSalesorder
  - `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` PropertyAccountingSalesorderShippingAddress
    - `address1` string
    - `address2` string
    - `city` string
    - `region` string
    - `region_code` string
    - `postal_code` string
    - `country` string
    - `country_code` string
  - `billing_address` PropertyAccountingSalesorderBillingAddress
    - `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' | 'OPEN' | 'COMPLETED' | 'CANCELED'
  - `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' | 'TIP' | 'SERVICE_CHARGE' | 'OTHER', required
      - `original_type` string
      - `amount` number, required
      - `currency` string
    - `contact_id` string
  - `sales_channel` string
  - `organization_id` string
  - `fees` AccountingFee[]
    - `type` 'TAX' | 'DISCOUNT' | 'PROMOTION' | 'SHIPPING' | 'GIFT_WRAP' | 'COD' | 'SURCHARGE' | 'TIP' | 'SERVICE_CHARGE' | 'OTHER', required
    - `original_type` string
    - `amount` number, required
    - `currency` string
  - `category_ids` string[]
  - `metadata` AccountingMetadata[]
    - `id` string
    - `slug` string
    - `value` union
      - object
      - string
      - number
      - boolean
      - union[]
        - union
          - object
          - string
          - number
          - boolean
    - `namespace` string
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'FILE' | 'TEXTAREA' | 'SINGLE_SELECT' | 'MULTIPLE_SELECT' | 'MEASUREMENT' | 'PRICE' | 'YES_NO' | 'CURRENCY' | 'URL'
    - `extra_data` union
      - object
      - string
      - number
      - boolean
      - union[]
        - union
          - object
          - string
          - number
          - boolean
  - `order_number` string
  - `location_id` string
  - `employee_user_id` string
  - `device_id` string
  - `fulfillment_type` 'DINE_IN' | 'TAKEOUT' | 'DELIVERY' | 'PICKUP' | 'CURBSIDE' | 'SHIPPING' | 'DIGITAL' | 'OTHER'
  - `guest_count` number
  - `subtotal_amount` number
  - `tax_amount` number
  - `discount_amount` number
  - `tip_amount` number
  - `service_charge_amount` number
  - `refunded_amount` number
  - `closed_at` string, date-time
  - `subscription_id` string
  - `payments` AccountingPaymentReference[] — read-only reciprocal of PaymentPayment.allocations; payments applied to this sales order
    - `payment_id` string
    - `amount` number
    - `allocated_at` string, date-time
  - `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/revisions/fecb148873a5/schema)
