> ## Documentation Index
> Fetch the complete documentation index at: https://sendcloud.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve all integration exception logs

> Retrieve all integration exception logs. These logs are created when integrations have problems making API requests to shop systems.

Integration exception logs might be generated, for example:

* if some resource cannot be found
* if API credentials are no longer valid

Each log record may contain information about the request and response, the status code and code exception, and can be used as a reference to identify issues between Sendcloud and a webshop.

Pagination is cursor-based. Use the `cursor` query parameter to navigate through pages. The `Link` response header contains the URL for the next page when more results are available.


## OpenAPI

````yaml /.openapi/v3/integrations/openapi.yaml get /integrations/logs
openapi: 3.1.0
info:
  title: Integrations
  version: 3.0.0
  contact:
    name: Sendcloud API Support
    email: contact@sendcloud.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  description: >-
    The Integrations API lets you manage some aspects of your integrations, and
    set and retrieve available shop order statuses.
servers:
  - url: https://panel.sendcloud.sc/api/v3
    description: Sendcloud Production
security: []
tags:
  - name: Integrations
    description: IntegrationsAPI
  - name: Exception logs
    description: Integration exception logs API
paths:
  /integrations/logs:
    get:
      tags:
        - Exception logs
      summary: Retrieve all integration exception logs
      description: >-
        Retrieve all integration exception logs. These logs are created when
        integrations have problems making API requests to shop systems.
      operationId: sc-public-v3-integrations-get-retrieve_integrations_logs
      parameters:
        - in: query
          name: cursor
          schema:
            type: string
            format: date-time
          description: >-
            Cursor for pagination. Use the value from the `Link` response header
            to fetch the next page.
          example: '2023-03-01T02:02:00+01:00'
        - in: query
          name: page_size
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
          description: Number of results per page.
          example: 25
      responses:
        '200':
          description: OK
          headers:
            Link:
              schema:
                type: string
              description: >-
                Contains the URL for the next page of results (RFC 5988).
                Example:
                `<https://panel.sendcloud.sc/api/v3/integrations/logs?cursor=2023-03-01T02:02:00&page_size=25>;
                rel="next"`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/integration-log'
              examples:
                RetrieveIntegrationLogs:
                  summary: Retrieve a list of integration logs
                  value:
                    data:
                      - 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
                        protected: false
                        additional_data: ''
      security:
        - HTTPBasicAuth: []
        - OAuth2ClientCreds: []
components:
  schemas:
    integration-log:
      type: object
      title: Integration Log Object
      description: >-
        An integration exception log record containing information about a
        failed API request to a shop system.
      properties:
        id:
          type: integer
          title: ID
          description: ID of the log record
          minimum: 1
          example: 123
          readOnly: true
        integration_id:
          type:
            - integer
            - 'null'
          description: ID of the integration to which this log belongs
          minimum: 1
          example: 123
        base_url:
          description: Base shop URL
          type: string
          example: https://example.com
          minLength: 1
        full_url:
          description: Full path to resource where error happened
          type:
            - string
            - 'null'
          example: https://example.com/order-note.json
        method:
          type: string
          description: HTTP method that caused an error
          example: POST
        response_code:
          type:
            - integer
            - 'null'
          description: Standard HTTP error code
          example: 495
          minimum: 0
        response:
          type:
            - object
            - 'null'
          title: Response object
          description: Response JSON containing response body and headers
          properties:
            headers:
              title: HTTP headers
              description: HTTP headers which were sent within a response
              type:
                - object
                - 'null'
            body:
              title: HTTP response body
              description: HTTP response body
              type:
                - string
                - object
                - 'null'
        request:
          type:
            - object
            - 'null'
          title: Request object
          description: Request JSON containing request body and headers
          properties:
            headers:
              title: HTTP headers
              description: HTTP headers which were sent within a request
              type:
                - object
                - string
                - 'null'
            payload:
              title: HTTP request body
              description: HTTP request body
              type:
                - object
                - string
                - 'null'
        created_at:
          type: string
          format: date-time
          description: Timestamp indicating when an exception occurred
          example: '2023-03-01T02:02:00+01:00'
        exception_type:
          type:
            - string
            - 'null'
          description: >-
            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:
          type:
            - string
            - 'null'
          title: Exception text
          description: Human readable description of exception
          example: An SSL error occurred
        protected:
          type: boolean
          description: An indication whether or not request/response is obfuscated
          example: false
          readOnly: true
        additional_data:
          type:
            - object
            - string
          description: Additional data associated with the log entry
          default: ''
      required:
        - base_url
  securitySchemes:
    HTTPBasicAuth:
      type: http
      description: >-
        Basic Authentication using API key and secrets is currently the main
        authentication mechanism.
      scheme: basic
    OAuth2ClientCreds:
      type: oauth2
      description: >-
        OAuth2 is a standardized protocol for authorization that allows users to
        share their private resources stored on one site with another site
        without having to provide their credentials. OAuth2 Client Credentials
        Grant workflow. This workflow is typically used for server-to-server
        interactions that require authorization to access specific resources.
      flows:
        clientCredentials:
          tokenUrl: https://account.sendcloud.com/oauth2/token/
          scopes:
            api: Default OAuth scope required to access Sendcloud API.

````