> ## 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.

<Warning>
  **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](/docs/getting-started/api-version-guide), or check out the [migration guide for API v3](/docs/getting-started/migration-guidelines-for-api-v3).
</Warning>

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.


## OpenAPI

````yaml /.openapi/v2/integrations/openapi.yaml get /integrations/logs
openapi: 3.1.0
info:
  title: Integrations
  contact:
    name: Sendcloud API Support
    email: contact@sendcloud.com
    url: https://www.sendcloud.dev
  version: 2.0.0
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  description: >-
    The Integrations API allows you to retrieve, update and add orders to custom
    webshop integrations.
servers:
  - url: https://panel.sendcloud.sc/api/v2
    description: Sendcloud Production
security: []
tags:
  - name: Integrations
  - name: Shipments
paths:
  /integrations/logs:
    get:
      tags:
        - Integrations
      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-v2-orders-get-retrieve_integrations_logs
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  next:
                    type: string
                    format: uri
                    description: >-
                      Cursor based pagination url to go forward. By following
                      this URL you can get a next batch of logs
                  previous:
                    type: string
                    format: uri
                    description: >-
                      Cursor based pagination url to go backwards. By following
                      this URL you can get a previous batch of logs
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/IntegrationLog'
              examples:
                RetrieveIntegrationLogs:
                  summary: Retrieve a list of integration logs
                  value:
                    next: https://example.com
                    previous: https://example.com
                    results:
                      - 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
                      - id: 124
                        integration_id: 123
                        user_id: 123
                        base_url: https://example.com
                        full_url: https://example.com/order-note.json
                        method: POST
                        response_code: 404
                        response: {}
                        request:
                          headers:
                            Cache-Control: max-age=3600
                            Content-Type: text/html; charset=utf-8
                            Connection: keep-alive
                          payload: {}
                        created_at: '2023-03-01T02:02:00+01:00'
                        exception: PageNotFound
                        protected: false
      security:
        - HTTPBasicAuth: []
        - OAuth2ClientCreds: []
components:
  schemas:
    IntegrationLog:
      type:
        - object
      title: Integration Log Object
      properties:
        id:
          type:
            - integer
          title: ID
          description: ID of an log record
          minimum: 1
          example: 123
          readOnly: true
        integration_id:
          type:
            - integer
            - 'null'
          description: ID of an integration to which this log belongs
          minimum: 1
          example: 123
          writeOnly: true
        user_id:
          type:
            - integer
          description: ID of a user to which this log belongs
          minimum: 1
          example: 123
          writeOnly: true
        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 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
              examples:
                - headerExample:
                    Cache-Control: max-age=3600
                    Content-Type: text/html; charset=utf-8
                    Connection: keep-alive
              type:
                - object
                - 'null'
            body:
              title: HTTP response body
              description: HTTP response body
              example: |
                <!doctype html>
                <html>
                 <head>
                 <title>SSL Certificate Error</title>
                 </head>
                 </html>
              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'
              examples:
                - headerExample:
                    Cache-Control: max-age=3600
                    Content-Type: text/html; charset=utf-8
                    Connection: keep-alive
            payload:
              title: HTTP request body
              description: HTTP request body
              type:
                - object
                - string
                - 'null'
              examples:
                - order_note:
                    note: Success
        created_at:
          type:
            - string
          format: date-time
          description: >-
            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:
          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
      required:
        - base_url
      description: ''
  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.

````