# Find all expense.

`GET /api/expense`

Authentication (security requirement alternatives):

```json
[
  {
    "bearer": []
  }
]
```

- bearer: http (bearer), header JWT. Enter JWT token

Responses:

- 200: Found expense

Content type: application/json

Type: object

Schema: [Expense](https://sourcey-gauzy.pages.dev/api-reference/models/expense/index.md)

- `deletedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `createdAt` (optional)
  Type: string, date-time
  
  The creation timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `updatedAt` (optional)
  Type: string, date-time
  
  The last update timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `id` (optional)
  Type: string

- `isActive` (optional)
  Type: boolean
  
  default: true

- `isArchived` (optional)
  Type: boolean
  
  default: false

- `archivedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `tenantId` (optional)
  Type: string

- `organizationId` (optional)
  Type: string

- `amount` (required)
  Type: number

- `typeOfExpense` (optional)
  Type: string

- `notes` (optional)
  Type: string

- `currency` (required)
  Type: string
  
  enum: ["AFN","AFA","ALL","ALK","DZD","ADP","AOA","AOK","AON","AOR","ARA","ARS","ARM","ARP","ARL","AMD","AWG","AUD","ATS","AZN","AZM","BSD","BHD","BDT","BBD","BYN","BYB","BYR","BEF","BEC","BEL","BZD","BMD","BTN","BOB","BOL","BOV","BOP","BAM","BAD","BAN","BWP","BRC","BRZ","BRE","BRR","BRN","BRB","BRL","GBP","BND","BGL","BGN","BGO","BGM","BUK","BIF","XPF","KHR","CAD","CVE","KYD","XAF","CLE","CLP","CLF","CNX","CNY","COP","COU","KMF","CDF","CRC","HRD","HRK","CUC","CUP","CYP","CZK","CSK","DKK","DJF","DOP","NLG","XCD","DDM","ECS","ECV","EGP","GQE","ERN","EEK","ETB","EUR","XEU","FKP","FJD","FIM","FRF","XFO","XFU","GMD","GEK","GEL","DEM","GHS","GHC","GIP","GRD","GTQ","GWP","GNF","GNS","GYD","HTG","HNL","HKD","HUF","ISK","ISJ","INR","IDR","IRR","IQD","IEP","ILS","ILP","ILR","ITL","JMD","JPY","JOD","KZT","KES","KWD","KGS","LAK","LVL","LVR","LBP","LSL","LRD","LYD","LTL","LTT","LUL","LUC","LUF","MOP","MKD","MKN","MGA","MGF","MWK","MYR","MVR","MVP","MLF","MTL","MTP","MRO","MUR","MXV","MXN","MXP","MDC","MDL","MCF","MNT","MAD","MAF","MZE","MZN","MZM","MMK","NAD","NPR","ANG","TWD","NZD","NIO","NIC","NGN","KPW","NOK","OMR","PKR","PAB","PGK","PYG","PEI","PEN","PES","PHP","PLN","PLZ","PTE","GWE","QAR","XRE","RHD","RON","ROL","RUB","RUR","RWF","SVC","WST","SAR","RSD","CSD","SCR","SLL","SGD","SKK","SIT","SBD","SOS","ZAR","ZAL","KRH","KRW","KRO","SSP","SUR","ESP","ESA","ESB","LKR","SHP","SDD","SDG","SDP","SRD","SRG","SZL","SEK","CHF","SYP","STD","TJR","TJS","TZS","THB","TPE","TOP","TTD","TND","TRY","TRL","TMT","TMM","USD","USN","USS","UGX","UGS","UAH","UAK","AED","UYU","UYP","UYI","UZS","VUV","VEF","VEB","VND","VNN","CHE","CHW","XOF","YDD","YER","YUN","YUD","YUM","YUR","ZRN","ZRZ","ZMW","ZMK","ZWD","ZWR","ZWL"]

- `valueDate` (optional)
  Type: string, date-time

- `purpose` (optional)
  Type: string

- `taxType` (optional)
  Type: string

- `taxLabel` (optional)
  Type: string

- `rateValue` (required)
  Type: number

- `receipt` (optional)
  Type: string

- `splitExpense` (required)
  Type: boolean

- `reference` (optional)
  Type: string
  
  maxLength: 256

- `status` (optional)
  Type: string
  
  enum: ["INVOICED","UNINVOICED","PAID","NOT_BILLABLE"]

- `employee` (required)
  Reference: [Employee](https://sourcey-gauzy.pages.dev/api-reference/models/employee/index.md); Type: object

- `employeeId` (required)
  Type: string
  
  readOnly: true

- `vendor` (required)
  Reference: [OrganizationVendor](https://sourcey-gauzy.pages.dev/api-reference/models/organizationvendor/index.md); Type: object

- `vendorId` (required)
  Type: string
  
  readOnly: true

- `category` (required)
  Reference: [ExpenseCategory](https://sourcey-gauzy.pages.dev/api-reference/models/expensecategory/index.md); Type: object

- `categoryId` (required)
  Type: string
  
  readOnly: true

- `project` (required)
  Reference: [OrganizationProject](https://sourcey-gauzy.pages.dev/api-reference/models/organizationproject/index.md); Type: object

- `projectId` (optional)
  Type: string

- `organizationContact` (required)
  Reference: [OrganizationContact](https://sourcey-gauzy.pages.dev/api-reference/models/organizationcontact/index.md); Type: object

- `organizationContactId` (optional)
  Type: string

- `invoiceItems` (optional)
  Type: array
  
  Items:
    Reference: [InvoiceItem](https://sourcey-gauzy.pages.dev/api-reference/models/invoiceitem/index.md); Type: object

- `tags` (required)
  Type: array
  
  Items:
    Reference: [Tag](https://sourcey-gauzy.pages.dev/api-reference/models/tag/index.md); Type: object

- 401: Unauthorized

- 403: Forbidden

- 404: Record not found

## Examples

### cURL

```bash
curl -X GET 'http://localhost:3000/api/expense' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost:3000/api/expense', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'http://localhost:3000/api/expense',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```
