{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/keito-ai/json-schema/keito-ai-patch-api-v2-expenses-id-request-schema.json",
  "title": "PatchApiV2ExpensesIdRequest",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/keito-ai-openapi-generated.yml#/components/schemas/PatchApiV2ExpensesIdRequest",
  "type": "object",
  "properties": {
    "project_id": {
      "type": "string",
      "description": "Visible project in this workspace"
    },
    "expense_category_id": {
      "type": "string",
      "description": "Active expense category"
    },
    "spent_date": {
      "type": "string",
      "description": "Work date, YYYY-MM-DD"
    },
    "total_cost": {
      "type": "number",
      "description": "For amount‑based category; positive amount, do not also send units"
    },
    "units": {
      "type": "number",
      "description": "For per‑unit category; positive quantity, at most six decimal places, do not send total_cost"
    },
    "entry_type": {
      "type": "string",
      "description": "expense or refund (source cannot be changed)"
    },
    "adjustment_reason": {
      "type": "string",
      "description": "For refunds"
    },
    "adjustment_of_id": {
      "type": "string",
      "description": "Original expense being refunded"
    },
    "notes": {
      "type": "string",
      "description": "Description"
    },
    "billable": {
      "type": "boolean",
      "description": "Whether to charge the client"
    },
    "attach_receipt_to_invoice": {
      "type": "boolean",
      "description": "Select stored receipt for future invoices"
    },
    "source": {
      "type": "string",
      "description": "Not accepted on update"
    },
    "metadata": {
      "type": "object",
      "description": "JSON object, at most 4 KB"
    }
  }
}