Opportunities
REST API Opportunities
POST /v1/opportunities/
Creates an opportunity.
The contact’s first name, last name and email address (case insensitive) are used to match a contact to an existing contact in Priava.
A new contact will be created only if one cannot be matched.
When a user provides an organisation:
- If the contact exists, there is no change to its organisation and it is ignored.
- If the organisation exists, but the contact doesn’t exist then a new contact is created and associated to the existing organisation.
- If the organisation and the contact don’t exist, the organisation will be created with the contact’s telephone and email address. The contact will be associated to this new organisation.
Request:
A JSON POST request body expecting APIToken in the request header which re-authenticates the user with each request.
This parameter is ignored when creating an Opportunity.
The contact’s last name.
The number of persons the Opportunity is for. Must be a non-negative integer value.
The type of Event the Opportunity is for. You should populate a drop down list with a call from GET Event Types to get a list of the Event Types and their relevant ID’s.
The start date for the opportunity in date time format.
The opportunity status name e.g. Open or Web – Open. Must match an opportunity status that is set up in Priava.
The contact type of the contact associated to the Opportunity. Must match a contact type that is set up in Priava.
The source of the Opportunity. You should populate a drop down list with a call from GET Opportunity\Event Source to get a list of the Opportunity\Event Source and their relevant ID’s or pre-populate this field with a valid ID and Name.
The contact’s first name.
The contact’s last name.
The contact’s email address.
The contact’s mobile number
The contact’s phone number.
The contact’s Organisation / Company name.
A collection of Venues associated to the Opportunity. You should populate a multi-select UI element with a call from GET Venues to get a list of the Venues and their relevant ID’s or pre-populate this field with a valid ID and Name.
The type of comment as per the Priava Comment Type setup for your system. Must match a comment type that is set up in Priava. ‘System’ is not a valid comment type.
The comment associated to the Opportunity with comment type of commentType.
* Either a phone or mobile number is required (not both) in order to create a contact.
** If a comment is added via the comments property, then the commentType must be added also.