This GET method allows you to retreive a list of relations including contact and address details from your administration.
Note:
-
- Sorting on “CustomerNumber” or “SupplierNumber” will return zero’s / null values first. Therefore it’s recommended to only use these sorting options in combination with the “RelationType” filter. For example, sort on CustomerNumber only if RelationType is set to “Customer” and sort on SupplierNumber only if RelationType is set to “Supplier”.
- This endpoint will return a maximum of 200 relations. To retreive all relations use the offset and limit parameters in combination with a sort on created date or relation GUID to ensure an unique list.
- Request
- Response
Parameters
RelationType
String
Details
(optional) Defines what type of relations to retreive. Value should be one of the following: All, Supplier, Customer
RelationNumber
String
Details
(optional) Filter the requested relations by number. This can be either the supplier number or the customer number
RelationName
String
Details
(optional) Filter the requested relations by the name of the business or private relation
RelationEmail
String
Details
(optional) Filter the requested relations by the e-mailadres of the relation
RelationVAT
String
Details
(optional) Filter the requested relations by the VAT number of the relation. Please note when using this filter, only business relations will be returned since private relations cannot have a VAT number. Also note that this parameter should include the VAT number without country code and without VAT addition such as B01 or B02.
RelationGUID
Long
Details
(optional) Retreive the relation with the specified GUID (unique identifier). This will always return 0 or 1 results.
SearchOperand
String
Details
When creating a request with multiple parameters, this setting can be used to switch between "AND" or "OR" condition checking. For example: when both parameters RelationName and RelationEmail are submitted and this setting is set to "AND", the query will only return relation where both RelationName AND RelationEmail match the parameters. However, if this setting is set to "OR" the query will return a list of relations that match with either the RelationName or the RelationEmail. This setting defaults to "AND". This setting only applies to the parameters: RelationNumber, RelationName, RelationEmail and RelationVAT.
ChangedSince
Long
Details
(optional) An UNIX timestamp in seconds. Will return only relations that are changed since the specified timestamp.
CreatedSince
String
Details
(optional) An UNIX timestamp in seconds. Will return only relations that are created since the specified timestamp.
Limit
Integer
Details
Defines the limit of items to retreive
Offset
Integer
Details
Defines the offset for the retreive
Sorting
String
Details
An optional sorting parameter. Recommended to use when using LIMIT and OFFSET parameters. Allowed sorting values: RelationGUID, CreatedDate, ChangedDate, CustomerNumber, SupplierNumber, RelationName
SortDir
String
Details
Defaults to "DESC". Allowed values: "ASC" (low to high) and "DESC" (high to low)
CURL Example
1 |
curl -X GET -H "Content-Type: application/json" -H "ApiKey: b7d343Bnhd436f3ec3bd3504582" -H "Username: [email protected]" "https://rest-api.silvasoft.nl/rest/listrelations/?Limit=50&Sorting=createdDate&SortDir=DESC&RelationType=ALL" |
Parameters
Email
String
More info
Relation e-mail address
Phone
String
More info
Relation phone number
Address_City
String
More info
City of the correspondence address
Address_Street
String
More info
Street of the correspondence address
Address_PostalCode
String
More info
Postalcode of the correspondence address
Address_CountryCode
String
More info
ISO 3166 (A2) country code of the correspondence address
Address_Unit
String
More info
Unit number of the correspondence address
Address_UnitAppendix
String
More info
Appendix (e.g. appartment/suite/floor) for the address unit
GroupName
String
More info
The name of the CRM group this relation is assoicated with.
IsCustomer
Boolean (true|false)
More info
Whether the relation is marked as customer or not
IsSupplier
Boolean (true|false)
More info
Whether the relation is marked as supplier or not
IsOther
Boolean (true|false)
More info
Wheter the relation is marked as other customer or not
SupplierNumber
Integer
More info
If the relation is a supplier, this will be the suppliers number
CustomerNumber
Integer
More info
If the relation is a customer, this will be the relations customernumber
RegistrationNumber
String
More info
This is the national registration number of the company
TaxIdentificationNumber
String
More info
This is the VAT number of the company
Relation_Contact
Array
More info
An JSON array containing the relation contacts
Relation_Contact > Email
String
More info
Contact e-mail address
Relation_Contact > Phone
String
More info
Contact phonenumber
Relation_Contact > Sex
String
More info
Contact Sex (Man|Vrouw)
Relation_Contact > LastName
String
More info
Contact last name
Relation_Contact > FamilyName
String
More info
Deprecated, use LastName instead.
Relation_Contact > FirstName
String
More info
Contact first name
Relation_Contact > Preposition
String
More info
The family name preposition (In Dutch: tussenvoegsel).
Relation_Contact > ContactNotes
String
More info
Notes to be added to the contact
Relation_Contact > DefaultContact
String
More info
Whether this contact is the relations main / default contact or not
PrivateOrBusiness
String
More info
Wether the relation is a private (cunsumer) or business relation. (PrivateRelation|BusinessRelation)
RelationGUID
Long
More info
Unique identifier for this relation. This will never change and always stay unique.
CreatedOn
Long
More info
An UNIX timestamp in seconds reflecting the date and time of creation.
ChangedOn
Long
More info
An UNIX timestamp in seconds reflecting the date and time of last change.
Relation_CustomField
Array
More info
An array of custom fields and their values for this relation.
Relation_CustomField > Label
String
More info
The custom field name / label
Relation_CustomField > DataType
String
More info
The datatype of this custom field. Can be used to determine which value field is needed. Possible data types: Decimal, Boolean, String, Integer, DateTime
Relation_CustomField > DateTimeValue
String Date (dd-MM-yyyy)
More info
The date value of the custom field.
Relation_CustomField > DecimalValue
Float
More info
The decimal value of the custom field
Relation_CustomField > BooleanValue
Boolean (true|false)
More info
The boolean value of the custom field
Relation_CustomField > StringValue
String
More info
The string value of the custom field
Relation_CustomField > IntValue
String
More info
The integer value of the custom field
Relation_CustomField > FieldType
String
More info
The field type as specified in Sivasoft. Possible field types: Integer, Date, Decimal, TextSmall, TextLarge, Hyperlink, Checkbox, List
Relation_CustomField > TypeOfRelation
String
More info
Possible values: Customer, Supplier, Other. Specifies whether the field is a customer field, supplier field or other relation field.
Relation_BankAccount > IBAN
String
More info
The IBAN number for the bank account
Relation_BankAccount > SkipIBANCheck
Boolean (true|false)
More info
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)
More info
Wether the bank account should be used for in- and/or excasso
Relation_BankAccount > BIC
String
More info
Bank account BIC
Relation_BankAccount > Place
String
More info
Bank account place
Relation_BankAccount > Name
String
More info
Bank account name
Response JSON Example
The response order can vary from the parameter order above
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
[ { "IsCustomer": true, "PrivateOrBusiness": "BusinessRelation", "Address_City": "New-York", "SupplierNumber": null, "Address_PostalCode": "25252", "Address_Street": "1th avenue", "Name": "John Real Estate", "Address_CountryCode": "US", "Relation_BankAccount": [ { "IBAN": "NL52DEUT0265175143", "SkipIBANCheck": false, "UseForExcasso": true, "BIC": "DEUTNL2N", "Place": "Amsterdam", "Name": "naam t.a.v." } ], "Relation_Contact": [ { "ContactNotes": "Example note", "FamilyName": "Doe", "FirstName": "John", "Phone": null, "Sex": "Man", "LastName": "Doe", "Preposition": null, "DefaultContact": true }, { "ContactNotes": "Johns brother", "FamilyName": "Doe", "FirstName": "James", "Phone": null, "Sex": "Man", "LastName": "Doe", "Preposition": "from", "DefaultContact": true }], "Relation_CustomField ": [ { "DateTimeValue": null, "DecimalValue": "0.0", "BooleanValue": false, "Label": "Shoe size", "DataType": "Integer", "StringValue": null, "IntValue": 25, "TypeOfRelation": "Customer", "FieldType": "Integer" }, { "DateTimeValue": null, "DecimalValue": "0.0", "BooleanValue": false, "Label": "Special delivery notes", "DataType": "String", "StringValue": "Please deliver to third floor for this relation.", "IntValue": 0, "TypeOfRelation": "Other", "FieldType": "TextSmall" } ], "Address_Unit": "1a", "IsSupplier": false, "CustomerNumber": 1, "IsOther": true, "Phone": null, "RegistrationNumber": null, "TaxIdentificationNumber": null, "GroupName": "Default group", "RelationGUID": 8765432, "CreatedOn": 1598340866, "ChangedOn": 1599849807 }, { "IsCustomer": true, "Email": "info@anothercustomer", ....... } ] |