• GET rest/listrelations/

      • Get a list of relations

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

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.

Response JSON Example

The response order can vary from the parameter order above