# 💸 Expenses

Expense recording and management

## List expenses

> List all expenses for an organization

```json
{"openapi":"3.0.3","info":{"title":"Skhokho API","version":"v1.0"},"tags":[{"name":"Expenses","description":"Expense recording and management"}],"servers":[{"url":"https://skhokho.ai","description":"Production"},{"url":"http://102.209.118.152:8000/","description":"Local"},{"url":"https://dev.skhokho.ai","description":"Development"}],"security":[{"basicAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"sessionid"}},"schemas":{"ExpenseList":{"type":"object","description":"Lightweight version for list views.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"title":{"type":"string"},"expense_number":{"type":"string","maxLength":100},"status":{"enum":["draft","submitted","approved","paid","rejected","reimbursed"],"type":"string","description":"* `draft` - Draft\n* `submitted` - Submitted for Approval\n* `approved` - Approved\n* `paid` - Paid\n* `rejected` - Rejected\n* `reimbursed` - Reimbursed"},"status_display":{"type":"string","readOnly":true},"expense_date":{"type":"string","format":"date"},"amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"tax_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"total_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,10}(?:\\.\\d{0,2})?$","readOnly":true},"employee":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"vendor":{"allOf":[{"$ref":"#/components/schemas/FinanceExpenseVendorMini"}],"readOnly":true},"date_created":{"type":"string","format":"date-time","readOnly":true,"nullable":true}},"required":["amount","date_created","employee","expense_date","expense_number","status_display","title","total_amount","vendor"]},"FinancePersonMini":{"type":"object","description":"Lightweight serializer for Person model.\nUsed for nested person references in financial documents.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"full_name":{"type":"string","readOnly":true}},"required":["full_name"]},"FinanceExpenseVendorMini":{"type":"object","description":"Lightweight serializer for Vendor references.","properties":{"unique_id":{"type":"string"},"name":{"type":"string","readOnly":true}},"required":["name","unique_id"]}}},"paths":{"/api/v1.0/organisation/{org_id}/expenses/":{"get":{"operationId":"organisation_expenses_list","description":"List all expenses for an organization","summary":"List expenses","parameters":[{"in":"query","name":"account_id","schema":{"type":"string"},"description":"Filter by account unique_id"},{"in":"query","name":"employee_id","schema":{"type":"string"},"description":"Filter by employee unique_id"},{"in":"query","name":"from_date","schema":{"type":"string"},"description":"Filter expenses from this expense_date (YYYY-MM-DD)"},{"in":"path","name":"org_id","schema":{"type":"string"},"required":true},{"in":"query","name":"search","schema":{"type":"string"},"description":"Search expense_number or title"},{"in":"query","name":"status","schema":{"type":"string","enum":["approved","draft","paid","rejected","submitted"]},"description":"Filter by expense status"},{"in":"query","name":"to_date","schema":{"type":"string"},"description":"Filter expenses up to this expense_date (YYYY-MM-DD)"},{"in":"query","name":"vendor_id","schema":{"type":"string"},"description":"Filter by vendor unique_id"}],"tags":["Expenses"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseList"}}}},"description":""},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}}}}}}
```

## Create expense

> Create a new expense

```json
{"openapi":"3.0.3","info":{"title":"Skhokho API","version":"v1.0"},"tags":[{"name":"Expenses","description":"Expense recording and management"}],"servers":[{"url":"https://skhokho.ai","description":"Production"},{"url":"http://102.209.118.152:8000/","description":"Local"},{"url":"https://dev.skhokho.ai","description":"Development"}],"security":[{"basicAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"sessionid"}},"schemas":{"ExpenseRequest":{"type":"object","description":"Comprehensive serializer for Expense model.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"title":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"expense_number":{"type":"string","minLength":1,"maxLength":100},"account_id":{"type":"string","writeOnly":true,"minLength":1},"status":{"enum":["draft","submitted","approved","paid","rejected","reimbursed"],"type":"string","description":"* `draft` - Draft\n* `submitted` - Submitted for Approval\n* `approved` - Approved\n* `paid` - Paid\n* `rejected` - Rejected\n* `reimbursed` - Reimbursed"},"expense_date":{"type":"string","format":"date"},"amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"tax_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"vendor_id":{"type":"string","writeOnly":true,"nullable":true,"minLength":1},"employee_id":{"type":"string","writeOnly":true,"nullable":true,"minLength":1},"receipt":{"type":"string","format":"binary","nullable":true,"description":"Receipt or supporting document"},"vat_processed":{"type":"boolean","description":"Whether VAT has been processed for reconciliation"}},"required":["account_id","amount","expense_date","expense_number","title"]},"Expense":{"type":"object","description":"Comprehensive serializer for Expense model.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"title":{"type":"string"},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"expense_number":{"type":"string","maxLength":100},"account":{"allOf":[{"$ref":"#/components/schemas/AccountParent"}],"readOnly":true},"status":{"enum":["draft","submitted","approved","paid","rejected","reimbursed"],"type":"string","description":"* `draft` - Draft\n* `submitted` - Submitted for Approval\n* `approved` - Approved\n* `paid` - Paid\n* `rejected` - Rejected\n* `reimbursed` - Reimbursed"},"status_display":{"type":"string","readOnly":true},"expense_date":{"type":"string","format":"date"},"submitted_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"approved_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"paid_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"tax_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"total_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,10}(?:\\.\\d{0,2})?$","readOnly":true},"vendor":{"allOf":[{"$ref":"#/components/schemas/FinanceExpenseVendorMini"}],"readOnly":true},"employee":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"approved_by":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"receipt":{"type":"string","format":"uri","nullable":true,"description":"Receipt or supporting document"},"receipt_url":{"type":"string","nullable":true,"readOnly":true},"vat_processed":{"type":"boolean","description":"Whether VAT has been processed for reconciliation"},"vat_processed_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"created_by":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"date_created":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"last_updated":{"type":"string","format":"date-time","readOnly":true,"nullable":true}},"required":["account","amount","approved_by","approved_date","created_by","date_created","employee","expense_date","expense_number","last_updated","paid_date","receipt_url","status_display","submitted_date","title","total_amount","vat_processed_date","vendor"]},"AccountParent":{"type":"object","description":"Minimal serializer for parent account references.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"account_code":{"type":"string","maxLength":20},"name":{"type":"string","readOnly":true},"account_type":{"enum":["asset","liability","equity","income","expense"],"type":"string","description":"* `asset` - Asset\n* `liability` - Liability\n* `equity` - Equity\n* `income` - Income\n* `expense` - Expense"}},"required":["account_code","account_type","name"]},"FinanceExpenseVendorMini":{"type":"object","description":"Lightweight serializer for Vendor references.","properties":{"unique_id":{"type":"string"},"name":{"type":"string","readOnly":true}},"required":["name","unique_id"]},"FinancePersonMini":{"type":"object","description":"Lightweight serializer for Person model.\nUsed for nested person references in financial documents.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"full_name":{"type":"string","readOnly":true}},"required":["full_name"]}}},"paths":{"/api/v1.0/organisation/{org_id}/expenses/create/":{"post":{"operationId":"organisation_expenses_create_create","description":"Create a new expense","summary":"Create expense","parameters":[{"in":"path","name":"org_id","schema":{"type":"string"},"required":true}],"tags":["Expenses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ExpenseRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ExpenseRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}},"description":""},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}}}}}}
```

## Retrieve expense

> Retrieve a specific expense with full details

```json
{"openapi":"3.0.3","info":{"title":"Skhokho API","version":"v1.0"},"tags":[{"name":"Expenses","description":"Expense recording and management"}],"servers":[{"url":"https://skhokho.ai","description":"Production"},{"url":"http://102.209.118.152:8000/","description":"Local"},{"url":"https://dev.skhokho.ai","description":"Development"}],"security":[{"basicAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"sessionid"}},"schemas":{"Expense":{"type":"object","description":"Comprehensive serializer for Expense model.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"title":{"type":"string"},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"expense_number":{"type":"string","maxLength":100},"account":{"allOf":[{"$ref":"#/components/schemas/AccountParent"}],"readOnly":true},"status":{"enum":["draft","submitted","approved","paid","rejected","reimbursed"],"type":"string","description":"* `draft` - Draft\n* `submitted` - Submitted for Approval\n* `approved` - Approved\n* `paid` - Paid\n* `rejected` - Rejected\n* `reimbursed` - Reimbursed"},"status_display":{"type":"string","readOnly":true},"expense_date":{"type":"string","format":"date"},"submitted_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"approved_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"paid_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"tax_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"total_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,10}(?:\\.\\d{0,2})?$","readOnly":true},"vendor":{"allOf":[{"$ref":"#/components/schemas/FinanceExpenseVendorMini"}],"readOnly":true},"employee":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"approved_by":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"receipt":{"type":"string","format":"uri","nullable":true,"description":"Receipt or supporting document"},"receipt_url":{"type":"string","nullable":true,"readOnly":true},"vat_processed":{"type":"boolean","description":"Whether VAT has been processed for reconciliation"},"vat_processed_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"created_by":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"date_created":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"last_updated":{"type":"string","format":"date-time","readOnly":true,"nullable":true}},"required":["account","amount","approved_by","approved_date","created_by","date_created","employee","expense_date","expense_number","last_updated","paid_date","receipt_url","status_display","submitted_date","title","total_amount","vat_processed_date","vendor"]},"AccountParent":{"type":"object","description":"Minimal serializer for parent account references.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"account_code":{"type":"string","maxLength":20},"name":{"type":"string","readOnly":true},"account_type":{"enum":["asset","liability","equity","income","expense"],"type":"string","description":"* `asset` - Asset\n* `liability` - Liability\n* `equity` - Equity\n* `income` - Income\n* `expense` - Expense"}},"required":["account_code","account_type","name"]},"FinanceExpenseVendorMini":{"type":"object","description":"Lightweight serializer for Vendor references.","properties":{"unique_id":{"type":"string"},"name":{"type":"string","readOnly":true}},"required":["name","unique_id"]},"FinancePersonMini":{"type":"object","description":"Lightweight serializer for Person model.\nUsed for nested person references in financial documents.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"full_name":{"type":"string","readOnly":true}},"required":["full_name"]}}},"paths":{"/api/v1.0/organisation/{org_id}/expenses/{expense_id}/":{"get":{"operationId":"organisation_expenses_retrieve","description":"Retrieve a specific expense with full details","summary":"Retrieve expense","parameters":[{"in":"path","name":"expense_id","schema":{"type":"string"},"required":true},{"in":"path","name":"org_id","schema":{"type":"string"},"required":true}],"tags":["Expenses"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}},"description":""},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}}}
```

## Update expense

> Update an existing expense

```json
{"openapi":"3.0.3","info":{"title":"Skhokho API","version":"v1.0"},"tags":[{"name":"Expenses","description":"Expense recording and management"}],"servers":[{"url":"https://skhokho.ai","description":"Production"},{"url":"http://102.209.118.152:8000/","description":"Local"},{"url":"https://dev.skhokho.ai","description":"Development"}],"security":[{"basicAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"sessionid"}},"schemas":{"ExpenseRequest":{"type":"object","description":"Comprehensive serializer for Expense model.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"title":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"expense_number":{"type":"string","minLength":1,"maxLength":100},"account_id":{"type":"string","writeOnly":true,"minLength":1},"status":{"enum":["draft","submitted","approved","paid","rejected","reimbursed"],"type":"string","description":"* `draft` - Draft\n* `submitted` - Submitted for Approval\n* `approved` - Approved\n* `paid` - Paid\n* `rejected` - Rejected\n* `reimbursed` - Reimbursed"},"expense_date":{"type":"string","format":"date"},"amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"tax_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"vendor_id":{"type":"string","writeOnly":true,"nullable":true,"minLength":1},"employee_id":{"type":"string","writeOnly":true,"nullable":true,"minLength":1},"receipt":{"type":"string","format":"binary","nullable":true,"description":"Receipt or supporting document"},"vat_processed":{"type":"boolean","description":"Whether VAT has been processed for reconciliation"}},"required":["account_id","amount","expense_date","expense_number","title"]},"Expense":{"type":"object","description":"Comprehensive serializer for Expense model.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"title":{"type":"string"},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"expense_number":{"type":"string","maxLength":100},"account":{"allOf":[{"$ref":"#/components/schemas/AccountParent"}],"readOnly":true},"status":{"enum":["draft","submitted","approved","paid","rejected","reimbursed"],"type":"string","description":"* `draft` - Draft\n* `submitted` - Submitted for Approval\n* `approved` - Approved\n* `paid` - Paid\n* `rejected` - Rejected\n* `reimbursed` - Reimbursed"},"status_display":{"type":"string","readOnly":true},"expense_date":{"type":"string","format":"date"},"submitted_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"approved_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"paid_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"tax_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"total_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,10}(?:\\.\\d{0,2})?$","readOnly":true},"vendor":{"allOf":[{"$ref":"#/components/schemas/FinanceExpenseVendorMini"}],"readOnly":true},"employee":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"approved_by":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"receipt":{"type":"string","format":"uri","nullable":true,"description":"Receipt or supporting document"},"receipt_url":{"type":"string","nullable":true,"readOnly":true},"vat_processed":{"type":"boolean","description":"Whether VAT has been processed for reconciliation"},"vat_processed_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"created_by":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"date_created":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"last_updated":{"type":"string","format":"date-time","readOnly":true,"nullable":true}},"required":["account","amount","approved_by","approved_date","created_by","date_created","employee","expense_date","expense_number","last_updated","paid_date","receipt_url","status_display","submitted_date","title","total_amount","vat_processed_date","vendor"]},"AccountParent":{"type":"object","description":"Minimal serializer for parent account references.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"account_code":{"type":"string","maxLength":20},"name":{"type":"string","readOnly":true},"account_type":{"enum":["asset","liability","equity","income","expense"],"type":"string","description":"* `asset` - Asset\n* `liability` - Liability\n* `equity` - Equity\n* `income` - Income\n* `expense` - Expense"}},"required":["account_code","account_type","name"]},"FinanceExpenseVendorMini":{"type":"object","description":"Lightweight serializer for Vendor references.","properties":{"unique_id":{"type":"string"},"name":{"type":"string","readOnly":true}},"required":["name","unique_id"]},"FinancePersonMini":{"type":"object","description":"Lightweight serializer for Person model.\nUsed for nested person references in financial documents.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"full_name":{"type":"string","readOnly":true}},"required":["full_name"]}}},"paths":{"/api/v1.0/organisation/{org_id}/expenses/{expense_id}/update/":{"put":{"operationId":"organisation_expenses_update_update","description":"Update an existing expense","summary":"Update expense","parameters":[{"in":"path","name":"expense_id","schema":{"type":"string"},"required":true},{"in":"path","name":"org_id","schema":{"type":"string"},"required":true}],"tags":["Expenses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ExpenseRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ExpenseRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}},"description":""},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}}}
```

## Update expense

> Update an existing expense

```json
{"openapi":"3.0.3","info":{"title":"Skhokho API","version":"v1.0"},"tags":[{"name":"Expenses","description":"Expense recording and management"}],"servers":[{"url":"https://skhokho.ai","description":"Production"},{"url":"http://102.209.118.152:8000/","description":"Local"},{"url":"https://dev.skhokho.ai","description":"Development"}],"security":[{"basicAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"sessionid"}},"schemas":{"PatchedExpenseRequest":{"type":"object","description":"Comprehensive serializer for Expense model.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"title":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"expense_number":{"type":"string","minLength":1,"maxLength":100},"account_id":{"type":"string","writeOnly":true,"minLength":1},"status":{"enum":["draft","submitted","approved","paid","rejected","reimbursed"],"type":"string","description":"* `draft` - Draft\n* `submitted` - Submitted for Approval\n* `approved` - Approved\n* `paid` - Paid\n* `rejected` - Rejected\n* `reimbursed` - Reimbursed"},"expense_date":{"type":"string","format":"date"},"amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"tax_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"vendor_id":{"type":"string","writeOnly":true,"nullable":true,"minLength":1},"employee_id":{"type":"string","writeOnly":true,"nullable":true,"minLength":1},"receipt":{"type":"string","format":"binary","nullable":true,"description":"Receipt or supporting document"},"vat_processed":{"type":"boolean","description":"Whether VAT has been processed for reconciliation"}}},"Expense":{"type":"object","description":"Comprehensive serializer for Expense model.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"title":{"type":"string"},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"expense_number":{"type":"string","maxLength":100},"account":{"allOf":[{"$ref":"#/components/schemas/AccountParent"}],"readOnly":true},"status":{"enum":["draft","submitted","approved","paid","rejected","reimbursed"],"type":"string","description":"* `draft` - Draft\n* `submitted` - Submitted for Approval\n* `approved` - Approved\n* `paid` - Paid\n* `rejected` - Rejected\n* `reimbursed` - Reimbursed"},"status_display":{"type":"string","readOnly":true},"expense_date":{"type":"string","format":"date"},"submitted_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"approved_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"paid_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"tax_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"total_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,10}(?:\\.\\d{0,2})?$","readOnly":true},"vendor":{"allOf":[{"$ref":"#/components/schemas/FinanceExpenseVendorMini"}],"readOnly":true},"employee":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"approved_by":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"receipt":{"type":"string","format":"uri","nullable":true,"description":"Receipt or supporting document"},"receipt_url":{"type":"string","nullable":true,"readOnly":true},"vat_processed":{"type":"boolean","description":"Whether VAT has been processed for reconciliation"},"vat_processed_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"created_by":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"date_created":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"last_updated":{"type":"string","format":"date-time","readOnly":true,"nullable":true}},"required":["account","amount","approved_by","approved_date","created_by","date_created","employee","expense_date","expense_number","last_updated","paid_date","receipt_url","status_display","submitted_date","title","total_amount","vat_processed_date","vendor"]},"AccountParent":{"type":"object","description":"Minimal serializer for parent account references.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"account_code":{"type":"string","maxLength":20},"name":{"type":"string","readOnly":true},"account_type":{"enum":["asset","liability","equity","income","expense"],"type":"string","description":"* `asset` - Asset\n* `liability` - Liability\n* `equity` - Equity\n* `income` - Income\n* `expense` - Expense"}},"required":["account_code","account_type","name"]},"FinanceExpenseVendorMini":{"type":"object","description":"Lightweight serializer for Vendor references.","properties":{"unique_id":{"type":"string"},"name":{"type":"string","readOnly":true}},"required":["name","unique_id"]},"FinancePersonMini":{"type":"object","description":"Lightweight serializer for Person model.\nUsed for nested person references in financial documents.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"full_name":{"type":"string","readOnly":true}},"required":["full_name"]}}},"paths":{"/api/v1.0/organisation/{org_id}/expenses/{expense_id}/update/":{"patch":{"operationId":"organisation_expenses_update_partial_update","description":"Update an existing expense","summary":"Update expense","parameters":[{"in":"path","name":"expense_id","schema":{"type":"string"},"required":true},{"in":"path","name":"org_id","schema":{"type":"string"},"required":true}],"tags":["Expenses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedExpenseRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedExpenseRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedExpenseRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}},"description":""},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}}}
```

## Perform expense action

> Perform an action on an expense using query parameter.\
> &#x20;   \
> &#x20;   \*\*Available Actions:\*\*\
> &#x20;   \- \`submit\` - Submit a draft expense for approval\
> &#x20;   \- \`approve\` - Approve a submitted expense\
> &#x20;   \- \`reject\` - Reject a submitted expense (supports optional \`reason\` parameter)\
> &#x20;   \- \`mark\_paid\` - Mark an approved expense as paid\
> &#x20;   \
> &#x20;   \*\*Examples:\*\*\
> &#x20;   \- \`/expenses/{id}/action?action=submit\`\
> &#x20;   \- \`/expenses/{id}/action?action=approve\`\
> &#x20;   \- \`/expenses/{id}/action?action=reject\&reason=Missing+receipts\`\
> &#x20;   \- \`/expenses/{id}/action?action=mark\_paid\`\
> &#x20;  &#x20;

```json
{"openapi":"3.0.3","info":{"title":"Skhokho API","version":"v1.0"},"tags":[{"name":"Expenses","description":"Expense recording and management"}],"servers":[{"url":"https://skhokho.ai","description":"Production"},{"url":"http://102.209.118.152:8000/","description":"Local"},{"url":"https://dev.skhokho.ai","description":"Development"}],"security":[{"basicAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"sessionid"}},"schemas":{"Expense":{"type":"object","description":"Comprehensive serializer for Expense model.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"title":{"type":"string"},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"expense_number":{"type":"string","maxLength":100},"account":{"allOf":[{"$ref":"#/components/schemas/AccountParent"}],"readOnly":true},"status":{"enum":["draft","submitted","approved","paid","rejected","reimbursed"],"type":"string","description":"* `draft` - Draft\n* `submitted` - Submitted for Approval\n* `approved` - Approved\n* `paid` - Paid\n* `rejected` - Rejected\n* `reimbursed` - Reimbursed"},"status_display":{"type":"string","readOnly":true},"expense_date":{"type":"string","format":"date"},"submitted_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"approved_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"paid_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"tax_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,13}(?:\\.\\d{0,2})?$"},"total_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,10}(?:\\.\\d{0,2})?$","readOnly":true},"vendor":{"allOf":[{"$ref":"#/components/schemas/FinanceExpenseVendorMini"}],"readOnly":true},"employee":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"approved_by":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"receipt":{"type":"string","format":"uri","nullable":true,"description":"Receipt or supporting document"},"receipt_url":{"type":"string","nullable":true,"readOnly":true},"vat_processed":{"type":"boolean","description":"Whether VAT has been processed for reconciliation"},"vat_processed_date":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"created_by":{"allOf":[{"$ref":"#/components/schemas/FinancePersonMini"}],"readOnly":true},"date_created":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"last_updated":{"type":"string","format":"date-time","readOnly":true,"nullable":true}},"required":["account","amount","approved_by","approved_date","created_by","date_created","employee","expense_date","expense_number","last_updated","paid_date","receipt_url","status_display","submitted_date","title","total_amount","vat_processed_date","vendor"]},"AccountParent":{"type":"object","description":"Minimal serializer for parent account references.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"account_code":{"type":"string","maxLength":20},"name":{"type":"string","readOnly":true},"account_type":{"enum":["asset","liability","equity","income","expense"],"type":"string","description":"* `asset` - Asset\n* `liability` - Liability\n* `equity` - Equity\n* `income` - Income\n* `expense` - Expense"}},"required":["account_code","account_type","name"]},"FinanceExpenseVendorMini":{"type":"object","description":"Lightweight serializer for Vendor references.","properties":{"unique_id":{"type":"string"},"name":{"type":"string","readOnly":true}},"required":["name","unique_id"]},"FinancePersonMini":{"type":"object","description":"Lightweight serializer for Person model.\nUsed for nested person references in financial documents.","properties":{"unique_id":{"type":"string","nullable":true,"maxLength":100},"full_name":{"type":"string","readOnly":true}},"required":["full_name"]}}},"paths":{"/api/v1.0/organisation/{org_id}/expenses/{expense_id}/action/":{"get":{"operationId":"organisation_expenses_action_retrieve","description":"Perform an action on an expense using query parameter.\n    \n    **Available Actions:**\n    - `submit` - Submit a draft expense for approval\n    - `approve` - Approve a submitted expense\n    - `reject` - Reject a submitted expense (supports optional `reason` parameter)\n    - `mark_paid` - Mark an approved expense as paid\n    \n    **Examples:**\n    - `/expenses/{id}/action?action=submit`\n    - `/expenses/{id}/action?action=approve`\n    - `/expenses/{id}/action?action=reject&reason=Missing+receipts`\n    - `/expenses/{id}/action?action=mark_paid`\n    ","summary":"Perform expense action","parameters":[{"in":"query","name":"action","schema":{"type":"string","enum":["approve","mark_paid","reject","submit"]},"description":"The action to perform on the expense","required":true},{"in":"path","name":"expense_id","schema":{"type":"string"},"required":true},{"in":"path","name":"org_id","schema":{"type":"string"},"required":true},{"in":"query","name":"reason","schema":{"type":"string"},"description":"Reason for rejection (only used with action=reject)"}],"tags":["Expenses"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}},"description":""},"400":{"description":"Bad Request - Invalid action or invalid state transition"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.skhokho.ai/finance/expenses.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
