curl --request POST \
--url https://panel.sendcloud.sc/api/v3/integrations/{id}/logs \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "https://example.com",
"full_url": "https://example.com/order-note.json",
"method": "POST",
"response_code": 495,
"response": {
"headers": {
"Cache-Control": "max-age=3600",
"Content-Type": "text/html; charset=utf-8",
"Connection": "keep-alive"
},
"body": "<!doctype html>\n<html>\n <head>\n <title>SSL Certificate Error</title>\n </head>\n </html>\n"
},
"request": {
"headers": {
"Cache-Control": "max-age=3600",
"Content-Type": "text/html; charset=utf-8",
"Connection": "keep-alive"
},
"payload": {
"order_note": {
"note": "Success"
}
}
},
"created_at": "2023-03-01T02:02:00+01:00",
"exception_type": "requests.exceptions.SSLError",
"exception": "An SSL error occurred"
}
'import requests
url = "https://panel.sendcloud.sc/api/v3/integrations/{id}/logs"
payload = {
"base_url": "https://example.com",
"full_url": "https://example.com/order-note.json",
"method": "POST",
"response_code": 495,
"response": {
"headers": {
"Cache-Control": "max-age=3600",
"Content-Type": "text/html; charset=utf-8",
"Connection": "keep-alive"
},
"body": "<!doctype html>
<html>
<head>
<title>SSL Certificate Error</title>
</head>
</html>
"
},
"request": {
"headers": {
"Cache-Control": "max-age=3600",
"Content-Type": "text/html; charset=utf-8",
"Connection": "keep-alive"
},
"payload": { "order_note": { "note": "Success" } }
},
"created_at": "2023-03-01T02:02:00+01:00",
"exception_type": "requests.exceptions.SSLError",
"exception": "An SSL error occurred"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
base_url: 'https://example.com',
full_url: 'https://example.com/order-note.json',
method: 'POST',
response_code: 495,
response: {
headers: {
'Cache-Control': 'max-age=3600',
'Content-Type': 'text/html; charset=utf-8',
Connection: 'keep-alive'
},
body: JSON.stringify('<!doctype html>\n<html>\n <head>\n <title>SSL Certificate Error</title>\n </head>\n </html>\n')
},
request: {
headers: {
'Cache-Control': 'max-age=3600',
'Content-Type': 'text/html; charset=utf-8',
Connection: 'keep-alive'
},
payload: {order_note: {note: 'Success'}}
},
created_at: '2023-03-01T02:02:00+01:00',
exception_type: 'requests.exceptions.SSLError',
exception: 'An SSL error occurred'
})
};
fetch('https://panel.sendcloud.sc/api/v3/integrations/{id}/logs', 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/v3/integrations/{id}/logs",
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([
'base_url' => 'https://example.com',
'full_url' => 'https://example.com/order-note.json',
'method' => 'POST',
'response_code' => 495,
'response' => [
'headers' => [
'Cache-Control' => 'max-age=3600',
'Content-Type' => 'text/html; charset=utf-8',
'Connection' => 'keep-alive'
],
'body' => '<!doctype html>
<html>
<head>
<title>SSL Certificate Error</title>
</head>
</html>
'
],
'request' => [
'headers' => [
'Cache-Control' => 'max-age=3600',
'Content-Type' => 'text/html; charset=utf-8',
'Connection' => 'keep-alive'
],
'payload' => [
'order_note' => [
'note' => 'Success'
]
]
],
'created_at' => '2023-03-01T02:02:00+01:00',
'exception_type' => 'requests.exceptions.SSLError',
'exception' => 'An SSL error occurred'
]),
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/v3/integrations/{id}/logs"
payload := strings.NewReader("{\n \"base_url\": \"https://example.com\",\n \"full_url\": \"https://example.com/order-note.json\",\n \"method\": \"POST\",\n \"response_code\": 495,\n \"response\": {\n \"headers\": {\n \"Cache-Control\": \"max-age=3600\",\n \"Content-Type\": \"text/html; charset=utf-8\",\n \"Connection\": \"keep-alive\"\n },\n \"body\": \"<!doctype html>\\n<html>\\n <head>\\n <title>SSL Certificate Error</title>\\n </head>\\n </html>\\n\"\n },\n \"request\": {\n \"headers\": {\n \"Cache-Control\": \"max-age=3600\",\n \"Content-Type\": \"text/html; charset=utf-8\",\n \"Connection\": \"keep-alive\"\n },\n \"payload\": {\n \"order_note\": {\n \"note\": \"Success\"\n }\n }\n },\n \"created_at\": \"2023-03-01T02:02:00+01:00\",\n \"exception_type\": \"requests.exceptions.SSLError\",\n \"exception\": \"An SSL error occurred\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://panel.sendcloud.sc/api/v3/integrations/{id}/logs")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"https://example.com\",\n \"full_url\": \"https://example.com/order-note.json\",\n \"method\": \"POST\",\n \"response_code\": 495,\n \"response\": {\n \"headers\": {\n \"Cache-Control\": \"max-age=3600\",\n \"Content-Type\": \"text/html; charset=utf-8\",\n \"Connection\": \"keep-alive\"\n },\n \"body\": \"<!doctype html>\\n<html>\\n <head>\\n <title>SSL Certificate Error</title>\\n </head>\\n </html>\\n\"\n },\n \"request\": {\n \"headers\": {\n \"Cache-Control\": \"max-age=3600\",\n \"Content-Type\": \"text/html; charset=utf-8\",\n \"Connection\": \"keep-alive\"\n },\n \"payload\": {\n \"order_note\": {\n \"note\": \"Success\"\n }\n }\n },\n \"created_at\": \"2023-03-01T02:02:00+01:00\",\n \"exception_type\": \"requests.exceptions.SSLError\",\n \"exception\": \"An SSL error occurred\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v3/integrations/{id}/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base_url\": \"https://example.com\",\n \"full_url\": \"https://example.com/order-note.json\",\n \"method\": \"POST\",\n \"response_code\": 495,\n \"response\": {\n \"headers\": {\n \"Cache-Control\": \"max-age=3600\",\n \"Content-Type\": \"text/html; charset=utf-8\",\n \"Connection\": \"keep-alive\"\n },\n \"body\": \"<!doctype html>\\n<html>\\n <head>\\n <title>SSL Certificate Error</title>\\n </head>\\n </html>\\n\"\n },\n \"request\": {\n \"headers\": {\n \"Cache-Control\": \"max-age=3600\",\n \"Content-Type\": \"text/html; charset=utf-8\",\n \"Connection\": \"keep-alive\"\n },\n \"payload\": {\n \"order_note\": {\n \"note\": \"Success\"\n }\n }\n },\n \"created_at\": \"2023-03-01T02:02:00+01:00\",\n \"exception_type\": \"requests.exceptions.SSLError\",\n \"exception\": \"An SSL error occurred\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"integration_id": 123,
"base_url": "https://example.com",
"full_url": "https://example.com/order-note.json",
"method": "POST",
"response_code": 495,
"response": {
"headers": {
"Cache-Control": "max-age=3600",
"Content-Type": "text/html; charset=utf-8",
"Connection": "keep-alive"
},
"body": "<!doctype html>\n<html>\n <head>\n <title>SSL Certificate Error</title>\n </head>\n </html>\n"
},
"request": {
"headers": {
"Cache-Control": "max-age=3600",
"Content-Type": "text/html; charset=utf-8",
"Connection": "keep-alive"
},
"payload": {
"order_note": {
"note": "Success"
}
}
},
"created_at": "2023-03-01T02:02:00+01:00",
"exception_type": "requests.exceptions.SSLError",
"exception": "An SSL error occurred",
"protected": false,
"additional_data": ""
}
}{
"errors": [
{
"status": 400,
"code": "extra_forbidden",
"title": "Extra Forbidden",
"detail": "Extra inputs are not permitted",
"source": {
"pointer": "body/unknown_field"
}
}
]
}{
"errors": [
{
"status": 404,
"code": "not_found",
"title": "Not Found",
"detail": "The Integration could not be found with the search criteria given"
}
]
}Create integration exception logs
Create integration exception logs, which will appear in the connection issue log screen of the user’s integration.
curl --request POST \
--url https://panel.sendcloud.sc/api/v3/integrations/{id}/logs \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "https://example.com",
"full_url": "https://example.com/order-note.json",
"method": "POST",
"response_code": 495,
"response": {
"headers": {
"Cache-Control": "max-age=3600",
"Content-Type": "text/html; charset=utf-8",
"Connection": "keep-alive"
},
"body": "<!doctype html>\n<html>\n <head>\n <title>SSL Certificate Error</title>\n </head>\n </html>\n"
},
"request": {
"headers": {
"Cache-Control": "max-age=3600",
"Content-Type": "text/html; charset=utf-8",
"Connection": "keep-alive"
},
"payload": {
"order_note": {
"note": "Success"
}
}
},
"created_at": "2023-03-01T02:02:00+01:00",
"exception_type": "requests.exceptions.SSLError",
"exception": "An SSL error occurred"
}
'import requests
url = "https://panel.sendcloud.sc/api/v3/integrations/{id}/logs"
payload = {
"base_url": "https://example.com",
"full_url": "https://example.com/order-note.json",
"method": "POST",
"response_code": 495,
"response": {
"headers": {
"Cache-Control": "max-age=3600",
"Content-Type": "text/html; charset=utf-8",
"Connection": "keep-alive"
},
"body": "<!doctype html>
<html>
<head>
<title>SSL Certificate Error</title>
</head>
</html>
"
},
"request": {
"headers": {
"Cache-Control": "max-age=3600",
"Content-Type": "text/html; charset=utf-8",
"Connection": "keep-alive"
},
"payload": { "order_note": { "note": "Success" } }
},
"created_at": "2023-03-01T02:02:00+01:00",
"exception_type": "requests.exceptions.SSLError",
"exception": "An SSL error occurred"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
base_url: 'https://example.com',
full_url: 'https://example.com/order-note.json',
method: 'POST',
response_code: 495,
response: {
headers: {
'Cache-Control': 'max-age=3600',
'Content-Type': 'text/html; charset=utf-8',
Connection: 'keep-alive'
},
body: JSON.stringify('<!doctype html>\n<html>\n <head>\n <title>SSL Certificate Error</title>\n </head>\n </html>\n')
},
request: {
headers: {
'Cache-Control': 'max-age=3600',
'Content-Type': 'text/html; charset=utf-8',
Connection: 'keep-alive'
},
payload: {order_note: {note: 'Success'}}
},
created_at: '2023-03-01T02:02:00+01:00',
exception_type: 'requests.exceptions.SSLError',
exception: 'An SSL error occurred'
})
};
fetch('https://panel.sendcloud.sc/api/v3/integrations/{id}/logs', 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/v3/integrations/{id}/logs",
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([
'base_url' => 'https://example.com',
'full_url' => 'https://example.com/order-note.json',
'method' => 'POST',
'response_code' => 495,
'response' => [
'headers' => [
'Cache-Control' => 'max-age=3600',
'Content-Type' => 'text/html; charset=utf-8',
'Connection' => 'keep-alive'
],
'body' => '<!doctype html>
<html>
<head>
<title>SSL Certificate Error</title>
</head>
</html>
'
],
'request' => [
'headers' => [
'Cache-Control' => 'max-age=3600',
'Content-Type' => 'text/html; charset=utf-8',
'Connection' => 'keep-alive'
],
'payload' => [
'order_note' => [
'note' => 'Success'
]
]
],
'created_at' => '2023-03-01T02:02:00+01:00',
'exception_type' => 'requests.exceptions.SSLError',
'exception' => 'An SSL error occurred'
]),
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/v3/integrations/{id}/logs"
payload := strings.NewReader("{\n \"base_url\": \"https://example.com\",\n \"full_url\": \"https://example.com/order-note.json\",\n \"method\": \"POST\",\n \"response_code\": 495,\n \"response\": {\n \"headers\": {\n \"Cache-Control\": \"max-age=3600\",\n \"Content-Type\": \"text/html; charset=utf-8\",\n \"Connection\": \"keep-alive\"\n },\n \"body\": \"<!doctype html>\\n<html>\\n <head>\\n <title>SSL Certificate Error</title>\\n </head>\\n </html>\\n\"\n },\n \"request\": {\n \"headers\": {\n \"Cache-Control\": \"max-age=3600\",\n \"Content-Type\": \"text/html; charset=utf-8\",\n \"Connection\": \"keep-alive\"\n },\n \"payload\": {\n \"order_note\": {\n \"note\": \"Success\"\n }\n }\n },\n \"created_at\": \"2023-03-01T02:02:00+01:00\",\n \"exception_type\": \"requests.exceptions.SSLError\",\n \"exception\": \"An SSL error occurred\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://panel.sendcloud.sc/api/v3/integrations/{id}/logs")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"https://example.com\",\n \"full_url\": \"https://example.com/order-note.json\",\n \"method\": \"POST\",\n \"response_code\": 495,\n \"response\": {\n \"headers\": {\n \"Cache-Control\": \"max-age=3600\",\n \"Content-Type\": \"text/html; charset=utf-8\",\n \"Connection\": \"keep-alive\"\n },\n \"body\": \"<!doctype html>\\n<html>\\n <head>\\n <title>SSL Certificate Error</title>\\n </head>\\n </html>\\n\"\n },\n \"request\": {\n \"headers\": {\n \"Cache-Control\": \"max-age=3600\",\n \"Content-Type\": \"text/html; charset=utf-8\",\n \"Connection\": \"keep-alive\"\n },\n \"payload\": {\n \"order_note\": {\n \"note\": \"Success\"\n }\n }\n },\n \"created_at\": \"2023-03-01T02:02:00+01:00\",\n \"exception_type\": \"requests.exceptions.SSLError\",\n \"exception\": \"An SSL error occurred\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v3/integrations/{id}/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base_url\": \"https://example.com\",\n \"full_url\": \"https://example.com/order-note.json\",\n \"method\": \"POST\",\n \"response_code\": 495,\n \"response\": {\n \"headers\": {\n \"Cache-Control\": \"max-age=3600\",\n \"Content-Type\": \"text/html; charset=utf-8\",\n \"Connection\": \"keep-alive\"\n },\n \"body\": \"<!doctype html>\\n<html>\\n <head>\\n <title>SSL Certificate Error</title>\\n </head>\\n </html>\\n\"\n },\n \"request\": {\n \"headers\": {\n \"Cache-Control\": \"max-age=3600\",\n \"Content-Type\": \"text/html; charset=utf-8\",\n \"Connection\": \"keep-alive\"\n },\n \"payload\": {\n \"order_note\": {\n \"note\": \"Success\"\n }\n }\n },\n \"created_at\": \"2023-03-01T02:02:00+01:00\",\n \"exception_type\": \"requests.exceptions.SSLError\",\n \"exception\": \"An SSL error occurred\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"integration_id": 123,
"base_url": "https://example.com",
"full_url": "https://example.com/order-note.json",
"method": "POST",
"response_code": 495,
"response": {
"headers": {
"Cache-Control": "max-age=3600",
"Content-Type": "text/html; charset=utf-8",
"Connection": "keep-alive"
},
"body": "<!doctype html>\n<html>\n <head>\n <title>SSL Certificate Error</title>\n </head>\n </html>\n"
},
"request": {
"headers": {
"Cache-Control": "max-age=3600",
"Content-Type": "text/html; charset=utf-8",
"Connection": "keep-alive"
},
"payload": {
"order_note": {
"note": "Success"
}
}
},
"created_at": "2023-03-01T02:02:00+01:00",
"exception_type": "requests.exceptions.SSLError",
"exception": "An SSL error occurred",
"protected": false,
"additional_data": ""
}
}{
"errors": [
{
"status": 400,
"code": "extra_forbidden",
"title": "Extra Forbidden",
"detail": "Extra inputs are not permitted",
"source": {
"pointer": "body/unknown_field"
}
}
]
}{
"errors": [
{
"status": 404,
"code": "not_found",
"title": "Not Found",
"detail": "The Integration could not be found with the search criteria given"
}
]
}Authorizations
Basic Authentication using API key and secrets is currently the main authentication mechanism.
Path Parameters
The id of the integration
Body
Request body for creating an integration exception log.
Base shop URL
1"https://example.com"
Full path to resource where error happened
"https://example.com/order-note.json"
HTTP method that caused an error
"POST"
Standard HTTP error code
x >= 0495
Response JSON containing response body and headers
Show child attributes
Show child attributes
Request JSON containing request body and headers
Show child attributes
Show child attributes
Timestamp indicating when an exception occurred. If not provided, the current date will be used.
"2023-03-01T02:02:00+01:00"
Internal field to store Python exception type. We use this field to suggest our users the ways how they can fix issues.
"requests.exceptions.SSLError"
Human readable description of exception
"An SSL error occurred"
Response
Created
An integration exception log record containing information about a failed API request to a shop system.
Show child attributes
Show child attributes