API Name
CreateCostUnit
Overview
Create cost units to support batch creation.
Request parameters
| Name |
Type |
Required |
Description |
| unitEntityList |
List<(CostUnitDto)> |
Yes |
Cost unit entity list |
List<(CostUnitDto)>:
| Name |
Type |
Required |
Description |
| parentUnitId |
Long |
Yes |
Parent Cost unit ID, -1 indicates the cost unit root |
| ownerUid |
Long |
Yes |
Owner user ID of the new cost unit |
| unitName |
String |
Yes |
Cost unit name |
Response parameters
| Name |
Type |
Description |
| success |
boolean |
Is success or not |
| code |
String |
Error code |
| message |
String |
Detail information |
| data |
CostUnitListResponse |
Message body |
CostUnitListResponse:
| Name |
Type |
Description |
| costUnitDtoList |
List |
Cost unit list |
| pageNum |
int |
Page number |
| pageSize |
int |
Number of lines per page |
| totalCount |
int |
Total Count |
Error codes
| Error code | Message | Description |
|---|
| MissingParameter | The specified parameter is mandatory for this request. | Missing Parameter |
| UnitNotBelongToUser | Financial unit is not belong to this user. | Cost unit is not belong to this user. |
| InvalidParameter | NAME_IS_INVALID | Cost unit name is illegal or duplicate. |
| InternalError | The request processing has failed due to some unknown error, exception or failure. | Internal Error. |
Request sample
https://business.ap-southeast-1.aliyuncs.com/?Action=CreateCostUnit&UnitEntityList.1.OwnerUid=16************86&UnitEntityList.1.ParentUnitId=12***********45&UnitEntityList.1.UnitName=dd&Public parameters
Response sample
"Data": { "CostUnitDtoList": [ { "UnitName": "dd", "ParentUnitId": 12***********45 "OwnerUid": 16************86 } ] }, "Message": "Successful", "RequestId": "F5B803CF-94D8-43AF-ADB3-D819AAD30E27", "Success": true, "Code": "success"