<< Click to Display Table of Contents >> Navigation: API requests > Get hour bookings |
API request
Namw: GetBookings
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:GetBookings xmlns:ns2="api.timewriter.nl"> <securityToken></securityToken> <startDate></startDate> <endDate></endDate> <filters> <filter> <field></field> <operator></operator> <value></value> </filter> ... </filters> </ns2:GetBookings> </S:Body> </S:Envelope> |
Explanation
Tag/field name |
Type |
Remark |
Description |
securityToken |
string |
mandatory |
securityToken obtained at log in |
startDate |
date |
mandatory |
get bookings from this date |
endDate |
date |
mandatory |
get bookings until and including this date |
filters |
List<Filter> |
optional Apart from the startDate/endDate filter this filter can be used for filtering on specific booking fields. |
filter list for Booking fields (check Response structure and Explanation below) See also Filter For only fetching the changed data check the: Filter -> Example |
Example
This example will get all hours in whole January 2018.
|
---|
API response
Name: GetBookingsResponse
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:GetBookingsResponse xmlns:ns2="api.timewriter.nl"> <result> <error></error> <errorMessage></errorMessage> <bookingList> <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_AT4> <name_IT_AT5></name_IT_AT5> <userFieldList> <userField> <key></key> <value></value> </userField> ... </booking> ... </bookingList> </result> </ns2:GetBookingsResponse> </S:Body> </S:Envelope> |
Explanation
Tag/field name |
Type |
||||||||||||
result |
RequestResult
|