• POST rest/addbusinessrelation/

      • Add a business relation

This POST method allows you to create a new business relation 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 and supplierNumber may not be 0. Sending 0 as number will be interpreted as an empty value.

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. 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 the relation, resulting in you having multiple relations with exactly the same name.

OnExistingRelationNumber This field determines how we should behave when the relation you POST already exist, based on the customer or supplier 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 the relation, but with a new, 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 or suppliernumber. If you leave both numbers empty, we will automatically generate a number for you and return the newly created relation with the automatic defined number.