> ## 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 exception logs for a specific integration

> Retrieve exception logs for a specific integration. 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/{id}/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/{id}/logs:
    parameters:
      - schema:
          type: integer
        name: id
        in: path
        required: true
        description: The id of the integration
    get:
      tags:
        - Exception logs
      summary: Retrieve exception logs for a specific integration
      description: >-
        Retrieve exception logs for a specific integration. These logs are
        created when integrations have problems making API requests to shop
        systems.
      operationId: sc-public-v3-integrations-get-retrieve_integration_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/{id}/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: ''
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors'
              examples:
                IntegrationDoesNotExist:
                  summary: Integration does not exist
                  value:
                    errors:
                      - status: 404
                        code: not_found
                        title: Not Found
                        detail: >-
                          The Integration could not be found with the search
                          criteria given
      security:
        - HTTPBasicAuth: []
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
    errors:
      title: Errors
      type: object
      description: A standardized format for errors in JSON:API responses.
      properties:
        errors:
          type:
            - array
            - object
          items:
            type: object
            allOf:
              - $ref: '#/components/schemas/ErrorObject'
            required:
              - status
              - code
              - detail
    ErrorObject:
      title: Error
      type: object
      description: Error in a JSON:API error format
      properties:
        id:
          type: string
          description: A unique identifier for the error.
        links:
          type: object
          description: >-
            A set of hyperlinks that provide additional information about the
            error.
          properties:
            about:
              type: string
              description: A URL that provides additional information about the error.
        status:
          type: string
          format: int32
          description: The HTTP status code of the error.
          minLength: 1
        code:
          type: string
          description: A unique error code for the error, in snake case format.
          minLength: 1
          enum:
            - unknown_field
            - invalid
            - forbidden
            - invalid_choice
            - min_value
            - 'null'
            - not_found
            - required
            - not_a_list
            - non_field_errors
            - authentication_failed
            - validation_error
            - parcel_announcement_error
        title:
          type: string
          description: A short, human-readable summary of the error.
          minLength: 1
        detail:
          type: string
          description: A human-readable explanation of the error.
          minLength: 1
        source:
          type: object
          description: >-
            An object that identifies the source of the error within the request
            payload.
          properties:
            pointer:
              type: string
              description: >-
                A `JSON` pointer to the location of the error within the request
                payload.
            parameter:
              type: string
              description: The name of the `query` parameter that caused the error.
            header:
              type: string
              description: The name of the `header` parameter that caused the error.
        meta:
          type: object
          description: Additional metadata about the error.
  securitySchemes:
    HTTPBasicAuth:
      type: http
      description: >-
        Basic Authentication using API key and secrets is currently the main
        authentication mechanism.
      scheme: basic

````