Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Use /entity routing instead of /user


Excerpt

Creates a new entity/account as a child of another entity in the Rubiq database, with fields specified in a contract between the calling application and the Rubiq API. The parent-child relationship between the entities must be previously established in Rubiq Cloud.



Endpoint ID:1005
Method:
Status
colourGreen
titlePOST
URL:

/userentity/dp-keyid/{dpentity-keyid}/child/{contract-id}

/userentity/ext-key/{ext-key}/{ext-type}/child/{contract-id}

 



 

dp-key

dialogportal™ master key entity-id

Rubiq entity ID that uniquely identifies account that will be the parent of the new child's parent entity

 

ext-key

External key that uniquely identifies account that will be the parent of the identifies the new child's parent entity


 ext-typeType of external key

 contract-id

Identifies the type of child to create and the set of contract fields passed in the request body

Request body:

 JSON data with properties corresponding to the fields in the specified contract

Code Block
titleExample 1 - Contract specifies first name, last name and gender:
{
	"firstName": "John",
	"lastName": "Doe",
	"gender": "Male"
}



Span
stylewhite-space:pre
Response body:


JSON data with key(s) and data for the newly created

account and data for the account

child entity. The result will always hold the

dialogportal™ master key

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.

Code Block
titleExample 1 – App setting specifies no specific key:
{
	"
dpKey
id": 123456
	"firstName": "John",
	"lastName": "Doe",
	"gender": "Male"
}


Code Block
titleExample 2 – App setting specifies external key type:
{
	"
dpKey
id": 123456,
	"extKeyType": 12,
	"extKey": "key",
	"firstName": "John",
	"lastName": "Doe",
	"gender": "Male"
}


Status codes:

201

Child was created with success 

303Child already exists, redirected to “Get Account Data” 

400Request is valid but data validation failed

...