• 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.

  • Request
  • Response

Parameters

Name* String Details
Relation name
OnExistingRelationNumber String Details
ABORT|CONTINUE (defaults to ABORT)
OnExistingRelationName String Details
ABORT|CONTINUE (defaults to ABORT)
Email String Details
Relation e-mail address
Phone String Details
Relation phone number
Address_City String Details
City of the correspondence address
Address_Street String Details
Street of the correspondence address
Address_PostalCode String Details
Postalcode of the correspondence address
Address_CountryCode String Details
ISO 3166 (A2) country code of the correspondence address
Address_Unit String Details
Unit number of the correspondence address
Address_UnitAppendix String Details
Unit number appendix. Examples: a, b, or suite c.
IsCustomer Boolean (true|false) Details
Whether the relation is marked as customer or not
IsSupplier Boolean (true|false) Details
Whether the relation is marked as supplier or not
IsOther Boolean (true|false) Details
Wheter the relation is marked as other relation or not
SupplierNumber Integer Details
If the relation is a supplier, this will be the suppliers number
CustomerNumber Integer Details
If the relation is a customer, this will be the relations customernumber
RegistrationNumber String Details
This is the national registration number of the company
TaxIdentificationNumber String Details
Tax/VAT number without country code. Example: 123456789 or 12345678B01
GroupName String Details
The group to associate this relation with. If the group does not exist yet, a new group with the submitted name will be created.
Relation_Contact Array Details
An JSON array of contacts for the relation. The first contact will be used as the relations main contact.
Relation_Contact > Email String Details
Contact e-mail address
Relation_Contact > Phone String Details
Contact phonenumber
Relation_Contact > Sex String Details
Contact Sex (Man|Vrouw)
Relation_Contact > LastName String Details
Contact last name
Relation_Contact > FirstName String Details
Contact first name
Relation_Contact > ContactNotes String Details
Notes to be added to the contact

CURL Example

Parameters


Response JSON Example

The response order can vary from the parameter order above