Here are 2 new API calls related to appointment scheduling in Method and how they can be used.
MethodAPIAppointment_CopySeries - This API will copy the appointments from one recurring record to another record. Here are the parameters required for the call.
strTable: Table in which the specified Record exists.
intCopySeriesFromRecordID: This is the record where the series information will come from. This record must have a RecurrenceType of Series.
intCopySeriesToRecordID: This is the record where the series information will be copied to. This record must have a RecurrenceType of Series or One Time. Appointments with a Recurrence Type of Occurrence will fail as they are already are associated with a Series. One Time jobs will be turned into a Series.
strCopySeriesDatesOption: This can be left blank and will follow the general rules of creating Occurrence appointments related to the copied from series basis (Daily, Weekly, Monthly, etc). If you do wish to specify an option here, here are a list of alternative ways you can generate occurrence dates.
"Insert Dates" is the default (and is used if the value is left blank) and will be used to generate the dates based on the basis of the copied from series record.
"Copy Exact Dates greater than today" - will copy the occurrence jobs currently in the record specified in intCopySeriesFromRecordID to the intCopySeriesToRecordID exactly as they are and will not create services older than today.
"Insert Dates Copy Exact Dates" - will copy all jobs currently in the record specified in intCopySeriesFromRecordID to the intCopySeriesToRecordID regardless if the current date is greater than the service's date.
"Copy no dates" will copy the information from the intCopySeriesFromRecordID record to the intCopySeriesToRecordID, but no Occurrence dates will be generated.
MethodApiAppointment_InsertDate - this will allow you to insert a record with the Recurrence Type Occurrence into a Series. The API does not limit you in which dates you must insert the new appointment. The parameters are the following.
intAppointmentRecordID: This is the record id of the Series you will be inserting a new occurrence for.
strAppointmentStartDateAndTiime: This is the start date and time of the new occurrence. Please not this time must be in UTC or the times will be incorrect in Method when viewed in the browser. So for example if you wish to see a service as 2009-07-21 9:00:00 EST you will have to send the time as 2009-07-21 13:00:00.
strAppointmentEndDateAndTiime: This is the end date and time of the new occurrence. Same rules applies as above with UTC time.