Get the Organization Hierarchy for an Account
get
/bcws/webresources/v1.0/accounts/hierarchy/{id}
Gets the organization hierarchy for the account that matches the specified ID.
Request
Path Parameters
-
id(required): string
The ID of the account.
Query Parameters
-
expand(required): boolean
flag to retrieve child details
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/xml
- application/json
200 Response
The account's organization hierarchy was returned successfully.
Root Schema : organizationHierarchy
Type:
Show Source
object
-
accountId(required): string
The ID of the account.
-
accountNumber(required): string
The account number.
-
address(required): string
The address for the account.
-
children: array
children
The list of child accounts in the organization hierarchy.
-
city(required): string
The city for the account.
-
company: string
The company name.
-
country(required): string
The country.
-
extension: object
extension
The extended attributes.
-
firstName(required): string
The customer's first name.
-
lastName(required): string
The customer's last name.
-
middleName: string
The customer's middle name.
-
numberOfDirectChildren: integer
(int32)
The number of immediate children of the parent in the organization hierarchy.
-
organizationHierarchyType: integer
(int32)
The type of organization hierarchy, such as site or legal entity.
-
parent: object
parent
The parent in the organization hierarchy.
-
state: string
The state.
-
zip: string
The zip code.
Nested Schema : children
Type:
array
The list of child accounts in the organization hierarchy.
Show Source
-
Array of:
object children
The list of child accounts in the organization hierarchy.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : parent
Type:
object
The parent in the organization hierarchy.
Show Source
-
accountId(required): string
The ID of the account.
-
accountNumber(required): string
The account number.
-
address(required): string
The address for the account.
-
city(required): string
The city for the account.
-
company: string
The company name.
-
country(required): string
The country.
-
extension: object
extension
The extended attributes.
-
firstName(required): string
The customer's first name.
-
lastName(required): string
The customer's last name.
-
middleName: string
The customer's middle name.
-
organizationHierarchyType: integer
(int32)
The type of organization hierarchy, such as not set, site, legal entity, billing account, or service account.
-
parent: object
parent
The parent in the organization hierarchy.
-
state: string
The state.
-
zip: string
The zip code.
Nested Schema : children
Type:
object
The list of child accounts in the organization hierarchy.
Show Source
-
accountId(required): string
The ID of the account.
-
accountNumber(required): string
The account number.
-
address(required): string
The address for the account.
-
city(required): string
The city for the account.
-
company: string
The company name.
-
country(required): string
The country.
-
extension: object
extension
The extended attributes.
-
firstName(required): string
The customer's first name.
-
lastName(required): string
The customer's last name.
-
middleName: string
The customer's middle name.
-
state: string
The state.
-
zip: string
The zip code.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : extension
Type:
object
The extended attributes.
500 Response
An internal server error occurred.
Examples
This example shows how to get information about the organization hierarchy that the specified account belongs to by submitting a GET request on the REST resource using cURL. For more information about cURL, see "Use cURL".
cURL Command
curl -X GET 'http://hostname:port/bcws/webresources/version/accounts/hierarchy/0.0.0.1+-account+261427'
where:
- hostname is the URL for the Billing Care REST server.
- port is the port for the Billing Care REST server.
- version is the version of the API you're using, such as v1.0.
Example of Response Body
This example shows the contents of the response body in JSON format.
{
"extension": null,
"accountId": "0.0.0.1+-account+261427",
"address": "500 Oracle Parkway",
"city": "Redwood Shores",
"company": "Vision Corporation",
"country": "US",
"firstName": "Joe",
"lastName": "Smith",
"middleName": "",
"state": "CA",
"zip": "94065",
"accountNumber": "0.0.0.1-261427",
"parent": {
"extension": null,
"accountId": "0.0.0.1+-account+149726",
"address": "No. 3, Bannerghatta Road",
"city": "Bengaluru",
"company": "Vision Corporation",
"country": "INDIA",
"firstName": "Ananya",
"lastName": "Patel",
"middleName": "",
"state": "ka",
"zip": "560029",
"accountNumber": "0.0.0.1-149726",
"parent": null,
"organizationHierarchyType": 0
},
"children": [],
"organizationHierarchyType": 0,
"numberOfDirectChildren": 1
}