Update Deal
curl --request PATCH \
--url https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"owner_id": "<string>",
"name": "<string>",
"amount": 123,
"opportunity_stage_id": "<string>",
"closed_date": "<string>",
"typed_custom_fields": {}
}
'import requests
url = "https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id}"
payload = {
"owner_id": "<string>",
"name": "<string>",
"amount": 123,
"opportunity_stage_id": "<string>",
"closed_date": "<string>",
"typed_custom_fields": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
owner_id: '<string>',
name: '<string>',
amount: 123,
opportunity_stage_id: '<string>',
closed_date: '<string>',
typed_custom_fields: {}
})
};
fetch('https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'owner_id' => '<string>',
'name' => '<string>',
'amount' => 123,
'opportunity_stage_id' => '<string>',
'closed_date' => '<string>',
'typed_custom_fields' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id}"
payload := strings.NewReader("{\n \"owner_id\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"opportunity_stage_id\": \"<string>\",\n \"closed_date\": \"<string>\",\n \"typed_custom_fields\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"owner_id\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"opportunity_stage_id\": \"<string>\",\n \"closed_date\": \"<string>\",\n \"typed_custom_fields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"owner_id\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"opportunity_stage_id\": \"<string>\",\n \"closed_date\": \"<string>\",\n \"typed_custom_fields\": {}\n}"
response = http.request(request)
puts response.read_body{
"opportunity": {}
}Opportunities
Update Deal
Update fields on an existing deal (opportunity).
PATCH
https://api.aisa.one/apis/v1
/
apollo
/
opportunities
/
{opportunity_id}
Update Deal
curl --request PATCH \
--url https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"owner_id": "<string>",
"name": "<string>",
"amount": 123,
"opportunity_stage_id": "<string>",
"closed_date": "<string>",
"typed_custom_fields": {}
}
'import requests
url = "https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id}"
payload = {
"owner_id": "<string>",
"name": "<string>",
"amount": 123,
"opportunity_stage_id": "<string>",
"closed_date": "<string>",
"typed_custom_fields": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
owner_id: '<string>',
name: '<string>',
amount: 123,
opportunity_stage_id: '<string>',
closed_date: '<string>',
typed_custom_fields: {}
})
};
fetch('https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'owner_id' => '<string>',
'name' => '<string>',
'amount' => 123,
'opportunity_stage_id' => '<string>',
'closed_date' => '<string>',
'typed_custom_fields' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id}"
payload := strings.NewReader("{\n \"owner_id\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"opportunity_stage_id\": \"<string>\",\n \"closed_date\": \"<string>\",\n \"typed_custom_fields\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"owner_id\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"opportunity_stage_id\": \"<string>\",\n \"closed_date\": \"<string>\",\n \"typed_custom_fields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/apollo/opportunities/{opportunity_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"owner_id\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"opportunity_stage_id\": \"<string>\",\n \"closed_date\": \"<string>\",\n \"typed_custom_fields\": {}\n}"
response = http.request(request)
puts response.read_body{
"opportunity": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Opportunity ID
Body
application/json
Response
Successful response
Updated opportunity
⌘I