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

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.

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 parameter customerNumber may not be 0. Sending 0 as number will be interpreted as an empty value for this parameter.

Existing relations
If a relation already exists based on the submitted e-mailadress or customernumber, 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 based on the customernumber or e-mailadress you can still 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 and OnExistingRelationNumber for this. 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”, and “OnExistingRelationNumber”
The following parameters in this request needs some explanation: OnExistingRelationEmail and OnExistingRelationNumber. We will explain both 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.

OnExistingRelationNumber This field determines how we should behave when the relation you POST already exist, based on the customernumber. 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 customernumber. If you leave it empty, we will automatically generate a number for you and return the newly created relation.

  • Request
  • Response


OnExistingRelationNumber String Details
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
IsOther Boolean (true|false) Details
Wheter the relation is marked as other relation or not
CustomerNumber Integer Details
If the relation is a customer, this will be the relations customernumber
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
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
Relation_CustomField > FieldType
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 String 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


Response JSON Example

The response order can vary from the parameter order above