Create or update an event/appointment.
In Erply backend, events (appointments) are listed in the Calendar ยป Tasks module.
To retrieve events, use getEvents.
Function may return error 1043 if creating appointment and employee already has an appointment in the selected time slot. (In that case you need to requery getTimeSlots
and select a different start and end time for new appointment.)
Parameter name | Description | Possible value | Required |
---|---|---|---|
id | ID of existing event. If this parameter is present, then an existing event is updated. | integer | |
description | Name or explanation of the event. | string | |
typeID | Event type ID. For a list of types, see getEventTypes. If you have salon/spa module enabled, and want to create appointments or stylist schedule items, skip this parameter and use type = APPOINTMENT or type = SCHEDULE instead. |
integer | yes |
type | Event type. Use this field only if you have salon/spa module enabled (otherwise returns error 1006) and if you want to create a salon appointment or stylist schedule item. Possible values: APPOINTMENT, SCHEDULE, BREAK, LUNCH, VACATION, SICKDAY. | string | |
startTime | Start date and time of the event, eg. 2010-05-18 15:40:00 (must be specified in the account's default timezone) | Datetime (yyyy-mm-dd hh:mm:ss) | yes |
endTime | End date and time of the event, eg. 2010-05-18 16:00:00 (must be specified in the account's default timezone) | Datetime (yyyy-mm-dd hh:mm:ss) | yes |
customerID | ID of the customer related to this event (eg. a phone call or a meeting with particular customer) | integer | |
contactID | ID of the customer's contact person | integer | |
projectID | ID of the project associated with this event. Use getProjects. | integer | |
employeeID | Employee whom this task was assigned to. Use getEmployees. | integer | |
submitterID | Employee who entered or assigned this task. Use getEmployees. | integer | |
supplierID | Supplier ID. Use getSuppliers. | integer | |
statusID | Event status. For a list of statuses, see getEventStatuses. If you are using salon/spa module and want to set appointment status to one of the 6 predefined statuses, do not use this parameter - use the "status" field instead. |
integer | |
status | Event status ID. Use this field only if you have salon/spa module enabled (otherwise returns error 1006) and if you want to create or update an appointment. Possible values: SCHEDULED, CHECKEDIN, NOSHOW, BEINGSERVICED, CHECKEDOUT, NONE. | string | |
resourceID | Resource associated with this event (a projector, a meeting room etc.). | integer | |
productID | ID of the product. If Salon / SPA module is not enabled, function returns error 1006. | integer | |
warehouseID | ID of the salon. If Salon / SPA module is not enabled, function returns error 1006. | integer | |
checkInTime | If Salon / SPA module is not enabled, function returns error 1006. | Unix timestamp | |
checkOutTime | If Salon / SPA module is not enabled, function returns error 1006. | Unix timestamp | |
serviceStartTime | If Salon / SPA module is not enabled, function returns error 1006. | Unix timestamp | |
completed | 1 if event is completed, otherwise 0 | 0 or 1, by default 0 | |
notes | Longer description, associated e-mail message or anything else. | Text | |
notOverlapping | (Only applies if you are using Salon module, and only for events of type "APPOINTMENT".) If set to 1, and if you are creating a new appointment, and it overlaps with an existing appointment (or a lunch, break, vacation or sick day) for the same stylist (employee), API returns error 1043. |
0 or 1, by default 0 | |
***** | Additional attributes associated with this item. Attributes must be supplied as a flat list, each attribute defined by the following set of three parameters. Replace # with set number (1, 2, 3, ...). When updating an existing entry, API will only update the attributes specified in input data and leave all other existing attributes unchanged. To delete an attribute, set its value to 'null' or 'undefined'. |
||
attributeName# | Attribute name. Name can only contain the following symbols: A-Z, a-z, 0-9, dash and underscore. | string | |
attributeType# | Attribute type, possible types are 'text', 'int' and 'double'. By default 'text'. | string | |
attributeValue# | Value of the attribute. Set value to 'null' or 'undefined' to delete an attribute. 'text' attribute can be any string, maximum 255 characters. 'int' must be a signed 32-bit integer. 'double' must be a decimal number. |
string |
Field name | Type | Description |
---|---|---|
eventID | integer | ID of the newly-created or updated item |