Add Accounts to a Hierarchy

post

/bcws/webresources/v1.0/accounts/hierarchy/add/{id}

Adds the accounts listed in the request body as child accounts to an existing organization hierarchy. You specify the organization hierarchy's parent account in the path parameter.

Request

Path Parameters
Supported Media Types
Request Body - application/xml ()
The list of child account IDs to add to the hierarchy.
Root Schema : schema
Type: array
Show Source
Request Body - application/json ()
The list of child account IDs to add to the hierarchy.
Root Schema : schema
Type: array
Show Source
Back to Top

Response

204 Response

The account was added successfully.

500 Response

An internal server error occurred.
Back to Top

Examples

This example shows how to add accounts to an existing hierarchy by submitting a POST request on the REST resource using cURL. For more information about cURL, see "Use cURL". In this example, the accounts listed in the request body are added as children in the organization hierarchy owned by account 149726.

cURL Command

curl -X POST 'http://hostname:port/bcws/webresources/v1.0/accounts/hierarchy/add/0.0.0.1+-account+149726'  -H 'content-type: application/json' -d addToHierarchy.json

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.
  • addToHierarchy.json is the JSON file containing the list of accounts to add to the hierarchy.

Example of Request Body

This example shows the contents of the addToHierarchy.json file sent as the request body.

[
	"0.0.0.1+-account+81329",
	"0.0.0.1+-account+85712",
	"0.0.0.1+-account+123346"
]

Example of Response Body

If successful, a 204 response code is returned with no response body.

Back to Top