Compatibility
This function is only available for customers with activated time recording V3.
Allows you to create, edit and delete cost centers.
Description
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
Parameters
Parameter | Description | Type | Note | Mandatory |
---|---|---|---|---|
company | RTI company key | string | yes | |
import | RTI import key | string | yes | |
action | Possible request modes | string | permissible modes are:
| yes |
ident | Identifier of the cost center | string | Unique identifier of the cost center. Only with this ID is it possible to edit or delete a cost center later. | yes |
name | Name of the cost center | string | yes(1) | |
valid_from | Start of the cost center's validity | string | YYYYmmddHHiiss | yes(1) |
valid_to | End of the cost center's validity | string | YYYYmmddHHiiss | no |
planned_duration | Planned duration of the cost center | integer | in minutes | no |
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. [ { "ident": "A100", "duration": 2000 }, { "ident": "A200", "duration": null }, { "ident": "A300" } ] | no |
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 default: 0 | no |
defined_persons | Defined persons of the cost center | array | An array of employee numbers (string). [ "M1000", "M1001", "M1002" ] | no |
Hints:
(1) Mandatory field when creating a cost center
If fields are not transmitted when editing cost centers, they will not be changed.
Return
When creating and editing, "COSTCENTER_DATA_SAVED" is returned if successful.
When deleting a cost center, "COSTCENTER_DELETED" is returned if successful..
If entries are missing or incorrect, an "ERROR:description" is returned.
Examples
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"]
https://map.yellowfox.de/rti/timerecording/set_costcenter.php?company=COMPANY_RTIKEY&import=COMPANY_IMPORTKEY&ident=B1234&action=update&name=Büro
https://map.yellowfox.de/rti/timerecording/set_costcenter.php?company=COMPANY_RTIKEY&import=COMPANY_IMPORTKEY&ident=B1234&action=delete