Bulk update pipeline stages
Updates stages for a pipeline in bulk.
POST
/
v1
/
pipelines
/
{pipeline_id}
/
stages
/
bulk
/
update
Bulk update pipeline stages
curl --request POST \
--url https://api.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
[
{
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"color": "<string>",
"stage_order": 2,
"is_default": true,
"probability": 50,
"description": "<string>"
}
]
'import requests
url = "https://api.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update"
payload = [
{
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"color": "<string>",
"stage_order": 2,
"is_default": True,
"probability": 50,
"description": "<string>"
}
]
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
stage_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
label: '<string>',
color: '<string>',
stage_order: 2,
is_default: true,
probability: 50,
description: '<string>'
}
])
};
fetch('https://api.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update', 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.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'stage_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'label' => '<string>',
'color' => '<string>',
'stage_order' => 2,
'is_default' => true,
'probability' => 50,
'description' => '<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://api.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update"
payload := strings.NewReader("[\n {\n \"stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"color\": \"<string>\",\n \"stage_order\": 2,\n \"is_default\": true,\n \"probability\": 50,\n \"description\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", 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.post("https://api.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"color\": \"<string>\",\n \"stage_order\": 2,\n \"is_default\": true,\n \"probability\": 50,\n \"description\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"color\": \"<string>\",\n \"stage_order\": 2,\n \"is_default\": true,\n \"probability\": 50,\n \"description\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": "<unknown>"
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}Authorizations
Personal API key. Requests act as the workspace member who created the key, with that member's current access, and stop working when the key is disabled or its creator leaves the workspace.
Path Parameters
Pipeline ID.
Body
application/json
Array of pipeline stage patches. Maximum 100 items.
Required array length:
1 - 100 elementsMaximum string length:
255Maximum string length:
32Required range:
x >= 1Required range:
0 <= x <= 100Available options:
default, positive, negative Free-text guidance for the stage. Leading and trailing whitespace is trimmed before the length is checked. Send an empty string or null to clear it.
Maximum string length:
5000Was this page helpful?
⌘I
Bulk update pipeline stages
curl --request POST \
--url https://api.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
[
{
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"color": "<string>",
"stage_order": 2,
"is_default": true,
"probability": 50,
"description": "<string>"
}
]
'import requests
url = "https://api.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update"
payload = [
{
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"color": "<string>",
"stage_order": 2,
"is_default": True,
"probability": 50,
"description": "<string>"
}
]
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
stage_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
label: '<string>',
color: '<string>',
stage_order: 2,
is_default: true,
probability: 50,
description: '<string>'
}
])
};
fetch('https://api.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update', 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.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'stage_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'label' => '<string>',
'color' => '<string>',
'stage_order' => 2,
'is_default' => true,
'probability' => 50,
'description' => '<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://api.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update"
payload := strings.NewReader("[\n {\n \"stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"color\": \"<string>\",\n \"stage_order\": 2,\n \"is_default\": true,\n \"probability\": 50,\n \"description\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", 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.post("https://api.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"color\": \"<string>\",\n \"stage_order\": 2,\n \"is_default\": true,\n \"probability\": 50,\n \"description\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.octolane.com/v1/pipelines/{pipeline_id}/stages/bulk/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"color\": \"<string>\",\n \"stage_order\": 2,\n \"is_default\": true,\n \"probability\": 50,\n \"description\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": "<unknown>"
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}