<< Click to Display Table of Contents >> Navigation: API requests > Add/Update hour bookings |
API request
Name: UpdateBooking
API request structure
<?xml version="1.0" encoding="utf-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <S:Body> <ns2:UpdateBooking xmlns:ns2="api.timewriter.nl"> <securityToken></securityToken> <booking> <id></id> <start></start> <duration></duration> <approvalLevel></approvalLevel> <leaveState></leaveState> <invoiced></invoiced> <id_IT_MED></id_IT_MED> <id_GR_MED></id_GR_MED> <id_IT_TAA></id_IT_TAA> <id_IT_AT1></id_IT_AT1> <id_IT_AT2></id_IT_AT2> <id_IT_AT3></id_IT_AT3> <id_IT_AT4></id_IT_AT4> <id_IT_AT5></id_IT_AT5> <userFieldList> <userField> <key></key> <value></value> </userField> ... </userFieldList> </booking> <roundTimes></roundTimes> </ns2:UpdateBooking> </S:Body> </S:Envelope> |
Explanation
Tag/field name |
Type |
Remark |
Description |
securityToken |
string |
mandatory |
securityToken obtained at log in |
roundTimes |
boolean |
mandatory if true, the start time and/or duration will be rounded to the minimal time unit set in TimeWriter |
round start time and/or duration |
booking |
mandatory |
see Booking |
Examples
This example will add an hour booking with the following properties: •start date and time is 23 December 2017 14:15. •The duration is 60 minutes. •There are 2 user fields used (1 text en 1 numeric).
|
---|
The next example will update an hour booking:
|
---|
API response
Name: UpdateBookingResponse
API response structure
<?xml version="1.0" encoding="utf-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <S:Body> <ns2:UpdateBookingResponse xmlns:ns2="api.timewriter.nl"> <result> <error></error> <errorMessage></errorMessage> <booking> <id></id> <start></start> <duration></duration> <approvalLevel></approvalLevel> <leaveState></leaveState> <invoiced></invoiced> <id_IT_MED></id_IT_MED> <id_GR_MED></id_GR_MED> <id_IT_TAA></id_IT_TAA> <id_IT_AT1></id_IT_AT1> <id_IT_AT2></id_IT_AT2> <id_IT_AT3></id_IT_AT3> <id_IT_AT4></id_IT_AT4> <id_IT_AT5></id_IT_AT5> <name_IT_MED></name_IT_MED> <name_GR_MED></name_GR_MED> <name_IT_AT1></name_IT_AT1> <name_IT_AT2></name_IT_AT2> <name_IT_AT3></name_IT_AT3> <name_IT_AT4></name_IT_AT5> <name_IT_AT5></name_IT_AT5> <userFieldList> <userField> <key></key> <value></value> </userField> ... </userFieldList> </booking> </result> </ns2:UpdateBookingResponse> </S:Body> </S:Envelope> |
Explanation
Tag/field name |
Type |
result |
RequestResult |