{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://smklog.com/developers/schemas/tracking-result.schema.json",
  "title": "TrackingResult",
  "type": "object",
  "description": "Tracking for one shipment whose label was bought on smklog.com: the latest status and up to eight scan events, newest first. Never carries names, addresses, emails or order ids.",
  "required": [
    "tracking",
    "events"
  ],
  "properties": {
    "tracking": {
      "type": "object",
      "required": [
        "tracking_code",
        "status"
      ],
      "properties": {
        "tracking_code": {
          "type": "string",
          "description": "The tracking number"
        },
        "carrier": {
          "type": "string",
          "description": "USPS, UPS, FedEx or DHL"
        },
        "status": {
          "type": "string",
          "description": "Machine status: pre_transit, in_transit, out_for_delivery, available_for_pickup, delivered, return_to_sender, cancelled, failure or unknown"
        },
        "status_label": {
          "type": "string",
          "description": "The status in words"
        },
        "status_detail": {
          "type": "string",
          "description": "The carrier detail of the latest status, empty when none was given"
        },
        "last_event_at": {
          "type": "string",
          "description": "When the latest scan happened (ISO 8601), empty before the first scan"
        },
        "estimated_delivery": {
          "type": "string",
          "description": "Estimated delivery date when the carrier gives one, empty otherwise"
        },
        "delivered_at": {
          "type": "string",
          "description": "When the shipment was delivered, empty until then"
        },
        "updated_at": {
          "type": "string",
          "description": "When SMKlog last refreshed this record"
        }
      }
    },
    "events": {
      "type": "array",
      "maxItems": 8,
      "description": "Scan events, newest first; empty before the carrier first scans the package",
      "items": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Machine status of this scan, empty when the carrier gave none"
          },
          "status_label": {
            "type": "string",
            "description": "The status in words"
          },
          "message": {
            "type": "string",
            "description": "The carrier scan message"
          },
          "datetime": {
            "type": "string",
            "description": "When the scan happened, as the carrier stamps it"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          }
        }
      }
    },
    "message": {
      "type": "string",
      "description": "A sentence about the status for the human"
    }
  },
  "x-provenance": {
    "method": "published",
    "publisher": "SMKlog (SMKLOG-2022 LLC)",
    "source": "https://quote-api.smklog.com/openapi.json",
    "published": "2026-11-26"
  }
}
