{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/parcelone/json-schema/parcelone-shipment-result-schema.json",
  "title": "ShipmentResult",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/parcelone-shipping-openapi.json#/components/schemas/ShipmentResult",
  "properties": {
    "YourShipmentID": {
      "description": "- MaxLen 20 - your ShipmentID from Request, last time available here for your reference of shipment creation",
      "type": "string"
    },
    "ActionResult": {
      "$ref": "#/$defs/ShipmentActionResult"
    },
    "LabelURL": {
      "description": "- no Maxlimit",
      "type": "string"
    },
    "Charges": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Amount"
      }
    },
    "TotalCharges": {
      "$ref": "#/$defs/Amount"
    },
    "PackageResults": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ShipmentPackageResult"
      }
    },
    "DocumentsResults": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ShipmentDocumentsResult"
      }
    },
    "InternationalDocumentsResults": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ShipmentDocumentsResult"
      }
    },
    "LabelsAvailable": {
      "description": "- If label is available - bool",
      "type": "integer"
    },
    "DocumentsAvailable": {
      "description": "- If document is available - bool",
      "type": "integer"
    },
    "InternationalDocumentsAvailable": {
      "description": "- If international document is available - bool",
      "type": "integer"
    },
    "InternationalDocumentsNeeded": {
      "description": "- If international documents are needed - bool",
      "type": "integer"
    }
  },
  "type": "object",
  "$defs": {
    "Amount": {
      "description": "Amount common format",
      "required": [
        "Currency",
        "Value"
      ],
      "properties": {
        "Currency": {
          "description": "- MaxLen 3 - ISO 4217",
          "type": "string"
        },
        "Value": {
          "description": "- Format 9999999999.99",
          "type": "string"
        },
        "Description": {
          "description": "- no Maxlimit",
          "type": "string"
        }
      },
      "type": "object"
    },
    "Format": {
      "description": "common Format",
      "properties": {
        "Type": {
          "description": "- MaxLen 10 - for printing in most cases: GIF,PDF, ZPL203, ZPL300",
          "type": "string"
        },
        "Size": {
          "description": "- no Maxlimit - for printing of Customs documents: CN22, CN23, in other cases so far no effects on fixed return formats",
          "type": "string"
        },
        "Unit": {
          "description": "- no Maxlimit - for future use",
          "type": "string"
        },
        "Orientation": {
          "description": "- 0=Portrait, 1=Landscape",
          "type": "integer",
          "default": 0,
          "enum": [
            0,
            1
          ]
        },
        "Height": {
          "description": "- Format 9999999999.99 - for future use",
          "type": "string"
        },
        "Width": {
          "description": "- Format 9999999999.99 - for future use",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ShipmentActionResult": {
      "description": "Additional ActionResult for detailed information about shipments or errors",
      "properties": {
        "ShipmentID": {
          "description": "- MaxLen 20",
          "type": "string"
        },
        "ShipmentRef": {
          "description": "- MaxLen 20",
          "type": "string"
        },
        "TrackingID": {
          "description": "- MaxLen 20",
          "type": "string"
        },
        "Success": {
          "description": "- bool",
          "type": "integer"
        },
        "Errors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ShipmentError"
          }
        },
        "Warnings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ShipmentWarning"
          }
        }
      },
      "type": "object"
    },
    "ShipmentDocumentsResult": {
      "properties": {
        "ShipmentID": {
          "description": "- MaxLen 20",
          "type": "string"
        },
        "PackageID": {
          "description": "- MaxLen 20",
          "type": "string"
        },
        "TrackingID": {
          "description": "- MaxLen 20",
          "type": "string"
        },
        "DocType": {
          "description": "- MaxLen 25",
          "type": "string"
        },
        "Format": {
          "$ref": "#/$defs/Format"
        },
        "Document": {
          "description": "- no Maxlimit",
          "type": "string"
        },
        "Charges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Amount"
          }
        },
        "PackageRef": {
          "description": "- MaxLen 20",
          "type": "string"
        },
        "PackageTrackingID": {
          "description": "- MaxLen 20",
          "type": "string"
        },
        "ActionResult": {
          "$ref": "#/$defs/ShipmentActionResult"
        },
        "DocumentID": {
          "description": "- MaxLen 50",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ShipmentError": {
      "properties": {
        "ErrorNo": {
          "description": "- MaxLen 4",
          "type": "string"
        },
        "Message": {
          "description": "- no Maxlimit",
          "type": "string"
        },
        "StatusCode": {
          "description": "- MaxLen 20",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ShipmentPackageResult": {
      "properties": {
        "ShipmentID": {
          "description": "- MaxLen 20",
          "type": "string"
        },
        "PackageID": {
          "description": "- MaxLen 20 - sequential package count will be returned in response, for Parcel.One will always be 1",
          "type": "string"
        },
        "PackageRef": {
          "description": "- MaxLen 20 - package reference from request, exception Parcel.One with reserving LastMileCarrierTracknumber at shipping - in this case PackageRef will return the last mile carrier and PackageTrackingID returns the LMC Trackingnumber.",
          "type": "string"
        },
        "TrackingID": {
          "description": "- MaxLen 20 - Package Tracking Number, exception Parcel.One with reserving LastMileCarrierTracknumber at shipping - in this case PackageRef will return the last mile carrier and PackageTrackingID returns the LMC Trackingnumber.",
          "type": "string"
        },
        "DocType": {
          "description": "- MaxLen 25",
          "type": "string"
        },
        "Format": {
          "$ref": "#/$defs/Format"
        },
        "Label": {
          "description": "- no Maxlimit",
          "type": "string"
        },
        "TrackingURL": {
          "description": "- no Maxlimit",
          "type": "string"
        },
        "CarrierTrackURL": {
          "description": "- LastMileCarrierTrackingLink at shipping if available",
          "type": "string"
        },
        "Charges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Amount"
          }
        }
      },
      "type": "object"
    },
    "ShipmentWarning": {
      "properties": {
        "WarningNo": {
          "description": "- MaxLen 4",
          "type": "string"
        },
        "Message": {
          "description": "- no Maxlimit",
          "type": "string"
        },
        "StatusCode": {
          "description": "- MaxLen 20",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}