Inhaltsverzeichnis

Travels

GET

Get travel via ID [From X2 new format]

/rest/travels/travel/5

Example result
<?xml version="1.0" encoding="UTF-8"?>
<xml>
    <id>5</id>
    <project_id>37</project_id>
    <cost_centre_id>3</cost_centre_id>
    <work_package_id>9</work_package_id>
    <route>Graz-Bruck</route>
    <number>55</number>
    <type_id>1</type_id>
    <km_from></km_from>
    <km_to></km_to>
    <purpose>Meeting</purpose>
    <is_company_car>0</is_company_car>
    <description></description>
    <is_client_changed>0</is_client_changed>
    ...
</xml>

POST

Add a new travel [From X2 new format]

/rest/travels/travel

Example request body
staff_id=1&date=2015/01/27&project_id=37&work_package_id=9&number=55&type_id=1&purpose=Test&Route=Graz-Bruck
Example result
<?xml version="1.0" encoding="UTF-8"?>
<xml>
    <url>.../rest/travels/travel/5</url>
</xml>

Possible values

Field Description Valid Values German Name
staff_id Staff ID required,integer Person
date Date required,us_date Datum
project_id Project ID required,integer Projekt
cost_centre_id Cost centre ID integer Kostenstelle
work_package_id Work package ID required,integer Bereich
number Number required,numeric,greater_than[-0.001] Anzahl
type_id Type ID required,integer Art
purpose Purpose Zweck
description Description Bemerkung
route Route Strecke/Ort

GET

Get travels for a member of staff for today [From X2 new format]

/rest/travels/staff/4

Example result
<?xml version="1.0" encoding="UTF-8"?>
<xml>
    <item0 id="34" purpose="foo" number="55" is_deducted="0" staff_name="Administrator" project="095 Krankenhaus Kupferberg 30" project_id="2" project_name="Krankenhaus Kupferberg 30" project_number="095" ... date="2015-10-12 00:00:00"/>
</xml>

Get travels for a member of staff for a defined date [From X2 new format]

/rest/travels/staff/4/2011/1/1

Same result as above