{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/lightspeed/main/json-schema/lightspeed-request-collection-response-schema.json",
  "title": "Request Logs response",
  "description": "A collection of request log records wrapped in the top-level data object.",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lightspeed-channel-request-log-api-openapi.yml#/components/schemas/RequestCollectionResponse",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/RequestLog"
      },
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "RequestLog": {
      "description": "An object representing a single request and response made to a channel.",
      "properties": {
        "error": {
          "description": "f an error occurred with the request, such as an inability to resolve a hostname, connect or TLS errors, this will be recorded here. Only errors with the ability to make the request are logged here, rather than errors when interpreting a response.",
          "type": [
            "string",
            "null"
          ]
        },
        "grouping_id": {
          "description": "An identifier used to group together requests that occurred together as part of the same job or Lightspeed Retail (X-Series) API request.",
          "type": "string"
        },
        "id": {
          "description": "Auto-generated object ID.",
          "type": "string"
        },
        "occurred_at": {
          "description": "An RFC3339 representation of the time at which the request was logged.",
          "format": "date-time",
          "type": "string"
        },
        "request": {
          "description": "A dump of the full request information in HTTP format, including headers and any request body.",
          "type": "string"
        },
        "request_method": {
          "description": "The HTTP method used to make the request.",
          "enum": [
            "GET",
            "POST",
            "PUT",
            "DELETE"
          ],
          "type": "string"
        },
        "response": {
          "description": "A dump of the full response information in HTTP format, including headers and any response body.",
          "type": "string"
        },
        "status_code": {
          "description": "The HTTP status code received in the response.",
          "type": "number"
        }
      },
      "required": [
        "grouping_id",
        "id",
        "occurred_at",
        "request",
        "request_method",
        "response"
      ],
      "title": "Request Log",
      "type": "object"
    }
  }
}