Skip to main content

Relationships v2

A guide to managing relationships in QV Systems Accelerate using API v2, including GET, POST, and PUT requests.

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

Path Parameters

HTTP Header

api-key REQUIRED

string - Your Accelerate API Key

URL Substitution

subdomain REQUIRED
string - Your Accelerate subdomain

relationship ID REQUIRED
integer - ID of your chosen relationship


Relationship Requests

GET POST PUT

GET PUT - Retrieve a specific relationship or update an existing relationship

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

Example Payload PUT

{
"legal_form": "Private Individual",
"forename": "James",
"middle_name": "Richard",
"surname": "Michaels"
}

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": 2300191,
"external_reference": "2300191",
"account_manager": "[email protected]",
"legal_form": "Private Individual",
"display_name": "James Michaels",
"kyc_flag": "N",
"customer_since": null,
"last_contact_date": null,
"email_marketing_flag": "N",
"postal_marketing_flag": "N",
"phone_marketing_flag": "N",
"third_party_marketing_flag": "N",
"source": "Email",
"title": null,
"forename": "James",
"middle_name": null,
"surname": "Michaels",
"telephone_number": null,
"telephone_number_2": null,
"mobile_number": "07999226507",
"fax_number": null,
"email_address": "[email protected]",
"date_of_birth": null,
"nationality": "British",
"residential_status": null,
"marital_status": null,
"occupation": null,
"occupation_position": null,
"employment_type": null,
"dependents": null,
"right_to_work_flag": "Y",
"criminal_conviction_flag": "N",
"wage_payment_frequency": "Monthly",
"wage_payment_day": null,
"preferred_payment_day": null,
...
}


POST - Add a new relationship

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

Example Payload

{
"legal_form": "Private Individual",
"forename": "James",
"middle_name": "Richard",
"surname": "Michaels"
}

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": 2301185,
"external_reference": "2301185",
"account_manager": null,
"legal_form": "Private Individual",
"display_name": "James Michaels",
"kyc_flag": "N",
"customer_since": null,
"last_contact_date": null,
"email_marketing_flag": "N",
"postal_marketing_flag": "N",
"phone_marketing_flag": "N",
"third_party_marketing_flag": "N",
"source": null,
"title": null,
"forename": "James",
"middle_name": "Richard",
"surname": "Michaels",
"telephone_number": null,
"telephone_number_2": null,
"mobile_number": null,
"fax_number": null,
"email_address": null,
"date_of_birth": null,
"nationality": null,
"residential_status": null,
"marital_status": null,
"occupation": null,
"occupation_position": null,
"employment_type": null,
"dependents": null,
"right_to_work_flag": "N",
"criminal_conviction_flag": "N",
"wage_payment_frequency": null,
"wage_payment_day": null,
"preferred_payment_day": null,
"driving_licence_number": null,
"driving_licence_type": null,
"payday_loan_flag": "N",
"gross_annual_salary": null,
"wage_salary": null,
"driving_licence_expiry": null,
...
}


Relationship Attributes

When updating/adding a new relationship via the API, there are a number of fields needed.


Mandatory Fields

Expand to view the mandatory fields

legal_form - string
Must be one of Private Individual, Sole Trader, Limited Company, LLP or Registered Charity. Note that when a Relationship is read from the database, the following are the possible values for this field: LLP, Limited Company, Micro Enterprise, Partnership 4+, Partnership <4, Private Individual, Registered Charity, Sole Trader.

forename - string

If legal_form = Individual

surname - string
If legal_form = Individual

registered_name - string
if legal_form = Company. Only use if legal_form != Individual

Non Mandatory Fields

Expand to view all non- mandatory fields that can be used.

external_reference - string

account_manager - string
Supply email address when using POST or PUT . Must be a valid Accelerate user. If you have round robin groups set up that you want to use for auto-assignment, do not pass anything here when creating a new relationship.

display_name - string
Must not be supplied when using POST or PUT .

relationship_id - number
Must not be supplied when using POST or PUT .

kyc_flag - string
Y or N

customer_since - date

last_contact_date - date

source - string

relationship_status - string


Must be one of Lead, Prospect: Cold, Prospect: Warm, Prospect: Hot, Active, Retention, Lost.

title - string
Must be one of Miss, Ms, Doctor, Reverend, Professor, Captain, Major, Sir, Lady, Father, Lieutenant, Lieut Col, Lieut Com, Flight Lt, Lord, Honourable, Judge, Bishop, Brigadier, Canon, Colonel, Commander, Corporal, Count, Countess, Group Capn, Major Genl, Pastor, Rabbi, Prince, Princess, Rev Canon, Rev Doctor, Sergeant, Sister, Mr, Mrs.

middle_name - string

telephone_number - string
Only use if legal_form = Individual or Sole Trader

telephone_number_2 - string
Only use if legal_form = Individual or Sole Trader

mobile_number - string
Only use if legal_form = Individual or Sole Trader

fax_number - string
Only use if legal_form = Individual or Sole Trader

email_address - string
Only use if legal_form = Individual or Sole Trader

date_of_birth - date
Only use if legal_form = Individual

nationality - string
Only use if legal_form = Individual

residential_status - string
Only use if legal_form = Individual. Must be one of Living with Parents, Mortgaged Owner, Outright Owner, Renting

marital_status - string
Only use if legal_form = Individual. Must be one of Civil Partnership, Divorced, In Relationship, Living with Partner, Married, Separated, Single, Widowed

occupation - string
Only use if legal_form = Individual

occupation_position - string
Only use if legal_form = Individual. Must be one of Business Owner, Executive Management, Junior Management, Middle Management, Professional, Skilled Manual, Unemployed, Unskilled Manual

employment_type - string
Only use if legal_form = Individual. Must be one of Agency (Full Time), Agency (Part Time), Home Maker, Permanent (Full Time), Permanent (Part Time), Retired, Self Employed, Student, Subcontractor, Temporary (Full Time), Temporary (Part Time), Unable to Work, Unemployed

dependents - number
Only use if legal_form = Individual

right_to_work_flag - string
Y or N, only use if legal_form = Individual

criminal_conviction_flag - string
Y or N, only use if legal_form = Individual

wage_payment_frequency - string
Must be one of Weekly, Fortnightly, Four-weekly,Monthly, only use if legal_form = Individual

wage_payment_day - number
Must be between 1 and 31, only use if legal_form = Individual

preferred_payment_day - number
Must be between 1 and 31, only use if legal_form = Individual

driving_licence_number - string
Must be a valid UK driving licence number, only use if legal_form = Individual

driving_licence_type - string
Only use if legal_form = Individual. Must be one of Full Other, Full UK, Provisional

driving_licence_expiry - date
Only use if legal_form = Individual

passport_type - string
Only use if legal_form = Individual. Must be United Kingdom

payday_loan_flag - string
Y or N, only use if legal_form = Individual

wage_salary - number
Only use if legal_form = Individual

gross_annual_salary - number
Only use if legal_form = Individual

facebook_username - string
Only use if legal_form = Individual

twitter_username - string
Only use if legal_form = Individual

mis_renewal_month - number
Must be between 1 and 12, only use if legal_form = Individual

trading_name - string
Only use if legal_form != Individual. Only populate this where the Trading Name is different from the Registered Name, or the Relationship is a Sole Trader.

subdomain - string
Must not be supplied when using POST or PUT .

registration_number - string
Only use if legal_form != Individual Must be a valid UK company registration number format

vat_registration_number - string
Only use if legal_form != Individual

establishment_date - date
Only use if legal_form != Individual

annual_turnover - number
Only use if legal_form != Individual

business_description - string
Only use if legal_form != Individual

sic_2007 - string
Only use if legal_form != Individual

sic_2007_description - string
Must not be supplied when using POST or PUT .

short_term_hire_flag - string
Y or N, only use if legal_form != Individual

pooled_mileage_flag - string
Y or N, only use if legal_form != Individual

fleet_mgmt_only_flag - string
Y or N, only use if legal_form != Individual

system_access_flag - string
Must not be supplied when using POST or PUT .

mileage_logging_flag - string
Y or N, only use if legal_form != Individual

fleet_size_car - number
Only use if legal_form != Individual

fleet_size_lcv - number
Only use if legal_form != Individual

future_fleet_size_car - number
Only use if legal_form != Individual

future_fleet_size_lcv - number
Only use if legal_form != Individual

future_fleet_size_date - date
Only use if legal_form != Individual

payroll_shutoff_day - number
Must be between 1 and 31, only use if legal_form != Individual and mileage_logging_flag = Y

primary_lender - string
Only use if legal_form != Individual

primary_lender_contract_expiry - date
Only use if legal_form != Individual

proposal_url - string
QV Apply URL unique for this relationship. Only populated of client is set up with QV Apply.

employee_count - number

Only use if legal_form is not (Individual, Sole Trader)

Did this answer your question?