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

# Update an expense

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

## Request

- Base URL: `http://api.unified.to`
- URL: `http://api.unified.to/accounting/{connection_id}/expense/{id}`
- Auth: API key in header `authorization`

## Path parameters

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

## Query parameters

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

## Request body

- AccountingExpense
  - `id` string
  - `created_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `updated_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `user_id` string: references a HR employee/user (reference to HrisEmployee)
  - `contact_id` string: (reference to AccountingContact)
  - `account_id` string: (reference to AccountingAccount)
  - `name` string
  - `payment_method` string
  - `posted_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `total_amount` number
  - `currency` string
  - `tax_amount` number
  - `reimbursed_amount` number
  - `reimbursed_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `approved_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `approver_user_id` string: references HR employee/user (reference to HrisEmployee)
  - `lineitems` AccountingLineitem[]
    - `id` string
    - `created_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
    - `updated_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
    - `refunded_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
    - `total_amount` number: unit_quantity * unit_amount + tax_amount
    - `refund_amount` number
    - `discount_amount` number
    - `tax_amount` number
    - `item_id` string: (reference to CommerceItem)
    - `unit_amount` number
    - `unit_quantity` number
    - `item_sku` string
    - `item_name` string
    - `item_description` string
    - `notes` string
    - `taxrate_id` string
    - `account_id` string: (reference to AccountingAccount)
    - `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: Unified fee category
      - `original_type` string: The provider's original fee label, e.g. "VAT" or a shipping carrier name
      - `amount` number, required
      - `currency` string: ISO 4217 currency code, e.g. USD
    - `contact_id` string: (reference to AccountingContact)
    - `project_id` string: ref -> AccountingProject; the project this line is coded to (reference to TaskProject)
    - `exchange_rate` number: The exchange rate applied to this line, for multi-currency documents
    - `is_billable` boolean: True when the line is rebillable to a customer
  - `attachments` AccountingAttachment[]
    - `id` string
    - `download_url` string
    - `name` string
    - `mime_type` string
  - `organization_id` string
  - `users` AccountingReference[]
    - `id` string
    - `name` string
  - `approver_users` AccountingReference[]: expense approver(s); id is HR employee/user when resolved
    - `id` string
    - `name` string
  - `status` 'DRAFT' | 'SUBMITTED' | 'PENDING' | 'APPROVED' | 'REJECTED' | 'PAID'
  - `external_number` string
  - `category_ids` string[]
  - `project_id` string: (reference to TaskProject)
  - `metadata` AccountingMetadata[]
    - `id` string
    - `slug` string
    - `value` unknown
    - `namespace` string
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'FILE' | 'TEXTAREA' | 'SINGLE_SELECT' | 'MULTIPLE_SELECT' | 'MEASUREMENT' | 'PRICE' | 'YES_NO' | 'CURRENCY' | 'URL'
    - `extra_data` unknown
  - `taxrate_id` string: ref -> AccountingTaxrate applied to the expense
  - `exchange_rate` number: Exchange rate to the base/home currency at the expense date
  - `type` 'USER' | 'COMPANY': USER = employee spend; COMPANY = books/purchase expense
  - `raw` unknown

## Response `200`

Successful

- AccountingExpense
  - `id` string
  - `created_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `updated_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `user_id` string: references a HR employee/user (reference to HrisEmployee)
  - `contact_id` string: (reference to AccountingContact)
  - `account_id` string: (reference to AccountingAccount)
  - `name` string
  - `payment_method` string
  - `posted_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `total_amount` number
  - `currency` string
  - `tax_amount` number
  - `reimbursed_amount` number
  - `reimbursed_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `approved_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `approver_user_id` string: references HR employee/user (reference to HrisEmployee)
  - `lineitems` AccountingLineitem[]
    - `id` string
    - `created_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
    - `updated_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
    - `refunded_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
    - `total_amount` number: unit_quantity * unit_amount + tax_amount
    - `refund_amount` number
    - `discount_amount` number
    - `tax_amount` number
    - `item_id` string: (reference to CommerceItem)
    - `unit_amount` number
    - `unit_quantity` number
    - `item_sku` string
    - `item_name` string
    - `item_description` string
    - `notes` string
    - `taxrate_id` string
    - `account_id` string: (reference to AccountingAccount)
    - `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: Unified fee category
      - `original_type` string: The provider's original fee label, e.g. "VAT" or a shipping carrier name
      - `amount` number, required
      - `currency` string: ISO 4217 currency code, e.g. USD
    - `contact_id` string: (reference to AccountingContact)
    - `project_id` string: ref -> AccountingProject; the project this line is coded to (reference to TaskProject)
    - `exchange_rate` number: The exchange rate applied to this line, for multi-currency documents
    - `is_billable` boolean: True when the line is rebillable to a customer
  - `attachments` AccountingAttachment[]
    - `id` string
    - `download_url` string
    - `name` string
    - `mime_type` string
  - `organization_id` string
  - `users` AccountingReference[]
    - `id` string
    - `name` string
  - `approver_users` AccountingReference[]: expense approver(s); id is HR employee/user when resolved
    - `id` string
    - `name` string
  - `status` 'DRAFT' | 'SUBMITTED' | 'PENDING' | 'APPROVED' | 'REJECTED' | 'PAID'
  - `external_number` string
  - `category_ids` string[]
  - `project_id` string: (reference to TaskProject)
  - `metadata` AccountingMetadata[]
    - `id` string
    - `slug` string
    - `value` unknown
    - `namespace` string
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'FILE' | 'TEXTAREA' | 'SINGLE_SELECT' | 'MULTIPLE_SELECT' | 'MEASUREMENT' | 'PRICE' | 'YES_NO' | 'CURRENCY' | 'URL'
    - `extra_data` unknown
  - `taxrate_id` string: ref -> AccountingTaxrate applied to the expense
  - `exchange_rate` number: Exchange rate to the base/home currency at the expense date
  - `type` 'USER' | 'COMPANY': USER = employee spend; COMPANY = books/purchase expense
  - `raw` unknown

---

[API](https://skmtc.dev/unified/apis/unified-to-api-2.md) · [All operations](https://skmtc.dev/unified/apis/unified-to-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/unified/apis/unified-to-api-2/revisions/7a38bdd7f089?raw)
