{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "the tracker id that can be used for requesting info about a tracker"
    },
    "carrier_tracking_no": {
      "type": "string",
      "description": "tracking number (provided by the carrier) for this shipment"
    },
    "status": {
      "type": "string",
      "enum": ["registered", "label_created", "picked_up", "delivered", "not_delivered", "transit", "exception", "out_for_delivery", "destroyed", "unknown", "canceled"],
      "description": "key describing the current status"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "timestamp the tracker was created"
    },
    "from": {
      "$ref": "#/definitions/address",
      "description": "the senders address"
    },
    "tracking_status_updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "timestamp the tracking status was last updated"
    },
    "last_polling_at": {
      "type": "string",
      "format": "date-time",
      "description": "timestamp the shipment status was last polled at the carrier"
    },
    "next_polling_at": {
      "type": "string",
      "format": "date-time",
      "description": "timestamp the shipment status will be polled the next time"
    },
    "shipment_id": {
      "type": "string",
      "description": "id of the corresponding shipment within shipcloud"
    },
    "carrier": {
      "type": "string",
      "enum": ["dhl", "dhl_express", "dpag", "ups", "dpd", "hermes", "gls", "iloxx", "tnt", "fedex", "go", "parcel_one", "cargo_international"],
      "description": "acronym of the carrier the shipment was sent with"
    },
    "to": {
      "$ref": "#/definitions/address",
      "description": "the receivers address"
    },
    "tracking_events": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "timestamp of when this event occured"
          },
          "location": {
            "type": "string",
            "description": "location of the package at this moment"
          },
          "status": {
            "type": "string",
            "enum": ["registered", "label_created", "picked_up", "delivered", "not_delivered", "transit", "exception", "out_for_delivery", "destroyed", "unknown", "canceled"],
            "description": "key describing the status"
          },
          "details": {
            "type": "string",
            "description": "message the carrier sends to describe the shipments status"
          }
        },
        "required": ["timestamp", "location", "status", "details"],
        "additionalProperties": false
      }
    }
  },
  "required": ["id", "carrier_tracking_no", "status", "created_at", "tracking_status_updated_at", "last_polling_at", "next_polling_at", "shipment_id", "carrier"],
  "additionalProperties": false,
  "definitions": {
    "address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "identifier of a previously created address"
        },
        "company": { "type": "string" },
        "first_name": { "type": "string" },
        "last_name": { "type": "string" },
        "care_of": { "type": "string" },
        "street": { "type": "string" },
        "street_no": { "type": "string" },
        "city": { "type": "string" },
        "zip_code": { "type": "string" },
        "state": { "type": "string" },
        "country": { "type": "string", "description": "Country as uppercase ISO 3166-1 alpha-2 code" },
        "phone": {
          "type": "string",
          "description": "telephone number"
        }
      },
      "required": ["last_name", "street", "street_no", "city", "zip_code", "country"],
      "additionalProperties": false
    }
  }
}

download