~~NOTRANS~~
====== Travels ======
===== GET =====
==== Get travel via ID [From X2 new format] ====
''/rest/travels/travel/__5__''
* Get for travel ID 5
== Example result ==
5
37
3
9
Graz-Bruck
55
1
Meeting
0
0
...
===== POST =====
==== Add a new travel [From X2 new format] ====
''/rest/travels/travel''
* Add new
== 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 ==
.../rest/travels/travel/5
=== 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 |
^ 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 |
**X3 13.0**\\
The ''cost_centre_id'' is ignored starting with X3 13.0 and should therefore be omitted for this call.\\
Setting the ''cost_centre_id'' will result in a HTTP Header ''US-Warning'' with the above message, but the call will still work.
===== GET =====
==== Get travels for a member of staff for today [From X2 new format] ====
''/rest/travels/staff/__4__''
* Get for staff ID 4
== Example result ==
==== Get travels for a member of staff for a defined date [From X2 new format] ====
''/rest/travels/staff/__4__/__2011/1/1__''
* Get for staff ID 4
* Get for 2011/Jan/01
== Same result as above ==