{
  "$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": ["awaits_pickup_by_receiver", "canceled", "delayed", "delivered", "destroyed", "exception", "not_delivered", "notification", "out_for_delivery", "picked_up", "registered", "transit", "unknown"],
      "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": ["angel_de", "cargo_international", "dhl", "dhl_express", "dpag", "dpd", "gls", "go", "hermes", "iloxx", "parcel_one", "ups"],
      "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": ["awaits_pickup_by_receiver", "canceled", "delayed", "delivered", "destroyed", "exception", "not_delivered", "notification", "out_for_delivery", "picked_up", "transit", "unknown"],
            "description": "Key describing the status. The initial status is 'registered'"
          },
          "details": {
            "type": "string",
            "description": "message the carrier sends to describe the shipments status"
          }
        },
        "required": ["timestamp", "location", "status", "details"],
        "additionalProperties": false
      }
    },
    "metadata": {
      "type": "object",
      "description": "additional data associated with the shipment"
    }
  },
  "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