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

Existing relations
If a relation already exists based on the submitted e-mailadress, company name, customernumber (if customer) or suppliernumber (if supplier), we will always return the existing relation. We will not execute any updates to this relation. Use ‘UpdateRelation’ endpoint instead.

If the relation already exists you can choose whether you still want to create a new (possibly duplicate) relation or if you want to get the existing relation in the response. Use parameters: OnExistingRelationEmail, OnExistingRelationNumber and OnExistingRelationName. Please see explanation below.

Tip: you can use the response parameter ‘createdOn’ to check if the relation was just created by you or already created in the past. This way you can see if the response is an existing relation or the relation you just created.

Parameters “OnExistingRelationEmail”, “OnExistingRelationNumber” and “OnExistingRelationName”
The following parameters in this request needs some explanation: OnExistingRelationEmail, OnExistingRelationNumber and OnExistingRelationName. We will explain these parameters below.

OnExistingRelationEmail This field determines what should happen when the relation you POST already exist, based on the e-mailaddress. 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 e-mailaddress.

OnExistingRelationName This field determines what should happen when the relation you POST already exist, based on the company 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 suppliernumber. 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 it is not required to post a cusomter- or suppliernumber. If you leave both numbers empty, we will automatically generate a number for you and return the newly created relation. 

  • Request
  • Response

Parameters

Name* String Details
Relation name
OnExistingRelationEmail String Details
ABORT|CONTINUE (defaults to ABORT)
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 > Preposition String Details
The family name preposition (In Dutch: tussenvoegsel).
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
Relation_CustomField Array Details
An array of custom field values to add to the relation. Custom field with specified label must already be created in Silvasoft (CRM settings)
Relation_CustomField > Label String Details
The label of the custom field. This must match the label as specified in Silvasoft.
Relation_CustomField > FieldType String Details
The fieldtype. Must correspond with the field type as specified in Silvasoft. Possible field types: Integer, Date, Decimal, TextSmall, TextLarge, Hyperlink, Checkbox, List
Relation_CustomField > TypeOfRelation String Details
(optional) Type of relation. You only need to specify this if you have duplicate field names in your custom field configuration across customers, suppliers or other relations. Allowed values: Customer, Supplier, Other.
Relation_CustomField > IntValue Integer Details
If FieldType is Integer you can specify the integer value here
Relation_CustomField > DecimalValue Float Details
If FieldType is Decimal you can specify the decimal value here
Relation_CustomField > BooleanValue Boolean (true|false) Details
If FieldType is Checkbox you can specify the boolean value here
Relation_CustomField > StringValue String Details
If FieldType is TextSmall or TextLarge or List or Hyperlink you can specify the string value here
Relation_CustomField > DateTimeValue Date String (dd-MM-yyyy) Details
If FieldType is Date you can specify the date string here
CreateSalesLead Boolean (true|false) Details
If set to true, a sales lead (Verkoopkans) will also be created for this relation.
Relation_SalesLead Array Details
A JSON array, containing just one item with more information regarding the sales lead. Optional and only applicable if 'CreateSalesLead' is set to True.
Relation_SalesLead > SalesLeadTitle String Details
A custom title for the sales lead to be created
Relation_SalesLead > SalesLeadStage String Details
The sales stage to put the lead in. If no stage is submitted the default stage will be used.
Relation_SalesLead > SalesLeadNotes String Details
Extra notes to be added to the sales lead
Relation_BankAccount > IBAN String Details
The IBAN number for the bank account
Relation_BankAccount > SkipIBANCheck Boolean (true|false) Details
You can skip the IBAN check for the Iban number. In case the Iban check fails, this value will automatically turn to true.
Relation_BankAccount > UseForExcasso Boolean (true|false) Details
Wether the bank account should be used for in- and/or excasso
Relation_BankAccount > BIC String Details
Bank account BIC
Relation_BankAccount > Place String Details
Bank account place
Relation_BankAccount > Name String Details
Bank account name

CURL Example

Parameters


Response JSON Example

The response order can vary from the parameter order above