# Expense

## Overview

The Expense service allows users to capture the details for expense bills and payments.

## API Specifications

**Base path**: `/expense/bill/`

### API Contract Link

The API specification is available [here](https://github.com/egovernments/DIGIT-Specs/blob/master/works/expense-contract.yml). To view it in the Swagger editor, click below.

{% embed url="<https://editor.swagger.io/?url=https://raw.githubusercontent.com/egovernments/DIGIT-Specs/master/works/expense-contract.yml>" %}

## Data Model&#x20;

### DB Schema Diagram

<figure><img src="https://github.com/egovernments/DIGIT-Works/blob/master/backend/expense/src/main/resources/db-diagram-expense.png?raw=true" alt=""><figcaption></figcaption></figure>

### Web Sequence Diagrams

TBD

### Persister

Persister configuration: [Expense persister](https://github.com/egovernments/works-configs/blob/UAT/egov-persister/expense-bill-payment-persister.yaml)

### Indexer

Indexer configuration: [Expense indexer](https://github.com/egovernments/works-configs/blob/UAT/egov-indexer/expensebill-indexer.yml)

Index Name: expense-bill-index

## Related Topics

* [Functional specifications - Expense](/works/specifications/functional-specifications/expenditure-billing.md)
* [Expense service configuration](/works/setup/configure-works/service-configuration/expense.md)
* Expense UI configuration - for MuktaSoft
* Expense user manual


---

# 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.digit.org/works/platform/architecture/low-level-design/services/expense.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.
