Add or Update Cost Center

MT
Last updated 6 months ago

post
Add or Update Cost Center

[PlatformAddress]/api/1.0/account?action=addOrUpdateCostCenter
Add or update cost center details to the account.
Request
Response
Path Parameters
id
required
integer
The unique identifier of the cost centre (Leave empty to add the cost centre to the account)
name
required
string
The name of the cost centre
code
required
string
The code of the cost centre
description
optional
string
The complete description of the coast centre
200: OK
{
"Success": true,
"Id": 5452
}

Example Request

Example: Add a cost center to an account

{
"name": "test cost center",
"code": "AB12",
"description": "The complete description of the cost center"
}

Returns

Property

Description

success

Whether or not the cost center was added to the account

id

The unique identifier of the cost center

Throws

Code

Description

Specific Code: 24150

Account does not exist

Specific Code: 24150

The cost centers details are invalid