All Products
Document Center

BSS OpenAPI:CreateCostUnit

Last Updated:Oct 25, 2019

API Name



Create cost units to support batch creation.

Request parameters

Name Type Required Description
unitEntityList List<(CostUnitDto)> Yes Cost unit entity list


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


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 MessageDescription
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

  2. &UnitEntityList.1.OwnerUid=16************86
  3. &UnitEntityList.1.ParentUnitId=12***********45
  4. &UnitEntityList.1.UnitName=dd
  5. &Public parameters

Response sample

  1. "Data": {
  2. "CostUnitDtoList": [
  3. {
  4. "UnitName": "dd",
  5. "ParentUnitId": 12***********45
  6. "OwnerUid": 16************86
  7. }
  8. ]
  9. },
  10. "Message": "Successful",
  11. "RequestId": "F5B803CF-94D8-43AF-ADB3-D819AAD30E27",
  12. "Success": true,
  13. "Code": "success"