# Cost Center Transactions

{% hint style="warning" %}
**Limited Support/End of Life Capabilities**

The Classic API has been replaced by the Alemba RestFul API.  While we will continue to support the Classic API for clients that are still using it, no further development will be done.

If you need to request a hotfix or support for these features, please contact [<mark style="color:blue;">**Alemba Support**</mark>](https://alemba.help/production/Portal.aspx)
{% endhint %}

### CostCenterCreate Transaction

The CostCenterCreate transaction can be used to create a new cost center record and save its details.

#### Input Parameters: CostCenterCreateRequest

<table data-header-hidden><thead><tr><th></th><th width="121"></th><th></th><th width="108"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Mandatory</td><td>Default</td><td>Description</td></tr><tr><td>sID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s current Session ID</td></tr><tr><td>sLoginUserID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Login ID</td></tr><tr><td>sLoginPassword</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Password</td></tr><tr><td>sDatabase</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Name of the ASM System for logging in.</td></tr><tr><td>lEntityRef</td><td>Lookup Field</td><td>Ignored</td><td>-</td><td>Ignored on create</td></tr><tr><td>sGroupName</td><td>String</td><td>No</td><td>-</td><td>Cost Center name</td></tr><tr><td>sDescription</td><td>String</td><td>No</td><td>“”</td><td>Cost Center Description</td></tr><tr><td>lCategory</td><td>Lookup Field</td><td>No</td><td>0</td><td>Cost Center Category</td></tr><tr><td>lParentCostCenter</td><td>Lookup Field</td><td>No</td><td>0</td><td>Parent Cost Center</td></tr><tr><td>lPartition</td><td>Lookup Field</td><td>No</td><td>Analyst’s default partition</td><td>Partition in which to create this cost center</td></tr><tr><td>sReason</td><td>String</td><td>No</td><td>“”</td><td>Audit reason</td></tr><tr><td>aCustomParameters</td><td>Array</td><td>No</td><td>“”</td><td>See Defining Custom Parameters.</td></tr></tbody></table>

#### Return Values:CostCenterResponse <a href="#costcentreresponse" id="costcentreresponse"></a>

| Argument   | Type      | Description                             |
| ---------- | --------- | --------------------------------------- |
| nEntityRef | Integer   | Newly created cost center ref           |
| sMessage   | String    | Error/Warning message returned from API |
| Ret        | APIReturn | Error/Warning number returned from API  |

### CostCenterUpdate Transaction

The CostCenterUpdate transaction can be used to update the details of an existing cost center record.

#### Input Parameters: CostCenterUpdateRequest

<table data-header-hidden><thead><tr><th></th><th width="103"></th><th></th><th width="95"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Mandatory</td><td>Default</td><td>Description</td></tr><tr><td>sID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s current Session ID</td></tr><tr><td>sLoginUserID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Login ID</td></tr><tr><td>sLoginPassword</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Password</td></tr><tr><td>sDatabase</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Name of the ASM System for logging in.</td></tr><tr><td>lEntityRef</td><td>Lookup Field</td><td>Yes</td><td>-</td><td>Reference number of the cost center to update</td></tr><tr><td>sGroupName</td><td>String</td><td>No</td><td>(As is)</td><td>Cost Center name</td></tr><tr><td>sDescription</td><td>String</td><td>No</td><td>(As is)</td><td>Cost Center Description</td></tr><tr><td>lCategory</td><td>Lookup Field</td><td>No</td><td>(As is)</td><td>Cost Center Category</td></tr><tr><td>lParentCostCenter</td><td>Lookup Field</td><td>No</td><td>(As is)</td><td>Parent Cost Center</td></tr><tr><td>lPartition</td><td>Lookup Field</td><td>No</td><td>(As is)</td><td>Partition in which to create this cost center</td></tr><tr><td>sReason</td><td>String</td><td>No</td><td>“”</td><td>Audit reason</td></tr><tr><td>aCustomParameters</td><td>Array</td><td>No</td><td>“”</td><td>See Defining Custom Parameters.</td></tr></tbody></table>

#### Return Values: CostCenterResponse

See CostCenterResponse for more information.

### CostCenterRetrieve Transaction

The CostCenterRetrieve transaction can be used to retrieve the details of a cost center record.

#### Input Parameters: CostCenterEntityRequest

<table data-header-hidden><thead><tr><th></th><th width="109"></th><th></th><th width="109"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Mandatory</td><td>Default</td><td>Description</td></tr><tr><td>sID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s current Session ID</td></tr><tr><td>sLoginUserID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Login ID</td></tr><tr><td>sLoginPassword</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Password</td></tr><tr><td>sDatabase</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Name of the ASM System for logging in.</td></tr><tr><td>lEntityRef</td><td>Lookup Field</td><td>Yes</td><td>-</td><td>Reference number of the cost center to retrieve</td></tr><tr><td>aCustomParameters</td><td>Array</td><td>No</td><td>“”</td><td>See Defining Custom Parameters.</td></tr></tbody></table>

#### Return Values: CostCenterRetrieveResponse

| Argument  | Type      | Description                               |
| --------- | --------- | ----------------------------------------- |
| Ret       | APIReturn | Error/Warning number returned from by API |
| sMessage  | String    | Error/Warning message returned by the API |
| ResultSet | DataSet   | ResultSet containing attribute details    |

### CostCenterDelete Transaction

The CostCenterDelete transaction can be used to find and delete a cost center record. After the transaction is executed, the status and audit trail are updated.

#### Input Parameters: CostCentreDeleteRequest

<table data-header-hidden><thead><tr><th></th><th width="109"></th><th></th><th width="103"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Mandatory</td><td>Default</td><td>Description</td></tr><tr><td>sID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s current Session ID</td></tr><tr><td>sLoginUserID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Login ID</td></tr><tr><td>sLoginPassword</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Password</td></tr><tr><td>sDatabase</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Name of the ASM System for logging in.</td></tr><tr><td>lEntityRef</td><td>Lookup Field</td><td>Yes</td><td>-</td><td>Reference number of the cost center to delete</td></tr><tr><td>sReason</td><td>String</td><td>No</td><td>“”</td><td>Audit reason</td></tr><tr><td>aCustomParameters</td><td>Array</td><td>No</td><td>“”</td><td>See Defining Custom Parameters.</td></tr></tbody></table>

#### Return Values: CostCentreResponse

See CostCenterResponse for more information.
