curl --request POST \
--url https://panel.sendcloud.sc/api/v2/integrations/{id}/logs \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"integration_id": 123,
"user_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"
}
'import requests
url = "https://panel.sendcloud.sc/api/v2/integrations/{id}/logs"
payload = {
"integration_id": 123,
"user_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>
<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({
integration_id: 123,
user_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: 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/v2/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/v2/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([
'integration_id' => 123,
'user_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>
<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/v2/integrations/{id}/logs"
payload := strings.NewReader("{\n \"integration_id\": 123,\n \"user_id\": 123,\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/v2/integrations/{id}/logs")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"integration_id\": 123,\n \"user_id\": 123,\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/v2/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 \"integration_id\": 123,\n \"user_id\": 123,\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{
"id": 123,
"integration_id": 123,
"user_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
}{
"error": {
"code": 400,
"request": "api/v2/integrations/12/logs",
"message": "{'exception': ['This field may not be null.', ]}"
}
}{
"error": {
"code": 404,
"request": "api/v2/integrations/",
"message": "No Integration matches the given query."
}
}Create integration exceptions 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/v2/integrations/{id}/logs \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"integration_id": 123,
"user_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"
}
'import requests
url = "https://panel.sendcloud.sc/api/v2/integrations/{id}/logs"
payload = {
"integration_id": 123,
"user_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>
<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({
integration_id: 123,
user_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: 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/v2/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/v2/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([
'integration_id' => 123,
'user_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>
<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/v2/integrations/{id}/logs"
payload := strings.NewReader("{\n \"integration_id\": 123,\n \"user_id\": 123,\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/v2/integrations/{id}/logs")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"integration_id\": 123,\n \"user_id\": 123,\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/v2/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 \"integration_id\": 123,\n \"user_id\": 123,\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{
"id": 123,
"integration_id": 123,
"user_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
}{
"error": {
"code": 400,
"request": "api/v2/integrations/12/logs",
"message": "{'exception': ['This field may not be null.', ]}"
}
}{
"error": {
"code": 404,
"request": "api/v2/integrations/",
"message": "No Integration matches the given query."
}
}Authorizations
Basic Authentication using API key and secrets is currently the main authentication mechanism.
Path Parameters
The id of the integration to which the shipments belong
Body
Base shop URL
1"https://example.com"
ID of an integration to which this log belongs
x >= 1123
ID of a user to which this log belongs
x >= 1123
Full path to resource where error happened
"https://example.com/order-note.json"
HTTP method 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 the fields is not presented in the request, current date will be set
"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
OK
Base shop URL
1"https://example.com"
ID of an log record
x >= 1123
Full path to resource where error happened
"https://example.com/order-note.json"
HTTP method 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 the fields is not presented in the request, current date will be set
"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"
An indication whether or not request/response is obfuscated
false