Skip to main content

Contact Object v2

A technical guide to retrieving, adding, and updating contact information within relationships in Accelerate using API v2.

Funmilola Olorode avatar
Written by Funmilola Olorode
Updated over 6 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

contact ID REQUIRED
integer - ID of your chosen contact


Contact Requests

GET POST PUT

GET POST - Retrieve contacts from a relationship or add a new contact to a relationship.

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

Example Payload

POST

{
"title": "Mr",
"forename": "Joe",
"surname": "Bloggs",
"position": "CTO",
"email_address": "[email protected]",
"mobile_number": "07777777777",
"director_flag": "N",
"primary_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.

{
"items": [
{
"contact_id": 1371000,
"title": "Mr",
"forename": "Joe",
"middle_name": null,
"surname": "Bloggs",
"position": "CTO",
"email_address": "[email protected]",
"telephone_number": null,
"telephone_number_notes": null,
"telephone_number_2": null,
"telephone_number_2_notes": null,
"mobile_number": "07777777777",
"fax_number": null,
"birth_day": null,
"birth_month": null,
"date_of_birth": null,
"marital_status": null,
"residential_status": null,
"preferred_contact_method": null,
"dependents": null,
"director_flag": "N",
"primary_flag": "Y",
"system_access_flag": "N",
"psc_flag": "N",
"mileage_logging_admin_flag": "N",
"directorship_status": null,
"appointment_date": null,
"nationality": "British",
"country_of_residence": null
}
],
"first": {
"$ref": "https://example.quotevineapp.com/qvine/quotevine/api/v2/relationships/2300187/contacts/"
}
}

PUT - Update an existing contact on a relationship

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

Example Payload

PUT

{
"forename": "Joe",
"surname": "Bloggs",
"position": "Chief Technical Officer",
"date_of_birth": "1970-08-08",
"director_flag": "N",
"primary_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.

A successful PUT request will not return a response object.

{}

Contact Attributes

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

Mandatory Fields

Expand to see the list of mandatory fields

forename - string

surname - string

email_address - string

Only mandatory if primary_flag = 'Y'.

telephone_number - string
Only mandatory if primary_flag = 'Y'.

director_flag - string
Y or N.

primary_flag - string
Y or N

Note: that each Relationship can only have one primary contact, so setting this to Y will unset the flag, if set, on any other contacts on that Relationship

Non Mandatory Fields

Expand to see the list of non-mandatory fields.

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

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.

position - string

telephone_number_notes - string

telephone_number_2 - string

telephone_number_2_notes - string

mobile_number - string

fax_number - string

birth_day - number
Between 1 to 31

birth_month - number
Between 1 to 12

marital_status - string
Must be one of Single, In Relationship,Married, Widowed.

dependents - number
Must be >= 0

date_of_birth - string
yyyy-mm-dd

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

Did this answer your question?