All Products
Document Center

BSS OpenAPI:QueryCostUnit

Last Updated:Oct 25, 2019

API Name



Query all cost unit nodes under the current node of the cost unit tree. When the ParentUnitId is -1, all cost units are checked.

Request parameters

Name Type Required Description
ownerUid Long Yes Owner user ID of the new cost unit
ParentUnitId Long Yes Parent cost unit ID, -1 indicates the cost unit root
pageNum int No Page number, default 1
pageSize int No Page size, default 20

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.
MasterAndSubHasNoRelation Your accounts has no valid account relation yet. The master has no relationship.
InternalError The request processing has failed due to some unknown error, exception or failure. Internal Error。

Request sample

  2. &OwnerUid=168***********77
  3. &ParentUnitId=102************53
  4. &RegionId=cn-hangzhou
  5. &Public parameters

Response sample