Update an opportunity
curl --request PATCH \
--url https://app.eloout.com/api/v1/opportunities/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"stageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"value": 123,
"customFields": {},
"applyToClosed": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stageId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
value: 123,
customFields: {},
applyToClosed: true
})
};
fetch('https://app.eloout.com/api/v1/opportunities/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.eloout.com/api/v1/opportunities/{id}"
payload = {
"stageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"value": 123,
"customFields": {},
"applyToClosed": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"data": {
"id": "4f5a6b7c-8d9e-4f0a-9b2c-3d4e5f6a7b8c",
"result": "updated",
"stageId": "2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f6a",
"stageChange": {
"fromStageId": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"toStageId": "2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f6a"
},
"protectedFields": []
}
}{
"ok": false,
"error": {
"code": "UNAUTHENTICATED",
"message": "Invalid or revoked API key"
}
}{
"ok": false,
"error": {
"code": "FORBIDDEN",
"message": "This API key lacks the opportunities:write scope",
"details": {
"requiredScope": "opportunities:write"
}
}
}{
"ok": false,
"error": {
"code": "NOT_FOUND",
"message": "Opportunity not found"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"ok": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request is not valid",
"details": {
"fieldErrors": {
"limit": [
"At most 100"
]
}
}
}
}{
"ok": false,
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests for this API key or its organization"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Update an opportunity
Moving to a WON stage marks the deal won. A value a person owns is never overwritten.
Requires the opportunities:write permission.
PATCH
/
opportunities
/
{id}
Update an opportunity
curl --request PATCH \
--url https://app.eloout.com/api/v1/opportunities/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"stageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"value": 123,
"customFields": {},
"applyToClosed": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stageId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
value: 123,
customFields: {},
applyToClosed: true
})
};
fetch('https://app.eloout.com/api/v1/opportunities/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.eloout.com/api/v1/opportunities/{id}"
payload = {
"stageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"value": 123,
"customFields": {},
"applyToClosed": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"data": {
"id": "4f5a6b7c-8d9e-4f0a-9b2c-3d4e5f6a7b8c",
"result": "updated",
"stageId": "2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f6a",
"stageChange": {
"fromStageId": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"toStageId": "2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f6a"
},
"protectedFields": []
}
}{
"ok": false,
"error": {
"code": "UNAUTHENTICATED",
"message": "Invalid or revoked API key"
}
}{
"ok": false,
"error": {
"code": "FORBIDDEN",
"message": "This API key lacks the opportunities:write scope",
"details": {
"requiredScope": "opportunities:write"
}
}
}{
"ok": false,
"error": {
"code": "NOT_FOUND",
"message": "Opportunity not found"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"ok": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The request is not valid",
"details": {
"fieldErrors": {
"limit": [
"At most 100"
]
}
}
}
}{
"ok": false,
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests for this API key or its organization"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
Headers
1 to 255 printable ASCII characters without spaces, scoped to the API key. A retry of the same request (method, path, query and body) within 24 h gets the stored answer with Idempotent-Replayed: true and does not run again; the same key with another request is 422; while the first runs, 409. Answers of 500 and above are not stored: the key is released and a retry runs the write again. Ignored on a dry run.
Maximum string length:
255Query Parameters
Body
application/json