Opportunities API Reference
The purpose of Opportunity API is to:
- Explain how opportunity records can be created
- Example responses for different operations
- List of API methods for opportunities
API methods for Opportunities as follows:
- Get all opportunities
- Create opportunities
- Search a opportunities
- Update a opportunities
- Delete a opportunities
Web Method: getOpportunitesConfigData
Purpose
You can use the getConfigData method to get all the configuration data’s like Opportunities types, market, territories and etc.
Request API URL
https://api.apptivo.com/app/dao/v6/opportunities?a=getConfigData&apiKey=API_KEY&accessKey=ACCESS_KEY
Request Parameters
Parameter | Data Type | Description |
apiKey* | String | Apptivo business account API Key |
accessKey* | String | Apptivo business account Access Key |
* – Mandatory parameters
Output
This will return all the Opportunities configuration data with JSON format.
Notes
- You can get these configuration values and use them while creating opportunities.
Sample URL
https://api.apptivo.com/app/dao/v6/opportunities?a=getConfigData&apiKey=oRxYzRZRvOTH-cTPBPVPArJnVNW-6a8d8bf4-1c5f-4930-a5da-49f380afcd33&accessKey=3g806jxv5gq7Q62E
Web Method: createOpportunity
Purpose:
You can use createopportunity method to create Opportunities in Apptivo with generic fields provided by application.
Request URL:
https://api.apptivo.com/app/dao/v6/opportunities?a=save&opportunityData{OPPORTUNITY_DATA}&apiKey=API_KEY&accesKey=ACCESS_KEY
Request Parameters:
Parameter | Data Type | Description |
opportunityData* | JSON | Please see the sample request URL |
apiKey* | String | Apptivo API Key |
accessKey* | String | Apptivo Access Key |
* – Mandatory parameters
Output:
This will return the details of the created opportunity with JSON format.
Sample Request URL:
https://www.apptivo.com/app/dao/v6/opportunities?a=save&opportunityData={"opportunityName":"Testopportunites","salesStageName":"Prospecting","salesStageId":229771,"salesCycleId":null,"probability":5,"opportunityTypeId":null,"leadSourceTypeId":29685786,"leadSourceTypeName":"Cold Call","closeDate":"07/10/2017","assignedToObjectRefName":"Db2Es s","assignedToObjectId":"8","assignedToObjectRefId":77021,"amount":0,"currencyCode":"INR","campaignName":"","campaignId":null,"followUpDate":null,"followUpDescription":null,"createdByName":"","lastUpdatedByName":"","creationDate":"","lastUpdateDate":"","marketId":null,"territoryName":"","territoryId":null,"searchColumn":"","addresses":[],"emailAddresses":[],"phoneNumbers":[],"lastContactedDate":null,"labels":[],"createdBy":null,"opportunityId":null,"lastUpdatedBy":null,"isMultiCurrency":"N","accounts":[],"customAttributes":[],"isLocked":"N"}
&isDuplicate=N
&isLeadConvert=N
&isCustomerTerritoryUpdate=false
Web Method: updateOpportunity
Purpose:
This method used to update the opportunity information.
Request URL:
https://api.apptivo.com/app/dao/v6/opportunities?a=update&opportunityData={OPPORTUNITY_DATA_VALUES}&attributeNames=[OPPORTUNITY_DATA_NAME]&objectId=4&opportunityId=OPPORTUNITY_ID&isEmailAddressUpdate=EMAIL_UPDATE&apiKey=API_KEY&accesKey=ACCESS_KEY
Request Parameters:
Parameter | Data Type | Description |
OPPORTUNITY_ID | Opportunity ID | |
OPPORTUNITY_DATA_VALUES | Updated field value | |
OPPORTUNITY_DATA_NAME | Updated field name | |
EMAIL_UPDATE | If Email updated, it should be true or false | by default, it is false |
SESSION_KEY | Apptivo session key from username and password |
* – Mandatory parameters
Output:
This will return the details of updated lead data with JSON format.
Sample Request URL:
https://www.apptivo.com/app/dao/v6/opportunities?a=update&opportunityData={"id":"93536","opportunityId":93536,"opportunityName":"Test opportunitesupdate","opportunityNameNotAnalysed":"Test opportunites","salesStageName":"Prospecting","salesStageId":229771,"leadSourceTypeName":"Cold Call","leadSourceTypeId":29685786,"assignedToObjectRefName":"Db2Es s","assignedToObjectRefId":77021,"assignedToObjectId":8,"closeDate":"07/10/2017","probability":"5.00","amount":0,"actualAmount":0,"currencyCode":"INR","campaignName":"","territoryName":"","isMultiCurrency":"N","objectStatus":"0","opportunityHistory":"","isActive":"Y","propertiesAppEnabled":"N","salesStageHistory":[],"labels":[],"removeLabels":[],"addresses":[],"removeAddresses":[],"customAttributes":[],"notes":[],"propertyList":[],"inquiryTypes":[],"items":[],"phoneNumbers":[],"emailAddresses":[],"removePhoneNumbers":[],"removeEmailAddresses":[],"assigneeManagers":[],"isLocked":"N","accounts":[],"firmId":218079,"lastContactedDate":"Not Contacted","createdBy":76130,"lastUpdatedBy":76130,"createdByName":"Db2Es s","creationDate":"Oct 07, 2017 05:44:26 PM","lastUpdateDate":"Oct 07, 2017 05:44:26 PM","lastUpdatedByName":"Db2Es s","version":3,"followUpDate":null,"sales_stage_select":229771,"amountCurrencyCode":"INR","tags":[],"isDirtypage":null,"opportunityTypeName":"New Business","opportunityTypeId":59138}
&opportunityId=93536
&attributeName=["opportunityName","opportunityTypeName"]
&isCustomerTerritoryUpdate=false
Web Method: searchOpportunities
Purpose:
This method used to get the number of opportunities in Apptivo based on the email address.
Request URL:
https://api.apptivo.com/app/dao/v6/opportunities?a=getAllByAdvancedSearch&numRecords=NUM_OF_RECORDS&searchData={SEARCH_DATA}&multiSelectData={}&apiKey=API_KEY&accesKey=ACCESS_KEY
Request Parameters:
Parameter | Data Type | Description |
SEARCH_DATA | search data with Json format | please see the sample request URL |
NUM_OF_RECORDS | number of records to return | |
SESSION_KEY | Apptivo session key from username and password |
* – Mandatory parameters
Output:
This will return the number of opportunities with JSON format.
Sample Request URL:
https://www.apptivo.com/app/dao/v6/opportunities?a=getAllByAdvancedSearch
&startIndex=0
&numRecords=50
&sortColumn=opportunityName.sortable
&sortDir=asc
&searchData:{"opportunityCustomer":"","opportunityName":"Test","opportunityCustomerId":null,"probability":null,"probabilityTo":null,"opportunityContact":"","opportunityContactId":null,"closeDate":"","closeDateTo":"","lastContactedDateFrom":"","lastContactedDateTo":"","nextStep":"","amount":null,"amountTo":null,"campaignName":"","campaignId":null,"description":"","followUpDescription":"","createdByName":"","lastUpdatedByName":"","territoryName":"","territoryId":null,"labels":[],"assignedToObjectRefName":"","currencyCode":null,"customAttributes":[]}
multiSelectData={"salesStageIds":[],"opportunityTypeIds":[],"leadSourceIds":[],"marketIds":[],"segmentIds":[],"salesCycleIds":[]}
&objectId=11
&status=0
Comments
0 comments
Please sign in to leave a comment.