> For the complete documentation index, see [llms.txt](https://docs.fieldmotion.com/fieldmotion-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldmotion.com/fieldmotion-api-docs/job/_setstatustocomplete.md).

# \_setStatusToComplete

Sets the status of a Job to complete, chosen by it's given ID.

### Parameters

#### id

The ID of the Job which will have it's status set to complete.

### Example

```
FM_api('Job_setStatusToComplete', [
        'id'=>'12345'
    ]
);
```

### Results

#### On Success

```
"{"ok":1,"date_completed":"2026-05-03 11:37:30","date_completed_e":"1779276660"}"
```

#### On Failure

If the "id" parameter is not set:

```
{"error":"no id"}
```

If the "id" parameter has an integer value less than 1:

```
{"error":"missing or invalid parameter: id"}
```

If the "id" parameter does not match an existing Job:

```
{"ok":1,"date_completed":null,"date_completed_e":null}
```
