Last modified by YellowFox_RD on 2025/01/23 10:44

Hide last authors
YellowFox_RD 1.1 1 (% class="box" %)
Dominic Lippmann 2.1 2 (((
Dominic Lippmann 4.1 3 Table of Contents
Dominic Lippmann 2.1 4 )))
5
YellowFox_RD 1.1 6 {{toc/}}
7
8 (% class="box" %)
9 (((
Dominic Lippmann 4.1 10 **Compatibility**
11 This function is only available for customers with activated time recording V3.
YellowFox_RD 1.1 12 )))
13
Dominic Lippmann 4.1 14 Allows you to create, edit and delete cost centers.
Dominic Lippmann 2.1 15
Dominic Lippmann 4.1 16 = Description =
Dominic Lippmann 2.1 17
18 (% class="blue mark" %)**POST**(%%)** //timerecording/set_costcenter.php?company//**//=//COMPANY_RTIKEY//**&import**=//COMPANY_IMPORTKEY**&action**=ACTION_TYPE**&name**=COSTCENTER_IDENT**&name**=COSTCENTER_NAME**&valid_from**=COSTCENTER_VALIDFROM_DATETIME**&valid_to**=COSTCENTER_VALIDTO_DATETIME**&planned_duration**=COSTCENTER_DURATION**&defined_activities**=COSTCENTER_ACTIVITIES**&allow_other_activities**=COSTCENTER_OTHER_ACTIVITIES_OPTION**&defined_persons**=COSTCENTER_PERSONS
19
Dominic Lippmann 4.1 20 = //Parameters// =
YellowFox_RD 1.1 21
Dominic Lippmann 4.1 22 |=Parameter|=Description|=Type|=Note|=Mandatory
23 |company|RTI company key|string| |yes
24 |import|RTI import key|string| |yes
25 |action|Possible request modes|string|permissible modes are:(((
26 * new: create a new cost center
27 * update: edit an existing cost center
28 * delete: delete a cost center
29 )))|yes
30 |ident|Identifier of the cost center|string|Unique identifier of the cost center.
31 Only with this ID is it possible to edit or delete a cost center later.|yes
32 |name|Name of the cost center|string| |yes(1)
33 |valid_from|Start of the cost center's validity|string|YYYYmmddHHiiss|yes(1)
34 |valid_to|End of the cost center's validity|string|YYYYmmddHHiiss|no
35 |planned_duration|Planned duration of the cost center|integer|in minutes|no
36 |defined_activities|Defined activities of the cost center|array|An array of objects containing the identifier and an optional planning time in minutes per activity.
37 The identification of the activities must be unique and already stored in the system.
38 Example:
YellowFox_RD 1.1 39 {{code language="js"}}[
Dominic Lippmann 2.1 40 {
41 "ident": "A100",
42 "duration": 2000
43 },
44 {
45 "ident": "A200",
46 "duration": null
47 },
48 {
49 "ident": "A300"
50 }
Dominic Lippmann 4.1 51 ]{{/code}}|no
52 |allow_other_activities|This option determines whether other activities are allowed for the booking in addition to the "defined_activities".|integer|Possible values: 0 or 1
53 default: 0|no
54 |defined_persons|Defined persons of the cost center|array|An array of employee numbers (string).
55 If persons are specified for a cost center, it is only possible for these persons to create a time booking to this cost center.
56 The employee number is determined separately for each person via the personnel administration.
57 {{code language="js"}}[ "M1000", "M1001", "M1002" ]{{/code}}|no
58 Hints:
59 (1) Mandatory field when creating a cost center
60 If fields are not transmitted when editing cost centers, they will not be changed.
YellowFox_RD 1.1 61
Dominic Lippmann 4.1 62 = Return =
YellowFox_RD 1.1 63
Dominic Lippmann 4.1 64 When creating and editing, "**COSTCENTER_DATA_SAVED**" is returned if successful.
65 When deleting a cost center, "**COSTCENTER_DELETED**" is returned if successful..
66 If entries are missing or incorrect, an "(% class="error" %)**ERROR:description**(%%)" is returned.
YellowFox_RD 1.1 67
Dominic Lippmann 4.1 68 = Examples =
Dominic Lippmann 2.1 69
Dominic Lippmann 4.1 70 **Create a new cost center with all possible fields**
71 {{code language="java"}}https://map.yellowfox.de/rti/timerecording/set_costcenter.php?company=COMPANY_RTIKEY&import=COMPANY_IMPORTKEY&action=new&ident=B1234&name=Baustelle&valid_from=20210101000000&valid_to=20211231235959&planned_duration=10000&defined_activities=[{"ident":"A100","duration":5000},{"ident":"A200","duration":5000}]&allow_other_activities=0&defined_persons=["M1000","M1001"]{{/code}}
Dominic Lippmann 2.1 72
Dominic Lippmann 4.1 73 **Edit the name of a cost center**
YellowFox_RD 1.1 74 {{code language="java"}}https://map.yellowfox.de/rti/timerecording/set_costcenter.php?company=COMPANY_RTIKEY&import=COMPANY_IMPORTKEY&ident=B1234&action=update&name=Büro{{/code}}
75
Dominic Lippmann 4.1 76 **Delete a cost center**
YellowFox_RD 1.1 77 {{code language="java"}}https://map.yellowfox.de/rti/timerecording/set_costcenter.php?company=COMPANY_RTIKEY&import=COMPANY_IMPORTKEY&ident=B1234&action=delete{{/code}}
78