/
1006: Enumerate children

1006: Enumerate children

Retrieves all the children for an entity/account. The returned data will always contain the Rubiq entity ID and optionally a key with an external type for each of the children. In addition, the payload may optionally contain the data for each child as specified in the contract between the calling application and the Rubiq API.


Endpoint ID:1006
Method:GET
URL:

/entity/id/{entity-id}/children/data/{contract-id}

/entity/ext-key/{ext-key}/{ext-type}/children/data/{contract-id}


entity-id

Rubiq entity ID that uniquely identifies an account to enumerate children for


ext-key

External key that uniquely identifies an account to enumerate children for


ext-typeType of external key

contract-id

Identifies the type of children to return and the contract fields to return. If omitted, all child types are returned, each type using the default contract fields for that type

Request body:None 

Response body:

JSON data with properties corresponding to the fields in the specified contract. The result will always hold the Rubiq entity ID, and if the app making the request is configured to use a specific external key, this key is also included in the response.

Example 1 – Account has one child of type 2 and contract for children specifies first name, last name and gender and /data is part of the request:
{
	"children": [
		{
			"id": 1234,
			"type": 2,
			"firstName": "John",
			"lastName": "Doe",
			"gender": "Male"
		}
	]
}
Example 2 – Account has two children of type 2 and /data is not part of the request
{
	"children": [
		{
			"id": 1234,
			"type": 2
		},
		{
			"id": 5678,
			"type": 2
		}
	]
}
Example 3 – Account has no children:
{
	"children":[]
}
Status codes:

200

Account found with success

404Account was not found

The following sub codes may be returned:

404.1User not found
404.2External user could not be found

Related content

1002: Get account data
1002: Get account data
More like this
1001: Create account
1001: Create account
More like this
1011: Search
1011: Search
More like this
1020: Create account with children
1020: Create account with children
More like this
8001: Submit form data
8001: Submit form data
More like this
1009: Enumerate tracks
1009: Enumerate tracks
More like this