iVvy Developer API
  • API Documentation
  • Getting Started
    • Obtaining Keys
    • Creating the request
      • Method/URI Header
      • Request Headers
        • Standard Headers
        • Custom Headers
      • Signing the request
      • Query Parameters
    • Test Ping
    • Interpreting the response
      • Collections
      • Pagination
      • Filtering
      • Exceptions
      • Response Headers
      • Dates
    • Batch
      • Run
      • Progress
      • Result
      • Restart
      • Repost
    • Use Cases
      • CRM Systems
      • Financial Accounting Systems
      • Point Of Sale
      • Property Management Systems
  • Contacts & Companies
    • Get Contact List
    • Get Contact
    • Get Contact Note List
    • Add or Update Contact
    • Get Contact Custom Field Definition
    • Get Company Custom Field Definition
    • Get Subscription Group List
    • Add Contacts To Subscription Group
    • Remove Contacts From Subscription Group
    • Get Company List
    • Get Company
    • Get Company Note List
    • Add or Update Company
    • Add or Update Lead
    • Add or Update Contact Note
    • Add or Update Company Note
  • Event
    • Add or Update Event
    • Get Event List
    • Get Event
    • Get Registration
    • Get Registration List
    • Get Attendee
    • Get Attendee List
    • Get Invited Contact List
    • Invite Contacts
    • Get Sponsorship List
    • Get Speaker List
    • Get Session List
    • Create Login Token
  • Venue
    • Venue Setup Data
      • Get Venue
      • Get Venue List
      • Get Venue Room List
      • Get Venue Room Option List
      • Get Venue Rate Plan List
      • Get Venue Rate Plan Rate List
      • Get Venue Rate Plan Room Rate List
      • Get Resource List
      • Get Resource Availability
      • Get Menu List
      • Get Beverage Package List
      • Get Function Space List
      • Get Space Blockout List
      • Get Function Space Category List
      • Get Function Space Availability
      • Get Function Space Hire Plan Rate List
      • Get Function Space Hire Plan Rate
      • Get Cost Center List
      • Get Session Type List
      • Get Revenue Template List
      • Get Tax List
      • Add or Update Function Space
      • Get Event Type List
      • Add or Update Function Space Category
      • Add or Update Guest Room
      • Get Booking Custom Field List
      • Get Space Hire Plans
      • Get Venue Package List
      • Get Venue Package
    • Booking Data
      • Convert Lead To Opportunity
      • Add or Update Opportunity
      • Get Booking
      • Get Booking List
      • Get Booking List For Account
      • Get Booking Notes
      • Get Booking Session List
      • Get Booking Session Menu List
      • Get Booking Changelog List
      • Get Booking Attendee (By Hash)
      • Get Booking Attendee List
      • Get Booking Release Schedule
      • Add or Update Booking
      • Change Booking Status
      • Add Items To Booking
      • Add Payment To Booking
      • Add Refund To Booking
      • Add or Update Booking Attendee
      • Add or Update Booking Note
      • Add or Update Booking Session
      • Add or Update Booking Session Beverage
      • Add or Update Booking Session Menu
      • Add or Update Booking Session Resource
      • Remove Booking Session
      • Remove Booking Session Beverage
      • Remove Booking Session Menu
      • Remove Booking Session Resource
      • Get Space Blockout List
      • Add or Update Blockout Space
      • Remove Blockout Space
      • Get Booking Tax List
      • Add or Update Opportunity Note
      • Upload Booking Document
    • Booking Accommodation Data
      • Get Booking Accommodation List
      • Add or Update Booking Accommodation
      • Remove Booking Accommodation
      • Get Booking Room Reservation List
      • Add or Update Booking Room Reservation
      • Update Room Reservation Guest Contact
      • Remove Booking Room Reservation
      • Confirm Booking Room Reservation
      • Cancel Booking Room Reservation
      • Change Status of Booking Room Reservation
      • Add or Update Room Counts
      • Add or Update Room Dynamic Rates
      • Remove Room Dynamic Rates
      • Add or Update Rate Plan Booking Rules
  • Partner
    • Get Venue List
    • Get Venue
  • Invoice
    • Get Invoice List
    • Get Invoice
    • Get Options
    • Add Payment
    • Get Credit Note List
    • Get Credit Note
  • Account
    • Add or Update Cost Center
    • Get Cost Center List
    • Get Email Log List
    • Add Error Report
    • Get Account User List
  • CRM
    • Get Lead List
    • Get Opportunity List
    • Get Opportunity Note List
    • Get Task List
    • Get Activity List
    • Get Lead Stage List
    • Get Lead Type List
    • Get Lead Quality List
    • Get Lead Source List
    • Get Lead Channel List
    • Get Lead Note List
    • Add or Update Activity Purpose
    • Add or Update Activity
    • Add or Update Task
    • Add or Update Lead Quality
    • Add or Update Lead Stage
    • Add or Update Lead Channel
    • Add or Update Lead Type
    • Add or Update Lead Source
    • Add or Update Lead Note
  • Notifications
    • Company Endpoint
    • Contact Endpoint
    • CRM Endpoint
    • Invoice Endpoint
    • Booking Endpoint
    • Event Endpoint
  • Development Reference
    • Calculating md5
    • HMAC-SHA1
    • JSON Encoding
    • Timestamp Format
    • Date Format
    • Time Format
    • Address Format
    • URLEncoding
    • Timezone List
  • Announcements
    • Room Reservation Contact Changes
    • Contact Customfield Changes
    • Booking Accommodation API Changes
Powered by GitBook
On this page
  • Add or Update Opportunity
  • Opportunity
  • External URL Field
  • Special Considerations
  • Assigning a company/contact to the opportunity
  • Example Request
  • Add Opportunity
  • Update Opportunity
  • Returns
  • Throws
  1. Venue
  2. Booking Data

Add or Update Opportunity

Add or Update Opportunity

POST [PlatformAddress]/api/1.0/venue?action=addOrUpdateOpportunity

{
  "success": true,
  "id": 755
}

Opportunity

Property
Type
Required
Description

id

integer

optional

The unique identifier of opportunity. A new opportunity will be created if this parameter is not present.

venueId

integer

required

The unique id of the venue to which the opportunity belongs.

name

string

optional

The name for the opportunity (Required when id is missing).

description

string

optional

The description for the opportunity.

companyId

integer

optional

company

object

optional

The data array of company. See addOrUpdateCompany API in contact namespace for parameters.

companyLeadContactId

integer

optional

contactId

integer

optional

contact

object

optional

The data array of contact. See addOrUpdateContact API in contact namespace for parameters.

qualityId

integer

optional

The unique id of the quality.

industryId

integer

optional

The unique id of industry.

sourceId

integer

optional

The unique id of source (Required when the ID parameter is missing)

ownerUserId

integer

optional

The id of the sales person user assigned to the opportunity. The privileges of the user assigned to the api key may prevent this from being changed.

typeId

integer

optional

The unique id of type (Required when id is missing).

stageId

integer

optional

The unique id of stage.

stageReasonId

integer

optional

The unique stage reason id of opportunity.

channelId

integer

optional

The unique id of channel.

utmSource

string

optional

The source of the campaign. (only when adding)

utmMedium

string

optional

What medium the campaign used/uses. (only when adding)

utmCampaign

string

optional

The name of the campaign. (only when adding)

utmTerm

string

optional

The Term of the campaign. (only when adding)

utmContent

string

optional

Any content about the campaign.

referralContactId

integer

optional

The contact Id of referral for "Referral Program" source. (Required when the source is Referral Program and referralContact parameter is missing)

referralContact

object

optional

The data array of contact. See addOrUpdateContact API in contact namespace for parameters.

referralCompanyId

integer

optional

The company Id of referral for "Referral Program" source. (Required when the source is Referral Program and referralCompany parameter is missing)

referralCompany

object

optional

The data array of company. See addOrUpdateCompany API in contact namespace for parameters.

confirmedQuoteId

integer

optional

The unique if of confirmed quote to which the opportunity belongs.

confirmedQuoteStatus

integer

optional

The status of the confirmed quote to which the opportunity belongs.

cancelledQuoteId

integer

optional

The unique id of cancelled quote to which the opportunity belongs.

lostToCompetition

integer

optional

The unique id of lost reason.

closedDate

date

optional

The close date of the opportunity.

customFields

array

optional

externalUrls

array

optional

## Custom Field

A opportunity custom field is an object with the following details.

Property
Type
Required
Description

fieldId

integer

required

The unique id of the opportunity custom field

fieldValue

mixed

required

The value of the opportunity custom field. Depends on the type of custom field value.

External URL Field

An External URL field is an object with the following details.

Property
Type
Required
Description

ref

string

required

The unique reference key of the external URL

url

string

optional

The url link (https) scheme eg. https://example.com When the value is null, the external url record will be removed based on the provided reference key.

label

string

optional

The label of the URL to display.

Special Considerations

Assigning a company/contact to the opportunity

The contact type of a opportunity is either a company or a contact. When companyId or company is present in the request then the contact type of the opportunity is set to company, and the companyLeadContactId or contact must be a contact that belongs to that company. Otherwise the contact type of the opportunity is set to contact and contactId can be any valid contact in the venue's account.

If contact and company are present in request then it will link given contact to company.

Example Request

Add Opportunity

{
  "venueId": "107",
  "name": "Lead By API",
  "company" : {
    "businessName": "Business Name",
    "updateIfExists": true
  },
  "contact" : {
    "firstName" : "First",
    "lastName" : "Last",
    "email" : "email8@email.com",
    "updateIfExists" : true
  },
  "typeId": "18",
  "sourceId": "25",
  "stageId": "69",
  "industryId": "77",
  "stageReasonId": "127",
  "closedDate": "2017-05-05",
  "referralCompany": {
    "businessName": "Business",
    "primaryContact": {
      "firstName": "Test",
      "lastName": "Test",
      "email": "Test@gmail.com"
    }
  },
  "referralContact": {
    "firstName": "Test",
    "lastName": "Test",
    "email": "Test@gmail.com"
  }
}

Update Opportunity

{
  "id": 755,
  "venueId": "107",
  "name": "Updated Name"
}

Returns

Property
Description

success

Whether or not the opportunity was added to the venue

id

The unique id of the opportunity

Throws

Code
Description

Specific Code: 24221

The request is empty

Specific Code: 24222

The opportunity does not exist

Specific Code: 24224

The opportunity details are invalid

This call takes values for a opportunity, and either

  1. Updates the values for that opportunity (after you have provided an id in the parameters), or

  2. Adds the opportunity to the system (if the id parameter is missing)

The result of this call will contain the status of the result (either true or false) and the opportunity identifier of the updated or newly

PreviousConvert Lead To OpportunityNextGet Booking

Last updated 7 months ago

The unique id of the company to assign to the opportunity. See .

The unique id of the company contact to assign to the opportunity See .

The unique id of the contact to assign to the opportunity See .

The custom field values of the opportunity. A custom field value might be required depending on how it has been configured in the venue's account. See

This is an array of External URL field objects of the opportunity (a maximum of 3 objects allowed). When set to null, it will remove all externalUrls from the opportunity. See

assigning a company/contact to the opportunity
assigning a company/contact to the opportunity
assigning a company/contact to the opportunity
Custom Field
External Url