Create a new calendar booking
Calendar create
Create a new calendar booking.
Parameter | Description | Examples | More info |
---|---|---|---|
Action | Create a new record in the calendar bookings | action=create | |
Parameters described in overview | |||
Input | JSON string | input= | |
calTimeSummaryInternal | "calTimeSummaryInternal":"1005543" | ||
calIsoDateTimeStart | "calIsoDateTimeStart":"2017-07-10T14:30:00" | ||
calIsoDateTimeEnd | "calIsoDateTimeEnd":"2017-07-10T14:30:00" | ||
calDurationDecimalHours | "calDurationDecimalHours":"-0.75" | ||
calResourceId | "calResourceId":"5" |
Example request:
Request to create a booking
http://<SERVER>/jsonapi/calendar.json?user=user&password=user&version=3.3&action=create&input={"data": [{"calTimeSummaryInternal":"1005543","calIsoDateTimeStart":"2017-07-10T14:30:00","calIsoDateTimeEnd":"2017-07-10T14:30:00","calDurationDecimalHours":"-0.75","calResourceId":"5"}]}
Note: The duration passed may be modified by the business logic of the API.
e.g. if 500 hours is passed the API will reduce the duration to the hours for the number of working days specified by the start and end date. If no start or end time is specified in the ISO date fields, and the duration is for an entire day, the 'All day' flag on the booking will be automatically set.
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "data processed successfully.",
"warningmessage": "",
"success": true,
"data": [
{
"calUuid": "A3492EF45155B8438C2D13AA6F6030D2",
"calDiaryInternal": 56570,
"calResourceId": "34",
"calResourceName": "Freelancer.01",
"calTimeSummaryInternal": 1005543,
"calClientCode": "1/1DFHTEST",
"calClientName": "SnakeByte Software",
"calJobNumber": "1/00010481",
"calJobNumberSimple": "10481",
"calJobDescription1stLine": "No date dependencies test",
"calJobHandlerName": "David.Harvey",
"calJobAndPhase": "1/00010481.H01",
"calJobPhaseNumberSimple": "10481.H01",
"calPhaseDescription1stLine": "Design 2t",
"calStageCode": "",
"calTaskDescription": "",
"calChargeCode": "1/ALT",
"calChargeCodeDescription": "Amends New",
"calDescription": "",
"calNotes": "",
"calStatus": "",
"calRequestStatus": "",
"calStartDate": "2017-07-10",
"calStartTime": "14:30:00",
"calEndTime": "14:45:00",
"calIsoDateTimeStart": "2017-07-10T14:30:00",
"calIsoDateTimeEnd": "2017-07-10T14:45:00",
"calAllDay": false,
"calColourHex": "EBFF00",
"calFeedback": "TODO",
"calWeakLink": 6011,
"calendarunallocatedunique": "1/00010481.H01###1/ALT",
"calendarunallocatedestimated": 1,
"calendarunallocatedbooked": 3.25,
"calendarunallocatedremaining": -2.25,
"calendarunallocatedtimesheets": 0,
"calendarunallocateddraft": 0,
"calendarunallocatedinitials": "F0,FC",
"calNumberOfDays": "1",
"calDurationDescription": "0.25 hour",
"calHoursPerDay": "0.25",
"calTimeStampModified": 0,
"calRecordVersionNumber": 0
}
]
}