Skip to main content
POST
/
integrations
/
{id}
/
logs
Create integration exceptions logs
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"
}
'
{
  "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
}

Authorizations

Authorization
string
header
required

Basic Authentication using API key and secrets is currently the main authentication mechanism.

Path Parameters

id
integer
required

The id of the integration to which the shipments belong

Body

application/json
base_url
string
required

Base shop URL

Minimum string length: 1
Example:

"https://example.com"

integration_id
integer | null

ID of an integration to which this log belongs

Required range: x >= 1
Example:

123

user_id
integer

ID of a user to which this log belongs

Required range: x >= 1
Example:

123

full_url
string | null

Full path to resource where error happened

Example:

"https://example.com/order-note.json"

method
string

HTTP method caused an error

Example:

"POST"

response_code
integer | null

Standard HTTP error code

Required range: x >= 0
Example:

495

response
Response object · object

Response JSON containing response body and headers

request
Request object · object

Request JSON containing request body and headers

created_at
string<date-time>

Timestamp indicating when an exception occurred. If the fields is not presented in the request, current date will be set

Example:

"2023-03-01T02:02:00+01:00"

exception_type
string | null

Internal field to store Python exception type. We use this field to suggest our users the ways how they can fix issues.

Example:

"requests.exceptions.SSLError"

exception
string | null

Human readable description of exception

Example:

"An SSL error occurred"

Response

OK

base_url
string
required

Base shop URL

Minimum string length: 1
Example:

"https://example.com"

id
integer

ID of an log record

Required range: x >= 1
Example:

123

full_url
string | null

Full path to resource where error happened

Example:

"https://example.com/order-note.json"

method
string

HTTP method caused an error

Example:

"POST"

response_code
integer | null

Standard HTTP error code

Required range: x >= 0
Example:

495

response
Response object · object

Response JSON containing response body and headers

request
Request object · object

Request JSON containing request body and headers

created_at
string<date-time>

Timestamp indicating when an exception occurred. If the fields is not presented in the request, current date will be set

Example:

"2023-03-01T02:02:00+01:00"

exception_type
string | null

Internal field to store Python exception type. We use this field to suggest our users the ways how they can fix issues.

Example:

"requests.exceptions.SSLError"

exception
string | null

Human readable description of exception

Example:

"An SSL error occurred"

protected
boolean

An indication whether or not request/response is obfuscated

Example:

false