_save

Save an Appointment.

Parameters

id

The ID of the Appointment 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 Appointment 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 Appointment is for a specific Department, include the ID.

due_date

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

form_id

ID of the Form which contains this Appointment'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 Appointment is for. ISO 8601 should be used for all date formats.

user_id

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

priority

Priority of the Appointment. 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 Appointment.

recurrence

Optional stringified JSON object describing the recurrence of this Appointment.

meta

Example

FM_api('Appointment_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"}

Last updated