Bulk Update Opportunities
Description
Updates all opportunities that match search criteria. CRM Opportunity ID and latest opportunity data is passed in.
HTTP Method
put
URL
/api/v2/opportunities/search
Parameters
Parameter |
Type |
Location |
Required |
Description |
---|---|---|---|---|
LanguageId | integer | Query | No | Language ID for localized content (default: 1) |
Request Body Structure
{ "SearchCriteria": { "OpportunityIds": ["string"] }, "UpdateRequest": { "OpportunityName": "string", "OpportunityID": "string", "CategoryName": "string", "StageName": "string", "AcctPotential": 0.00, "SalesRevenue": 0.00, "PendingCloseDate": "2024-12-31" } }
Request Body Fields
SearchCriteria Object
Field |
Type |
Required |
Description |
---|---|---|---|
OpportunityIds | string[] | Yes | Array of CRM opportunity IDs to update |
UpdateRequest Object
Field |
Type |
Required |
Description |
---|---|---|---|
OpportunityName | string | No | Name/title of the opportunity |
OpportunityID | string | No | External CRM opportunity identifier |
CategoryName | string | No | Category name (must match existing category) |
StageName | string | No | Stage name (must match existing stage) |
AcctPotential | decimal | No | Account potential value |
SalesRevenue | decimal | No | Expected sales revenue |
PendingCloseDate | string | No | Expected close date (format: yyyy-MM-dd) |
Request Examples
# Bulk update opportunities by CRM ID PUT /api/v2/opportunities/search?LanguageId=1 Authorization: Bearer {your-token} Content-Type: application/json { "SearchCriteria": { "OpportunityIds": ["CRM-001", "CRM-002", "CRM-003"] }, "UpdateRequest": { "StageName": "Qualified", "AcctPotential": 100000.00 } }
# Update specific opportunity by CRM ID PUT /api/v2/opportunities/search Authorization: Bearer {your-token} Content-Type: application/json { "SearchCriteria": { "OpportunityIds": ["SFDC-12345"] }, "UpdateRequest": { "OpportunityName": "Enterprise Software License", "CategoryName": "Software", "StageName": "Proposal", "AcctPotential": 500000.00, "SalesRevenue": 250000.00, "PendingCloseDate": "2024-06-30" } }
Response Structure
Success Response (200 OK)
{ "Opportunity": [ { "Type": "Pre", "ID": 123, "VisitID": 456, "CustomerID": 789, "OpportunityName": "Enterprise Software License", "OpportunityID": "SFDC-12345", "OpportunityCategoryID": 1, "OpportunityStageID": 3, "OpportunityCompetitorID": null, "AcctPotential": 500000.00, "SalesRevenue": 250000.00, "PendingCloseDate": "2024-06-30", "VisitCustomerOpportunityID": null, "FollowUpSentDate": null } ], "AvailableCategories": null, "AvailableStages": null, "ValidationMessage": null }
Response Codes
Code |
Description |
Response Type |
---|---|---|
200 | Success | V2OpportunityUpdateBulkResponse |
400 | Bad Request / Validation Error | V2OpportunityInvalidResponse |
401 | Not Authorized | string |
500 | Internal Server Error | InternalServerErrorResponse |