# \_listBy

Lists Jobs using optional filters.

### Parameters

Note that at least one of the following optional filters must be set.

#### year

Integer year of the Job (OPTIONAL)

#### week

Integer week number of the Job (OPTIONAL)

uses [mode 1](https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_week) of the MySQL week function

#### department\_id

Integer department ID (OPTIONAL)

#### assettype\_id

Integer asset-type ID (OPTIONAL)

#### status

Integer status of the Job (OPTIONAL)

#### last\_edited

Datetime returns jobs where last\_edited is greater than or equal to this (OPTIONAL)

### Example

```
FM_api('Appointments_listBy', [
	'status' => '2'
]);
```

### Result

```
{"appointments":[{"id":"50","customer_id":"208986","meeting_time":"2018-02-07 11:32:00"},{"id":"68","customer_id":"208986","meeting_time":"2018-02-28 19:12:00"},{"id":"71","customer_id":"215023","meeting_time":"2018-03-05 10:21:00"},{"id":"77","customer_id":"215023","meeting_time":"2018-03-09 14:01:00"},{"id":"90","customer_id":"208986","meeting_time":"2018-03-29 11:59:00"},{"id":"786","customer_id":"208986","meeting_time":"2018-04-23 14:27:00"},{"id":"787","customer_id":"208986","meeting_time":"2018-04-25 11:34:00"},{"id":"789","customer_id":"208986","meeting_time":"2018-04-26 12:28:00"}]}
```
