Update Entity
Update an existing entity with new data.
This endpoint supports both full and partial updates:
- Partial Update: Provide only the fields you want to change. All other fields remain unchanged.
- Full Update: Provide all fields to completely replace the entity data.
Args: entity_id: Unique identifier of the entity to update entity_info: Updated entity data including: - Fields to modify (partial update supported - only changed fields required) - All unchanged fields will retain their current values - Custom field updates if applicable user: Authenticated user information (used for audit trails) response: HTTP response object for status code modification
Returns: Complete updated entity data including: - All entity fields with updated values - Updated timestamp information - Computed fields and relationships
Note: - Returns HTTP 200 on successful update - Returns HTTP 206 (Partial Content) if entity is updated but some custom fields failed to update - Automatically updates modification timestamp and user information
Raises: HTTPException: - 400: Invalid input data or validation errors - 401: Authentication required - 403: Insufficient permissions to update this entity - 404: Entity not found - 409: Update conflict (entity modified by another user) - 422: Validation error in request data - 500: Internal server error during update
Path Parameters
- Type: stringentity
_id required
Query Parameters
- Type: booleaninclude
_additionals Whether to include additional fields from the additional fields tab.
Body·
- Type: stringnamerequired
Deal name - A descriptive name for the deal (e.g., 'Acme Corp - Enterprise License')
- Type: enumnullableae
Confidence Level AE Confidence - Account Executive's confidence level in closing this deal
values1234 - Type: numberai
Assigned Probability min:0max:100nullableAI Probability - Machine learning calculated probability of deal success (0-100%)
- nullableamount
Breakdown By Period Payment Schedule - Breakdown of payments by time period (monthly, quarterly, annually)
Payment Schedule - Breakdown of payments by time period (monthly, quarterly, annually)
- propertyadditionalPropertyType: anything
Name
- Type: numbernullableannual
Contract Value Annual Contract Value (ACV) - Normalized annual value of the contract
- Type: numbernullablearr
Annual Recurring Revenue - Expected annual recurring revenue from this deal
- Type: numbernullablearr
Local Annual Recurring Revenue (Local) - ARR in account's system currency
- Type: booleannullableauto
Renewal Auto-renewal - Whether the contract automatically renews
- Type: stringFormat: date-timenullableclosed
At Actual Close Date - Date when the deal was actually closed (for closed deals only)
- Type: integernullableclosed
Lost Reason Loss Reason ID - Identifier for the reason why the deal was lost (required if status is closed_lost)
- Type: stringnullableclosed
Lost Reason Text Loss Reason Details - Additional details about why the deal was lost
- Type: stringnullablecompany
Id Company - Unique identifier of the company this deal is associated with
- additionalPropertyType: anythingproperty
Name
Responses
- application/json
- application/json
curl 'https://crm.dreamhub.ai/api/v1/deals/{entity_id}?include_additionals=false' \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "Acme Corp - Enterprise License Q1 2024",
"managedBy": "550e8400-e29b-41d4-a716-446655440000",
"companyId": "550e8400-e29b-41d4-a716-446655440001",
"contactId": "550e8400-e29b-41d4-a716-446655440002",
"leadId": "550e8400-e29b-41d4-a716-446655440003",
"status": "active",
"stage": 3,
"movedToStageAt": "2024-01-15T10:30:00Z",
"expectedCloseAt": "2024-03-31T23:59:59Z",
"closedAt": "2024-03-28T14:30:00Z",
"dealValueAmount": 125000,
"arr": 50000,
"mrr": 4166.67,
"arrLocal": 50000,
"mrrLocal": 4166.67,
"probability": 75,
"techEvaluationStatus": 1,
"qualificationScore": 85.5,
"aeConfidenceLevel": 1,
"aiAssignedProbability": 78.3,
"closedLostReason": 3,
"closedLostReasonText": "Customer chose competitor due to lower pricing",
"manuallyAddedPeople": [
"550e8400-e29b-41d4-a716-446655440004",
"550e8400-e29b-41d4-a716-446655440005"
],
"manuallyAddedPartnerContacts": [
"ptc-abc123",
"ptc-def456"
],
"contractStartDate": "2024-04-01T00:00:00Z",
"contractEndDate": "2025-03-31T23:59:59Z",
"optOutDate": "2024-06-30T23:59:59Z",
"contractTotalAmount": 150000,
"amountBreakdownByPeriod": [
{
"amount": 37500,
"period": "2024-Q1"
},
{
"amount": 37500,
"period": "2024-Q2"
}
],
"autoRenewal": true,
"licenseId": "ENT-2024-001",
"productId": "PROD-ENTERPRISE",
"licensesInDeal": 50,
"potentialLicensesInCompany": 200,
"implementationCost": 15000,
"trainingCost": 5000,
"uploadContracts": {
"contract_v1.pdf": {
"size": 1024000,
"uploaded_at": "2024-01-15T10:00:00Z"
}
},
"annualContractValue": 125000,
"totalContractValue": 375000,
"currency": "USD",
"contractId": "CONTRACT-2024-001",
"partnerId": "ptn-acme-550e8400",
"partnerContactId": "ptc-jane-550e8400",
"additionalProperty": "anything"
}'
{
"name": "Acme Corp - Enterprise License Q1 2024",
"managedBy": "550e8400-e29b-41d4-a716-446655440000",
"companyId": "550e8400-e29b-41d4-a716-446655440001",
"contactId": "550e8400-e29b-41d4-a716-446655440002",
"leadId": "550e8400-e29b-41d4-a716-446655440003",
"status": "active",
"stage": 3,
"movedToStageAt": "2024-01-15T10:30:00Z",
"expectedCloseAt": "2024-03-31T23:59:59Z",
"closedAt": "2024-03-28T14:30:00Z",
"dealValueAmount": 125000,
"arr": 50000,
"mrr": 4166.67,
"arrLocal": 50000,
"mrrLocal": 4166.67,
"probability": 75,
"techEvaluationStatus": 1,
"qualificationScore": 85.5,
"aeConfidenceLevel": 1,
"aiAssignedProbability": 78.3,
"closedLostReason": 3,
"closedLostReasonText": "Customer chose competitor due to lower pricing",
"manuallyAddedPeople": [
"550e8400-e29b-41d4-a716-446655440004",
"550e8400-e29b-41d4-a716-446655440005"
],
"manuallyAddedPartnerContacts": [
"ptc-abc123",
"ptc-def456"
],
"contractStartDate": "2024-04-01T00:00:00Z",
"contractEndDate": "2025-03-31T23:59:59Z",
"optOutDate": "2024-06-30T23:59:59Z",
"contractTotalAmount": 150000,
"amountBreakdownByPeriod": [
{
"amount": 37500,
"period": "2024-Q1"
},
{
"amount": 37500,
"period": "2024-Q2"
}
],
"autoRenewal": true,
"licenseId": "ENT-2024-001",
"productId": "PROD-ENTERPRISE",
"licensesInDeal": 50,
"potentialLicensesInCompany": 200,
"implementationCost": 15000,
"trainingCost": 5000,
"uploadContracts": {
"contract_v1.pdf": {
"size": 1024000,
"uploaded_at": "2024-01-15T10:00:00Z"
}
},
"annualContractValue": 125000,
"totalContractValue": 375000,
"currency": "USD",
"contractId": "CONTRACT-2024-001",
"partnerId": "ptn-acme-550e8400",
"partnerContactId": "ptc-jane-550e8400",
"automaticallyAddedPeople": [
"string"
],
"automaticallyAddedPartnerContacts": [
"string"
],
"lastModifiedBy": "string",
"id": "d-log-f47ac10b",
"createdAt": "2026-09-29T00:01:38.500Z",
"lastActivity": "2026-09-29T00:01:38.500Z",
"openForDays": 1,
"allDealPeople": [
"string"
],
"allDealPartnerContacts": [
"string"
],
"percentageOfMappedContacts": 1,
"percentageFromOwnerPipelineArr": 1,
"percentageFromOwnerPipelineMrr": 1,
"daysInStage": 1,
"committedArr": 1,
"committedMrr": 1,
"keyStakeholdersMappingScore": 1,
"keyStakeholdersMappingText": "string",
"championsMappingScore": 1,
"championsMappingText": "string",
"qualificationText": "string",
"stakeholdersApprovalText": "string",
"closedLostReasonName": "string",
"companyName": "string",
"productName": "string",
"alerts": [
{
"additionalProperty": "anything"
}
],
"hasNextSteps": true,
"serviceCount": 1,
"closingQuarter": "string",
"additionalProperty": "anything"
}
