Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languagede


Info
titleKompatibilität

Diese Funktion ist nur für Kunden mit aktivierter Zeiterfassung V3 verfügbar.


Gibt alle aktuell verfügbaren Kostenstellen der Zeiterfassung zurück.

Beschreibung

Status
colourGreen
titleGET
 timerecording/get_costcenters.php?company=COMPANY_RTIKEY&import=COMPANY_IMPORTKEY&format=FORMAT_TYPE

Parameter

Parameter

Beschreibung

Typ

Hinweis

Pflicht

companyRTI Firmenschlüsselstring
ja
importRTI Importschlüsselstring
ja
formatAusgabeformatstring

zulässige Ausgabeformate

  • csv
  • json
  • xml

Standard ist csv.

nein

Rückgabewerte

Es wird ein string zurückgegeben. Im Fehlerfall wird "ERROR:Beschreibung".

JSON Format

Gibt einen JSON Formatierten Text zurück mit den Eigenschaften jeder Kostenstelle.

Beispiel Ausgabe

Code Block
languagejs
titleJSON Ausgabe
[{ 
	ident: 'K1001',
	name: 'Baustelle B',
	valid_from: '2021-01-01',
	valid_to: null,
	planned_duration: 20000,
	defined_activities: [
		{ ident: 'A100', duration: 18000 },
		{ ident: 'A200', duration: 2000 },
		{ ident: 'A200', duration: null }
	],
	allow_other_activities: 0,
	defined_persons: [
		{ id: '2093', name:'Max Mustermann' }
	]
}]

XML Format

Gibt einen XML Formatierten Text zurück mit den Eigenschaften jeder Kostenstelle.

Beispiel Ausgabe

Code Block
languagexml
titleXML Ausgabe
<?xml version="1.0" encoding="UTF-8"?>
<costcenters>
<costcenter>
   <defined_activities>
      <activity>
         <duration>18000</duration>
         <ident>A100</ident>
      </activity>
      <activity>
         <duration>2000</duration>
         <ident>A200</ident>
      </activity>
      <activity>
         <duration null="true" />
         <ident>A200</ident>
      </activity>
   </defined_activities>
   <allow_other_activities>0</allow_other_activities>
   <ident>K1001</ident>
   <name>Baustelle B</name>
   <defined_persons>
      <person>
         <id>2093</ident>
         <name>Max Mustermann</name>
      </person>
   </defined_persons>
   <planned_duration>20000</planned_duration>
   <valid_from>2021-01-01</valid_from>
   <valid_to null="true" />
</costcenter>
<costcenters>

CSV Format

Das CSV Format enthält eine Zeile pro Kostenstelle. Felder die mehrere Datensätze enthalten können, werden als JSON String ausgegeben.

Metainformationen

TrennzeichenSemikolon ( ; )
TextbegrenzerDoppeltes Hochkomma ( " )
Zeilenende0x0D 0x0A (CarriageReturn LineFeed)
HeaderZeile 1
KodierungUTF-8

CSV Spalten

Spalte

Beschreibung


 
identoptional selbst definierter Identifikator der KostenstelleEinstellbar über die allgemeinen Daten der Kostenstelle.
nameselbst definierter Name der Kostenstelle
valid_fromDatum seit wann diese Kostenstelle aktiv istFormat: YYYY-mm-dd
valid_tooptional Datum bis wann diese Kostenstelle aktiv istFormat: YYYY-mm-dd
planned_durationoptional geplante Dauer der Kostenstellein Minuten
defined_activitiesoptional festgelegte Tätigkeiten für diese KostenstelleFormat: JSON String
allow_other_activitiesOption die festlegt ob neben den festgelegten Tätigkeiten auch andere Tätigkeiten auf diese Kostenstelle gebucht werden dürfen. Format: 0 oder 1
defined_personsoptional festgelegte Personen für diese KostenstelleFormat: JSON String

Beispiel Ausgabe

Code Block
titleAusgabe in CSV
"ident";"name";"valid_from"";valid_to";"planned_duration";"defined_activities";"allow_other_activities";"defined_persons"
"K1001";"Baustelle B";"2021-01-01";"";"20000";"[{ ident: 'A100', duration: 18000 },{ ident: 'A200', duration: 2000 },{ ident: 'A200', duration: null }]";"0";"[{id:'2093',name:'Max Mustermann'}]"

 Beispiele

Code Block
titleKostenstellen im CSV Format
https://map.yellowfox.de/rti/timerecording/get_costcenters.php?company=COMPANY_RTIKEY&import=COMPANY_IMPORTKEY&format=csv


Sv translation
languageen


Info
titleCompatibility

This function is intended to be used with timerecording V3


Returns all currently available time recording cost centers.

Description

Status
colourGreen
titleGET
 timerecording/get_costcenters.php?company=COMPANY_RTIKEY&import=COMPANY_IMPORTKEY&format=FORMAT_TYPE

Parameters

parameter

description

type

hint

mandatory

companyRTI company keystring
yes
importRTI import keystring
yes
formatoutput formatstring

allowed output formats

  • csv
  • json
  • xml

Default is csv.

no

Return values

This function returns a string. On error the return will be "Error:Description".

JSON Format

Returns a JSON formatted text with the properties of each cost center.

Example output

Code Block
languagejs
titleJSON Ausgabe
[{ 
	ident: 'K1001',
	name: 'Baustelle B',
	valid_from: '2021-01-01',
	valid_to: null,
	planned_duration: 20000,
	defined_activities: [
		{ ident: 'A100', duration: 18000 },
		{ ident: 'A200', duration: 2000 },
		{ ident: 'A200', duration: null }
	],
	allow_other_activities: 0,
	defined_persons: [
		{ id: '2093', name:'Max Mustermann' }
	]
}]


XML Format

Returns an XML formatted text with the properties of each cost center.

Example output

Code Block
languagexml
titleXML Ausgabe
<?xml version="1.0" encoding="UTF-8"?>
<costcenters>
<costcenter>
   <defined_activities>
      <activity>
         <duration>18000</duration>
         <ident>A100</ident>
      </activity>
      <activity>
         <duration>2000</duration>
         <ident>A200</ident>
      </activity>
      <activity>
         <duration null="true" />
         <ident>A200</ident>
      </activity>
   </defined_activities>
   <allow_other_activities>0</allow_other_activities>
   <ident>K1001</ident>
   <name>Baustelle B</name>
   <defined_persons>
      <person>
         <id>2093</ident>
         <name>Max Mustermann</name>
      </person>
   </defined_persons>
   <planned_duration>20000</planned_duration>
   <valid_from>2021-01-01</valid_from>
   <valid_to null="true" />
</costcenter>
<costcenters>


CSV Format

The CSV format contains one line per cost center. Fields that can contain multiple data records are output as a JSON string.

Meta information

SeparatorSemicolon ( ; )
DelimiterDouble quote ( " )
Line break0x0D 0x0A (CarriageReturn LineFeed)
HeaderRow 1
EncodingWindows-1252

CSV columns

Column

Description


 
identoptional self-defined identifier of the cost centerCan be set under cost center basic data.
nameself-defined name of the cost center
valid_fromDate since when this cost center has been active.Format: YYYY-mm-dd
valid_tooptional Date until when this cost center is activeFormat: YYYY-mm-dd
planned_durationoptional planned duration of the cost centerin minutes
defined_activitiesoptional defined activities for this cost centerFormat: JSON string
allow_other_activitiesOption that determines whether other activities can be posted to this cost center in addition to the activities defined.Format: 0 or 1
defined_personsoptional defined persons for this cost centerFormat: JSON string

Example output


"ident";"name";"valid_from"";valid_to";"planned_duration";"defined_activities";"allow_other_activities";"defined_persons"
"K1001";"Baustelle B";"2021-01-01";"";"20000";"[{ ident: 'A100', duration: 18000 },{ ident: 'A200', duration: 2000 },{ ident: 'A200', duration: null }]";"0";"[{id:'2093',name:'Max Mustermann'}]"


 Examples


Code Block
titleGet cost centers as CSV
https://map.yellowfox.de/rti/timerecording/get_costcenters.php?company=COMPANY_RTIKEY&import=COMPANY_IMPORTKEY&format=csv