• Venue and event management in the cloud

How Can We Help?


Opportunity : Search Opportunity

In this article


SEARCH Opportunity

POST /v2/opportunity/get

This API returns a list of opportunities that satisfy the search parameters provided. By default, only the first 50 searched opportunity will be returned.


Parameter
OpportunityName    String

The Opportunity's name.

StartDate    DateTime

The start date and time of an opportunity.

EndDate    DateTime

The end date and time of an opportunity.

OpportunityNumber    Number

Opportunity number to be specified which will be used to get an opportunity.

QuoteNumber    Number

Quote number to be specified which will be used to get an opportunity.

Owner    String

The Id owner of an opportunity that is available in your Priava account. The owner must exist in your Priava Account.

IdentifiedBy    String

The id of an identifier of an opportunity that is available in your Priava account. The identifier must exist in your Priava Account.

Venues    Array

The array of the venues id's present in an opportunity to be searched.

CreatedDate    DateTime

The created date and time of the opportunities to be searched. The API will search for opportunities created after this date.

LastUpdatedDate    DateTime

The updated date and time of the opportunities to be searched. The API will search for opportunities updated after this date.

StatusChangedDate    DateTime

The status change date and time of the opportunities to be searched. The API will search for opportunities whose status has been changed after this date.

ExcludeOpportunityCreatedStatus    Boolean

This is to be passed along with StatusChangedDate. When true, the search result will contain only those opportunities whose statuses have been updated.

PageNo    Integer

The Page Number of the Opportunity list results.

Offset    Integer

If Offset is specified then it will fetch the next number of records after offset and skip the previous records, for e.g If there are 50 records and offset is 10 then records will be fetched from 11 to 50.
Note: If Offset is specified then PageNo parameter is ignored.

RecordsPerPage    Integer

The number of records per page.

SortingOrder    Object Array

The sorting of data as per the fields provided.

{
   "StartDate": "09/03/2019 09:00",
   "EndDate": "11/03/2019 17:00",
   "OpportunityNumber": "562",
   "OpportunityName": "Amit Birthday Party",
   "QuoteNumber": "",
   "Venue": ["3586"],
   "IdentifiedBy": "100011482",
   "Owner": "100011512",
   "PageNo": 1,
   "RecordsPerPage": 50,
   "Offset": 0,
   "SortingOrder": [{
      "ColumnName": "OpportunityName",
      "IsAscending": true
   }],
   "EventType": ["174"],
   "OpportunityStatus": ["1"]
}
Response:

Returns a list of opportunity satisfying the search criteria.

{
   "success": true,
   "result": [{
      "OpportunityEndDate": "10/03/2019 17:00",
      "OpportunityName": "John Meeting",
      "OpportunityId": 100176176,
      "OpportunityStatus": {
         "Type": "Open",
         "Id": 1,
         "Name": "Enquiry",
         "Colour": "#660033"
      },
      "EventType": {
         "Id": 174,
         "Name": "Client Meeting"
      },
      "OpportunityNumber": "562",
      "OpportunityStartDate": "10/03/2019 09:00",
      "OpportunityComment": [],
      "PrimaryContact": {
         "Organisation": {
            "Id": 100142080,
            "Name": "John"
         },
         "Id": 100500794,
         "Name": "Demo"
      }
   }],
   "AdditionalInfo": {
      "Count": 1
   }
}