# \_save

Save a Job.

### Parameters

#### id

The ID of the Job to update.

#### attendees

A stringed JSON object containing two objects:

* emails: an array of email addresses. if the email addresses are of existing users, they should be preceded by the user ID and a colon ':'.
* email: the email text to send to the attendees.

#### attendees\_send

'0' to not send the attendees email, '1' to send the attendees email.

#### contract\_id

If this Job is part of a Contract, include the Contract ID.

#### customer\_id

The Customer or Asset's ID.

#### customer\_type

'0' for a Customer, '1' for an Asset.

#### department\_id

If this Job is for a specific Department, include the ID.

#### due\_date

What date should this Job be completed by at the latest.

#### form\_id

ID of the Form which contains this Job's questions.

#### form\_type

'0' for normal Form. '1' for asset rental sign-out, '2' for asset rental sign-in.

#### job\_ref

Textual job reference.

#### meeting\_time

When this Job is for. ISO 8601 should be used for all date formats.

#### user\_id

The user this Job is assigned to, or 0 if not yet assigned.

#### priority

Priority of the Job. Default is 3.

#### form\_num

Optional Form number, so you can say for example that this is the 3rd "inspection form" or the 5th "work sheet", etc.

#### form\_values

Stringified JSON object for pre-filling Form questions. each question's text is a key in the object.

#### notes

Optional text describing notes for this Job.

#### recurrence

Optional stringified JSON object describing the recurrence of this Job.

#### meta

### Example

```
FM_api('Job_save',
      [
	  'id'=>'222402',
	  'attendees'=>'{"emails":["3928:test3@test3.test3","4657:kae@verens.com"],"email":"test"}',
	  'attendees_send'=>'1',
	  'contract_id'=>'1',
	  'customer_id'=>'100831',
	  'customer_type'=>'0',
	  'department_id'=>'0',
	  'due_date'=>'2015-11-02',
	  'form_id'=>'29',
	  'form_type'=>'0',
	  'job_ref'=>'test create/complete 358',
	  'meeting_time'=>'2015-11-02 16:18',
	  'user_id'=>'3928',
	  'priority'=>'3',
	  'form_num'=>'',
	  'form_values'=>'',
	  'notes'=>'',
	  'recurrence'=>'{"active":0}',
	  'meta'=>''
	  ]
);
```

### Result

```
{"ok":1,"id":"4657"}
```
