Skip to main content

Relationships Search v2

A technical guide to searching for existing relationships in QV Systems Accelerate using the API v2.

Funmilola Olorode avatar
Written by Funmilola Olorode
Updated over 7 months ago

Note: Before you create a new relationship always use the search request to see if any matching relationships are already in the database


Path Parameters

HTTP Header

api-key REQUIRED

string - Your Accelerate API Key

URL Substitution

subdomain REQUIRED
string - Your Accelerate subdomain


Relationship Search Requests

POST

POST - Search and retrieve

https://{{subdomain}}.quotevineapp.com/qvine/quotevine/api/v2/relationships/search

Example Payload

POST

{
"relationship_name": "John Smith",
"return_multiple_flag": "Y"
}

Response

400
​

Returned if the request sent is invalid.

404
​

Returned if the request is not found or the user does not have permission to view it.

200
Returned if the request is successful.

Expand to see example of a successful response.

[
{
"relationship_id": 2227189,
"legal_form": "Private Individual",
"display_name": "John Smith",
"relationship_status": "Dataloader Upload",
"telephone_number": "",
"telephone_number_2": "",
"mobile_number": "",
"email_address": "",
"date_of_birth": "",
"registration_number": "",
"vat_registration_number": "",
"postcode": "MK402FL",
"creation_date": "2022-01-12",
"last_update_date": "2022-01-12",
"relationship_id_hash": "6B06F2A4BF6A998F4CFD84826101F4E0"
},
{
"relationship_id": 2227188,
"legal_form": "Private Individual",
"display_name": "John Smith",
"relationship_status": "Dataloader Upload",
"telephone_number": "",
"telephone_number_2": "",
"mobile_number": "",
"email_address": "",
"date_of_birth": "",
"registration_number": "",
"vat_registration_number": "",
"postcode": "MK402FL",
"creation_date": "2022-01-12",
"last_update_date": "2022-01-12",
"relationship_id_hash": "45511BFA28A3DB75D47940F761F05F7F"
}
]

Search Attributes

When searching for relationships via the API, you need to specify at least one of the following fields along with the mandatory field(s).

The search attributes are;

relationship_name - string
Pass in the forename + surname separated with a space, or if searching for a company the company name

email_address - string

mobile_number - string
Remove all spaces from the number - can also be a landline number

external_reference - string
If searching for a registered company, it is good practice to pass in the company registration number here, as the only parameter.

updated_since - date
If updated_since is passed, all other parameters are ignored. The minimum date is seven days prior to the current date.

return_multiple_flag - string
Must be set to Y. The API will return any matching relationships it finds (limited to 20 records, sorted most recently created last).

Mandatory Fields

return_multiple_flag- string
Value must be set to Y. The API will return any matching relationships it finds (limited to 20 records, sorted most recently created last).


Returned Attributes

The API will only return a subset of the possible relationship fields as only certain data will be useful in evaluating whether an existing relationship is the same logical information as the new relationship you are attempting to add.

The returned attributes are:

relationship_id

legal_form

display_name

relationship_status

telephone_number
If legal_form != Private Individual or Sole Trader this will be the telephone_number of the primary contact

telephone_number_2
If legal_form != Private Individual or Sole Trader this will be the telephone_number_2 of the primary contact

mobile_number
If legal_form != Private Individual or Sole Trader this will be the mobile_number of the primary contact

email_address
If legal_form != Private Individual or Sole Trader this will be the email_address of the primary contact

date_of_birth
If legal_form != Private Individual or Sole Trader this will be the date_of_birth of the primary contact

registration_number
Not relevant unless legal_form != Private Individual or Sole Trader

vat_registration_number
Not relevant unless legal_form != Private Individual or Sole Trader

postcode

creation_date - YYYY-MM-DD

last_update_date - YYYY-MM-DD

Did this answer your question?