PATCH Update deals
Base URL: https://server-url-from-token-page.endpoint. Version: 1.2.0.
PATCH /api/v1/public/deals — Update deals
Read/write token required
Send input rows with id plus changed fields. Deal program is numeric: 1=Land, 2=Expand. Land is new-customer acquisition; Expand is growth with an existing customer. Only these deal programs are accessible. Account program is a separate free-text classification, not a deal program. Updates are partial: omitted fields stay unchanged; supplied arrays replace the whole array, not append. Read and send the merged full array to append; [] clears it. accountId cannot be reassigned. Rows update/delete independently; inspect failures and retry only failed rows. Creation is not idempotent; verify saved records after a timeout.
Send the documented JSON object. Workspace scope comes exclusively from the bearer credential. Requires a read/write API credential. Check receipts before retrying a timed-out write.
JSON body fields
input(body, object[], required)See the JSON schema for this field’s contract.
- Minimum items: 1
- Maximum items: 1000
name(body, string, optional)See the JSON schema for this field’s contract.
- Minimum length: 1
program(body, 1 | 2, optional)Deal program is numeric: 1=Land, 2=Expand. Land is new-customer acquisition; Expand is growth with an existing customer. Only these deal programs are accessible. Account program is a separate free-text classification, not a deal program.
owners(body, string[], optional)See the JSON schema for this field’s contract.
stage(body, Deal Activation | Expansion Potential Identified | Consideration | Deal Closing | Won | Lost | Nurture | Disqualified, optional)See the JSON schema for this field’s contract.
targetSegment(body, string, optional)See the JSON schema for this field’s contract.
remarks(body, string, optional)See the JSON schema for this field’s contract.
locations(body, string[], optional)See the JSON schema for this field’s contract.
value(body, number, optional)See the JSON schema for this field’s contract.
valueType(body, ARR | MRR, optional)See the JSON schema for this field’s contract.
currency(body, USD | EUR | SEK | MYR | AED | SAR, optional)See the JSON schema for this field’s contract.
activationPoint(body, string, optional)Source or trigger that activated the opportunity.
activationPointRemarks(body, string, optional)See the JSON schema for this field’s contract.
championStakeholder(body, string, optional)Free-text champion label, not a stakeholder ID or association.
titleFight(body, string, optional)Decision-authority bottleneck preventing closure.
probabilityOfClosing(body, High | Medium | Low | Closed | None, optional)See the JSON schema for this field’s contract.
estimateCloseDate(body, string:date-time, optional)See the JSON schema for this field’s contract.
id(body, string, required)See the JSON schema for this field’s contract.
- Pattern: ^[a-f\d]{24}$
activationChecklist(body, string[], optional)See the JSON schema for this field’s contract.
salesChecklist(body, string[], optional)See the JSON schema for this field’s contract.
JSON request body schema
{
"type": "object",
"properties": {
"input": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"program": {
"type": "number",
"enum": [
1,
2
],
"description": "Deal program is numeric: 1=Land, 2=Expand. Land is new-customer acquisition; Expand is growth with an existing customer. Only these deal programs are accessible. Account program is a separate free-text classification, not a deal program."
},
"owners": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
}
},
"stage": {
"type": "string",
"enum": [
"Deal Activation",
"Expansion Potential Identified",
"Consideration",
"Deal Closing",
"Won",
"Lost",
"Nurture",
"Disqualified"
]
},
"targetSegment": {
"type": "string"
},
"remarks": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"value": {
"type": "number"
},
"valueType": {
"type": "string",
"enum": [
"ARR",
"MRR"
]
},
"currency": {
"type": "string",
"enum": [
"USD",
"EUR",
"SEK",
"MYR",
"AED",
"SAR"
]
},
"activationPoint": {
"type": "string",
"description": "Source or trigger that activated the opportunity."
},
"activationPointRemarks": {
"type": "string"
},
"championStakeholder": {
"type": "string",
"description": "Free-text champion label, not a stakeholder ID or association."
},
"titleFight": {
"type": "string",
"description": "Decision-authority bottleneck preventing closure."
},
"probabilityOfClosing": {
"type": "string",
"enum": [
"High",
"Medium",
"Low",
"Closed",
"None"
]
},
"estimateCloseDate": {
"type": "string",
"format": "date-time"
},
"id": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
},
"activationChecklist": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
}
},
"salesChecklist": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
}
}
},
"required": [
"id"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 1000
}
},
"required": [
"input"
],
"additionalProperties": false,
"description": "Updates are partial: omitted fields stay unchanged; supplied arrays replace the whole array, not append. Read and send the merged full array to append; [] clears it. accountId cannot be reassigned. Rows update/delete independently; inspect failures and retry only failed rows. Creation is not idempotent; verify saved records after a timeout."
}JSON response schema
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"ids",
"filter"
],
"description": "Whether the mutation scope came from explicit ids or a server-side filter."
},
"artifactBacked": {
"type": "boolean",
"description": "True when private uploaded ids selected the cohort; row numbers replace ids in every result sample and failure."
},
"dryRun": {
"type": "boolean",
"description": "True means preview/count only; false means a write was attempted."
},
"entityType": {
"type": "string",
"description": "Entity family targeted by this mutation.",
"enum": [
"deal"
]
},
"updateMode": {
"type": "string",
"enum": [
"uniform",
"artifact_rows"
],
"description": "Whether every entity receives one shared patch or row-aligned artifact values."
},
"matchedCount": {
"type": "number",
"description": "Total entities matching the requested scope before write execution."
},
"attemptedCount": {
"type": "number",
"description": "Entities the runtime attempted to update. In dryRun mode this is normally 0."
},
"succeededCount": {
"type": "number",
"description": "Entities successfully updated. In dryRun mode this is normally 0."
},
"failedCount": {
"type": "number",
"description": "Entities or uploaded rows that failed validation or write execution."
},
"validationFailureCount": {
"type": "number",
"description": "Dry-run count of invalid, duplicate, unmatched, or row-patch validation failures. If greater than 0, list every row from failures before discussing matchedSample."
},
"idValidationFailures": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "number"
},
"rowNumber": {
"type": "integer",
"minimum": 1,
"description": "One-based uploaded row number used instead of an entity id for private artifact-backed results."
},
"id": {
"type": "string"
},
"name": {
"type": "string",
"description": "Human-readable entity name for the failed row when available."
},
"accountName": {
"type": "string",
"description": "Parent account name for failed stakeholder/deal rows when available."
},
"code": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"reason"
],
"additionalProperties": false
},
"description": "Dry-run-only list of invalid, duplicate, or unmatched requested inputs. Artifact-backed results identify rows without returning uploaded ids."
},
"skippedCount": {
"type": "number",
"description": "Entities skipped by validation, safety limits, or no-op checks. In dryRun mode with explicit ids, this is the id-validation failure count, not the matched sample size."
},
"expectedCount": {
"type": "number",
"description": "User-confirmed expected matched count required for non-dry-run writes when supplied."
},
"maxCount": {
"type": "number",
"description": "Maximum allowed matched scope for this mutation request."
},
"matchedSample": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Entity id included only for non-artifact bounded samples."
},
"rowNumber": {
"type": "integer",
"minimum": 1,
"description": "One-based uploaded row number used instead of ids for artifact-backed samples."
},
"name": {
"type": "string",
"description": "Human-readable entity name when available."
},
"accountId": {
"type": "string",
"description": "Parent account id for deal samples when available. Stakeholder samples intentionally avoid raw parent account ids; use accountName when available."
},
"accountName": {
"type": "string",
"description": "Parent account name for stakeholder/deal samples when available."
}
},
"additionalProperties": false
},
"description": "Bounded preview sample of matching entities; not exhaustive. Do not present this sample when failures is non-empty unless the user asks for examples of valid rows."
},
"proposedSample": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rowNumber": {
"type": "integer",
"minimum": 1
},
"entityName": {
"type": "string"
},
"values": {
"type": "object",
"additionalProperties": {
"anyOf": [
{
"nullable": true,
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
{
"type": "array",
"items": {
"nullable": true,
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
}
]
}
}
},
"required": [
"rowNumber",
"values"
],
"additionalProperties": false
},
"description": "Bounded row-aligned proposed patches. Raw artifact ids stay server-side."
},
"proposedSampleLimit": {
"type": "integer",
"minimum": 1
},
"proposedSampleTruncated": {
"type": "boolean"
},
"updatedSample": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Entity id included only for non-artifact bounded samples."
},
"rowNumber": {
"type": "integer",
"minimum": 1,
"description": "One-based uploaded row number used instead of ids for artifact-backed samples."
},
"name": {
"type": "string",
"description": "Human-readable entity name when available."
},
"accountId": {
"type": "string",
"description": "Parent account id for deal samples when available. Stakeholder samples intentionally avoid raw parent account ids; use accountName when available."
},
"accountName": {
"type": "string",
"description": "Parent account name for stakeholder/deal samples when available."
}
},
"additionalProperties": false
},
"description": "Bounded sample of updated entities for write mode; not exhaustive."
},
"updatedSampleLimit": {
"type": "number",
"description": "Maximum number of updated sample entities returned."
},
"updatedSampleTruncated": {
"type": "boolean",
"description": "Whether more updated entities exist beyond updatedSample."
},
"failures": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "number"
},
"rowNumber": {
"type": "integer",
"minimum": 1,
"description": "One-based uploaded row number used instead of an entity id for private artifact-backed results."
},
"id": {
"type": "string"
},
"name": {
"type": "string",
"description": "Human-readable entity name for the failed row when available."
},
"accountName": {
"type": "string",
"description": "Parent account name for failed stakeholder/deal rows when available."
},
"code": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"reason"
],
"additionalProperties": false
},
"description": "Per-entity or per-row failures. Artifact-backed results identify rows without returning uploaded ids. If non-empty, present these before matchedSample."
}
},
"required": [
"mode",
"dryRun",
"entityType",
"matchedCount",
"attemptedCount",
"succeededCount",
"failedCount",
"skippedCount",
"maxCount",
"updatedSample",
"updatedSampleLimit",
"updatedSampleTruncated",
"failures"
],
"additionalProperties": false
}Responses
200: Operation receipt or read result. Arrays are returned under items; scalar and null results under value.
RateLimit-Policy(header, value, optional)Response header
RateLimit-Limit(header, value, optional)Response header
RateLimit-Remaining(header, value, optional)Response header
RateLimit-Reset(header, value, optional)Response header
400: Invalid operation input or record identifiers.
400 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}401: Bearer credential is missing, expired or invalid.
401 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}402: Insufficient research credits. Add credits before retrying.
402 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}403: Write access or resource permission is required.
403 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}404: Record is not available in the credential workspace.
404 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}405: Use the documented HTTP method.
405 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}409: Revision conflict or a record has dependencies. Refetch and reconcile links before retrying.
409 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}413: Request exceeds the permitted JSON body size.
413 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}429: Rate limit exceeded. Observe Retry-After.
RateLimit-Policy(header, value, optional)Response header
RateLimit-Limit(header, value, optional)Response header
RateLimit-Remaining(header, value, optional)Response header
RateLimit-Reset(header, value, optional)Response header
429 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}500: Internal server error.
500 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}503: Service temporarily unavailable. Observe Retry-After when present.
503 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}504: Execution timed out. A write may have committed; check receipts or progress before retrying.
504 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}Update deals
curl -X PATCH "https://server-url-from-token-page.endpoint/api/v1/public/deals" \
-H "Authorization: Bearer $DOE_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
--data-raw '{
"input": [
{
"id": "507f1f77bcf86cd799439011",
"name": "Updated opportunity"
}
]
}'Response example
No response example is supplied. See the JSON response schema.