• POST rest/addprivaterelation/

      • Add a private (consumer) relation

This POST method allows you to create a new private relation (consumer) including contact and address details.

Important!
It is very important to understand how your request will be interpreted since this is a specific process and the outcome of your request can be unexpected.

General
First of all, the mandatory parameters are appended with an asterix (*). The rest of the parameters are not mandatory. The response of this request will be the details of the relation. The response format can be found in the ‘ListRelations’ endpoint response description.

Also, the parameters customerNumber may not be 0. Sending 0 as number will be interpreted as an empty value for this parameter.

Parameters
Two parameters in this request needs some explanation: OnExistingRelationNumber and OnExistingRelationName. We will explain both parameters below.

OnExistingRelationName This field determines what should happen when the relation you POST already exist, based on the relation name. A match occurs when the relations first- and lastname match. The default behaviour is that we will return the already existing relation. However, if you want the creation of the relation to be forced you can add this parameter in your POST. When set to CONTINUE we will continue creating a new relation, which will result in multiple consumers with the same name existing in your administration.

OnExistingRelationNumber This field determines how we should behave when the relation you POST already exist, based on the customer number. The default behaviour is that we will return the already existing relation. However, if you want the creation of the relation to be forced you can add this parameter in your POST. When set to CONTINUE we will continue creating a new relation, but with a differtent, unique number. When set to ABORT (default), we will abort the creation and return the already existing relation instead.

Please note that is is not required to post a relation number. If you leave it empty, we will automatically generate a number for you and return the newly created relation with the automatic defined number.