BPAPI Methods

BPAPI method Customer/AddChild

Customer/AddChild

Adds a new parent-child relationship between two customers to the database.

Authorization required: Yes

HTTP methods allowed: GET, POST

Syntax: Customer/AddChild/{child}/  Details 

Syntax: Customer/{parent}/AddChild/{child}/  Details 

Adds a new parent-child relationship between two customers to the database.
Parameter "child" refers to the subordinated customer in the relationship while parameter "parent" referes to the super customer / master customer.

Note that relationships may extend indefinitely in both directions with a child customer being the parent customer in another sub-ordinated relation and likewise, with a parent customer being the child customer in another super-ordinated relation.

The {parent} parameter is optional. If the {parent} parameter is not specified it will be derived from the credentials used for authorization.

The existence of relationships infer rights in the sense that the parent customer may access all properties belonging to the child customer.
The credentials used for authorization must contain the right to change properties of both the parent and child.
The easiest way to accomplish this is to just create the child with the parent's authorization. Alternatively, the method Customer/DelegateRight may be executed with the child's authorization before calling Customer/AddChild

See also Customer/DelegateRight

Although the creation of a child-parent relationship is seen from the perspective of the parent API wise (syntax wise) the relationsship in itself will usually show up as a property of the child-object.

See also Customer/AddAsChild which also creates the child-customer as well as adding the parent-child relationship.

Popularity: 53 (number of times method has been accessed)

Documentation and tests automatically generated from source-code 2020-04-08 16:17