Get hour bookings

<< Click to Display Table of Contents >>

Navigation:  API requests >

Get hour bookings

API request

Name: 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

format: yyyy-mm-dd

get bookings from this date

endDate

date

mandatory

format: yyyy-mm-dd

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

 

Limit

A maximum of 10000 hour bookings can be returned per request. Limit the startDate and endDate, so that not too many hour bookings are retrieved at once (e.g. per day or month).

If the specified period (startDate and endDate) will yield more than 10000 hour bookings, no hour bookings will be returned and it will be reported in the errorMessage field of the response.

 

Example

hmtoggle_arrow1Get hour bookings

 

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>

          <tariff></tariff>

          <timestamp></timestamp>

          <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

Tag/field name

Type

Description

error

boolean

false if there are no errors, true if there are errors

errorMessage

string

error message, only used when error = true

bookingList

List<Booking>

A list of hour bookings