# \_setContractId

Assigns a Contract to a Job.

### Parameters

#### id

The ID of the Job to assign the Contract to.

#### contract\_id

The ID of the Contract to assign to the Job.

### Example

```
FM_api('Job_setContractId', ['id' => '123', 'contract_id' => '234']);
```

### Result

#### On Success

```
{'ok':1}
```

If the Contract ID given is already assigned to the Job:

```
{'ok':1,'warning':'value already set'}
```

#### On Failure

If no Job ID is provided:

```
{'error':'no ID supplied'}
```

If no Contract ID is provided:

```
{'error':'no contract_id supplied'}
```

If the Job does not exist:

```
{'error':'appointment does not exist'}
```
