The CostCenter Object
Object Property | Required | Object Type | Description | Max Character Length |
---|
AccountCostCenterCode | Yes | String | Cost Center Code of Cost Center | 7 |
AccountCostCenter | Yes | String | Name of Cost Center | 50 |
AccountCostCenterId | No | Integer | Cost Center Id of Cost Center | 10 |
IsDisabled | No | Boolean | Disabled Status of Cost Center | 1 |
List All CostCenters
Returns a list of your all CostCenters in your UNItekTIME account.
GET /API/CostCenters
Example Request
curl "https://demo.unitektime.com/api/CostCenters" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp (yourname@example.com)"
Example Response
[
{
"AccountCostCenterId": 0001,
"AccountCostCenterCode": "Default",
"AccountCostCenter": "Default Cost Center",
"IsDisabled": "No"
}
]
Retrieve a CostCenter
Retrieves the CostCenter with the given ID. Returns a CostCenter object and a 200 OK response code if a valid identifier was provided.
GET /API/CostCenters/{CostCenter_ID}
Example Request
curl "https://demo.unitektime.com/api/CostCenters/0001" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp (yourname@example.com)"
Example Response
[
{
"AccountCostCenterId": 0001,
"AccountCostCenterCode": "Default",
"AccountCostCenter": "Default Cost Center",
"IsDisabled": "No"
}
]
Create a CostCenter
Creates a CostCenter in your UNItekTIME account and returns the Response Message.
POST /API/CostCenters
Object Property | Required | Object Type | Description | Max Character Length |
---|
AccountCostCenterCode | Yes | String | Cost Center Code of Cost Center | 7 |
AccountCostCenter | Yes | String | Name of Cost Center | 50 |
Example Request
curl "https://demo.unitektime.com/api/CostCenters" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X POST \
-H "Content-Type: application/json" \
-d "{'AccountCostCenterCode': 'tcc','AccountCostCenter': 'temp Cost Center'}"
Example Response
[
{
"id": "00000",
"message": "Cost Center Added Successfully"
}
]
Update a CostCenter
Update an CostCenter in your UNItekTIME account and returns the Response Message.
POST /API/CostCenters/{CostCenter_ID}
Example Request
curl "https://demo.unitektime.com/api/CostCenters/00001" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X POST \
-H "Content-Type: application/json" \
-d "{'AccountCostCenter': 'temp Cost Center'}"
Example Response
[
{
"id": "00002",
"message": "Cost Center Update Successfully"
}
]
Delete a CostCenter
Delete a CostCenter. Returns a 200 OK response code if the call succeeded.
DELETE /API/CostCenter/{CostCenter_ID}
Example Request
curl "https://demo.unitektime.com/api/CostCenters/00002" \
-H "APIKey: {Your API Key}" \
-H "AuthToken: {Your Authentication Token}" \
-H "User-Agent: MyApp (yourname@example.com)" \
-X DELETE \
-H "Content-Type: application/json"
Example Response
[
{
"id": "00002",
"message": "Cost Center Delete Succeed"
}
]