Update an integration
curl --request PUT \
--url https://panel.sendcloud.sc/api/v2/integrations/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"shop_name": "Integration #1",
"shop_url": "https://example.com",
"service_point_enabled": true,
"service_point_carriers": [
"ups"
],
"webhook_active": true,
"webhook_url": "https://example.com"
}
'import requests
url = "https://panel.sendcloud.sc/api/v2/integrations/{id}"
payload = {
"shop_name": "Integration #1",
"shop_url": "https://example.com",
"service_point_enabled": True,
"service_point_carriers": ["ups"],
"webhook_active": True,
"webhook_url": "https://example.com"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shop_name: 'Integration #1',
shop_url: 'https://example.com',
service_point_enabled: true,
service_point_carriers: ['ups'],
webhook_active: true,
webhook_url: 'https://example.com'
})
};
fetch('https://panel.sendcloud.sc/api/v2/integrations/{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://panel.sendcloud.sc/api/v2/integrations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'shop_name' => 'Integration #1',
'shop_url' => 'https://example.com',
'service_point_enabled' => true,
'service_point_carriers' => [
'ups'
],
'webhook_active' => true,
'webhook_url' => 'https://example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://panel.sendcloud.sc/api/v2/integrations/{id}"
payload := strings.NewReader("{\n \"shop_name\": \"Integration #1\",\n \"shop_url\": \"https://example.com\",\n \"service_point_enabled\": true,\n \"service_point_carriers\": [\n \"ups\"\n ],\n \"webhook_active\": true,\n \"webhook_url\": \"https://example.com\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("https://panel.sendcloud.sc/api/v2/integrations/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"shop_name\": \"Integration #1\",\n \"shop_url\": \"https://example.com\",\n \"service_point_enabled\": true,\n \"service_point_carriers\": [\n \"ups\"\n ],\n \"webhook_active\": true,\n \"webhook_url\": \"https://example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v2/integrations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shop_name\": \"Integration #1\",\n \"shop_url\": \"https://example.com\",\n \"service_point_enabled\": true,\n \"service_point_carriers\": [\n \"ups\"\n ],\n \"webhook_active\": true,\n \"webhook_url\": \"https://example.com\"\n}"
response = http.request(request)
puts response.read_body{
"shop_name": "Integration #1",
"shop_url": "https://example.com",
"last_updated_at": "2019-08-24T14:15:22Z",
"service_point_enabled": true,
"service_point_carriers": [
"ups"
],
"webhook_active": true,
"webhook_url": "https://example.com"
}{
"error": {
"code": 400,
"request": "api/v2/integrations/",
"message": "{'settings': ['webhook_active: This field may not be null.', 'webhook_url: This field may not be null.']}"
}
}{
"error": {
"code": 404,
"request": "api/v2/integrations/",
"message": "No Integration matches the given query."
}
}Integrations API
Update an integration
Update settings for a specific integration using its id.
PUT
/
integrations
/
{id}
Update an integration
curl --request PUT \
--url https://panel.sendcloud.sc/api/v2/integrations/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"shop_name": "Integration #1",
"shop_url": "https://example.com",
"service_point_enabled": true,
"service_point_carriers": [
"ups"
],
"webhook_active": true,
"webhook_url": "https://example.com"
}
'import requests
url = "https://panel.sendcloud.sc/api/v2/integrations/{id}"
payload = {
"shop_name": "Integration #1",
"shop_url": "https://example.com",
"service_point_enabled": True,
"service_point_carriers": ["ups"],
"webhook_active": True,
"webhook_url": "https://example.com"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
shop_name: 'Integration #1',
shop_url: 'https://example.com',
service_point_enabled: true,
service_point_carriers: ['ups'],
webhook_active: true,
webhook_url: 'https://example.com'
})
};
fetch('https://panel.sendcloud.sc/api/v2/integrations/{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://panel.sendcloud.sc/api/v2/integrations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'shop_name' => 'Integration #1',
'shop_url' => 'https://example.com',
'service_point_enabled' => true,
'service_point_carriers' => [
'ups'
],
'webhook_active' => true,
'webhook_url' => 'https://example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://panel.sendcloud.sc/api/v2/integrations/{id}"
payload := strings.NewReader("{\n \"shop_name\": \"Integration #1\",\n \"shop_url\": \"https://example.com\",\n \"service_point_enabled\": true,\n \"service_point_carriers\": [\n \"ups\"\n ],\n \"webhook_active\": true,\n \"webhook_url\": \"https://example.com\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("https://panel.sendcloud.sc/api/v2/integrations/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"shop_name\": \"Integration #1\",\n \"shop_url\": \"https://example.com\",\n \"service_point_enabled\": true,\n \"service_point_carriers\": [\n \"ups\"\n ],\n \"webhook_active\": true,\n \"webhook_url\": \"https://example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v2/integrations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"shop_name\": \"Integration #1\",\n \"shop_url\": \"https://example.com\",\n \"service_point_enabled\": true,\n \"service_point_carriers\": [\n \"ups\"\n ],\n \"webhook_active\": true,\n \"webhook_url\": \"https://example.com\"\n}"
response = http.request(request)
puts response.read_body{
"shop_name": "Integration #1",
"shop_url": "https://example.com",
"last_updated_at": "2019-08-24T14:15:22Z",
"service_point_enabled": true,
"service_point_carriers": [
"ups"
],
"webhook_active": true,
"webhook_url": "https://example.com"
}{
"error": {
"code": 400,
"request": "api/v2/integrations/",
"message": "{'settings': ['webhook_active: This field may not be null.', 'webhook_url: This field may not be null.']}"
}
}{
"error": {
"code": 404,
"request": "api/v2/integrations/",
"message": "No Integration matches the given query."
}
}OAuth2 scopes required:
write:integration. See Scopes for OAuth apps.API v2 is entering maintenance mode. New users should start with API v3 to access our latest features and improved performance. Already using v2? Don’t worry, your current integration remains fully functional. Read more about maintenance mode, or check out the migration guide for API v3.
service_point_enabled to true or false.
Unlike the Partially update an integration endpoint, you must send all fields, even those you don’t want to change.
You can obtain an integration id via the Retrieve a list of integrations endpoint.Authorizations
HTTPBasicAuthOAuth2ClientCreds
Body
application/json
An updated integration response object
Response
OK
An updated integration response object