Update a deal
curl --request PATCH \
--url https://n-api.leadstaker.com/v1/deals/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"contactId": "<string>",
"responsibleId": "<string>",
"fields": [
{
"fieldId": "<string>",
"value": "<unknown>"
}
],
"pipelineId": "<string>",
"tagIds": [
"<string>"
],
"stageId": "<string>",
"lossReasonId": "<string>"
}
'import requests
url = "https://n-api.leadstaker.com/v1/deals/{id}"
payload = {
"contactId": "<string>",
"responsibleId": "<string>",
"fields": [
{
"fieldId": "<string>",
"value": "<unknown>"
}
],
"pipelineId": "<string>",
"tagIds": ["<string>"],
"stageId": "<string>",
"lossReasonId": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contactId: '<string>',
responsibleId: '<string>',
fields: [{fieldId: '<string>', value: '<unknown>'}],
pipelineId: '<string>',
tagIds: ['<string>'],
stageId: '<string>',
lossReasonId: '<string>'
})
};
fetch('https://n-api.leadstaker.com/v1/deals/{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://n-api.leadstaker.com/v1/deals/{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([
'contactId' => '<string>',
'responsibleId' => '<string>',
'fields' => [
[
'fieldId' => '<string>',
'value' => '<unknown>'
]
],
'pipelineId' => '<string>',
'tagIds' => [
'<string>'
],
'stageId' => '<string>',
'lossReasonId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://n-api.leadstaker.com/v1/deals/{id}"
payload := strings.NewReader("{\n \"contactId\": \"<string>\",\n \"responsibleId\": \"<string>\",\n \"fields\": [\n {\n \"fieldId\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"pipelineId\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"stageId\": \"<string>\",\n \"lossReasonId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://n-api.leadstaker.com/v1/deals/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contactId\": \"<string>\",\n \"responsibleId\": \"<string>\",\n \"fields\": [\n {\n \"fieldId\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"pipelineId\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"stageId\": \"<string>\",\n \"lossReasonId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://n-api.leadstaker.com/v1/deals/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contactId\": \"<string>\",\n \"responsibleId\": \"<string>\",\n \"fields\": [\n {\n \"fieldId\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"pipelineId\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"stageId\": \"<string>\",\n \"lossReasonId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Deals
Update a deal
Partial update: only the keys present in the body change. Answers 204 with no body.
PATCH
/
v1
/
deals
/
{id}
Update a deal
curl --request PATCH \
--url https://n-api.leadstaker.com/v1/deals/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"contactId": "<string>",
"responsibleId": "<string>",
"fields": [
{
"fieldId": "<string>",
"value": "<unknown>"
}
],
"pipelineId": "<string>",
"tagIds": [
"<string>"
],
"stageId": "<string>",
"lossReasonId": "<string>"
}
'import requests
url = "https://n-api.leadstaker.com/v1/deals/{id}"
payload = {
"contactId": "<string>",
"responsibleId": "<string>",
"fields": [
{
"fieldId": "<string>",
"value": "<unknown>"
}
],
"pipelineId": "<string>",
"tagIds": ["<string>"],
"stageId": "<string>",
"lossReasonId": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contactId: '<string>',
responsibleId: '<string>',
fields: [{fieldId: '<string>', value: '<unknown>'}],
pipelineId: '<string>',
tagIds: ['<string>'],
stageId: '<string>',
lossReasonId: '<string>'
})
};
fetch('https://n-api.leadstaker.com/v1/deals/{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://n-api.leadstaker.com/v1/deals/{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([
'contactId' => '<string>',
'responsibleId' => '<string>',
'fields' => [
[
'fieldId' => '<string>',
'value' => '<unknown>'
]
],
'pipelineId' => '<string>',
'tagIds' => [
'<string>'
],
'stageId' => '<string>',
'lossReasonId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://n-api.leadstaker.com/v1/deals/{id}"
payload := strings.NewReader("{\n \"contactId\": \"<string>\",\n \"responsibleId\": \"<string>\",\n \"fields\": [\n {\n \"fieldId\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"pipelineId\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"stageId\": \"<string>\",\n \"lossReasonId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://n-api.leadstaker.com/v1/deals/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contactId\": \"<string>\",\n \"responsibleId\": \"<string>\",\n \"fields\": [\n {\n \"fieldId\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"pipelineId\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"stageId\": \"<string>\",\n \"lossReasonId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://n-api.leadstaker.com/v1/deals/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contactId\": \"<string>\",\n \"responsibleId\": \"<string>\",\n \"fields\": [\n {\n \"fieldId\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"pipelineId\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"stageId\": \"<string>\",\n \"lossReasonId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"status": 123,
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Authorizations
Path Parameters
Minimum string length:
1Body
application/json
Response
No content
⌘I