Skip to main content

Opportunity Object v2

A guide to managing opportunities within Accelerate using API v2, including GET, POST, and PUT requests.

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

opportunity ID OPTIONAL
integer - ID of your chosen opportunity


Opportunity Requests

GET POST PUT

GET POST - Retrieve opportunities from a relationship or add a new opportunity into a relationship

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

Example Payload

POST

{
"opportunity_type": "Single Car",
"opportunity_status": "New Opportunity",
"opportunity_source": "Email",
"quality": "High"
}

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": [
{
"opportunity_id": 542425,
"opportunity_type": "Single Car",
"opportunity_status": "New Opportunity",
"opportunity_source": "Email",
"opportunity_sub_source": null,
"description": null,
"quality": "Medium",
"units_car": null,
"units_lcv": null,
"value": null,
"target_close_date": null,
"close_date": null,
"brand": "Examples's Dev",
"account_manager": "[email protected]",
"tracking_field_1": null,
"tracking_field_2": null,
"tracking_field_3": null,
"tracking_field_4": null,
"tracking_field_5": null,
"creation_date": "2022-08-02T09:03:10.921Z",
"loss_reason": null,
"loss_details": null
}
],
"first": {
"$ref": "https://example.quotevineapp.com/qvine/quotevine/api/v2/relationships/2300191/opportunities/"
}
}

PUT -Update an existing opportunity within a relationship

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

Example Payload

PUT

{
"opportunity_type": "Single Car",
"opportunity_status": "New Opportunity",
"opportunity_source": "Email",
"description": "Customer is interested in leasing one vehicle.",
"quality": "High"
}

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.

{}

Opportunity Attributes

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

Mandatory Fields

Expand to see the list of mandatory fields.

opportunity_type - string
Must be one of Single Car, Single LCV, Multiple Vehicles, Maintenance,Consultancy, Fleet Management, Floorplan Finance, Courtesy Car(s), Asset Finance.

opportunity_status - string
Must be one of your custom Opportunity Statuses.

opportunity_source - string

quality - string

Must be one of High, Medium, Low.

Non Mandatory Fields

Expand to see the list of non-mandatory fields.

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

opportunity_sub_source - string

brand - string
Must be the exact description of a brand in your Accelerate.

description - string

units_car - number

units_lcv - number

value - number

target_close_date - date

close_date - date

account_manager - string
Must be the email address of a valid user in your organisation. If left blank (on either POST or PUT ) the opportunity will inherit the account manager of its parent relationship.

tracking_field_1 - string
Max length 1000 characters

tracking_field_2 - string
Max length 1000 characters

tracking_field_3 - string
Max length 1000 characters

tracking_field_4 - string
Max length 1000 characters

tracking_field_5 - string
Max length 1000 characters

loss_reason - string

Must not be supplied when using POST or PUT . Max length 30 characters.

loss_reason - string
Must not be supplied when using POST or PUT . Max length 4000 characters.

Did this answer your question?