From 568da80f727c1302afd77091c6f6483b6fb1fc37 Mon Sep 17 00:00:00 2001 From: Nirmal N R Date: Fri, 12 Jun 2026 11:49:20 +0530 Subject: [PATCH 1/3] fix: sync updated schema folders from the main schemas repo --- schema/Alert/README.md | 19 +- schema/Alert/v2.0/README.md | 28 + schema/Alert/v2.0/attributes.yaml | 106 +- schema/Alert/v2.0/context.jsonld | 18 + schema/Alert/v2.0/schema.json | 37 + schema/Alert/v2.0/vocab.jsonld | 68 + schema/CancellationPolicy/README.md | 11 +- schema/CancellationPolicy/v2.0/README.md | 23 + .../CancellationPolicy/v2.0/attributes.yaml | 72 +- schema/CancellationPolicy/v2.0/context.jsonld | 13 + schema/CancellationPolicy/v2.0/schema.json | 13 + schema/CancellationPolicy/v2.0/vocab.jsonld | 33 + schema/Carrier/README.md | 14 +- schema/Carrier/v2.0/README.md | 36 + .../Carrier/v2.0/attributes.jsonschema.yaml | 107 - schema/Carrier/v2.0/attributes.yaml | 17 +- schema/Carrier/v2.0/context.jsonld | 29 + schema/Carrier/v2.0/schema.json | 114 + schema/Carrier/v2.0/vocab.jsonld | 38 + schema/Consignment/README.md | 14 +- schema/Consignment/v2.0/README.md | 35 + .../v2.0/attributes.jsonschema.yaml | 95 - schema/Consignment/v2.0/attributes.yaml | 20 +- schema/Consignment/v2.0/context.jsonld | 27 + schema/Consignment/v2.0/schema.json | 99 + schema/Consignment/v2.0/vocab.jsonld | 36 + schema/Contact/README.md | 14 +- schema/Contact/v2.0/README.md | 27 + .../Contact/v2.0/attributes.jsonschema.yaml | 43 - schema/Contact/v2.0/attributes.yaml | 15 +- schema/Contact/v2.0/context.jsonld | 17 + schema/Contact/v2.0/schema.json | 34 + schema/Contact/v2.0/vocab.jsonld | 26 + schema/Courier/README.md | 14 +- schema/Courier/v2.0/README.md | 34 + .../Courier/v2.0/attributes.jsonschema.yaml | 96 - schema/Courier/v2.0/attributes.yaml | 17 +- schema/Courier/v2.0/context.jsonld | 24 + schema/Courier/v2.0/schema.json | 94 + schema/Courier/v2.0/vocab.jsonld | 33 + schema/DeliverySlot/README.md | 14 +- schema/DeliverySlot/v2.0/README.md | 31 + .../v2.0/attributes.jsonschema.yaml | 84 - schema/DeliverySlot/v2.0/attributes.yaml | 19 +- schema/DeliverySlot/v2.0/context.jsonld | 23 + schema/DeliverySlot/v2.0/schema.json | 81 + schema/DeliverySlot/v2.0/vocab.jsonld | 32 + schema/Driver/README.md | 25 +- schema/Driver/v2.0/README.md | 29 + schema/Driver/v2.0/attributes.yaml | 113 +- schema/Driver/v2.0/context.jsonld | 14 + schema/Driver/v2.0/schema.json | 47 + schema/Driver/v2.0/vocab.jsonld | 187 ++ schema/Fare/README.md | 14 +- schema/Fare/v2.0/README.md | 31 + schema/Fare/v2.0/attributes.yaml | 101 +- schema/Fare/v2.0/context.jsonld | 16 + schema/Fare/v2.0/schema.json | 56 + schema/Fare/v2.0/vocab.jsonld | 234 ++ schema/FareBreakup/README.md | 11 +- schema/FareBreakup/v2.0/README.md | 29 + schema/FareBreakup/v2.0/attributes.yaml | 74 +- schema/FareBreakup/v2.0/context.jsonld | 14 + schema/FareBreakup/v2.0/schema.json | 47 + schema/FareBreakup/v2.0/vocab.jsonld | 190 ++ schema/Hub/README.md | 14 +- schema/Hub/v2.0/README.md | 33 + schema/Hub/v2.0/attributes.jsonschema.yaml | 103 - schema/Hub/v2.0/attributes.yaml | 19 +- schema/Hub/v2.0/context.jsonld | 28 + schema/Hub/v2.0/schema.json | 109 + schema/Hub/v2.0/vocab.jsonld | 37 + schema/Logistics/README.md | 14 +- schema/Logistics/v2.0/README.md | 36 + .../Logistics/v2.0/attributes.jsonschema.yaml | 1879 ------------- schema/Logistics/v2.0/attributes.yaml | 108 +- schema/Logistics/v2.0/context.jsonld | 291 +- schema/Logistics/v2.0/schema.json | 2422 +++++++++++++++++ schema/Logistics/v2.0/vocab.jsonld | 271 +- schema/LogisticsAlert/README.md | 14 +- schema/LogisticsAlert/v2.0/README.md | 34 + .../v2.0/attributes.jsonschema.yaml | 104 - schema/LogisticsAlert/v2.0/attributes.yaml | 23 +- schema/LogisticsAlert/v2.0/context.jsonld | 24 + schema/LogisticsAlert/v2.0/schema.json | 106 + schema/LogisticsAlert/v2.0/vocab.jsonld | 33 + schema/LogisticsCancellationPolicy/README.md | 14 +- .../v2.0/README.md | 27 + .../v2.0/attributes.jsonschema.yaml | 79 - .../v2.0/attributes.yaml | 20 +- .../v2.0/context.jsonld | 23 + .../v2.0/schema.json | 84 + .../v2.0/vocab.jsonld | 32 + schema/LogisticsDriver/README.md | 14 +- schema/LogisticsDriver/v2.0/README.md | 36 + .../v2.0/attributes.jsonschema.yaml | 109 - schema/LogisticsDriver/v2.0/attributes.yaml | 26 +- schema/LogisticsDriver/v2.0/context.jsonld | 29 + schema/LogisticsDriver/v2.0/schema.json | 115 + schema/LogisticsDriver/v2.0/vocab.jsonld | 38 + schema/LogisticsFare/README.md | 14 +- schema/LogisticsFare/v2.0/README.md | 34 + .../v2.0/attributes.jsonschema.yaml | 81 - schema/LogisticsFare/v2.0/attributes.yaml | 18 +- schema/LogisticsFare/v2.0/context.jsonld | 21 + schema/LogisticsFare/v2.0/schema.json | 111 + schema/LogisticsFare/v2.0/vocab.jsonld | 108 + schema/LogisticsFareBreakup/README.md | 14 +- schema/LogisticsFareBreakup/v2.0/README.md | 27 + .../v2.0/attributes.jsonschema.yaml | 66 - .../LogisticsFareBreakup/v2.0/attributes.yaml | 15 +- .../LogisticsFareBreakup/v2.0/context.jsonld | 16 + schema/LogisticsFareBreakup/v2.0/schema.json | 94 + schema/LogisticsFareBreakup/v2.0/vocab.jsonld | 73 + schema/LogisticsFeedback/README.md | 14 +- schema/LogisticsFeedback/v2.0/README.md | 30 + .../v2.0/attributes.jsonschema.yaml | 58 - schema/LogisticsFeedback/v2.0/attributes.yaml | 25 +- schema/LogisticsFeedback/v2.0/context.jsonld | 20 + schema/LogisticsFeedback/v2.0/schema.json | 54 + schema/LogisticsFeedback/v2.0/vocab.jsonld | 29 + schema/LogisticsOperator/README.md | 14 +- schema/LogisticsOperator/v2.0/README.md | 34 + .../v2.0/attributes.jsonschema.yaml | 82 - schema/LogisticsOperator/v2.0/attributes.yaml | 23 +- schema/LogisticsOperator/v2.0/context.jsonld | 26 + schema/LogisticsOperator/v2.0/schema.json | 88 + schema/LogisticsOperator/v2.0/vocab.jsonld | 35 + schema/LogisticsPlace/README.md | 14 +- schema/LogisticsPlace/v2.0/README.md | 29 + .../v2.0/attributes.jsonschema.yaml | 91 - schema/LogisticsPlace/v2.0/attributes.yaml | 24 +- schema/LogisticsPlace/v2.0/context.jsonld | 28 + schema/LogisticsPlace/v2.0/schema.json | 93 + schema/LogisticsPlace/v2.0/vocab.jsonld | 37 + schema/LogisticsRating/README.md | 14 +- schema/LogisticsRating/v2.0/README.md | 28 + .../v2.0/attributes.jsonschema.yaml | 73 - schema/LogisticsRating/v2.0/attributes.yaml | 23 +- schema/LogisticsRating/v2.0/context.jsonld | 22 + schema/LogisticsRating/v2.0/schema.json | 71 + schema/LogisticsRating/v2.0/vocab.jsonld | 31 + schema/LogisticsReceipt/README.md | 14 +- schema/LogisticsReceipt/v2.0/README.md | 34 + .../v2.0/attributes.jsonschema.yaml | 69 - schema/LogisticsReceipt/v2.0/attributes.yaml | 25 +- schema/LogisticsReceipt/v2.0/context.jsonld | 24 + schema/LogisticsReceipt/v2.0/schema.json | 69 + schema/LogisticsReceipt/v2.0/vocab.jsonld | 33 + schema/LogisticsRoute/README.md | 14 +- schema/LogisticsRoute/v2.0/README.md | 33 + .../v2.0/attributes.jsonschema.yaml | 116 - schema/LogisticsRoute/v2.0/attributes.yaml | 23 +- schema/LogisticsRoute/v2.0/context.jsonld | 27 + schema/LogisticsRoute/v2.0/schema.json | 129 + schema/LogisticsRoute/v2.0/vocab.jsonld | 36 + schema/LogisticsSupportCase/README.md | 14 +- schema/LogisticsSupportCase/v2.0/README.md | 34 + .../v2.0/attributes.jsonschema.yaml | 98 - .../LogisticsSupportCase/v2.0/attributes.yaml | 23 +- .../LogisticsSupportCase/v2.0/context.jsonld | 26 + schema/LogisticsSupportCase/v2.0/schema.json | 104 + schema/LogisticsSupportCase/v2.0/vocab.jsonld | 35 + schema/LogisticsVehicle/README.md | 14 +- schema/LogisticsVehicle/v2.0/README.md | 38 + .../v2.0/attributes.jsonschema.yaml | 149 - schema/LogisticsVehicle/v2.0/attributes.yaml | 24 +- schema/LogisticsVehicle/v2.0/context.jsonld | 35 + schema/LogisticsVehicle/v2.0/schema.json | 165 ++ schema/LogisticsVehicle/v2.0/vocab.jsonld | 44 + schema/Operator/README.md | 17 +- schema/Operator/v2.0/README.md | 33 + schema/Operator/v2.0/attributes.yaml | 101 +- schema/Operator/v2.0/context.jsonld | 18 + schema/Operator/v2.0/schema.json | 65 + schema/Operator/v2.0/vocab.jsonld | 262 ++ schema/Package/README.md | 14 +- schema/Package/v2.0/README.md | 33 + .../Package/v2.0/attributes.jsonschema.yaml | 132 - schema/Package/v2.0/attributes.yaml | 16 +- schema/Package/v2.0/context.jsonld | 33 + schema/Package/v2.0/schema.json | 147 + schema/Package/v2.0/vocab.jsonld | 42 + schema/Place/README.md | 10 - schema/Place/v2.0/attributes.yaml | 83 - schema/Proof/README.md | 14 +- schema/Proof/v2.0/README.md | 33 + schema/Proof/v2.0/attributes.jsonschema.yaml | 91 - schema/Proof/v2.0/attributes.yaml | 16 +- schema/Proof/v2.0/context.jsonld | 25 + schema/Proof/v2.0/schema.json | 91 + schema/Proof/v2.0/vocab.jsonld | 34 + schema/Rating/README.md | 12 +- schema/Rating/v2.0/README.md | 24 + schema/Rating/v2.0/attributes.yaml | 79 +- schema/Rating/v2.0/context.jsonld | 15 + schema/Rating/v2.0/schema.json | 34 + schema/Rating/v2.0/vocab.jsonld | 37 + schema/Rating/v2.1/README.md | 26 + schema/Rating/v2.1/attributes.yaml | 41 + schema/Rating/v2.1/context.jsonld | 16 + schema/Rating/v2.1/schema.json | 38 + schema/Rating/v2.1/vocab.jsonld | 54 + schema/ReturnPolicy/README.md | 14 +- schema/ReturnPolicy/v2.0/README.md | 28 + .../v2.0/attributes.jsonschema.yaml | 73 - schema/ReturnPolicy/v2.0/attributes.yaml | 16 +- schema/ReturnPolicy/v2.0/context.jsonld | 22 + schema/ReturnPolicy/v2.0/schema.json | 76 + schema/ReturnPolicy/v2.0/vocab.jsonld | 31 + schema/Route/README.md | 15 +- schema/Route/v2.0/README.md | 33 + schema/Route/v2.0/attributes.yaml | 133 +- schema/Route/v2.0/context.jsonld | 18 + schema/Route/v2.0/schema.json | 65 + schema/Route/v2.0/vocab.jsonld | 276 ++ schema/Shipment/README.md | 14 +- schema/Shipment/v2.0/README.md | 46 + .../Shipment/v2.0/attributes.jsonschema.yaml | 130 - schema/Shipment/v2.0/attributes.yaml | 29 +- schema/Shipment/v2.0/context.jsonld | 36 + schema/Shipment/v2.0/schema.json | 142 + schema/Shipment/v2.0/vocab.jsonld | 45 + schema/SupportCase/README.md | 14 +- schema/SupportCase/v2.0/README.md | 38 + schema/SupportCase/v2.0/attributes.yaml | 124 +- schema/SupportCase/v2.0/context.jsonld | 24 + schema/SupportCase/v2.0/schema.json | 122 + schema/SupportCase/v2.0/vocab.jsonld | 129 + schema/TrackingUpdate/README.md | 14 +- schema/TrackingUpdate/v2.0/README.md | 33 + .../v2.0/attributes.jsonschema.yaml | 102 - schema/TrackingUpdate/v2.0/attributes.yaml | 23 +- schema/TrackingUpdate/v2.0/context.jsonld | 28 + schema/TrackingUpdate/v2.0/schema.json | 106 + schema/TrackingUpdate/v2.0/vocab.jsonld | 37 + schema/Vehicle/README.md | 26 +- schema/Vehicle/v2.0/README.md | 34 + schema/Vehicle/v2.0/attributes.yaml | 155 +- schema/Vehicle/v2.0/context.jsonld | 19 + schema/Vehicle/v2.0/schema.json | 68 + schema/Vehicle/v2.0/vocab.jsonld | 294 ++ schema/Waypoint/README.md | 14 +- schema/Waypoint/v2.0/README.md | 33 + .../Waypoint/v2.0/attributes.jsonschema.yaml | 80 - schema/Waypoint/v2.0/attributes.yaml | 17 +- schema/Waypoint/v2.0/context.jsonld | 23 + schema/Waypoint/v2.0/schema.json | 76 + schema/Waypoint/v2.0/vocab.jsonld | 32 + 249 files changed, 11622 insertions(+), 5696 deletions(-) create mode 100644 schema/Alert/v2.0/README.md create mode 100644 schema/Alert/v2.0/context.jsonld create mode 100644 schema/Alert/v2.0/schema.json create mode 100644 schema/Alert/v2.0/vocab.jsonld create mode 100644 schema/CancellationPolicy/v2.0/README.md create mode 100644 schema/CancellationPolicy/v2.0/context.jsonld create mode 100644 schema/CancellationPolicy/v2.0/schema.json create mode 100644 schema/CancellationPolicy/v2.0/vocab.jsonld create mode 100644 schema/Carrier/v2.0/README.md delete mode 100644 schema/Carrier/v2.0/attributes.jsonschema.yaml create mode 100644 schema/Carrier/v2.0/context.jsonld create mode 100644 schema/Carrier/v2.0/schema.json create mode 100644 schema/Carrier/v2.0/vocab.jsonld create mode 100644 schema/Consignment/v2.0/README.md delete mode 100644 schema/Consignment/v2.0/attributes.jsonschema.yaml create mode 100644 schema/Consignment/v2.0/context.jsonld create mode 100644 schema/Consignment/v2.0/schema.json create mode 100644 schema/Consignment/v2.0/vocab.jsonld create mode 100644 schema/Contact/v2.0/README.md delete mode 100644 schema/Contact/v2.0/attributes.jsonschema.yaml create mode 100644 schema/Contact/v2.0/context.jsonld create mode 100644 schema/Contact/v2.0/schema.json create mode 100644 schema/Contact/v2.0/vocab.jsonld create mode 100644 schema/Courier/v2.0/README.md delete mode 100644 schema/Courier/v2.0/attributes.jsonschema.yaml create mode 100644 schema/Courier/v2.0/context.jsonld create mode 100644 schema/Courier/v2.0/schema.json create mode 100644 schema/Courier/v2.0/vocab.jsonld create mode 100644 schema/DeliverySlot/v2.0/README.md delete mode 100644 schema/DeliverySlot/v2.0/attributes.jsonschema.yaml create mode 100644 schema/DeliverySlot/v2.0/context.jsonld create mode 100644 schema/DeliverySlot/v2.0/schema.json create mode 100644 schema/DeliverySlot/v2.0/vocab.jsonld create mode 100644 schema/Driver/v2.0/README.md create mode 100644 schema/Driver/v2.0/context.jsonld create mode 100644 schema/Driver/v2.0/schema.json create mode 100644 schema/Driver/v2.0/vocab.jsonld create mode 100644 schema/Fare/v2.0/README.md create mode 100644 schema/Fare/v2.0/context.jsonld create mode 100644 schema/Fare/v2.0/schema.json create mode 100644 schema/Fare/v2.0/vocab.jsonld create mode 100644 schema/FareBreakup/v2.0/README.md create mode 100644 schema/FareBreakup/v2.0/context.jsonld create mode 100644 schema/FareBreakup/v2.0/schema.json create mode 100644 schema/FareBreakup/v2.0/vocab.jsonld create mode 100644 schema/Hub/v2.0/README.md delete mode 100644 schema/Hub/v2.0/attributes.jsonschema.yaml create mode 100644 schema/Hub/v2.0/context.jsonld create mode 100644 schema/Hub/v2.0/schema.json create mode 100644 schema/Hub/v2.0/vocab.jsonld create mode 100644 schema/Logistics/v2.0/README.md delete mode 100644 schema/Logistics/v2.0/attributes.jsonschema.yaml create mode 100644 schema/Logistics/v2.0/schema.json create mode 100644 schema/LogisticsAlert/v2.0/README.md delete mode 100644 schema/LogisticsAlert/v2.0/attributes.jsonschema.yaml create mode 100644 schema/LogisticsAlert/v2.0/context.jsonld create mode 100644 schema/LogisticsAlert/v2.0/schema.json create mode 100644 schema/LogisticsAlert/v2.0/vocab.jsonld create mode 100644 schema/LogisticsCancellationPolicy/v2.0/README.md delete mode 100644 schema/LogisticsCancellationPolicy/v2.0/attributes.jsonschema.yaml create mode 100644 schema/LogisticsCancellationPolicy/v2.0/context.jsonld create mode 100644 schema/LogisticsCancellationPolicy/v2.0/schema.json create mode 100644 schema/LogisticsCancellationPolicy/v2.0/vocab.jsonld create mode 100644 schema/LogisticsDriver/v2.0/README.md delete mode 100644 schema/LogisticsDriver/v2.0/attributes.jsonschema.yaml create mode 100644 schema/LogisticsDriver/v2.0/context.jsonld create mode 100644 schema/LogisticsDriver/v2.0/schema.json create mode 100644 schema/LogisticsDriver/v2.0/vocab.jsonld create mode 100644 schema/LogisticsFare/v2.0/README.md delete mode 100644 schema/LogisticsFare/v2.0/attributes.jsonschema.yaml create mode 100644 schema/LogisticsFare/v2.0/context.jsonld create mode 100644 schema/LogisticsFare/v2.0/schema.json create mode 100644 schema/LogisticsFare/v2.0/vocab.jsonld create mode 100644 schema/LogisticsFareBreakup/v2.0/README.md delete mode 100644 schema/LogisticsFareBreakup/v2.0/attributes.jsonschema.yaml create mode 100644 schema/LogisticsFareBreakup/v2.0/context.jsonld create mode 100644 schema/LogisticsFareBreakup/v2.0/schema.json create mode 100644 schema/LogisticsFareBreakup/v2.0/vocab.jsonld create mode 100644 schema/LogisticsFeedback/v2.0/README.md delete mode 100644 schema/LogisticsFeedback/v2.0/attributes.jsonschema.yaml create mode 100644 schema/LogisticsFeedback/v2.0/context.jsonld create mode 100644 schema/LogisticsFeedback/v2.0/schema.json create mode 100644 schema/LogisticsFeedback/v2.0/vocab.jsonld create mode 100644 schema/LogisticsOperator/v2.0/README.md delete mode 100644 schema/LogisticsOperator/v2.0/attributes.jsonschema.yaml create mode 100644 schema/LogisticsOperator/v2.0/context.jsonld create mode 100644 schema/LogisticsOperator/v2.0/schema.json create mode 100644 schema/LogisticsOperator/v2.0/vocab.jsonld create mode 100644 schema/LogisticsPlace/v2.0/README.md delete mode 100644 schema/LogisticsPlace/v2.0/attributes.jsonschema.yaml create mode 100644 schema/LogisticsPlace/v2.0/context.jsonld create mode 100644 schema/LogisticsPlace/v2.0/schema.json create mode 100644 schema/LogisticsPlace/v2.0/vocab.jsonld create mode 100644 schema/LogisticsRating/v2.0/README.md delete mode 100644 schema/LogisticsRating/v2.0/attributes.jsonschema.yaml create mode 100644 schema/LogisticsRating/v2.0/context.jsonld create mode 100644 schema/LogisticsRating/v2.0/schema.json create mode 100644 schema/LogisticsRating/v2.0/vocab.jsonld create mode 100644 schema/LogisticsReceipt/v2.0/README.md delete mode 100644 schema/LogisticsReceipt/v2.0/attributes.jsonschema.yaml create mode 100644 schema/LogisticsReceipt/v2.0/context.jsonld create mode 100644 schema/LogisticsReceipt/v2.0/schema.json create mode 100644 schema/LogisticsReceipt/v2.0/vocab.jsonld create mode 100644 schema/LogisticsRoute/v2.0/README.md delete mode 100644 schema/LogisticsRoute/v2.0/attributes.jsonschema.yaml create mode 100644 schema/LogisticsRoute/v2.0/context.jsonld create mode 100644 schema/LogisticsRoute/v2.0/schema.json create mode 100644 schema/LogisticsRoute/v2.0/vocab.jsonld create mode 100644 schema/LogisticsSupportCase/v2.0/README.md delete mode 100644 schema/LogisticsSupportCase/v2.0/attributes.jsonschema.yaml create mode 100644 schema/LogisticsSupportCase/v2.0/context.jsonld create mode 100644 schema/LogisticsSupportCase/v2.0/schema.json create mode 100644 schema/LogisticsSupportCase/v2.0/vocab.jsonld create mode 100644 schema/LogisticsVehicle/v2.0/README.md delete mode 100644 schema/LogisticsVehicle/v2.0/attributes.jsonschema.yaml create mode 100644 schema/LogisticsVehicle/v2.0/context.jsonld create mode 100644 schema/LogisticsVehicle/v2.0/schema.json create mode 100644 schema/LogisticsVehicle/v2.0/vocab.jsonld create mode 100644 schema/Operator/v2.0/README.md create mode 100644 schema/Operator/v2.0/context.jsonld create mode 100644 schema/Operator/v2.0/schema.json create mode 100644 schema/Operator/v2.0/vocab.jsonld create mode 100644 schema/Package/v2.0/README.md delete mode 100644 schema/Package/v2.0/attributes.jsonschema.yaml create mode 100644 schema/Package/v2.0/context.jsonld create mode 100644 schema/Package/v2.0/schema.json create mode 100644 schema/Package/v2.0/vocab.jsonld delete mode 100644 schema/Place/README.md delete mode 100644 schema/Place/v2.0/attributes.yaml create mode 100644 schema/Proof/v2.0/README.md delete mode 100644 schema/Proof/v2.0/attributes.jsonschema.yaml create mode 100644 schema/Proof/v2.0/context.jsonld create mode 100644 schema/Proof/v2.0/schema.json create mode 100644 schema/Proof/v2.0/vocab.jsonld create mode 100644 schema/Rating/v2.0/README.md create mode 100644 schema/Rating/v2.0/context.jsonld create mode 100644 schema/Rating/v2.0/schema.json create mode 100644 schema/Rating/v2.0/vocab.jsonld create mode 100644 schema/Rating/v2.1/README.md create mode 100644 schema/Rating/v2.1/attributes.yaml create mode 100644 schema/Rating/v2.1/context.jsonld create mode 100644 schema/Rating/v2.1/schema.json create mode 100644 schema/Rating/v2.1/vocab.jsonld create mode 100644 schema/ReturnPolicy/v2.0/README.md delete mode 100644 schema/ReturnPolicy/v2.0/attributes.jsonschema.yaml create mode 100644 schema/ReturnPolicy/v2.0/context.jsonld create mode 100644 schema/ReturnPolicy/v2.0/schema.json create mode 100644 schema/ReturnPolicy/v2.0/vocab.jsonld create mode 100644 schema/Route/v2.0/README.md create mode 100644 schema/Route/v2.0/context.jsonld create mode 100644 schema/Route/v2.0/schema.json create mode 100644 schema/Route/v2.0/vocab.jsonld create mode 100644 schema/Shipment/v2.0/README.md delete mode 100644 schema/Shipment/v2.0/attributes.jsonschema.yaml create mode 100644 schema/Shipment/v2.0/context.jsonld create mode 100644 schema/Shipment/v2.0/schema.json create mode 100644 schema/Shipment/v2.0/vocab.jsonld create mode 100644 schema/SupportCase/v2.0/README.md create mode 100644 schema/SupportCase/v2.0/context.jsonld create mode 100644 schema/SupportCase/v2.0/schema.json create mode 100644 schema/SupportCase/v2.0/vocab.jsonld create mode 100644 schema/TrackingUpdate/v2.0/README.md delete mode 100644 schema/TrackingUpdate/v2.0/attributes.jsonschema.yaml create mode 100644 schema/TrackingUpdate/v2.0/context.jsonld create mode 100644 schema/TrackingUpdate/v2.0/schema.json create mode 100644 schema/TrackingUpdate/v2.0/vocab.jsonld create mode 100644 schema/Vehicle/v2.0/README.md create mode 100644 schema/Vehicle/v2.0/context.jsonld create mode 100644 schema/Vehicle/v2.0/schema.json create mode 100644 schema/Vehicle/v2.0/vocab.jsonld create mode 100644 schema/Waypoint/v2.0/README.md delete mode 100644 schema/Waypoint/v2.0/attributes.jsonschema.yaml create mode 100644 schema/Waypoint/v2.0/context.jsonld create mode 100644 schema/Waypoint/v2.0/schema.json create mode 100644 schema/Waypoint/v2.0/vocab.jsonld diff --git a/schema/Alert/README.md b/schema/Alert/README.md index ea0fe69..8c1c1dd 100644 --- a/schema/Alert/README.md +++ b/schema/Alert/README.md @@ -1,18 +1,9 @@ # Alert -## Overview -An **Alert** is a notification or exception raised during shipment transit — delays, damage, customs holds, SLA breaches, or failed deliveries. +Schema definition for Alert in the Beckn Protocol v2.0.1 -## IRI -`https://schema.beckn.org/logistics/Alert` +## Versions -## Alert Types -- DELAY: Shipment running late -- DAMAGE: Package damaged in transit -- LOSS: Package lost -- FAILED_DELIVERY: Delivery attempt failed -- SLA_BREACH: Service level agreement breached -- CUSTOMS_HOLD: Interstate/international customs hold - -## Version -Current version: **v2.0** — [v2.0/attributes.yaml](./v2.0/attributes.yaml) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Alert/v2.0/attributes.yaml](https://schema.beckn.io/Alert/v2.0/attributes.yaml) | [https://schema.beckn.io/Alert/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Alert/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Alert/v2.0/context.jsonld](https://schema.beckn.io/Alert/v2.0/context.jsonld) | [https://schema.beckn.io/Alert/v2.0/vocab.jsonld](https://schema.beckn.io/Alert/v2.0/vocab.jsonld) | [https://schema.beckn.io/Alert/v2.0/README.md](https://schema.beckn.io/Alert/v2.0/README.md) | diff --git a/schema/Alert/v2.0/README.md b/schema/Alert/v2.0/README.md new file mode 100644 index 0000000..7ba8e4c --- /dev/null +++ b/schema/Alert/v2.0/README.md @@ -0,0 +1,28 @@ +# Alert — v2.0 + +Schema definition for Alert in the Beckn Protocol v2.0.1 + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Alert/attributes.yaml](https://schema.beckn.io/Alert/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Alert/v2.0/attributes.yaml](https://schema.beckn.io/Alert/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Alert/attributes.jsonschema.yaml](https://schema.beckn.io/Alert/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Alert/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Alert/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Alert/context.jsonld](https://schema.beckn.io/Alert/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Alert/v2.0/context.jsonld](https://schema.beckn.io/Alert/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Alert/vocab.jsonld](https://schema.beckn.io/Alert/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Alert/v2.0/vocab.jsonld](https://schema.beckn.io/Alert/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `@context` | yes | string | - | +| `@type` | yes | string | - | +| `affectedEntities` | no | array | IDs of entities affected (route/order/fulfillment/etc.) | +| `descriptor` | yes | $ref: https://schema.beckn.io/Descriptor/v2.1/attributes.yaml#/components/schemas/Descriptor | - | +| `id` | yes | string | - | +| `severity` | no | string | - | +| `validity` | no | $ref: https://schema.beckn.io/TimePeriod/v2.1/attributes.yaml#/components/schemas/TimePeriod | - | diff --git a/schema/Alert/v2.0/attributes.yaml b/schema/Alert/v2.0/attributes.yaml index df2f2bb..92368d1 100644 --- a/schema/Alert/v2.0/attributes.yaml +++ b/schema/Alert/v2.0/attributes.yaml @@ -1,95 +1,37 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: Alert version: 2.0.0 - description: Schema definition for the Alert entity in the Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for Alert in the Beckn Protocol v2.0.1 license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Alert: - type: object + x-iri: https://schema.beckn.io/Alert/v2.0 + description: Schema definition for Alert in the Beckn Protocol v2.0.1 title: Alert - description: > - An Alert is a notification or warning related to a shipment, such as delays, - exceptions, damage reports, or SLA breaches. Maps to beckn:Event. - required: - - id - - type - - severity - - message - - timestamp + type: object properties: - id: - type: string - example: "ALT-0001" - shipmentId: - type: string - example: "SHP-2024-001234" - type: - type: string - enum: - - DELAY - - DAMAGE - - LOSS - - FAILED_DELIVERY - - CUSTOMS_HOLD - - WEATHER_DISRUPTION - - ROUTE_DEVIATION - - SLA_BREACH - - ADDRESS_ISSUE - - PAYMENT_FAILED - example: "DELAY" - severity: - type: string - enum: - - INFO - - WARNING - - CRITICAL - example: "WARNING" - message: - type: string - example: "Your shipment is delayed by 4 hours due to traffic at NH-44." - cause: - type: string - description: Root cause of the alert - example: "Highway accident causing major traffic backlog" - impactedETA: - type: string - format: date-time - description: Revised ETA due to alert - timestamp: - type: string - format: date-time - resolvedAt: - type: string - format: date-time - status: - type: string - enum: - - OPEN - - ACKNOWLEDGED - - RESOLVED - example: "OPEN" - notificationChannels: + affectedEntities: + description: IDs of entities affected (route/order/fulfillment/etc.) type: array items: type: string - enum: - - SMS - - EMAIL - - PUSH - - WHATSAPP - example: ["SMS", "PUSH"] - actionRequired: - type: boolean - description: Whether customer action is needed - example: false - suggestedAction: + descriptor: + $ref: https://schema.beckn.io/Descriptor/v2.1/attributes.yaml#/components/schemas/Descriptor + id: type: string - example: "Please reschedule delivery for tomorrow." + severity: + type: string + validity: + $ref: https://schema.beckn.io/TimePeriod/v2.1/attributes.yaml#/components/schemas/TimePeriod + required: + - id + - descriptor + additionalProperties: false + x-tags: + - common diff --git a/schema/Alert/v2.0/context.jsonld b/schema/Alert/v2.0/context.jsonld new file mode 100644 index 0000000..a78a7c6 --- /dev/null +++ b/schema/Alert/v2.0/context.jsonld @@ -0,0 +1,18 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "Alert": "beckn:Alert", + "@context": "beckn:@context", + "@type": "beckn:@type", + "affectedEntities": "beckn:affectedEntities", + "descriptor": "beckn:descriptor", + "id": "beckn:id", + "severity": "beckn:severity", + "validity": "beckn:validity" + } +} diff --git a/schema/Alert/v2.0/schema.json b/schema/Alert/v2.0/schema.json new file mode 100644 index 0000000..b1ea786 --- /dev/null +++ b/schema/Alert/v2.0/schema.json @@ -0,0 +1,37 @@ +{ + "$id": "https://schema.beckn.io/Alert/v2.0", + "x-iri": "https://schema.beckn.io/Alert/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Schema definition for Alert in the Beckn Protocol v2.0.1", + "title": "Alert", + "type": "object", + "properties": { + "affectedEntities": { + "description": "IDs of entities affected (route/order/fulfillment/etc.)", + "type": "array", + "items": { + "type": "string" + } + }, + "descriptor": { + "$ref": "https://schema.beckn.io/Descriptor/v2.1/schema.json" + }, + "id": { + "type": "string" + }, + "severity": { + "type": "string" + }, + "validity": { + "$ref": "https://schema.beckn.io/TimePeriod/v2.1/schema.json" + } + }, + "required": [ + "id", + "descriptor" + ], + "additionalProperties": false, + "x-tags": [ + "common" + ] +} diff --git a/schema/Alert/v2.0/vocab.jsonld b/schema/Alert/v2.0/vocab.jsonld new file mode 100644 index 0000000..fe58ced --- /dev/null +++ b/schema/Alert/v2.0/vocab.jsonld @@ -0,0 +1,68 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "Alert": "beckn:Alert", + "@type": "beckn:@type", + "affectedEntities": "beckn:affectedEntities", + "descriptor": "beckn:descriptor", + "id": "beckn:id", + "severity": "beckn:severity", + "validity": "beckn:validity" + }, + "@graph": [ + { + "@id": "beckn:Alert", + "@type": "rdfs:Class", + "rdfs:label": "Alert", + "rdfs:comment": "Schema definition for Alert in the Beckn Protocol v2.0.1" + }, + { + "@id": "beckn:@context", + "@type": "rdf:Property", + "rdfs:label": "@context", + "rdfs:comment": "TODO: Description Needed - @context" + }, + { + "@id": "beckn:@type", + "@type": "rdf:Property", + "rdfs:label": "@type", + "rdfs:comment": "TODO: Description Needed - @type" + }, + { + "@id": "beckn:affectedEntities", + "@type": "rdf:Property", + "rdfs:label": "affected Entities", + "rdfs:comment": "IDs of entities affected (route/order/fulfillment/etc.)" + }, + { + "@id": "beckn:descriptor", + "@type": "rdf:Property", + "rdfs:label": "descriptor", + "rdfs:comment": "TODO: Description Needed - descriptor" + }, + { + "@id": "beckn:id", + "@type": "rdf:Property", + "rdfs:label": "id", + "rdfs:comment": "TODO: Description Needed - id" + }, + { + "@id": "beckn:severity", + "@type": "rdf:Property", + "rdfs:label": "severity", + "rdfs:comment": "TODO: Description Needed - severity" + }, + { + "@id": "beckn:validity", + "@type": "rdf:Property", + "rdfs:label": "validity", + "rdfs:comment": "TODO: Description Needed - validity" + } + ] +} diff --git a/schema/CancellationPolicy/README.md b/schema/CancellationPolicy/README.md index 4c87cc2..1283e37 100644 --- a/schema/CancellationPolicy/README.md +++ b/schema/CancellationPolicy/README.md @@ -1,10 +1,9 @@ # CancellationPolicy -## Overview -**CancellationPolicy** defines the terms and charges for cancelling a shipment booking at various stages of the fulfillment lifecycle. +Schema definition for CancellationPolicy in the Beckn Protocol v2.0.1 -## IRI -`https://schema.beckn.org/logistics/CancellationPolicy` +## Versions -## Version -Current version: **v2.0** — [v2.0/attributes.yaml](./v2.0/attributes.yaml) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/CancellationPolicy/v2.0/attributes.yaml](https://schema.beckn.io/CancellationPolicy/v2.0/attributes.yaml) | [https://schema.beckn.io/CancellationPolicy/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/CancellationPolicy/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/CancellationPolicy/v2.0/context.jsonld](https://schema.beckn.io/CancellationPolicy/v2.0/context.jsonld) | [https://schema.beckn.io/CancellationPolicy/v2.0/vocab.jsonld](https://schema.beckn.io/CancellationPolicy/v2.0/vocab.jsonld) | [https://schema.beckn.io/CancellationPolicy/v2.0/README.md](https://schema.beckn.io/CancellationPolicy/v2.0/README.md) | diff --git a/schema/CancellationPolicy/v2.0/README.md b/schema/CancellationPolicy/v2.0/README.md new file mode 100644 index 0000000..c053d84 --- /dev/null +++ b/schema/CancellationPolicy/v2.0/README.md @@ -0,0 +1,23 @@ +# CancellationPolicy — v2.0 + +Schema definition for CancellationPolicy in the Beckn Protocol v2.0.1 + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/CancellationPolicy/attributes.yaml](https://schema.beckn.io/CancellationPolicy/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/CancellationPolicy/v2.0/attributes.yaml](https://schema.beckn.io/CancellationPolicy/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/CancellationPolicy/attributes.jsonschema.yaml](https://schema.beckn.io/CancellationPolicy/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/CancellationPolicy/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/CancellationPolicy/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/CancellationPolicy/context.jsonld](https://schema.beckn.io/CancellationPolicy/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/CancellationPolicy/v2.0/context.jsonld](https://schema.beckn.io/CancellationPolicy/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/CancellationPolicy/vocab.jsonld](https://schema.beckn.io/CancellationPolicy/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/CancellationPolicy/v2.0/vocab.jsonld](https://schema.beckn.io/CancellationPolicy/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `@context` | no | string | CPD | +| `@type` | no | string | - | diff --git a/schema/CancellationPolicy/v2.0/attributes.yaml b/schema/CancellationPolicy/v2.0/attributes.yaml index 2cacfd0..c657985 100644 --- a/schema/CancellationPolicy/v2.0/attributes.yaml +++ b/schema/CancellationPolicy/v2.0/attributes.yaml @@ -1,66 +1,22 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: CancellationPolicy version: 2.0.0 - description: Schema for CancellationPolicy in Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for CancellationPolicy in the Beckn Protocol v2.0.1 license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: CancellationPolicy: - type: object + x-iri: https://schema.beckn.io/CancellationPolicy/v2.0 + description: Schema definition for CancellationPolicy in the Beckn Protocol + v2.0.1 title: CancellationPolicy - description: Defines terms under which a shipment booking can be cancelled. - properties: - id: - type: string - example: "CP-EXPRESS-001" - cancellableUntil: - type: string - description: Cancellation allowed until this lifecycle stage - enum: - - BEFORE_PICKUP - - BEFORE_DISPATCH - - ANYTIME - - NON_CANCELLABLE - example: "BEFORE_PICKUP" - cancellationFee: - type: object - properties: - type: - type: string - enum: [FLAT, PERCENTAGE, NIL] - example: "FLAT" - value: - type: number - example: 50 - currency: - type: string - example: "INR" - refundPolicy: - type: object - properties: - refundable: - type: boolean - example: true - refundPercentage: - type: number - example: 100 - processingDays: - type: integer - example: 5 - conditions: - type: array - items: - type: string - example: ["Full refund if cancelled before pickup", "50% refund if cancelled after pickup"] - applicableServiceTypes: - type: array - items: - type: string - example: ["EXPRESS", "COURIER"] + x-tags: + - common + type: object + properties: {} + additionalProperties: false diff --git a/schema/CancellationPolicy/v2.0/context.jsonld b/schema/CancellationPolicy/v2.0/context.jsonld new file mode 100644 index 0000000..481a235 --- /dev/null +++ b/schema/CancellationPolicy/v2.0/context.jsonld @@ -0,0 +1,13 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "CancellationPolicy": "beckn:CancellationPolicy", + "@context": "beckn:@context", + "@type": "beckn:@type" + } +} diff --git a/schema/CancellationPolicy/v2.0/schema.json b/schema/CancellationPolicy/v2.0/schema.json new file mode 100644 index 0000000..3f3831c --- /dev/null +++ b/schema/CancellationPolicy/v2.0/schema.json @@ -0,0 +1,13 @@ +{ + "$id": "https://schema.beckn.io/CancellationPolicy/v2.0", + "x-iri": "https://schema.beckn.io/CancellationPolicy/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Schema definition for CancellationPolicy in the Beckn Protocol v2.0.1", + "title": "CancellationPolicy", + "x-tags": [ + "common" + ], + "type": "object", + "properties": {}, + "additionalProperties": false +} diff --git a/schema/CancellationPolicy/v2.0/vocab.jsonld b/schema/CancellationPolicy/v2.0/vocab.jsonld new file mode 100644 index 0000000..2936e74 --- /dev/null +++ b/schema/CancellationPolicy/v2.0/vocab.jsonld @@ -0,0 +1,33 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "CancellationPolicy": "beckn:CancellationPolicy", + "@type": "beckn:@type" + }, + "@graph": [ + { + "@id": "beckn:CancellationPolicy", + "@type": "rdfs:Class", + "rdfs:label": "Cancellation Policy", + "rdfs:comment": "Schema definition for CancellationPolicy in the Beckn Protocol v2.0.1" + }, + { + "@id": "beckn:@context", + "@type": "rdf:Property", + "rdfs:label": "@context", + "rdfs:comment": "CPD" + }, + { + "@id": "beckn:@type", + "@type": "rdf:Property", + "rdfs:label": "@type", + "rdfs:comment": "TODO: Description Needed - @type" + } + ] +} diff --git a/schema/Carrier/README.md b/schema/Carrier/README.md index ebced18..626cb0d 100644 --- a/schema/Carrier/README.md +++ b/schema/Carrier/README.md @@ -1,13 +1,9 @@ # Carrier -A schema.beckn.io Type +A Carrier is a transport service provider responsible for moving goods across distances. Carriers operate fleets of vehicles and may own/manage logistics hubs. Maps to beckn:Provider. -Transport service provider. Carriers own fleets and operate hubs. +## Versions -**Canonical IRI :** `log:Carrier` - -**Canonical URL:** https://schema.beckn.io/logistics/Carrier - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Carrier/v2.0/attributes.yaml](https://schema.beckn.io/Carrier/v2.0/attributes.yaml) | [https://schema.beckn.io/Carrier/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Carrier/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Carrier/v2.0/context.jsonld](https://schema.beckn.io/Carrier/v2.0/context.jsonld) | [https://schema.beckn.io/Carrier/v2.0/vocab.jsonld](https://schema.beckn.io/Carrier/v2.0/vocab.jsonld) | [https://schema.beckn.io/Carrier/v2.0/README.md](https://schema.beckn.io/Carrier/v2.0/README.md) | diff --git a/schema/Carrier/v2.0/README.md b/schema/Carrier/v2.0/README.md new file mode 100644 index 0000000..b927d2d --- /dev/null +++ b/schema/Carrier/v2.0/README.md @@ -0,0 +1,36 @@ +# Carrier — v2.0 + +A Carrier is a transport service provider responsible for moving goods across distances. Carriers operate fleets of vehicles and may own/manage logistics hubs. Maps to beckn:Provider. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Carrier/attributes.yaml](https://schema.beckn.io/Carrier/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Carrier/v2.0/attributes.yaml](https://schema.beckn.io/Carrier/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Carrier/attributes.jsonschema.yaml](https://schema.beckn.io/Carrier/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Carrier/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Carrier/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Carrier/context.jsonld](https://schema.beckn.io/Carrier/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Carrier/v2.0/context.jsonld](https://schema.beckn.io/Carrier/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Carrier/vocab.jsonld](https://schema.beckn.io/Carrier/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Carrier/v2.0/vocab.jsonld](https://schema.beckn.io/Carrier/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | Unique carrier identifier | +| `name` | yes | string | Legal name of the carrier | +| `code` | no | string | Short carrier code | +| `logo` | no | string | URL to carrier logo | +| `website` | no | string | - | +| `contact` | no | $ref: https://schema.beckn.io/Contact/v2.0/attributes.yaml#/components/schemas/Contact | - | +| `rating` | no | number | - | +| `serviceTypes` | no | array | Types of logistics services offered | +| `serviceCoverage` | no | array | Geographic regions served | +| `fleetSize` | no | integer | Number of vehicles in fleet | +| `hubs` | no | array | Logistics hubs operated by this carrier | +| `licenseNumber` | no | string | Transport license number | +| `gstNumber` | no | string | GST registration number | +| `panNumber` | no | string | PAN for tax purposes | +| `active` | no | boolean | Whether carrier is currently active on network | diff --git a/schema/Carrier/v2.0/attributes.jsonschema.yaml b/schema/Carrier/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 7b8aba4..0000000 --- a/schema/Carrier/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,107 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: Carrier JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - Carrier: - $ref: '#/$defs/Carrier' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - Carrier: - type: object - title: Carrier - description: 'A Carrier is a transport service provider responsible for moving - goods across distances. Carriers operate fleets of vehicles and may own/manage - logistics hubs. Maps to beckn:Provider. - - ' - required: - - id - - name - properties: - id: - type: string - description: Unique carrier identifier - example: CAR-DTDC-001 - name: - type: string - description: Legal name of the carrier - example: DTDC Express Limited - code: - type: string - description: Short carrier code - example: DTDC - logo: - type: string - format: uri - description: URL to carrier logo - website: - type: string - format: uri - contact: - $ref: https://schema.beckn.io/Contact/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Contact - rating: - type: number - minimum: 1 - maximum: 5 - example: 4.2 - serviceTypes: - type: array - description: Types of logistics services offered - items: - type: string - enum: - - HYPERLOCAL - - COURIER - - INTERSTATE - - LONG_HAUL - - EXPRESS - serviceCoverage: - type: array - description: Geographic regions served - items: - type: object - properties: - country: - type: string - states: - type: array - items: - type: string - pincodes: - type: array - items: - type: string - fleetSize: - type: integer - description: Number of vehicles in fleet - example: 500 - hubs: - type: array - description: Logistics hubs operated by this carrier - items: - $ref: https://schema.beckn.io/Hub/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Hub - licenseNumber: - type: string - description: Transport license number - gstNumber: - type: string - description: GST registration number - panNumber: - type: string - description: PAN for tax purposes - active: - type: boolean - description: Whether carrier is currently active on network - example: true diff --git a/schema/Carrier/v2.0/attributes.yaml b/schema/Carrier/v2.0/attributes.yaml index 0597a5b..2ac09dc 100644 --- a/schema/Carrier/v2.0/attributes.yaml +++ b/schema/Carrier/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: Carrier version: 2.0.0 description: Schema definition for the Carrier entity in the Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Carrier: + x-iri: https://schema.beckn.io/Carrier/v2.0 type: object title: Carrier - description: 'A Carrier is a transport service provider responsible for moving - goods across distances. Carriers operate fleets of vehicles and may own/manage - logistics hubs. Maps to beckn:Provider. + description: 'A Carrier is a transport service provider responsible for moving goods across distances. Carriers operate fleets of vehicles and may own/manage logistics hubs. Maps to beckn:Provider. ' required: diff --git a/schema/Carrier/v2.0/context.jsonld b/schema/Carrier/v2.0/context.jsonld new file mode 100644 index 0000000..9225343 --- /dev/null +++ b/schema/Carrier/v2.0/context.jsonld @@ -0,0 +1,29 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "Carrier": "beckn:Carrier", + "active": "beckn:active", + "code": "beckn:code", + "contact": "beckn:contact", + "country": "beckn:country", + "fleetSize": "beckn:fleetSize", + "gstNumber": "beckn:gstNumber", + "hubs": "beckn:hubs", + "id": "beckn:id", + "licenseNumber": "beckn:licenseNumber", + "logo": "beckn:logo", + "name": "beckn:name", + "panNumber": "beckn:panNumber", + "pincodes": "beckn:pincodes", + "rating": "beckn:rating", + "serviceCoverage": "beckn:serviceCoverage", + "serviceTypes": "beckn:serviceTypes", + "states": "beckn:states", + "website": "beckn:website" + } +} diff --git a/schema/Carrier/v2.0/schema.json b/schema/Carrier/v2.0/schema.json new file mode 100644 index 0000000..fdb70d6 --- /dev/null +++ b/schema/Carrier/v2.0/schema.json @@ -0,0 +1,114 @@ +{ + "type": "object", + "title": "Carrier", + "description": "A Carrier is a transport service provider responsible for moving goods across distances. Carriers operate fleets of vehicles and may own/manage logistics hubs. Maps to beckn:Provider. ", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique carrier identifier", + "example": "CAR-DTDC-001" + }, + "name": { + "type": "string", + "description": "Legal name of the carrier", + "example": "DTDC Express Limited" + }, + "code": { + "type": "string", + "description": "Short carrier code", + "example": "DTDC" + }, + "logo": { + "type": "string", + "format": "uri", + "description": "URL to carrier logo" + }, + "website": { + "type": "string", + "format": "uri" + }, + "contact": { + "$ref": "https://schema.beckn.io/Contact/v2.0/schema.json" + }, + "rating": { + "type": "number", + "minimum": 1, + "maximum": 5, + "example": 4.2 + }, + "serviceTypes": { + "type": "array", + "description": "Types of logistics services offered", + "items": { + "type": "string", + "enum": [ + "HYPERLOCAL", + "COURIER", + "INTERSTATE", + "LONG_HAUL", + "EXPRESS" + ] + } + }, + "serviceCoverage": { + "type": "array", + "description": "Geographic regions served", + "items": { + "type": "object", + "properties": { + "country": { + "type": "string" + }, + "states": { + "type": "array", + "items": { + "type": "string" + } + }, + "pincodes": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "fleetSize": { + "type": "integer", + "description": "Number of vehicles in fleet", + "example": 500 + }, + "hubs": { + "type": "array", + "description": "Logistics hubs operated by this carrier", + "items": { + "$ref": "https://schema.beckn.io/Hub/v2.0/schema.json" + } + }, + "licenseNumber": { + "type": "string", + "description": "Transport license number" + }, + "gstNumber": { + "type": "string", + "description": "GST registration number" + }, + "panNumber": { + "type": "string", + "description": "PAN for tax purposes" + }, + "active": { + "type": "boolean", + "description": "Whether carrier is currently active on network", + "example": true + } + }, + "$id": "https://schema.beckn.io/Carrier/v2.0", + "x-iri": "https://schema.beckn.io/Carrier/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/Carrier/v2.0/vocab.jsonld b/schema/Carrier/v2.0/vocab.jsonld new file mode 100644 index 0000000..dcc8dca --- /dev/null +++ b/schema/Carrier/v2.0/vocab.jsonld @@ -0,0 +1,38 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "Carrier": "beckn:Carrier", + "active": "beckn:active", + "code": "beckn:code", + "contact": "beckn:contact", + "country": "beckn:country", + "fleetSize": "beckn:fleetSize", + "gstNumber": "beckn:gstNumber", + "hubs": "beckn:hubs", + "id": "beckn:id", + "licenseNumber": "beckn:licenseNumber", + "logo": "beckn:logo", + "name": "beckn:name", + "panNumber": "beckn:panNumber", + "pincodes": "beckn:pincodes", + "rating": "beckn:rating", + "serviceCoverage": "beckn:serviceCoverage", + "serviceTypes": "beckn:serviceTypes", + "states": "beckn:states", + "website": "beckn:website" + }, + "@graph": [ + { + "@id": "beckn:Carrier", + "@type": "rdfs:Class", + "rdfs:label": "Carrier", + "rdfs:comment": "TODO: Description Needed - Carrier" + } + ] +} diff --git a/schema/Consignment/README.md b/schema/Consignment/README.md index bd0151f..c00e3ef 100644 --- a/schema/Consignment/README.md +++ b/schema/Consignment/README.md @@ -1,13 +1,9 @@ # Consignment -A schema.beckn.io Type +A Consignment is a collection of packages or shipments grouped together under a single commercial transaction between a shipper and consignee. Maps to beckn:Order. -Commercial grouping of shipments under a single transaction (AWB). +## Versions -**Canonical IRI :** `log:Consignment` - -**Canonical URL:** https://schema.beckn.io/logistics/Consignment - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Consignment/v2.0/attributes.yaml](https://schema.beckn.io/Consignment/v2.0/attributes.yaml) | [https://schema.beckn.io/Consignment/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Consignment/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Consignment/v2.0/context.jsonld](https://schema.beckn.io/Consignment/v2.0/context.jsonld) | [https://schema.beckn.io/Consignment/v2.0/vocab.jsonld](https://schema.beckn.io/Consignment/v2.0/vocab.jsonld) | [https://schema.beckn.io/Consignment/v2.0/README.md](https://schema.beckn.io/Consignment/v2.0/README.md) | diff --git a/schema/Consignment/v2.0/README.md b/schema/Consignment/v2.0/README.md new file mode 100644 index 0000000..d11a5d0 --- /dev/null +++ b/schema/Consignment/v2.0/README.md @@ -0,0 +1,35 @@ +# Consignment — v2.0 + +A Consignment is a collection of packages or shipments grouped together under a single commercial transaction between a shipper and consignee. Maps to beckn:Order. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Consignment/attributes.yaml](https://schema.beckn.io/Consignment/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Consignment/v2.0/attributes.yaml](https://schema.beckn.io/Consignment/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Consignment/attributes.jsonschema.yaml](https://schema.beckn.io/Consignment/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Consignment/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Consignment/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Consignment/context.jsonld](https://schema.beckn.io/Consignment/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Consignment/v2.0/context.jsonld](https://schema.beckn.io/Consignment/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Consignment/vocab.jsonld](https://schema.beckn.io/Consignment/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Consignment/v2.0/vocab.jsonld](https://schema.beckn.io/Consignment/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | Unique consignment identifier (e.g. AWB number) | +| `shipper` | yes | $ref: https://schema.beckn.io/Contact/v2.0/attributes.yaml#/components/schemas/Contact | - | +| `consignee` | yes | $ref: https://schema.beckn.io/Contact/v2.0/attributes.yaml#/components/schemas/Contact | - | +| `shipments` | no | array | List of shipments in this consignment | +| `carrier` | no | $ref: https://schema.beckn.io/Carrier/v2.0/attributes.yaml#/components/schemas/Carrier | - | +| `totalWeight` | no | object | - | +| `totalPackages` | no | integer | Total number of packages in this consignment | +| `serviceType` | no | string | - | +| `paymentMode` | no | string | Payment responsibility | +| `commercialInvoiceNumber` | no | string | Commercial invoice number for customs | +| `customsDeclaration` | no | boolean | Whether customs declaration is required | +| `status` | no | string | - | +| `createdAt` | no | string | - | +| `estimatedDelivery` | no | string | - | diff --git a/schema/Consignment/v2.0/attributes.jsonschema.yaml b/schema/Consignment/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 79657eb..0000000 --- a/schema/Consignment/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,95 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: Consignment JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - Consignment: - $ref: '#/$defs/Consignment' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - Consignment: - type: object - title: Consignment - description: 'A Consignment is a collection of packages or shipments grouped together - under a single commercial transaction between a shipper and consignee. Maps - to beckn:Order. - - ' - required: - - id - - shipper - - consignee - properties: - id: - type: string - description: Unique consignment identifier (e.g. AWB number) - example: AWB-2024-9900123 - shipper: - $ref: https://schema.beckn.io/Contact/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Contact - consignee: - $ref: https://schema.beckn.io/Contact/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Contact - shipments: - type: array - description: List of shipments in this consignment - items: - $ref: https://schema.beckn.io/Shipment/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Shipment - carrier: - $ref: https://schema.beckn.io/Carrier/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Carrier - totalWeight: - type: object - properties: - value: - type: number - unit: - type: string - enum: - - kg - - ton - totalPackages: - type: integer - description: Total number of packages in this consignment - serviceType: - type: string - enum: - - COURIER - - INTERSTATE - - LONG_HAUL - - EXPRESS - paymentMode: - type: string - enum: - - PREPAID - - TO_PAY - - COD - description: Payment responsibility - commercialInvoiceNumber: - type: string - description: Commercial invoice number for customs - customsDeclaration: - type: boolean - description: Whether customs declaration is required - status: - type: string - enum: - - CREATED - - BOOKED - - IN_TRANSIT - - DELIVERED - - CANCELLED - createdAt: - type: string - format: date-time - estimatedDelivery: - type: string - format: date-time diff --git a/schema/Consignment/v2.0/attributes.yaml b/schema/Consignment/v2.0/attributes.yaml index 68b1f7a..8421593 100644 --- a/schema/Consignment/v2.0/attributes.yaml +++ b/schema/Consignment/v2.0/attributes.yaml @@ -1,24 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: Consignment version: 2.0.0 - description: Schema definition for the Consignment entity in the Beckn Logistics - domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the Consignment entity in the Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Consignment: + x-iri: https://schema.beckn.io/Consignment/v2.0 type: object title: Consignment - description: 'A Consignment is a collection of packages or shipments grouped - together under a single commercial transaction between a shipper and consignee. - Maps to beckn:Order. + description: 'A Consignment is a collection of packages or shipments grouped together under a single commercial transaction between a shipper and consignee. Maps to beckn:Order. ' required: diff --git a/schema/Consignment/v2.0/context.jsonld b/schema/Consignment/v2.0/context.jsonld new file mode 100644 index 0000000..11898b5 --- /dev/null +++ b/schema/Consignment/v2.0/context.jsonld @@ -0,0 +1,27 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "Consignment": "beckn:Consignment", + "carrier": "beckn:carrier", + "commercialInvoiceNumber": "beckn:commercialInvoiceNumber", + "consignee": "beckn:consignee", + "createdAt": "beckn:createdAt", + "customsDeclaration": "beckn:customsDeclaration", + "estimatedDelivery": "beckn:estimatedDelivery", + "id": "beckn:id", + "paymentMode": "beckn:paymentMode", + "serviceType": "beckn:serviceType", + "shipments": "beckn:shipments", + "shipper": "beckn:shipper", + "status": "beckn:status", + "totalPackages": "beckn:totalPackages", + "totalWeight": "beckn:totalWeight", + "unit": "beckn:unit", + "value": "beckn:value" + } +} diff --git a/schema/Consignment/v2.0/schema.json b/schema/Consignment/v2.0/schema.json new file mode 100644 index 0000000..cf46f68 --- /dev/null +++ b/schema/Consignment/v2.0/schema.json @@ -0,0 +1,99 @@ +{ + "type": "object", + "title": "Consignment", + "description": "A Consignment is a collection of packages or shipments grouped together under a single commercial transaction between a shipper and consignee. Maps to beckn:Order. ", + "required": [ + "id", + "shipper", + "consignee" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique consignment identifier (e.g. AWB number)", + "example": "AWB-2024-9900123" + }, + "shipper": { + "$ref": "https://schema.beckn.io/Contact/v2.0/schema.json" + }, + "consignee": { + "$ref": "https://schema.beckn.io/Contact/v2.0/schema.json" + }, + "shipments": { + "type": "array", + "description": "List of shipments in this consignment", + "items": { + "$ref": "https://schema.beckn.io/Shipment/v2.0/schema.json" + } + }, + "carrier": { + "$ref": "https://schema.beckn.io/Carrier/v2.0/schema.json" + }, + "totalWeight": { + "type": "object", + "properties": { + "value": { + "type": "number" + }, + "unit": { + "type": "string", + "enum": [ + "kg", + "ton" + ] + } + } + }, + "totalPackages": { + "type": "integer", + "description": "Total number of packages in this consignment" + }, + "serviceType": { + "type": "string", + "enum": [ + "COURIER", + "INTERSTATE", + "LONG_HAUL", + "EXPRESS" + ] + }, + "paymentMode": { + "type": "string", + "enum": [ + "PREPAID", + "TO_PAY", + "COD" + ], + "description": "Payment responsibility" + }, + "commercialInvoiceNumber": { + "type": "string", + "description": "Commercial invoice number for customs" + }, + "customsDeclaration": { + "type": "boolean", + "description": "Whether customs declaration is required" + }, + "status": { + "type": "string", + "enum": [ + "CREATED", + "BOOKED", + "IN_TRANSIT", + "DELIVERED", + "CANCELLED" + ] + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "estimatedDelivery": { + "type": "string", + "format": "date-time" + } + }, + "$id": "https://schema.beckn.io/Consignment/v2.0", + "x-iri": "https://schema.beckn.io/Consignment/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/Consignment/v2.0/vocab.jsonld b/schema/Consignment/v2.0/vocab.jsonld new file mode 100644 index 0000000..675d3cd --- /dev/null +++ b/schema/Consignment/v2.0/vocab.jsonld @@ -0,0 +1,36 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "Consignment": "beckn:Consignment", + "carrier": "beckn:carrier", + "commercialInvoiceNumber": "beckn:commercialInvoiceNumber", + "consignee": "beckn:consignee", + "createdAt": "beckn:createdAt", + "customsDeclaration": "beckn:customsDeclaration", + "estimatedDelivery": "beckn:estimatedDelivery", + "id": "beckn:id", + "paymentMode": "beckn:paymentMode", + "serviceType": "beckn:serviceType", + "shipments": "beckn:shipments", + "shipper": "beckn:shipper", + "status": "beckn:status", + "totalPackages": "beckn:totalPackages", + "totalWeight": "beckn:totalWeight", + "unit": "beckn:unit", + "value": "beckn:value" + }, + "@graph": [ + { + "@id": "beckn:Consignment", + "@type": "rdfs:Class", + "rdfs:label": "Consignment", + "rdfs:comment": "TODO: Description Needed - Consignment" + } + ] +} diff --git a/schema/Contact/README.md b/schema/Contact/README.md index a737038..21fb282 100644 --- a/schema/Contact/README.md +++ b/schema/Contact/README.md @@ -1,13 +1,9 @@ # Contact -A schema.beckn.io Type +Contact information for sender, receiver, driver, or operator. -Logistics schema for Contact. +## Versions -**Canonical IRI :** `log:Contact` - -**Canonical URL:** https://schema.beckn.io/logistics/Contact - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Contact/v2.0/attributes.yaml](https://schema.beckn.io/Contact/v2.0/attributes.yaml) | [https://schema.beckn.io/Contact/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Contact/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Contact/v2.0/context.jsonld](https://schema.beckn.io/Contact/v2.0/context.jsonld) | [https://schema.beckn.io/Contact/v2.0/vocab.jsonld](https://schema.beckn.io/Contact/v2.0/vocab.jsonld) | [https://schema.beckn.io/Contact/v2.0/README.md](https://schema.beckn.io/Contact/v2.0/README.md) | diff --git a/schema/Contact/v2.0/README.md b/schema/Contact/v2.0/README.md new file mode 100644 index 0000000..79eb657 --- /dev/null +++ b/schema/Contact/v2.0/README.md @@ -0,0 +1,27 @@ +# Contact — v2.0 + +Contact information for sender, receiver, driver, or operator. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Contact/attributes.yaml](https://schema.beckn.io/Contact/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Contact/v2.0/attributes.yaml](https://schema.beckn.io/Contact/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Contact/attributes.jsonschema.yaml](https://schema.beckn.io/Contact/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Contact/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Contact/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Contact/context.jsonld](https://schema.beckn.io/Contact/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Contact/v2.0/context.jsonld](https://schema.beckn.io/Contact/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Contact/vocab.jsonld](https://schema.beckn.io/Contact/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Contact/v2.0/vocab.jsonld](https://schema.beckn.io/Contact/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `name` | no | string | - | +| `phone` | no | string | - | +| `email` | no | string | - | +| `alternatePhone` | no | string | - | +| `company` | no | string | Company name if B2B contact | +| `gstNumber` | no | string | GST number for B2B invoicing | diff --git a/schema/Contact/v2.0/attributes.jsonschema.yaml b/schema/Contact/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index f22a8f9..0000000 --- a/schema/Contact/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,43 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: Contact JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - Contact: - $ref: '#/$defs/Contact' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - Contact: - type: object - title: Contact - description: Contact information for sender, receiver, driver, or operator. - properties: - name: - type: string - example: Priya Mehta - phone: - type: string - example: '+919876543210' - email: - type: string - format: email - example: priya.mehta@email.com - alternatePhone: - type: string - company: - type: string - description: Company name if B2B contact - gstNumber: - type: string - description: GST number for B2B invoicing diff --git a/schema/Contact/v2.0/attributes.yaml b/schema/Contact/v2.0/attributes.yaml index 4f44750..94d3b15 100644 --- a/schema/Contact/v2.0/attributes.yaml +++ b/schema/Contact/v2.0/attributes.yaml @@ -1,18 +1,17 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: Contact version: 2.0.0 - description: Schema definition for the Contact entity in the Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema for Contact in Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Contact: + x-iri: https://schema.beckn.io/Contact/v2.0 type: object title: Contact description: Contact information for sender, receiver, driver, or operator. diff --git a/schema/Contact/v2.0/context.jsonld b/schema/Contact/v2.0/context.jsonld new file mode 100644 index 0000000..0986d2e --- /dev/null +++ b/schema/Contact/v2.0/context.jsonld @@ -0,0 +1,17 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "Contact": "beckn:Contact", + "alternatePhone": "beckn:alternatePhone", + "company": "beckn:company", + "email": "beckn:email", + "gstNumber": "beckn:gstNumber", + "name": "beckn:name", + "phone": "beckn:phone" + } +} diff --git a/schema/Contact/v2.0/schema.json b/schema/Contact/v2.0/schema.json new file mode 100644 index 0000000..5af1987 --- /dev/null +++ b/schema/Contact/v2.0/schema.json @@ -0,0 +1,34 @@ +{ + "type": "object", + "title": "Contact", + "description": "Contact information for sender, receiver, driver, or operator.", + "properties": { + "name": { + "type": "string", + "example": "Priya Mehta" + }, + "phone": { + "type": "string", + "example": "+919876543210" + }, + "email": { + "type": "string", + "format": "email", + "example": "priya.mehta@email.com" + }, + "alternatePhone": { + "type": "string" + }, + "company": { + "type": "string", + "description": "Company name if B2B contact" + }, + "gstNumber": { + "type": "string", + "description": "GST number for B2B invoicing" + } + }, + "$id": "https://schema.beckn.io/Contact/v2.0", + "x-iri": "https://schema.beckn.io/Contact/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/Contact/v2.0/vocab.jsonld b/schema/Contact/v2.0/vocab.jsonld new file mode 100644 index 0000000..20dc499 --- /dev/null +++ b/schema/Contact/v2.0/vocab.jsonld @@ -0,0 +1,26 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "Contact": "beckn:Contact", + "alternatePhone": "beckn:alternatePhone", + "company": "beckn:company", + "email": "beckn:email", + "gstNumber": "beckn:gstNumber", + "name": "beckn:name", + "phone": "beckn:phone" + }, + "@graph": [ + { + "@id": "beckn:Contact", + "@type": "rdfs:Class", + "rdfs:label": "Contact", + "rdfs:comment": "TODO: Description Needed - Contact" + } + ] +} diff --git a/schema/Courier/README.md b/schema/Courier/README.md index dffe1f8..5e6a685 100644 --- a/schema/Courier/README.md +++ b/schema/Courier/README.md @@ -1,13 +1,9 @@ # Courier -A schema.beckn.io Type +A Courier is an individual delivery agent responsible for last-mile pickup and delivery of packages, typically in hyperlocal or urban delivery contexts. Maps to beckn:Agent. -Last-mile delivery agent for urban hyperlocal contexts. +## Versions -**Canonical IRI :** `log:Courier` - -**Canonical URL:** https://schema.beckn.io/logistics/Courier - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Courier/v2.0/attributes.yaml](https://schema.beckn.io/Courier/v2.0/attributes.yaml) | [https://schema.beckn.io/Courier/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Courier/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Courier/v2.0/context.jsonld](https://schema.beckn.io/Courier/v2.0/context.jsonld) | [https://schema.beckn.io/Courier/v2.0/vocab.jsonld](https://schema.beckn.io/Courier/v2.0/vocab.jsonld) | [https://schema.beckn.io/Courier/v2.0/README.md](https://schema.beckn.io/Courier/v2.0/README.md) | diff --git a/schema/Courier/v2.0/README.md b/schema/Courier/v2.0/README.md new file mode 100644 index 0000000..adc1113 --- /dev/null +++ b/schema/Courier/v2.0/README.md @@ -0,0 +1,34 @@ +# Courier — v2.0 + +A Courier is an individual delivery agent responsible for last-mile pickup and delivery of packages, typically in hyperlocal or urban delivery contexts. Maps to beckn:Agent. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Courier/attributes.yaml](https://schema.beckn.io/Courier/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Courier/v2.0/attributes.yaml](https://schema.beckn.io/Courier/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Courier/attributes.jsonschema.yaml](https://schema.beckn.io/Courier/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Courier/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Courier/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Courier/context.jsonld](https://schema.beckn.io/Courier/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Courier/v2.0/context.jsonld](https://schema.beckn.io/Courier/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Courier/vocab.jsonld](https://schema.beckn.io/Courier/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Courier/v2.0/vocab.jsonld](https://schema.beckn.io/Courier/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | Unique courier identifier | +| `name` | yes | string | Full name of the courier | +| `phone` | no | string | Contact phone number | +| `email` | no | string | Email address | +| `profilePhoto` | no | string | URL to courier's profile photo | +| `rating` | no | number | Average rating (1-5) | +| `vehicleType` | no | string | Type of vehicle used | +| `vehicleNumber` | no | string | Vehicle registration number | +| `currentLocation` | no | $ref: https://schema.beckn.io/Place/v2.0/attributes.yaml#/components/schemas/Place | - | +| `status` | no | string | - | +| `activeShipments` | no | array | Currently assigned shipments | +| `kycVerified` | no | boolean | Whether courier has completed KYC verification | +| `joiningDate` | no | string | Date the courier joined the network | diff --git a/schema/Courier/v2.0/attributes.jsonschema.yaml b/schema/Courier/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index d070a8b..0000000 --- a/schema/Courier/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,96 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: Courier JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - Courier: - $ref: '#/$defs/Courier' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - Courier: - type: object - title: Courier - description: 'A Courier is an individual delivery agent responsible for last-mile - pickup and delivery of packages, typically in hyperlocal or urban delivery contexts. - Maps to beckn:Agent. - - ' - required: - - id - - name - properties: - id: - type: string - description: Unique courier identifier - example: CRR-001234 - name: - type: string - description: Full name of the courier - example: Ramesh Kumar - phone: - type: string - description: Contact phone number - example: '+919876543210' - email: - type: string - format: email - description: Email address - profilePhoto: - type: string - format: uri - description: URL to courier's profile photo - rating: - type: number - description: Average rating (1-5) - minimum: 1 - maximum: 5 - example: 4.6 - vehicleType: - type: string - description: Type of vehicle used - enum: - - BICYCLE - - MOTORCYCLE - - ELECTRIC_SCOOTER - - CAR - - VAN - example: MOTORCYCLE - vehicleNumber: - type: string - description: Vehicle registration number - example: KA05AB1234 - currentLocation: - $ref: https://schema.beckn.io/LogisticsPlace/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsPlace - status: - type: string - enum: - - AVAILABLE - - ASSIGNED - - ON_PICKUP - - ON_DELIVERY - - OFFLINE - example: ON_DELIVERY - activeShipments: - type: array - description: Currently assigned shipments - items: - type: string - kycVerified: - type: boolean - description: Whether courier has completed KYC verification - example: true - joiningDate: - type: string - format: date - description: Date the courier joined the network diff --git a/schema/Courier/v2.0/attributes.yaml b/schema/Courier/v2.0/attributes.yaml index 5cb9621..45e668c 100644 --- a/schema/Courier/v2.0/attributes.yaml +++ b/schema/Courier/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: Courier version: 2.0.0 description: Schema definition for the Courier entity in the Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Courier: + x-iri: https://schema.beckn.io/Courier/v2.0 type: object title: Courier - description: 'A Courier is an individual delivery agent responsible for last-mile - pickup and delivery of packages, typically in hyperlocal or urban delivery - contexts. Maps to beckn:Agent. + description: 'A Courier is an individual delivery agent responsible for last-mile pickup and delivery of packages, typically in hyperlocal or urban delivery contexts. Maps to beckn:Agent. ' required: diff --git a/schema/Courier/v2.0/context.jsonld b/schema/Courier/v2.0/context.jsonld new file mode 100644 index 0000000..7340170 --- /dev/null +++ b/schema/Courier/v2.0/context.jsonld @@ -0,0 +1,24 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "Courier": "beckn:Courier", + "activeShipments": "beckn:activeShipments", + "currentLocation": "beckn:currentLocation", + "email": "beckn:email", + "id": "beckn:id", + "joiningDate": "beckn:joiningDate", + "kycVerified": "beckn:kycVerified", + "name": "beckn:name", + "phone": "beckn:phone", + "profilePhoto": "beckn:profilePhoto", + "rating": "beckn:rating", + "status": "beckn:status", + "vehicleNumber": "beckn:vehicleNumber", + "vehicleType": "beckn:vehicleType" + } +} diff --git a/schema/Courier/v2.0/schema.json b/schema/Courier/v2.0/schema.json new file mode 100644 index 0000000..8270752 --- /dev/null +++ b/schema/Courier/v2.0/schema.json @@ -0,0 +1,94 @@ +{ + "type": "object", + "title": "Courier", + "description": "A Courier is an individual delivery agent responsible for last-mile pickup and delivery of packages, typically in hyperlocal or urban delivery contexts. Maps to beckn:Agent. ", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique courier identifier", + "example": "CRR-001234" + }, + "name": { + "type": "string", + "description": "Full name of the courier", + "example": "Ramesh Kumar" + }, + "phone": { + "type": "string", + "description": "Contact phone number", + "example": "+919876543210" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email address" + }, + "profilePhoto": { + "type": "string", + "format": "uri", + "description": "URL to courier's profile photo" + }, + "rating": { + "type": "number", + "description": "Average rating (1-5)", + "minimum": 1, + "maximum": 5, + "example": 4.6 + }, + "vehicleType": { + "type": "string", + "description": "Type of vehicle used", + "enum": [ + "BICYCLE", + "MOTORCYCLE", + "ELECTRIC_SCOOTER", + "CAR", + "VAN" + ], + "example": "MOTORCYCLE" + }, + "vehicleNumber": { + "type": "string", + "description": "Vehicle registration number", + "example": "KA05AB1234" + }, + "currentLocation": { + "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + }, + "status": { + "type": "string", + "enum": [ + "AVAILABLE", + "ASSIGNED", + "ON_PICKUP", + "ON_DELIVERY", + "OFFLINE" + ], + "example": "ON_DELIVERY" + }, + "activeShipments": { + "type": "array", + "description": "Currently assigned shipments", + "items": { + "type": "string" + } + }, + "kycVerified": { + "type": "boolean", + "description": "Whether courier has completed KYC verification", + "example": true + }, + "joiningDate": { + "type": "string", + "format": "date", + "description": "Date the courier joined the network" + } + }, + "$id": "https://schema.beckn.io/Courier/v2.0", + "x-iri": "https://schema.beckn.io/Courier/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/Courier/v2.0/vocab.jsonld b/schema/Courier/v2.0/vocab.jsonld new file mode 100644 index 0000000..cb0fded --- /dev/null +++ b/schema/Courier/v2.0/vocab.jsonld @@ -0,0 +1,33 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "Courier": "beckn:Courier", + "activeShipments": "beckn:activeShipments", + "currentLocation": "beckn:currentLocation", + "email": "beckn:email", + "id": "beckn:id", + "joiningDate": "beckn:joiningDate", + "kycVerified": "beckn:kycVerified", + "name": "beckn:name", + "phone": "beckn:phone", + "profilePhoto": "beckn:profilePhoto", + "rating": "beckn:rating", + "status": "beckn:status", + "vehicleNumber": "beckn:vehicleNumber", + "vehicleType": "beckn:vehicleType" + }, + "@graph": [ + { + "@id": "beckn:Courier", + "@type": "rdfs:Class", + "rdfs:label": "Courier", + "rdfs:comment": "TODO: Description Needed - Courier" + } + ] +} diff --git a/schema/DeliverySlot/README.md b/schema/DeliverySlot/README.md index 8404cb1..6c5a63c 100644 --- a/schema/DeliverySlot/README.md +++ b/schema/DeliverySlot/README.md @@ -1,13 +1,9 @@ # DeliverySlot -A schema.beckn.io Type +A DeliverySlot is a time window offered or agreed upon for delivery of a shipment. Maps to beckn:TimeSlot. -Time windows: `EXPRESS_1HR`, `EXPRESS_2HR`, `MORNING`, `AFTERNOON`, `EVENING`, `NEXT_DAY` +## Versions -**Canonical IRI :** `log:DeliverySlot` - -**Canonical URL:** https://schema.beckn.io/logistics/DeliverySlot - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/DeliverySlot/v2.0/attributes.yaml](https://schema.beckn.io/DeliverySlot/v2.0/attributes.yaml) | [https://schema.beckn.io/DeliverySlot/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/DeliverySlot/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/DeliverySlot/v2.0/context.jsonld](https://schema.beckn.io/DeliverySlot/v2.0/context.jsonld) | [https://schema.beckn.io/DeliverySlot/v2.0/vocab.jsonld](https://schema.beckn.io/DeliverySlot/v2.0/vocab.jsonld) | [https://schema.beckn.io/DeliverySlot/v2.0/README.md](https://schema.beckn.io/DeliverySlot/v2.0/README.md) | diff --git a/schema/DeliverySlot/v2.0/README.md b/schema/DeliverySlot/v2.0/README.md new file mode 100644 index 0000000..fa6265d --- /dev/null +++ b/schema/DeliverySlot/v2.0/README.md @@ -0,0 +1,31 @@ +# DeliverySlot — v2.0 + +A DeliverySlot is a time window offered or agreed upon for delivery of a shipment. Maps to beckn:TimeSlot. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/DeliverySlot/attributes.yaml](https://schema.beckn.io/DeliverySlot/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/DeliverySlot/v2.0/attributes.yaml](https://schema.beckn.io/DeliverySlot/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/DeliverySlot/attributes.jsonschema.yaml](https://schema.beckn.io/DeliverySlot/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/DeliverySlot/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/DeliverySlot/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/DeliverySlot/context.jsonld](https://schema.beckn.io/DeliverySlot/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/DeliverySlot/v2.0/context.jsonld](https://schema.beckn.io/DeliverySlot/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/DeliverySlot/vocab.jsonld](https://schema.beckn.io/DeliverySlot/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/DeliverySlot/v2.0/vocab.jsonld](https://schema.beckn.io/DeliverySlot/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | - | +| `date` | yes | string | - | +| `startTime` | yes | string | - | +| `endTime` | yes | string | - | +| `label` | no | string | Human-readable label | +| `available` | no | boolean | Whether this slot is still available | +| `surcharge` | no | object | Additional charge for this slot (e.g. express slot) | +| `capacity` | no | integer | Maximum deliveries in this slot | +| `remainingCapacity` | no | integer | - | +| `cutoffTime` | no | string | Last time to book this slot | diff --git a/schema/DeliverySlot/v2.0/attributes.jsonschema.yaml b/schema/DeliverySlot/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 5df9664..0000000 --- a/schema/DeliverySlot/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,84 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: DeliverySlot JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - DeliverySlot: - $ref: '#/$defs/DeliverySlot' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - DeliverySlot: - type: object - title: DeliverySlot - description: 'A DeliverySlot is a time window offered or agreed upon for delivery - of a shipment. Maps to beckn:TimeSlot. - - ' - required: - - id - - date - - startTime - - endTime - properties: - id: - type: string - example: SLOT-2024-03-15-AM - date: - type: string - format: date - example: '2024-03-15' - startTime: - type: string - example: '10:00' - endTime: - type: string - example: '13:00' - label: - type: string - description: Human-readable label - enum: - - EXPRESS_1HR - - EXPRESS_2HR - - MORNING - - AFTERNOON - - EVENING - - FULL_DAY - - NEXT_DAY - example: MORNING - available: - type: boolean - description: Whether this slot is still available - example: true - surcharge: - type: object - description: Additional charge for this slot (e.g. express slot) - properties: - amount: - type: number - example: 49 - currency: - type: string - example: INR - capacity: - type: integer - description: Maximum deliveries in this slot - example: 100 - remainingCapacity: - type: integer - example: 34 - cutoffTime: - type: string - format: date-time - description: Last time to book this slot - example: '2024-03-14T22:00:00+05:30' diff --git a/schema/DeliverySlot/v2.0/attributes.yaml b/schema/DeliverySlot/v2.0/attributes.yaml index 3856799..3dc7b5c 100644 --- a/schema/DeliverySlot/v2.0/attributes.yaml +++ b/schema/DeliverySlot/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: DeliverySlot version: 2.0.0 - description: Schema definition for the DeliverySlot entity in the Beckn Logistics - domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the DeliverySlot entity in the Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: DeliverySlot: + x-iri: https://schema.beckn.io/DeliverySlot/v2.0 type: object title: DeliverySlot - description: 'A DeliverySlot is a time window offered or agreed upon for delivery - of a shipment. Maps to beckn:TimeSlot. + description: 'A DeliverySlot is a time window offered or agreed upon for delivery of a shipment. Maps to beckn:TimeSlot. ' required: diff --git a/schema/DeliverySlot/v2.0/context.jsonld b/schema/DeliverySlot/v2.0/context.jsonld new file mode 100644 index 0000000..15c39ed --- /dev/null +++ b/schema/DeliverySlot/v2.0/context.jsonld @@ -0,0 +1,23 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "DeliverySlot": "beckn:DeliverySlot", + "amount": "beckn:amount", + "available": "beckn:available", + "capacity": "beckn:capacity", + "currency": "beckn:currency", + "cutoffTime": "beckn:cutoffTime", + "date": "beckn:date", + "endTime": "beckn:endTime", + "id": "beckn:id", + "label": "beckn:label", + "remainingCapacity": "beckn:remainingCapacity", + "startTime": "beckn:startTime", + "surcharge": "beckn:surcharge" + } +} diff --git a/schema/DeliverySlot/v2.0/schema.json b/schema/DeliverySlot/v2.0/schema.json new file mode 100644 index 0000000..d7674d4 --- /dev/null +++ b/schema/DeliverySlot/v2.0/schema.json @@ -0,0 +1,81 @@ +{ + "type": "object", + "title": "DeliverySlot", + "description": "A DeliverySlot is a time window offered or agreed upon for delivery of a shipment. Maps to beckn:TimeSlot. ", + "required": [ + "id", + "date", + "startTime", + "endTime" + ], + "properties": { + "id": { + "type": "string", + "example": "SLOT-2024-03-15-AM" + }, + "date": { + "type": "string", + "format": "date", + "example": "2024-03-15" + }, + "startTime": { + "type": "string", + "example": "10:00" + }, + "endTime": { + "type": "string", + "example": "13:00" + }, + "label": { + "type": "string", + "description": "Human-readable label", + "enum": [ + "EXPRESS_1HR", + "EXPRESS_2HR", + "MORNING", + "AFTERNOON", + "EVENING", + "FULL_DAY", + "NEXT_DAY" + ], + "example": "MORNING" + }, + "available": { + "type": "boolean", + "description": "Whether this slot is still available", + "example": true + }, + "surcharge": { + "type": "object", + "description": "Additional charge for this slot (e.g. express slot)", + "properties": { + "amount": { + "type": "number", + "example": 49 + }, + "currency": { + "type": "string", + "example": "INR" + } + } + }, + "capacity": { + "type": "integer", + "description": "Maximum deliveries in this slot", + "example": 100 + }, + "remainingCapacity": { + "type": "integer", + "example": 34 + }, + "cutoffTime": { + "type": "string", + "format": "date-time", + "description": "Last time to book this slot", + "example": "2024-03-14T22:00:00+05:30" + } + }, + "$id": "https://schema.beckn.io/DeliverySlot/v2.0", + "x-iri": "https://schema.beckn.io/DeliverySlot/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/DeliverySlot/v2.0/vocab.jsonld b/schema/DeliverySlot/v2.0/vocab.jsonld new file mode 100644 index 0000000..a70df19 --- /dev/null +++ b/schema/DeliverySlot/v2.0/vocab.jsonld @@ -0,0 +1,32 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "DeliverySlot": "beckn:DeliverySlot", + "amount": "beckn:amount", + "available": "beckn:available", + "capacity": "beckn:capacity", + "currency": "beckn:currency", + "cutoffTime": "beckn:cutoffTime", + "date": "beckn:date", + "endTime": "beckn:endTime", + "id": "beckn:id", + "label": "beckn:label", + "remainingCapacity": "beckn:remainingCapacity", + "startTime": "beckn:startTime", + "surcharge": "beckn:surcharge" + }, + "@graph": [ + { + "@id": "beckn:DeliverySlot", + "@type": "rdfs:Class", + "rdfs:label": "Delivery Slot", + "rdfs:comment": "TODO: Description Needed - DeliverySlot" + } + ] +} diff --git a/schema/Driver/README.md b/schema/Driver/README.md index bb71f63..4143699 100644 --- a/schema/Driver/README.md +++ b/schema/Driver/README.md @@ -1,24 +1,9 @@ # Driver -## Overview -A **Driver** is an individual who operates a vehicle for logistics delivery. Drivers are assigned shipments and are responsible for pickup, transit, and delivery. +A person who operates a transport vehicle and is responsible for the safe delivery of passengers during a mobility service trip. -## IRI -`https://schema.beckn.org/logistics/Driver` +## Versions -## Use Cases -- All logistics use cases: Hyperlocal, Courier, Interstate, Long Haul, Express - -## Key Attributes -| Attribute | Type | Description | -|---|---|---| -| id | string | Unique driver ID | -| name | string | Driver full name | -| licenseNumber | string | Driving license | -| rating | number | Average driver rating | -| currentLocation | object | Real-time GPS coordinates | -| status | enum | AVAILABLE / ON_ROUTE etc. | -| backgroundVerified | boolean | Verification status | - -## Version -Current version: **v2.0** — [v2.0/attributes.yaml](./v2.0/attributes.yaml) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Driver/v2.0/attributes.yaml](https://schema.beckn.io/Driver/v2.0/attributes.yaml) | [https://schema.beckn.io/Driver/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Driver/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Driver/v2.0/context.jsonld](https://schema.beckn.io/Driver/v2.0/context.jsonld) | [https://schema.beckn.io/Driver/v2.0/vocab.jsonld](https://schema.beckn.io/Driver/v2.0/vocab.jsonld) | [https://schema.beckn.io/Driver/v2.0/README.md](https://schema.beckn.io/Driver/v2.0/README.md) | diff --git a/schema/Driver/v2.0/README.md b/schema/Driver/v2.0/README.md new file mode 100644 index 0000000..e50da26 --- /dev/null +++ b/schema/Driver/v2.0/README.md @@ -0,0 +1,29 @@ +# Driver — v2.0 + +A person who operates a transport vehicle and is responsible for the safe delivery of passengers during a mobility service trip. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Driver/attributes.yaml](https://schema.beckn.io/Driver/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Driver/v2.0/attributes.yaml](https://schema.beckn.io/Driver/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Driver/attributes.jsonschema.yaml](https://schema.beckn.io/Driver/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Driver/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Driver/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Driver/context.jsonld](https://schema.beckn.io/Driver/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Driver/v2.0/context.jsonld](https://schema.beckn.io/Driver/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Driver/vocab.jsonld](https://schema.beckn.io/Driver/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Driver/v2.0/vocab.jsonld](https://schema.beckn.io/Driver/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `licenseNumber` | no | string | Driver's license number | +| `vehicleNumber` | no | string | Registration number of the vehicle being driven | +| `yearsOfExperience` | no | number | Number of years of professional driving experience | +| `id` | no | string | Unique identifier for the fulfillment agent | +| `person` | no | $ref: https://schema.beckn.io/Person/v2.0/attributes.yaml#/components/schemas/Person | Personal details of the agent | +| `organization` | no | $ref: https://schema.beckn.io/Organization/v2.0/attributes.yaml#/components/schemas/Organization | Organisation the agent belongs to | +| `contact` | no | string | Contact information for the agent | +| `rating` | no | $ref: https://schema.beckn.io/Rating/v2.0/attributes.yaml#/components/schemas/Rating | Overall rating of the agent | diff --git a/schema/Driver/v2.0/attributes.yaml b/schema/Driver/v2.0/attributes.yaml index 1fbaba8..ca35578 100644 --- a/schema/Driver/v2.0/attributes.yaml +++ b/schema/Driver/v2.0/attributes.yaml @@ -2,96 +2,47 @@ openapi: 3.1.0 info: title: Driver version: 2.0.0 - description: Schema definition for the Driver entity in the Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the Driver entity in the Beckn Mobility domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + url: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Driver: + x-iri: https://schema.beckn.io/Driver/v2.0 type: object title: Driver - description: > - A Driver is an individual who operates a vehicle for logistics delivery. - Drivers are assigned to shipments and responsible for physical transport. Maps to beckn:Agent. - required: - - id - - name - - licenseNumber + description: A person who operates a transport vehicle and is responsible for + the safe delivery of passengers during a mobility service trip. + x-tags: + - mobility + - ride-hailing properties: - id: - type: string - description: Unique driver identifier - example: "DRV-00456" - name: - type: string - description: Full name of the driver - example: "Suresh Patil" - phone: - type: string - example: "+919845001234" - email: - type: string - format: email - profilePhoto: - type: string - format: uri licenseNumber: + description: Driver's license number type: string - description: Driving license number - example: "MH1420210012345" - licenseExpiry: + vehicleNumber: + description: Registration number of the vehicle being driven type: string - format: date - description: License expiry date - rating: + yearsOfExperience: + description: Number of years of professional driving experience type: number - minimum: 1 - maximum: 5 - example: 4.5 - currentLocation: - type: object - description: Real-time GPS location - properties: - lat: - type: number - example: 12.9716 - lng: - type: number - example: 77.5946 - updatedAt: - type: string - format: date-time - status: + id: + description: Unique identifier for the fulfillment agent + type: string + person: + description: Personal details of the agent + $ref: https://schema.beckn.io/Person/v2.0/attributes.yaml#/components/schemas/Person + organization: + description: Organisation the agent belongs to + $ref: https://schema.beckn.io/Organization/v2.0/attributes.yaml#/components/schemas/Organization + contact: + description: Contact information for the agent type: string - enum: - - AVAILABLE - - ASSIGNED - - ON_ROUTE - - OFFLINE - example: "ON_ROUTE" - vehicle: - $ref: '#/components/schemas/Vehicle' - experienceYears: - type: integer - description: Years of driving experience - example: 5 - backgroundVerified: - type: boolean - description: Whether background verification is complete - example: true - languagesSpoken: - type: array - items: - type: string - example: ["Hindi", "Kannada"] - operatingZones: - type: array - description: Geographic zones the driver operates in - items: - type: string - example: ["Bangalore North", "Bangalore East"] + rating: + description: Overall rating of the agent + $ref: https://schema.beckn.io/Rating/v2.0/attributes.yaml#/components/schemas/Rating + additionalProperties: false diff --git a/schema/Driver/v2.0/context.jsonld b/schema/Driver/v2.0/context.jsonld new file mode 100644 index 0000000..f8df50e --- /dev/null +++ b/schema/Driver/v2.0/context.jsonld @@ -0,0 +1,14 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/mobility/v2.0/", + "Driver": "beckn:Driver", + "licenseNumber": "beckn:licenseNumber", + "vehicleNumber": "beckn:vehicleNumber", + "yearsOfExperience": "beckn:yearsOfExperience", + "id": "beckn:id", + "person": "beckn:person", + "organization": "beckn:organization", + "contact": "beckn:contact", + "rating": "beckn:rating" + } +} diff --git a/schema/Driver/v2.0/schema.json b/schema/Driver/v2.0/schema.json new file mode 100644 index 0000000..764ef18 --- /dev/null +++ b/schema/Driver/v2.0/schema.json @@ -0,0 +1,47 @@ +{ + "$id": "https://schema.beckn.io/Driver/v2.0", + "x-iri": "https://schema.beckn.io/Driver/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Driver", + "type": "object", + "description": "A person who operates a transport vehicle and is responsible for the safe delivery of passengers during a mobility service trip.", + "properties": { + "licenseNumber": { + "description": "Driver's license number", + "type": "string" + }, + "vehicleNumber": { + "description": "Registration number of the vehicle being driven", + "type": "string" + }, + "yearsOfExperience": { + "description": "Number of years of professional driving experience", + "type": "number" + }, + "id": { + "description": "Unique identifier for the fulfillment agent", + "type": "string" + }, + "person": { + "description": "Personal details of the agent", + "$ref": "https://schema.beckn.io/Person/v2.0/schema.json" + }, + "organization": { + "description": "Organisation the agent belongs to", + "$ref": "https://schema.beckn.io/Organization/v2.0/schema.json" + }, + "contact": { + "description": "Contact information for the agent", + "type": "string" + }, + "rating": { + "description": "Overall rating of the agent", + "$ref": "https://schema.beckn.io/Rating/v2.0/schema.json" + } + }, + "additionalProperties": false, + "x-tags": [ + "mobility", + "ride-hailing" + ] +} diff --git a/schema/Driver/v2.0/vocab.jsonld b/schema/Driver/v2.0/vocab.jsonld new file mode 100644 index 0000000..52350c8 --- /dev/null +++ b/schema/Driver/v2.0/vocab.jsonld @@ -0,0 +1,187 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/linked-data/latest-context.jsonld", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "skos": "http://www.w3.org/2004/02/skos/core#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "beckn:Driver", + "@type": "owl:Class", + "rdfs:label": { + "@value": "Driver", + "@language": "en" + }, + "rdfs:comment": { + "@value": "A person who operates a transport vehicle and is responsible for the safe delivery of passengers during a mobility service trip.", + "@language": "en" + }, + "rdfs:subClassOf": { + "@id": "https://schema.org/Person" + } + }, + { + "@id": "beckn:licenseNumber", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "licenseNumber", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Driver's license number", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Driver" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:vehicleNumber", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "vehicleNumber", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Registration number of the vehicle being driven", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Driver" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:yearsOfExperience", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "yearsOfExperience", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Number of years of professional driving experience", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Driver" + }, + "rdfs:range": { + "@id": "xsd:decimal" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Number" + } + }, + { + "@id": "beckn:id", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "id", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Unique identifier for the fulfillment agent", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Driver" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:person", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "person", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Personal details of the agent", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Driver" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#Person" + } + }, + { + "@id": "beckn:organization", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "organization", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Organisation the agent belongs to", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Driver" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#Organization" + } + }, + { + "@id": "beckn:contact", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "contact", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Contact information for the agent", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Driver" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:rating", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "rating", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Overall rating of the agent", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Driver" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#Rating" + } + } + ] +} diff --git a/schema/Fare/README.md b/schema/Fare/README.md index 5117405..32de9ac 100644 --- a/schema/Fare/README.md +++ b/schema/Fare/README.md @@ -1,13 +1,9 @@ # Fare -## Overview -**Fare** represents the total cost of a logistics service, including base freight, surcharges, taxes, and discounts. +The monetary cost of travel for a specific journey or service, calculated based on applicable fare rules and passenger categories. -## IRI -`https://schema.beckn.org/logistics/Fare` +## Versions -## Fare Components -- Base Freight, Fuel Surcharge, ODA Surcharge, COD Charge, Insurance, GST, Discount - -## Version -Current version: **v2.0** — [v2.0/attributes.yaml](./v2.0/attributes.yaml) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Fare/v2.0/attributes.yaml](https://schema.beckn.io/Fare/v2.0/attributes.yaml) | [https://schema.beckn.io/Fare/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Fare/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Fare/v2.0/context.jsonld](https://schema.beckn.io/Fare/v2.0/context.jsonld) | [https://schema.beckn.io/Fare/v2.0/vocab.jsonld](https://schema.beckn.io/Fare/v2.0/vocab.jsonld) | [https://schema.beckn.io/Fare/v2.0/README.md](https://schema.beckn.io/Fare/v2.0/README.md) | diff --git a/schema/Fare/v2.0/README.md b/schema/Fare/v2.0/README.md new file mode 100644 index 0000000..e1f9d09 --- /dev/null +++ b/schema/Fare/v2.0/README.md @@ -0,0 +1,31 @@ +# Fare — v2.0 + +The monetary cost of travel for a specific journey or service, calculated based on applicable fare rules and passenger categories. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Fare/attributes.yaml](https://schema.beckn.io/Fare/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Fare/v2.0/attributes.yaml](https://schema.beckn.io/Fare/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Fare/attributes.jsonschema.yaml](https://schema.beckn.io/Fare/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Fare/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Fare/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Fare/context.jsonld](https://schema.beckn.io/Fare/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Fare/v2.0/context.jsonld](https://schema.beckn.io/Fare/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Fare/vocab.jsonld](https://schema.beckn.io/Fare/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Fare/v2.0/vocab.jsonld](https://schema.beckn.io/Fare/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `fareId` | no | string | Unique identifier for the fare | +| `amount` | no | number | Total fare amount | +| `currency` | no | string | ISO 4217 currency code | +| `fareAttributes` | no | string | Transfer permissions, agency, and transfer limit | +| `fareRules` | no | $ref: https://schema.beckn.io/FareLegRule/v2.0/attributes.yaml#/components/schemas/FareLegRule | Leg rules that determine when this fare applies | +| `id` | no | string | Unique identifier for the offer | +| `descriptor` | no | $ref: https://schema.beckn.io/core/v2.0/Descriptor/attributes.yaml#components/schemas/Descriptor | Human-readable description of the offer | +| `price` | no | $ref: https://schema.beckn.io/PriceSpecification/v2.1/attributes.yaml#/components/schemas/PriceSpecification | Price specification for this offer | +| `validity` | no | $ref: https://schema.beckn.io/TimePeriod/v2.0/attributes.yaml#/components/schemas/TimePeriod | Validity period of the offer | +| `tags` | no | string | Tags or labels associated with the offer | diff --git a/schema/Fare/v2.0/attributes.yaml b/schema/Fare/v2.0/attributes.yaml index e917887..a487403 100644 --- a/schema/Fare/v2.0/attributes.yaml +++ b/schema/Fare/v2.0/attributes.yaml @@ -2,73 +2,54 @@ openapi: 3.1.0 info: title: Fare version: 2.0.0 - description: Schema for Fare in Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the Fare entity in the Beckn Mobility domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + url: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Fare: + x-iri: https://schema.beckn.io/Fare/v2.0 type: object title: Fare - description: Total cost charged for a logistics service including base freight, surcharges, taxes. - required: - - currency - - totalAmount + description: The monetary cost of travel for a specific journey or service, + calculated based on applicable fare rules and passenger categories. + x-tags: + - mobility + - schema-org + - ride-hailing properties: - currency: + fareId: + description: Unique identifier for the fare type: string - example: "INR" - baseFreight: - type: number - description: Base freight charge - example: 450 - fuelSurcharge: - type: number - example: 45 - odaSurcharge: - type: number - description: Out of Delivery Area surcharge - example: 0 - codCharge: - type: number - description: Cash on delivery charge - example: 30 - insuranceCharge: - type: number - example: 25 - gst: + amount: + description: Total fare amount type: number - description: GST amount - example: 81 - otherCharges: - type: number - example: 0 - discount: - type: number - example: 50 - totalAmount: - type: number - description: Final total payable - example: 581 - breakup: - type: array - description: Detailed fare breakup line items - items: - $ref: '#/components/schemas/FareBreakup' - estimatedFare: - type: boolean - description: Whether this is an estimate or confirmed fare - example: false - paymentMode: + currency: + description: ISO 4217 currency code + type: string + fareAttributes: + description: Transfer permissions, agency, and transfer limit + type: string + fareRules: + description: Leg rules that determine when this fare applies + $ref: https://schema.beckn.io/FareLegRule/v2.0/attributes.yaml#/components/schemas/FareLegRule + id: + description: Unique identifier for the offer + type: string + descriptor: + description: Human-readable description of the offer + $ref: https://schema.beckn.io/Descriptor/v2.0/attributes.yaml#/components/schemas/Descriptor + price: + description: Price specification for this offer + $ref: https://schema.beckn.io/PriceSpecification/v2.1/attributes.yaml#/components/schemas/PriceSpecification + validity: + description: Validity period of the offer + $ref: https://schema.beckn.io/TimePeriod/v2.0/attributes.yaml#/components/schemas/TimePeriod + tags: + description: Tags or labels associated with the offer type: string - enum: - - PREPAID - - COD - - TO_PAY - - CREDIT - example: "PREPAID" + additionalProperties: false diff --git a/schema/Fare/v2.0/context.jsonld b/schema/Fare/v2.0/context.jsonld new file mode 100644 index 0000000..03237d3 --- /dev/null +++ b/schema/Fare/v2.0/context.jsonld @@ -0,0 +1,16 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/mobility/v2.0/", + "Fare": "beckn:Fare", + "fareId": "beckn:fareId", + "amount": "beckn:amount", + "currency": "beckn:currency", + "fareAttributes": "beckn:fareAttributes", + "fareRules": "beckn:fareRules", + "id": "beckn:id", + "descriptor": "beckn:descriptor", + "price": "beckn:price", + "validity": "beckn:validity", + "tags": "beckn:tags" + } +} diff --git a/schema/Fare/v2.0/schema.json b/schema/Fare/v2.0/schema.json new file mode 100644 index 0000000..c78263b --- /dev/null +++ b/schema/Fare/v2.0/schema.json @@ -0,0 +1,56 @@ +{ + "$id": "https://schema.beckn.io/Fare/v2.0", + "x-iri": "https://schema.beckn.io/Fare/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fare", + "type": "object", + "description": "The monetary cost of travel for a specific journey or service, calculated based on applicable fare rules and passenger categories.", + "properties": { + "fareId": { + "description": "Unique identifier for the fare", + "type": "string" + }, + "amount": { + "description": "Total fare amount", + "type": "number" + }, + "currency": { + "description": "ISO 4217 currency code", + "type": "string" + }, + "fareAttributes": { + "description": "Transfer permissions, agency, and transfer limit", + "type": "string" + }, + "fareRules": { + "description": "Leg rules that determine when this fare applies", + "$ref": "https://schema.beckn.io/FareLegRule/v2.0/schema.json" + }, + "id": { + "description": "Unique identifier for the offer", + "type": "string" + }, + "descriptor": { + "description": "Human-readable description of the offer", + "$ref": "https://schema.beckn.io/Descriptor/v2.1/schema.json" + }, + "price": { + "description": "Price specification for this offer", + "$ref": "https://schema.beckn.io/PriceSpecification/v2.1/schema.json" + }, + "validity": { + "description": "Validity period of the offer", + "$ref": "https://schema.beckn.io/TimePeriod/v2.1/schema.json" + }, + "tags": { + "description": "Tags or labels associated with the offer", + "type": "string" + } + }, + "additionalProperties": false, + "x-tags": [ + "mobility", + "schema-org", + "ride-hailing" + ] +} diff --git a/schema/Fare/v2.0/vocab.jsonld b/schema/Fare/v2.0/vocab.jsonld new file mode 100644 index 0000000..8764797 --- /dev/null +++ b/schema/Fare/v2.0/vocab.jsonld @@ -0,0 +1,234 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/linked-data/latest-context.jsonld", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "skos": "http://www.w3.org/2004/02/skos/core#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "beckn:Fare", + "@type": "owl:Class", + "rdfs:label": { + "@value": "Fare", + "@language": "en" + }, + "rdfs:comment": { + "@value": "The monetary cost of travel for a specific journey or service, calculated based on applicable fare rules and passenger categories.", + "@language": "en" + }, + "rdfs:seeAlso": [ + { + "@id": "https://schema.org/PriceSpecification" + }, + { + "@id": "beckn:FareLegRule" + } + ] + }, + { + "@id": "beckn:fareId", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "fareId", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Unique identifier for the fare", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Fare" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:amount", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "amount", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Total fare amount", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Fare" + }, + "rdfs:range": { + "@id": "xsd:decimal" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Number" + } + }, + { + "@id": "beckn:currency", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "currency", + "@language": "en" + }, + "rdfs:comment": { + "@value": "ISO 4217 currency code", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Fare" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:fareAttributes", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "fareAttributes", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Transfer permissions, agency, and transfer limit", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Fare" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:fareRules", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "fareRules", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Leg rules that determine when this fare applies", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Fare" + }, + "rdfs:range": { + "@id": "beckn:FareLegRule" + }, + "rdfs:seeAlso": { + "@id": "../FareLegRule/v2.0/vocab.jsonld#beckn:FareLegRule" + } + }, + { + "@id": "beckn:id", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "id", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Unique identifier for the offer", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Fare" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:descriptor", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "descriptor", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Human-readable description of the offer", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Fare" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#Descriptor" + } + }, + { + "@id": "beckn:price", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "price", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Price specification for this offer", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Fare" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#PriceSpecification" + } + }, + { + "@id": "beckn:validity", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "validity", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Validity period of the offer", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Fare" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#TimePeriod" + } + }, + { + "@id": "beckn:tags", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "tags", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Tags or labels associated with the offer", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Fare" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + } + ] +} diff --git a/schema/FareBreakup/README.md b/schema/FareBreakup/README.md index 1c5b027..df0b540 100644 --- a/schema/FareBreakup/README.md +++ b/schema/FareBreakup/README.md @@ -1,10 +1,9 @@ # FareBreakup -## Overview -**FareBreakup** provides a detailed line-by-line itemization of the components making up the total fare. +A detailed breakdown of the total fare into its constituent components, including base fare, taxes, surcharges, and discounts. -## IRI -`https://schema.beckn.org/logistics/FareBreakup` +## Versions -## Version -Current version: **v2.0** — [v2.0/attributes.yaml](./v2.0/attributes.yaml) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/FareBreakup/v2.0/attributes.yaml](https://schema.beckn.io/FareBreakup/v2.0/attributes.yaml) | [https://schema.beckn.io/FareBreakup/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/FareBreakup/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/FareBreakup/v2.0/context.jsonld](https://schema.beckn.io/FareBreakup/v2.0/context.jsonld) | [https://schema.beckn.io/FareBreakup/v2.0/vocab.jsonld](https://schema.beckn.io/FareBreakup/v2.0/vocab.jsonld) | [https://schema.beckn.io/FareBreakup/v2.0/README.md](https://schema.beckn.io/FareBreakup/v2.0/README.md) | diff --git a/schema/FareBreakup/v2.0/README.md b/schema/FareBreakup/v2.0/README.md new file mode 100644 index 0000000..b5f403a --- /dev/null +++ b/schema/FareBreakup/v2.0/README.md @@ -0,0 +1,29 @@ +# FareBreakup — v2.0 + +A detailed breakdown of the total fare into its constituent components, including base fare, taxes, surcharges, and discounts. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/FareBreakup/attributes.yaml](https://schema.beckn.io/FareBreakup/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/FareBreakup/v2.0/attributes.yaml](https://schema.beckn.io/FareBreakup/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/FareBreakup/attributes.jsonschema.yaml](https://schema.beckn.io/FareBreakup/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/FareBreakup/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/FareBreakup/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/FareBreakup/context.jsonld](https://schema.beckn.io/FareBreakup/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/FareBreakup/v2.0/context.jsonld](https://schema.beckn.io/FareBreakup/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/FareBreakup/vocab.jsonld](https://schema.beckn.io/FareBreakup/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/FareBreakup/v2.0/vocab.jsonld](https://schema.beckn.io/FareBreakup/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `componentTitle` | no | string | Human-readable title for this fare component | +| `amount` | no | number | Monetary amount for this fare component | +| `currency` | no | string | ISO 4217 currency code for this component | +| `taxAmount` | no | number | Tax amount included in this component | +| `taxRate` | no | number | Tax rate percentage applied | +| `title` | no | string | Title or label of this price component | +| `price` | no | $ref: https://schema.beckn.io/PriceSpecification/v2.1/attributes.yaml#/components/schemas/PriceSpecification | Monetary value of this component | +| `tags` | no | string | Tags associated with this price component | diff --git a/schema/FareBreakup/v2.0/attributes.yaml b/schema/FareBreakup/v2.0/attributes.yaml index 3911099..9a692d6 100644 --- a/schema/FareBreakup/v2.0/attributes.yaml +++ b/schema/FareBreakup/v2.0/attributes.yaml @@ -2,59 +2,47 @@ openapi: 3.1.0 info: title: FareBreakup version: 2.0.0 - description: Schema for FareBreakup in Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the FareBreakup entity in the Beckn Mobility license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + url: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: FareBreakup: + x-iri: https://schema.beckn.io/FareBreakup/v2.0 type: object title: FareBreakup - description: A single line item in the fare breakup for a logistics service. - required: - - title - - amount + description: A detailed breakdown of the total fare into its constituent components, + including base fare, taxes, surcharges, and discounts. + x-tags: + - mobility + - ride-hailing properties: - title: + componentTitle: + description: Human-readable title for this fare component type: string - description: Name of the fare component - example: "Base Freight" amount: + description: Monetary amount for this fare component type: number - example: 450 currency: + description: ISO 4217 currency code for this component + type: string + taxAmount: + description: Tax amount included in this component + type: number + taxRate: + description: Tax rate percentage applied + type: number + title: + description: Title or label of this price component type: string - example: "INR" - type: + price: + description: Monetary value of this component + $ref: https://schema.beckn.io/PriceSpecification/v2.1/attributes.yaml#/components/schemas/PriceSpecification + tags: + description: Tags associated with this price component type: string - enum: - - ITEM - - SURCHARGE - - TAX - - DISCOUNT - - FEE - example: "ITEM" - taxBreakup: - type: array - description: Tax sub-components if applicable - items: - type: object - properties: - name: - type: string - example: "CGST @ 9%" - percent: - type: number - example: 9 - amount: - type: number - example: 40.5 - waived: - type: boolean - description: Whether this component was waived - example: false + additionalProperties: false diff --git a/schema/FareBreakup/v2.0/context.jsonld b/schema/FareBreakup/v2.0/context.jsonld new file mode 100644 index 0000000..8e0602c --- /dev/null +++ b/schema/FareBreakup/v2.0/context.jsonld @@ -0,0 +1,14 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/mobility/v2.0/", + "FareBreakup": "beckn:FareBreakup", + "componentTitle": "beckn:componentTitle", + "amount": "beckn:amount", + "currency": "beckn:currency", + "taxAmount": "beckn:taxAmount", + "taxRate": "beckn:taxRate", + "title": "beckn:title", + "price": "beckn:price", + "tags": "beckn:tags" + } +} diff --git a/schema/FareBreakup/v2.0/schema.json b/schema/FareBreakup/v2.0/schema.json new file mode 100644 index 0000000..6051860 --- /dev/null +++ b/schema/FareBreakup/v2.0/schema.json @@ -0,0 +1,47 @@ +{ + "$id": "https://schema.beckn.io/FareBreakup/v2.0", + "x-iri": "https://schema.beckn.io/FareBreakup/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "FareBreakup", + "type": "object", + "description": "A detailed breakdown of the total fare into its constituent components, including base fare, taxes, surcharges, and discounts.", + "properties": { + "componentTitle": { + "description": "Human-readable title for this fare component", + "type": "string" + }, + "amount": { + "description": "Monetary amount for this fare component", + "type": "number" + }, + "currency": { + "description": "ISO 4217 currency code for this component", + "type": "string" + }, + "taxAmount": { + "description": "Tax amount included in this component", + "type": "number" + }, + "taxRate": { + "description": "Tax rate percentage applied", + "type": "number" + }, + "title": { + "description": "Title or label of this price component", + "type": "string" + }, + "price": { + "description": "Monetary value of this component", + "$ref": "https://schema.beckn.io/PriceSpecification/v2.1/schema.json" + }, + "tags": { + "description": "Tags associated with this price component", + "type": "string" + } + }, + "additionalProperties": false, + "x-tags": [ + "mobility", + "ride-hailing" + ] +} diff --git a/schema/FareBreakup/v2.0/vocab.jsonld b/schema/FareBreakup/v2.0/vocab.jsonld new file mode 100644 index 0000000..05b2834 --- /dev/null +++ b/schema/FareBreakup/v2.0/vocab.jsonld @@ -0,0 +1,190 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/linked-data/latest-context.jsonld", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "skos": "http://www.w3.org/2004/02/skos/core#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "beckn:FareBreakup", + "@type": "owl:Class", + "rdfs:label": { + "@value": "FareBreakup", + "@language": "en" + }, + "rdfs:comment": { + "@value": "A detailed breakdown of the total fare into its constituent components, including base fare, taxes, surcharges, and discounts.", + "@language": "en" + } + }, + { + "@id": "beckn:componentTitle", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "componentTitle", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Human-readable title for this fare component", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:FareBreakup" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:amount", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "amount", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Monetary amount for this fare component", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:FareBreakup" + }, + "rdfs:range": { + "@id": "xsd:decimal" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Number" + } + }, + { + "@id": "beckn:currency", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "currency", + "@language": "en" + }, + "rdfs:comment": { + "@value": "ISO 4217 currency code for this component", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:FareBreakup" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:taxAmount", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "taxAmount", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Tax amount included in this component", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:FareBreakup" + }, + "rdfs:range": { + "@id": "xsd:decimal" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Number" + } + }, + { + "@id": "beckn:taxRate", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "taxRate", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Tax rate percentage applied", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:FareBreakup" + }, + "rdfs:range": { + "@id": "xsd:decimal" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Number" + } + }, + { + "@id": "beckn:title", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "title", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Title or label of this price component", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:FareBreakup" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:price", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "price", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Monetary value of this component", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:FareBreakup" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#PriceSpecification" + } + }, + { + "@id": "beckn:tags", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "tags", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Tags associated with this price component", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:FareBreakup" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + } + ] +} diff --git a/schema/Hub/README.md b/schema/Hub/README.md index e4e6444..39ead2f 100644 --- a/schema/Hub/README.md +++ b/schema/Hub/README.md @@ -1,13 +1,9 @@ # Hub -A schema.beckn.io Type +A Hub is a logistics fulfillment center, sorting facility, or distribution point where goods are consolidated, sorted, and dispatched for onward delivery. Maps to beckn:Location. -Logistics facility: `FULFILLMENT_CENTER`, `SORTING_HUB`, `DARK_STORE`, `LAST_MILE_HUB` +## Versions -**Canonical IRI :** `log:Hub` - -**Canonical URL:** https://schema.beckn.io/logistics/Hub - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Hub/v2.0/attributes.yaml](https://schema.beckn.io/Hub/v2.0/attributes.yaml) | [https://schema.beckn.io/Hub/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Hub/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Hub/v2.0/context.jsonld](https://schema.beckn.io/Hub/v2.0/context.jsonld) | [https://schema.beckn.io/Hub/v2.0/vocab.jsonld](https://schema.beckn.io/Hub/v2.0/vocab.jsonld) | [https://schema.beckn.io/Hub/v2.0/README.md](https://schema.beckn.io/Hub/v2.0/README.md) | diff --git a/schema/Hub/v2.0/README.md b/schema/Hub/v2.0/README.md new file mode 100644 index 0000000..c0d1184 --- /dev/null +++ b/schema/Hub/v2.0/README.md @@ -0,0 +1,33 @@ +# Hub — v2.0 + +A Hub is a logistics fulfillment center, sorting facility, or distribution point where goods are consolidated, sorted, and dispatched for onward delivery. Maps to beckn:Location. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Hub/attributes.yaml](https://schema.beckn.io/Hub/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Hub/v2.0/attributes.yaml](https://schema.beckn.io/Hub/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Hub/attributes.jsonschema.yaml](https://schema.beckn.io/Hub/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Hub/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Hub/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Hub/context.jsonld](https://schema.beckn.io/Hub/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Hub/v2.0/context.jsonld](https://schema.beckn.io/Hub/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Hub/vocab.jsonld](https://schema.beckn.io/Hub/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Hub/v2.0/vocab.jsonld](https://schema.beckn.io/Hub/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | - | +| `name` | yes | string | - | +| `code` | no | string | Short hub code | +| `place` | yes | $ref: https://schema.beckn.io/Place/v2.0/attributes.yaml#/components/schemas/Place | - | +| `type` | no | string | - | +| `operator` | no | $ref: https://schema.beckn.io/Operator/v2.0/attributes.yaml#/components/schemas/Operator | - | +| `operatingHours` | no | object | - | +| `processingCapacity` | no | object | Maximum packages processed per day | +| `serviceablePincodes` | no | array | PIN codes serviced from this hub | +| `facilities` | no | array | Facilities available at hub | +| `contactPhone` | no | string | - | +| `active` | no | boolean | - | diff --git a/schema/Hub/v2.0/attributes.jsonschema.yaml b/schema/Hub/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 36778f5..0000000 --- a/schema/Hub/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,103 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: Hub JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - Hub: - $ref: '#/$defs/Hub' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - Hub: - type: object - title: Hub - description: 'A Hub is a logistics fulfillment center, sorting facility, or distribution - point where goods are consolidated, sorted, and dispatched for onward delivery. - Maps to beckn:Location. - - ' - required: - - id - - name - - place - properties: - id: - type: string - example: HUB-BLR-MAIN - name: - type: string - example: Bengaluru Main Sorting Hub - code: - type: string - description: Short hub code - example: BLR-MAIN - place: - $ref: https://schema.beckn.io/LogisticsPlace/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsPlace - type: - type: string - enum: - - FULFILLMENT_CENTER - - SORTING_HUB - - COLLECTION_POINT - - LAST_MILE_HUB - - DARK_STORE - - CUSTOMS_WAREHOUSE - example: SORTING_HUB - operator: - $ref: https://schema.beckn.io/LogisticsOperator/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsOperator - operatingHours: - type: object - properties: - open: - type: string - example: 06:00 - close: - type: string - example: '23:00' - is24x7: - type: boolean - example: false - processingCapacity: - type: object - description: Maximum packages processed per day - properties: - value: - type: integer - example: 50000 - unit: - type: string - example: packages/day - serviceablePincodes: - type: array - description: PIN codes serviced from this hub - items: - type: string - example: - - '560001' - - '560002' - - '560068' - facilities: - type: array - description: Facilities available at hub - items: - type: string - example: - - cold_storage - - hazmat_storage - - customer_service_desk - contactPhone: - type: string - example: '+918028001234' - active: - type: boolean - example: true diff --git a/schema/Hub/v2.0/attributes.yaml b/schema/Hub/v2.0/attributes.yaml index 5786db0..448320f 100644 --- a/schema/Hub/v2.0/attributes.yaml +++ b/schema/Hub/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: Hub version: 2.0.0 description: Schema definition for the Hub entity in the Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Hub: + x-iri: https://schema.beckn.io/Hub/v2.0 type: object title: Hub - description: 'A Hub is a logistics fulfillment center, sorting facility, or - distribution point where goods are consolidated, sorted, and dispatched for - onward delivery. Maps to beckn:Location. + description: 'A Hub is a logistics fulfillment center, sorting facility, or distribution point where goods are consolidated, sorted, and dispatched for onward delivery. Maps to beckn:Location. ' required: @@ -48,7 +45,7 @@ components: - CUSTOMS_WAREHOUSE example: SORTING_HUB operator: - $ref: https://schema.beckn.io/LogisticsOperator/v2.0/attributes.yaml#/components/schemas/LogisticsOperator + $ref: https://schema.beckn.io/Operator/v2.0/attributes.yaml#/components/schemas/Operator operatingHours: type: object properties: diff --git a/schema/Hub/v2.0/context.jsonld b/schema/Hub/v2.0/context.jsonld new file mode 100644 index 0000000..a1b18a0 --- /dev/null +++ b/schema/Hub/v2.0/context.jsonld @@ -0,0 +1,28 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "Hub": "beckn:Hub", + "active": "beckn:active", + "close": "beckn:close", + "code": "beckn:code", + "contactPhone": "beckn:contactPhone", + "facilities": "beckn:facilities", + "id": "beckn:id", + "is24x7": "beckn:is24x7", + "name": "beckn:name", + "open": "beckn:open", + "operatingHours": "beckn:operatingHours", + "operator": "beckn:operator", + "place": "beckn:place", + "processingCapacity": "beckn:processingCapacity", + "serviceablePincodes": "beckn:serviceablePincodes", + "type": "beckn:type", + "unit": "beckn:unit", + "value": "beckn:value" + } +} diff --git a/schema/Hub/v2.0/schema.json b/schema/Hub/v2.0/schema.json new file mode 100644 index 0000000..63906a9 --- /dev/null +++ b/schema/Hub/v2.0/schema.json @@ -0,0 +1,109 @@ +{ + "type": "object", + "title": "Hub", + "description": "A Hub is a logistics fulfillment center, sorting facility, or distribution point where goods are consolidated, sorted, and dispatched for onward delivery. Maps to beckn:Location. ", + "required": [ + "id", + "name", + "place" + ], + "properties": { + "id": { + "type": "string", + "example": "HUB-BLR-MAIN" + }, + "name": { + "type": "string", + "example": "Bengaluru Main Sorting Hub" + }, + "code": { + "type": "string", + "description": "Short hub code", + "example": "BLR-MAIN" + }, + "place": { + "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + }, + "type": { + "type": "string", + "enum": [ + "FULFILLMENT_CENTER", + "SORTING_HUB", + "COLLECTION_POINT", + "LAST_MILE_HUB", + "DARK_STORE", + "CUSTOMS_WAREHOUSE" + ], + "example": "SORTING_HUB" + }, + "operator": { + "$ref": "https://schema.beckn.io/Operator/v2.0/schema.json" + }, + "operatingHours": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "06:00" + }, + "close": { + "type": "string", + "example": "23:00" + }, + "is24x7": { + "type": "boolean", + "example": false + } + } + }, + "processingCapacity": { + "type": "object", + "description": "Maximum packages processed per day", + "properties": { + "value": { + "type": "integer", + "example": 50000 + }, + "unit": { + "type": "string", + "example": "packages/day" + } + } + }, + "serviceablePincodes": { + "type": "array", + "description": "PIN codes serviced from this hub", + "items": { + "type": "string" + }, + "example": [ + "560001", + "560002", + "560068" + ] + }, + "facilities": { + "type": "array", + "description": "Facilities available at hub", + "items": { + "type": "string" + }, + "example": [ + "cold_storage", + "hazmat_storage", + "customer_service_desk" + ] + }, + "contactPhone": { + "type": "string", + "example": "+918028001234" + }, + "active": { + "type": "boolean", + "example": true + } + }, + "$id": "https://schema.beckn.io/Hub/v2.0", + "x-iri": "https://schema.beckn.io/Hub/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/Hub/v2.0/vocab.jsonld b/schema/Hub/v2.0/vocab.jsonld new file mode 100644 index 0000000..ebcea72 --- /dev/null +++ b/schema/Hub/v2.0/vocab.jsonld @@ -0,0 +1,37 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "Hub": "beckn:Hub", + "active": "beckn:active", + "close": "beckn:close", + "code": "beckn:code", + "contactPhone": "beckn:contactPhone", + "facilities": "beckn:facilities", + "id": "beckn:id", + "is24x7": "beckn:is24x7", + "name": "beckn:name", + "open": "beckn:open", + "operatingHours": "beckn:operatingHours", + "operator": "beckn:operator", + "place": "beckn:place", + "processingCapacity": "beckn:processingCapacity", + "serviceablePincodes": "beckn:serviceablePincodes", + "type": "beckn:type", + "unit": "beckn:unit", + "value": "beckn:value" + }, + "@graph": [ + { + "@id": "beckn:Hub", + "@type": "rdfs:Class", + "rdfs:label": "Hub", + "rdfs:comment": "TODO: Description Needed - Hub" + } + ] +} diff --git a/schema/Logistics/README.md b/schema/Logistics/README.md index c4c231d..737d6ba 100644 --- a/schema/Logistics/README.md +++ b/schema/Logistics/README.md @@ -1,13 +1,9 @@ # Logistics -A schema.beckn.io Type +A Carrier is a transport service provider responsible for moving goods across distances. Carriers operate fleets of vehicles and may own/manage logistics hubs. Maps to beckn:Provider. -Master schema package for Beckn Logistics v2.0 containing consolidated OpenAPI attributes, JSON Schema attributes, vocabulary graph, and context mappings. +## Versions -**Canonical IRI :** `log:Logistics` - -**Canonical URL:** https://schema.beckn.io/logistics/Logistics - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Logistics/v2.0/attributes.yaml](https://schema.beckn.io/Logistics/v2.0/attributes.yaml) | [https://schema.beckn.io/Logistics/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Logistics/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Logistics/v2.0/context.jsonld](https://schema.beckn.io/Logistics/v2.0/context.jsonld) | [https://schema.beckn.io/Logistics/v2.0/vocab.jsonld](https://schema.beckn.io/Logistics/v2.0/vocab.jsonld) | [https://schema.beckn.io/Logistics/v2.0/README.md](https://schema.beckn.io/Logistics/v2.0/README.md) | diff --git a/schema/Logistics/v2.0/README.md b/schema/Logistics/v2.0/README.md new file mode 100644 index 0000000..1af18c4 --- /dev/null +++ b/schema/Logistics/v2.0/README.md @@ -0,0 +1,36 @@ +# Logistics — v2.0 + +A Carrier is a transport service provider responsible for moving goods across distances. Carriers operate fleets of vehicles and may own/manage logistics hubs. Maps to beckn:Provider. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Logistics/attributes.yaml](https://schema.beckn.io/Logistics/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Logistics/v2.0/attributes.yaml](https://schema.beckn.io/Logistics/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Logistics/attributes.jsonschema.yaml](https://schema.beckn.io/Logistics/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Logistics/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Logistics/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Logistics/context.jsonld](https://schema.beckn.io/Logistics/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Logistics/v2.0/context.jsonld](https://schema.beckn.io/Logistics/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Logistics/vocab.jsonld](https://schema.beckn.io/Logistics/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Logistics/v2.0/vocab.jsonld](https://schema.beckn.io/Logistics/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | Unique carrier identifier | +| `name` | yes | string | Legal name of the carrier | +| `code` | no | string | Short carrier code | +| `logo` | no | string | URL to carrier logo | +| `website` | no | string | - | +| `contact` | no | $ref: #/components/schemas/Contact | - | +| `rating` | no | number | - | +| `serviceTypes` | no | array | Types of logistics services offered | +| `serviceCoverage` | no | array | Geographic regions served | +| `fleetSize` | no | integer | Number of vehicles in fleet | +| `hubs` | no | array | Logistics hubs operated by this carrier | +| `licenseNumber` | no | string | Transport license number | +| `gstNumber` | no | string | GST registration number | +| `panNumber` | no | string | PAN for tax purposes | +| `active` | no | boolean | Whether carrier is currently active on network | diff --git a/schema/Logistics/v2.0/attributes.jsonschema.yaml b/schema/Logistics/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 05f956b..0000000 --- a/schema/Logistics/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,1879 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: Logistics JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - Carrier: - $ref: '#/$defs/Carrier' - Consignment: - $ref: '#/$defs/Consignment' - Contact: - $ref: '#/$defs/Contact' - Courier: - $ref: '#/$defs/Courier' - DeliverySlot: - $ref: '#/$defs/DeliverySlot' - Hub: - $ref: '#/$defs/Hub' - LogisticsAlert: - $ref: '#/$defs/LogisticsAlert' - LogisticsCancellationPolicy: - $ref: '#/$defs/LogisticsCancellationPolicy' - LogisticsDriver: - $ref: '#/$defs/LogisticsDriver' - LogisticsFare: - $ref: '#/$defs/LogisticsFare' - LogisticsFareBreakup: - $ref: '#/$defs/LogisticsFareBreakup' - LogisticsFeedback: - $ref: '#/$defs/LogisticsFeedback' - LogisticsOperator: - $ref: '#/$defs/LogisticsOperator' - LogisticsPlace: - $ref: '#/$defs/LogisticsPlace' - LogisticsRating: - $ref: '#/$defs/LogisticsRating' - LogisticsReceipt: - $ref: '#/$defs/LogisticsReceipt' - LogisticsRoute: - $ref: '#/$defs/LogisticsRoute' - LogisticsSupportCase: - $ref: '#/$defs/LogisticsSupportCase' - LogisticsVehicle: - $ref: '#/$defs/LogisticsVehicle' - Package: - $ref: '#/$defs/Package' - Proof: - $ref: '#/$defs/Proof' - ReturnPolicy: - $ref: '#/$defs/ReturnPolicy' - Shipment: - $ref: '#/$defs/Shipment' - TrackingUpdate: - $ref: '#/$defs/TrackingUpdate' - Waypoint: - $ref: '#/$defs/Waypoint' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - Carrier: - type: object - title: Carrier - description: 'A Carrier is a transport service provider responsible for moving - goods across distances. Carriers operate fleets of vehicles and may own/manage - logistics hubs. Maps to beckn:Provider. - - ' - required: - - id - - name - properties: - id: - type: string - description: Unique carrier identifier - example: CAR-DTDC-001 - name: - type: string - description: Legal name of the carrier - example: DTDC Express Limited - code: - type: string - description: Short carrier code - example: DTDC - logo: - type: string - format: uri - description: URL to carrier logo - website: - type: string - format: uri - contact: - $ref: '#/$defs/Contact' - rating: - type: number - minimum: 1 - maximum: 5 - example: 4.2 - serviceTypes: - type: array - description: Types of logistics services offered - items: - type: string - enum: - - HYPERLOCAL - - COURIER - - INTERSTATE - - LONG_HAUL - - EXPRESS - serviceCoverage: - type: array - description: Geographic regions served - items: - type: object - properties: - country: - type: string - states: - type: array - items: - type: string - pincodes: - type: array - items: - type: string - fleetSize: - type: integer - description: Number of vehicles in fleet - example: 500 - hubs: - type: array - description: Logistics hubs operated by this carrier - items: - $ref: '#/$defs/Hub' - licenseNumber: - type: string - description: Transport license number - gstNumber: - type: string - description: GST registration number - panNumber: - type: string - description: PAN for tax purposes - active: - type: boolean - description: Whether carrier is currently active on network - example: true - Consignment: - type: object - title: Consignment - description: 'A Consignment is a collection of packages or shipments grouped together - under a single commercial transaction between a shipper and consignee. Maps - to beckn:Order. - - ' - required: - - id - - shipper - - consignee - properties: - id: - type: string - description: Unique consignment identifier (e.g. AWB number) - example: AWB-2024-9900123 - shipper: - $ref: '#/$defs/Contact' - consignee: - $ref: '#/$defs/Contact' - shipments: - type: array - description: List of shipments in this consignment - items: - $ref: '#/$defs/Shipment' - carrier: - $ref: '#/$defs/Carrier' - totalWeight: - type: object - properties: - value: - type: number - unit: - type: string - enum: - - kg - - ton - totalPackages: - type: integer - description: Total number of packages in this consignment - serviceType: - type: string - enum: - - COURIER - - INTERSTATE - - LONG_HAUL - - EXPRESS - paymentMode: - type: string - enum: - - PREPAID - - TO_PAY - - COD - description: Payment responsibility - commercialInvoiceNumber: - type: string - description: Commercial invoice number for customs - customsDeclaration: - type: boolean - description: Whether customs declaration is required - status: - type: string - enum: - - CREATED - - BOOKED - - IN_TRANSIT - - DELIVERED - - CANCELLED - createdAt: - type: string - format: date-time - estimatedDelivery: - type: string - format: date-time - Contact: - type: object - title: Contact - description: Contact information for sender, receiver, driver, or operator. - properties: - name: - type: string - example: Priya Mehta - phone: - type: string - example: '+919876543210' - email: - type: string - format: email - example: priya.mehta@email.com - alternatePhone: - type: string - company: - type: string - description: Company name if B2B contact - gstNumber: - type: string - description: GST number for B2B invoicing - Courier: - type: object - title: Courier - description: 'A Courier is an individual delivery agent responsible for last-mile - pickup and delivery of packages, typically in hyperlocal or urban delivery contexts. - Maps to beckn:Agent. - - ' - required: - - id - - name - properties: - id: - type: string - description: Unique courier identifier - example: CRR-001234 - name: - type: string - description: Full name of the courier - example: Ramesh Kumar - phone: - type: string - description: Contact phone number - example: '+919876543210' - email: - type: string - format: email - description: Email address - profilePhoto: - type: string - format: uri - description: URL to courier's profile photo - rating: - type: number - description: Average rating (1-5) - minimum: 1 - maximum: 5 - example: 4.6 - vehicleType: - type: string - description: Type of vehicle used - enum: - - BICYCLE - - MOTORCYCLE - - ELECTRIC_SCOOTER - - CAR - - VAN - example: MOTORCYCLE - vehicleNumber: - type: string - description: Vehicle registration number - example: KA05AB1234 - currentLocation: - $ref: '#/$defs/LogisticsPlace' - status: - type: string - enum: - - AVAILABLE - - ASSIGNED - - ON_PICKUP - - ON_DELIVERY - - OFFLINE - example: ON_DELIVERY - activeShipments: - type: array - description: Currently assigned shipments - items: - type: string - kycVerified: - type: boolean - description: Whether courier has completed KYC verification - example: true - joiningDate: - type: string - format: date - description: Date the courier joined the network - DeliverySlot: - type: object - title: DeliverySlot - description: 'A DeliverySlot is a time window offered or agreed upon for delivery - of a shipment. Maps to beckn:TimeSlot. - - ' - required: - - id - - date - - startTime - - endTime - properties: - id: - type: string - example: SLOT-2024-03-15-AM - date: - type: string - format: date - example: '2024-03-15' - startTime: - type: string - example: '10:00' - endTime: - type: string - example: '13:00' - label: - type: string - description: Human-readable label - enum: - - EXPRESS_1HR - - EXPRESS_2HR - - MORNING - - AFTERNOON - - EVENING - - FULL_DAY - - NEXT_DAY - example: MORNING - available: - type: boolean - description: Whether this slot is still available - example: true - surcharge: - type: object - description: Additional charge for this slot (e.g. express slot) - properties: - amount: - type: number - example: 49 - currency: - type: string - example: INR - capacity: - type: integer - description: Maximum deliveries in this slot - example: 100 - remainingCapacity: - type: integer - example: 34 - cutoffTime: - type: string - format: date-time - description: Last time to book this slot - example: '2024-03-14T22:00:00+05:30' - Hub: - type: object - title: Hub - description: 'A Hub is a logistics fulfillment center, sorting facility, or distribution - point where goods are consolidated, sorted, and dispatched for onward delivery. - Maps to beckn:Location. - - ' - required: - - id - - name - - place - properties: - id: - type: string - example: HUB-BLR-MAIN - name: - type: string - example: Bengaluru Main Sorting Hub - code: - type: string - description: Short hub code - example: BLR-MAIN - place: - $ref: '#/$defs/LogisticsPlace' - type: - type: string - enum: - - FULFILLMENT_CENTER - - SORTING_HUB - - COLLECTION_POINT - - LAST_MILE_HUB - - DARK_STORE - - CUSTOMS_WAREHOUSE - example: SORTING_HUB - operator: - $ref: '#/$defs/LogisticsOperator' - operatingHours: - type: object - properties: - open: - type: string - example: 06:00 - close: - type: string - example: '23:00' - is24x7: - type: boolean - example: false - processingCapacity: - type: object - description: Maximum packages processed per day - properties: - value: - type: integer - example: 50000 - unit: - type: string - example: packages/day - serviceablePincodes: - type: array - description: PIN codes serviced from this hub - items: - type: string - example: - - '560001' - - '560002' - - '560068' - facilities: - type: array - description: Facilities available at hub - items: - type: string - example: - - cold_storage - - hazmat_storage - - customer_service_desk - contactPhone: - type: string - example: '+918028001234' - active: - type: boolean - example: true - LogisticsAlert: - type: object - title: LogisticsAlert - description: 'An Alert is a notification or warning related to a shipment, such - as delays, exceptions, damage reports, or SLA breaches. Maps to beckn:Event. - - ' - required: - - id - - type - - severity - - message - - timestamp - properties: - id: - type: string - example: ALT-0001 - shipmentId: - type: string - example: SHP-2024-001234 - type: - type: string - enum: - - DELAY - - DAMAGE - - LOSS - - FAILED_DELIVERY - - CUSTOMS_HOLD - - WEATHER_DISRUPTION - - ROUTE_DEVIATION - - SLA_BREACH - - ADDRESS_ISSUE - - PAYMENT_FAILED - example: DELAY - severity: - type: string - enum: - - INFO - - WARNING - - CRITICAL - example: WARNING - message: - type: string - example: Your shipment is delayed by 4 hours due to traffic at NH-44. - cause: - type: string - description: Root cause of the alert - example: Highway accident causing major traffic backlog - impactedETA: - type: string - format: date-time - description: Revised ETA due to alert - timestamp: - type: string - format: date-time - resolvedAt: - type: string - format: date-time - status: - type: string - enum: - - OPEN - - ACKNOWLEDGED - - RESOLVED - example: OPEN - notificationChannels: - type: array - items: - type: string - enum: - - SMS - - EMAIL - - PUSH - - WHATSAPP - example: - - SMS - - PUSH - actionRequired: - type: boolean - description: Whether customer action is needed - example: false - suggestedAction: - type: string - example: Please reschedule delivery for tomorrow. - LogisticsCancellationPolicy: - type: object - title: LogisticsCancellationPolicy - description: Defines terms under which a shipment booking can be cancelled. - properties: - id: - type: string - example: CP-EXPRESS-001 - cancellableUntil: - type: string - description: Cancellation allowed until this lifecycle stage - enum: - - BEFORE_PICKUP - - BEFORE_DISPATCH - - ANYTIME - - NON_CANCELLABLE - example: BEFORE_PICKUP - cancellationFee: - type: object - properties: - type: - type: string - enum: - - FLAT - - PERCENTAGE - - NIL - example: FLAT - value: - type: number - example: 50 - currency: - type: string - example: INR - refundPolicy: - type: object - properties: - refundable: - type: boolean - example: true - refundPercentage: - type: number - example: 100 - processingDays: - type: integer - example: 5 - conditions: - type: array - items: - type: string - example: - - Full refund if cancelled before pickup - - 50% refund if cancelled after pickup - applicableServiceTypes: - type: array - items: - type: string - example: - - EXPRESS - - COURIER - LogisticsDriver: - type: object - title: LogisticsDriver - description: 'A Driver is an individual who operates a vehicle for logistics delivery. - Drivers are assigned to shipments and responsible for physical transport. Maps - to beckn:Agent. - - ' - required: - - id - - name - - licenseNumber - properties: - id: - type: string - description: Unique driver identifier - example: DRV-00456 - name: - type: string - description: Full name of the driver - example: Suresh Patil - phone: - type: string - example: '+919845001234' - email: - type: string - format: email - profilePhoto: - type: string - format: uri - licenseNumber: - type: string - description: Driving license number - example: MH1420210012345 - licenseExpiry: - type: string - format: date - description: License expiry date - rating: - type: number - minimum: 1 - maximum: 5 - example: 4.5 - currentLocation: - type: object - description: Real-time GPS location - properties: - lat: - type: number - example: 12.9716 - lng: - type: number - example: 77.5946 - updatedAt: - type: string - format: date-time - status: - type: string - enum: - - AVAILABLE - - ASSIGNED - - ON_ROUTE - - OFFLINE - example: ON_ROUTE - vehicle: - $ref: '#/$defs/LogisticsVehicle' - experienceYears: - type: integer - description: Years of driving experience - example: 5 - backgroundVerified: - type: boolean - description: Whether background verification is complete - example: true - languagesSpoken: - type: array - items: - type: string - example: - - Hindi - - Kannada - operatingZones: - type: array - description: Geographic zones the driver operates in - items: - type: string - example: - - Bangalore North - - Bangalore East - LogisticsFare: - type: object - title: LogisticsFare - description: Total cost charged for a logistics service including base freight, - surcharges, taxes. - required: - - currency - - totalAmount - properties: - currency: - type: string - example: INR - baseFreight: - type: number - description: Base freight charge - example: 450 - fuelSurcharge: - type: number - example: 45 - odaSurcharge: - type: number - description: Out of Delivery Area surcharge - example: 0 - codCharge: - type: number - description: Cash on delivery charge - example: 30 - insuranceCharge: - type: number - example: 25 - gst: - type: number - description: GST amount - example: 81 - otherCharges: - type: number - example: 0 - discount: - type: number - example: 50 - totalAmount: - type: number - description: Final total payable - example: 581 - breakup: - type: array - description: Detailed fare breakup line items - items: - $ref: '#/$defs/LogisticsFareBreakup' - estimatedFare: - type: boolean - description: Whether this is an estimate or confirmed fare - example: false - paymentMode: - type: string - enum: - - PREPAID - - COD - - TO_PAY - - CREDIT - example: PREPAID - LogisticsFareBreakup: - type: object - title: LogisticsFareBreakup - description: A single line item in the fare breakup for a logistics service. - required: - - title - - amount - properties: - title: - type: string - description: Name of the fare component - example: Base Freight - amount: - type: number - example: 450 - currency: - type: string - example: INR - type: - type: string - enum: - - ITEM - - SURCHARGE - - TAX - - DISCOUNT - - FEE - example: ITEM - taxBreakup: - type: array - description: Tax sub-components if applicable - items: - type: object - properties: - name: - type: string - example: CGST @ 9% - percent: - type: number - example: 9 - amount: - type: number - example: 40.5 - waived: - type: boolean - description: Whether this component was waived - example: false - LogisticsFeedback: - type: object - title: LogisticsFeedback - description: Qualitative feedback from sender or receiver about a logistics experience. - properties: - id: - type: string - example: FBK-001 - shipmentId: - type: string - rating: - $ref: '#/$defs/LogisticsRating' - review: - type: string - description: Free text review - example: Driver was very professional and delivered on time. - tags: - type: array - description: Structured feedback tags - items: - type: string - example: - - ON_TIME - - PROFESSIONAL_DRIVER - - GOOD_PACKAGING - wouldRecommend: - type: boolean - example: true - submittedBy: - type: string - description: User ID of feedback submitter - submittedAt: - type: string - format: date-time - isPublic: - type: boolean - description: Whether feedback is publicly visible - example: true - LogisticsOperator: - type: object - title: LogisticsOperator - description: Entity operating a logistics network or fleet, responsible for end-to-end - delivery service. - required: - - id - - name - properties: - id: - type: string - example: OPR-DELHIVERY-001 - name: - type: string - example: Delhivery - type: - type: string - enum: - - 3PL - - CAPTIVE - - AGGREGATOR - - POSTAL - example: 3PL - contact: - $ref: '#/$defs/Contact' - website: - type: string - format: uri - supportEmail: - type: string - format: email - supportPhone: - type: string - rating: - type: number - minimum: 1 - maximum: 5 - activeCarriers: - type: integer - description: Number of carriers on the operator's network - activeDrivers: - type: integer - deliveriesPerDay: - type: integer - serviceCoverage: - type: object - properties: - countries: - type: array - items: - type: string - cities: - type: array - items: - type: string - certifications: - type: array - items: - type: string - example: - - ISO9001 - - GDPR_COMPLIANT - LogisticsPlace: - type: object - title: LogisticsPlace - description: 'A geographic location relevant to logistics such as origin, destination, - hub, or waypoint. Includes structured address and GPS coordinates. Maps to beckn:Location - and schema:Place. - - ' - required: - - id - properties: - id: - type: string - example: PLC-BLR-001 - name: - type: string - description: Name of the place - example: Anita's Home - type: - type: string - enum: - - PICKUP - - DELIVERY - - HUB - - WAYPOINT - - STORE - - WAREHOUSE - example: DELIVERY - address: - type: object - properties: - line1: - type: string - example: 42, 5th Cross Road - line2: - type: string - example: Indiranagar - landmark: - type: string - example: Near Total Mall - city: - type: string - example: Bengaluru - state: - type: string - example: Karnataka - country: - type: string - example: India - pincode: - type: string - example: '560038' - gps: - type: object - properties: - lat: - type: number - example: 12.9719 - lng: - type: number - example: 77.6412 - contact: - $ref: '#/$defs/Contact' - accessInstructions: - type: string - description: Instructions for courier to reach the place - example: Ring bell twice. Building B, 3rd floor. - isVerified: - type: boolean - description: Whether the address has been geocode-verified - example: true - LogisticsRating: - type: object - title: LogisticsRating - description: A numeric score given by a user for a logistics service, driver, - or carrier. - required: - - value - - ratingFor - properties: - id: - type: string - example: RTG-00456 - value: - type: number - minimum: 1 - maximum: 5 - example: 4.5 - ratingFor: - type: string - enum: - - DRIVER - - CARRIER - - SERVICE - - PACKAGING - example: DRIVER - ratedBy: - type: string - description: User ID who gave the rating - shipmentId: - type: string - categories: - type: object - description: Category-wise ratings - properties: - timeliness: - type: number - minimum: 1 - maximum: 5 - packaging: - type: number - minimum: 1 - maximum: 5 - handling: - type: number - minimum: 1 - maximum: 5 - communication: - type: number - minimum: 1 - maximum: 5 - timestamp: - type: string - format: date-time - LogisticsReceipt: - type: object - title: LogisticsReceipt - description: Digital acknowledgment of payment and delivery for a logistics service. - required: - - id - - shipmentId - - fare - properties: - id: - type: string - example: RCP-2024-001234 - shipmentId: - type: string - example: SHP-2024-001234 - invoiceNumber: - type: string - example: INV-2024-9900 - issuedAt: - type: string - format: date-time - fare: - $ref: '#/$defs/LogisticsFare' - paymentMode: - type: string - enum: - - PREPAID - - COD - - TO_PAY - - CREDIT - example: PREPAID - paymentTransactionId: - type: string - example: TXN-UPI-2024-123456 - paidAt: - type: string - format: date-time - shipper: - $ref: '#/$defs/Contact' - consignee: - $ref: '#/$defs/Contact' - carrier: - $ref: '#/$defs/Carrier' - deliveryProof: - $ref: '#/$defs/Proof' - downloadUrl: - type: string - format: uri - description: URL to download PDF receipt - LogisticsRoute: - type: object - title: LogisticsRoute - description: 'A Route is the planned path for a shipment from origin to destination, - potentially passing through multiple hubs and waypoints. Maps to beckn:Journey. - - ' - required: - - id - - origin - - destination - properties: - id: - type: string - description: Unique route identifier - example: RTE-BLR-DEL-001 - name: - type: string - description: Human-readable route name - example: Bangalore to Delhi via Hyderabad - origin: - $ref: '#/$defs/LogisticsPlace' - destination: - $ref: '#/$defs/LogisticsPlace' - waypoints: - type: array - description: Intermediate waypoints/hubs on the route - items: - $ref: '#/$defs/Waypoint' - totalDistance: - type: object - properties: - value: - type: number - example: 2150 - unit: - type: string - enum: - - km - - miles - example: km - estimatedDuration: - type: object - properties: - value: - type: number - example: 36 - unit: - type: string - enum: - - hours - - days - example: hours - transportMode: - type: string - enum: - - ROAD - - AIR - - RAIL - - MULTIMODAL - example: ROAD - routeType: - type: string - description: Classification of route - enum: - - HYPERLOCAL - - LAST_MILE - - FIRST_MILE - - LINE_HAUL - - CROSS_DOCKING - example: LINE_HAUL - geometry: - type: object - description: GeoJSON LineString of route geometry - properties: - type: - type: string - example: LineString - coordinates: - type: array - items: - type: array - items: - type: number - tollCost: - type: number - description: Estimated toll charges in INR - example: 1250 - restrictions: - type: array - description: Route restrictions (e.g. night driving ban) - items: - type: string - example: - - No night driving in MP - - Heavy vehicle ban in city center - LogisticsSupportCase: - type: object - title: LogisticsSupportCase - description: Customer support ticket for shipment issues — loss, damage, delay, - or billing. - required: - - id - - issueType - - shipmentId - properties: - id: - type: string - example: SUP-2024-00789 - shipmentId: - type: string - issueType: - type: string - enum: - - SHIPMENT_LOST - - SHIPMENT_DAMAGED - - DELIVERY_DELAYED - - WRONG_ITEM_DELIVERED - - BILLING_DISPUTE - - DRIVER_MISCONDUCT - - OTHER - example: DELIVERY_DELAYED - description: - type: string - example: My package was supposed to be delivered yesterday but has not arrived. - priority: - type: string - enum: - - LOW - - MEDIUM - - HIGH - - URGENT - example: MEDIUM - status: - type: string - enum: - - OPEN - - IN_PROGRESS - - AWAITING_CUSTOMER - - RESOLVED - - CLOSED - example: OPEN - raisedBy: - type: string - description: User ID who raised the ticket - assignedAgent: - type: string - description: Support agent ID - attachments: - type: array - description: Photo/document evidence - items: - type: object - properties: - url: - type: string - format: uri - type: - type: string - enum: - - PHOTO - - DOCUMENT - claimAmount: - type: number - description: Amount claimed for loss/damage - resolution: - type: string - description: Resolution details - createdAt: - type: string - format: date-time - resolvedAt: - type: string - format: date-time - LogisticsVehicle: - type: object - title: LogisticsVehicle - description: 'A Vehicle is a transport asset used for logistics operations. Vehicle - types range from bicycles for hyperlocal delivery to heavy trucks for long haul - freight. Maps to beckn:Asset. - - ' - required: - - id - - registrationNumber - - type - properties: - id: - type: string - description: Unique vehicle identifier - example: VEH-00789 - registrationNumber: - type: string - description: Vehicle registration/license plate number - example: KA01AB5678 - type: - type: string - description: Type of vehicle - enum: - - BICYCLE - - ELECTRIC_SCOOTER - - MOTORCYCLE - - THREE_WHEELER - - CAR - - VAN - - MINI_TRUCK - - TRUCK_LCV - - TRUCK_HCV - - CONTAINER_TRUCK - - TRAILER - example: TRUCK_LCV - make: - type: string - description: Vehicle manufacturer - example: Tata Motors - model: - type: string - description: Vehicle model - example: Tata Ace Gold - year: - type: integer - description: Year of manufacture - example: 2022 - color: - type: string - example: White - fuelType: - type: string - enum: - - PETROL - - DIESEL - - CNG - - ELECTRIC - - HYBRID - example: DIESEL - payloadCapacity: - type: object - description: Maximum cargo capacity - properties: - value: - type: number - example: 750 - unit: - type: string - enum: - - kg - - ton - example: kg - volumeCapacity: - type: object - description: Cargo volume capacity - properties: - value: - type: number - example: 6 - unit: - type: string - enum: - - cubic_feet - - cubic_meters - example: cubic_feet - hasRefrigeration: - type: boolean - description: Whether vehicle has refrigeration (cold chain) - example: false - gpsEnabled: - type: boolean - description: Whether vehicle has GPS tracking - example: true - insuranceExpiry: - type: string - format: date - pollutionCertExpiry: - type: string - format: date - fitnessExpiry: - type: string - format: date - currentLocation: - type: object - properties: - lat: - type: number - lng: - type: number - speed: - type: number - description: Speed in km/h - heading: - type: number - description: Bearing in degrees - updatedAt: - type: string - format: date-time - status: - type: string - enum: - - AVAILABLE - - ASSIGNED - - ON_ROUTE - - MAINTENANCE - - INACTIVE - example: ON_ROUTE - Package: - type: object - title: Package - description: 'A Package is a physical unit of goods prepared for transport within - a shipment. Maps to beckn:Item. - - ' - required: - - id - - weight - properties: - id: - type: string - description: Unique identifier for the package - example: PKG-001 - description: - type: string - description: Description of package contents - example: Electronics - Laptop - weight: - type: object - description: Weight of the package - properties: - value: - type: number - example: 2.5 - unit: - type: string - enum: - - kg - - g - - lb - example: kg - dimensions: - type: object - description: Physical dimensions of the package - properties: - length: - type: number - example: 40 - width: - type: number - example: 30 - height: - type: number - example: 10 - unit: - type: string - enum: - - cm - - in - example: cm - volumetricWeight: - type: number - description: Calculated volumetric weight in kg - example: 3.0 - fragile: - type: boolean - description: Whether the package requires fragile handling - example: false - hazardous: - type: boolean - description: Whether the package contains hazardous materials - example: false - declaredValue: - type: object - description: Declared monetary value of contents - properties: - amount: - type: number - example: 50000 - currency: - type: string - example: INR - packageType: - type: string - description: Type of packaging - enum: - - BOX - - ENVELOPE - - PALLET - - DRUM - - BAG - - TUBE - example: BOX - barcode: - type: string - description: Package-level barcode or QR code - example: '4012345678901' - temperatureControl: - type: object - description: Temperature control requirements for cold chain - properties: - required: - type: boolean - example: false - minTemp: - type: number - example: 2 - maxTemp: - type: number - example: 8 - unit: - type: string - enum: - - C - - F - example: C - insuranceRequired: - type: boolean - description: Whether insurance is required for this package - example: false - Proof: - type: object - title: Proof - description: 'Proof of delivery or pickup evidence, including photos, signatures, - OTP confirmations, or digital receipts. Maps to beckn:Document. - - ' - required: - - id - - type - - timestamp - properties: - id: - type: string - example: POD-SHP001-001 - shipmentId: - type: string - example: SHP-2024-001234 - type: - type: string - enum: - - PHOTO - - SIGNATURE - - OTP - - BIOMETRIC - - DIGITAL_RECEIPT - - DOCUMENT_SCAN - example: PHOTO - subType: - type: string - description: What was captured - enum: - - DELIVERED_AT_DOOR - - DELIVERED_TO_PERSON - - LEFT_AT_SAFE_PLACE - - HANDED_TO_NEIGHBOUR - - PICKUP_CONFIRMED - example: DELIVERED_TO_PERSON - mediaUrl: - type: string - format: uri - description: URL to proof media (photo/signature image) - signatureData: - type: string - description: Base64-encoded signature data - otpVerified: - type: boolean - description: Whether OTP was verified for delivery - example: true - recipientName: - type: string - description: Name of person who received the package - example: Anita Sharma - recipientRelation: - type: string - description: Relation to consignee if not consignee - example: Spouse - location: - type: object - properties: - lat: - type: number - lng: - type: number - timestamp: - type: string - format: date-time - driverSignoff: - type: boolean - description: Driver confirmed successful delivery - example: true - ReturnPolicy: - type: object - title: ReturnPolicy - description: Defines conditions for returning goods and reverse logistics workflows. - properties: - id: - type: string - example: RP-STD-001 - returnsAccepted: - type: boolean - example: true - returnWindow: - type: object - properties: - value: - type: integer - example: 7 - unit: - type: string - enum: - - days - - hours - example: days - returnReason: - type: array - items: - type: string - example: - - DAMAGED_IN_TRANSIT - - WRONG_ITEM - - CONSIGNEE_REFUSED - - ADDRESS_NOT_FOUND - reversePickupCharge: - type: object - properties: - type: - type: string - enum: - - FREE - - FLAT - - PERCENTAGE - example: FREE - value: - type: number - example: 0 - currency: - type: string - example: INR - refundOnReturn: - type: boolean - example: true - returnHubAddress: - $ref: '#/$defs/LogisticsPlace' - Shipment: - type: object - title: Shipment - description: 'A Shipment represents the movement of one or more packages from - an origin to a destination. It is the top-level fulfillment entity in a logistics - transaction and maps to beckn:Fulfillment. - - ' - required: - - id - - status - - origin - - destination - properties: - id: - type: string - description: Unique identifier for the shipment - example: SHP-2024-001234 - trackingId: - type: string - description: Public tracking identifier shared with sender/receiver - example: TRK9876543210IN - status: - type: string - description: Current status of the shipment - enum: - - CREATED - - PICKUP_PENDING - - PICKED_UP - - IN_TRANSIT - - AT_HUB - - OUT_FOR_DELIVERY - - DELIVERED - - FAILED_DELIVERY - - RETURNED - - CANCELLED - example: IN_TRANSIT - origin: - $ref: '#/$defs/LogisticsPlace' - destination: - $ref: '#/$defs/LogisticsPlace' - packages: - type: array - description: List of packages in this shipment - items: - $ref: '#/$defs/Package' - carrier: - $ref: '#/$defs/Carrier' - driver: - $ref: '#/$defs/LogisticsDriver' - vehicle: - $ref: '#/$defs/LogisticsVehicle' - route: - $ref: '#/$defs/LogisticsRoute' - scheduledPickup: - type: string - format: date-time - description: Scheduled pickup time - estimatedDelivery: - type: string - format: date-time - description: Estimated delivery date and time - actualDelivery: - type: string - format: date-time - description: Actual delivery date and time - deliverySlot: - $ref: '#/$defs/DeliverySlot' - serviceType: - type: string - description: Type of logistics service - enum: - - HYPERLOCAL - - COURIER - - INTERSTATE - - LONG_HAUL - - EXPRESS - example: EXPRESS - specialInstructions: - type: string - description: Special handling instructions for the shipment - example: Handle with care. Do not tilt. - proof: - $ref: '#/$defs/Proof' - fare: - $ref: '#/$defs/LogisticsFare' - receipt: - $ref: '#/$defs/LogisticsReceipt' - cancellationPolicy: - $ref: '#/$defs/LogisticsCancellationPolicy' - returnPolicy: - $ref: '#/$defs/ReturnPolicy' - alerts: - type: array - description: Alerts raised for this shipment - items: - $ref: '#/$defs/LogisticsAlert' - trackingUpdates: - type: array - description: History of tracking updates - items: - $ref: '#/$defs/TrackingUpdate' - createdAt: - type: string - format: date-time - description: Timestamp when shipment was created - updatedAt: - type: string - format: date-time - description: Timestamp of last update - TrackingUpdate: - type: object - title: TrackingUpdate - description: 'A TrackingUpdate is a real-time or periodic update on the status - and location of a shipment during transit. Maps to beckn:Event. - - ' - required: - - id - - shipmentId - - status - - timestamp - properties: - id: - type: string - example: TRK-EVT-00123 - shipmentId: - type: string - example: SHP-2024-001234 - status: - type: string - enum: - - BOOKED - - PICKED_UP - - IN_TRANSIT - - AT_HUB - - OUT_FOR_DELIVERY - - DELIVERED - - FAILED_DELIVERY - - RETURNED - - EXCEPTION - example: IN_TRANSIT - location: - type: object - properties: - lat: - type: number - example: 17.385 - lng: - type: number - example: 78.4867 - address: - type: string - example: Near Hyderabad Sorting Hub, NH-44 - timestamp: - type: string - format: date-time - example: '2024-03-15T14:30:00+05:30' - message: - type: string - description: Human-readable status message - example: Your shipment has arrived at Hyderabad hub and is being sorted. - hub: - $ref: '#/$defs/Hub' - driver: - $ref: '#/$defs/LogisticsDriver' - vehicle: - $ref: '#/$defs/LogisticsVehicle' - exceptionDetails: - type: object - description: Details if this update is an exception - properties: - reason: - type: string - enum: - - ADDRESS_NOT_FOUND - - CONSIGNEE_UNAVAILABLE - - ACCESS_DENIED - - NATURAL_DISASTER - - VEHICLE_BREAKDOWN - - CUSTOMS_HOLD - example: CONSIGNEE_UNAVAILABLE - remarks: - type: string - nextAction: - type: string - description: Next planned action - example: Re-delivery attempt scheduled for tomorrow 10 AM - 1 PM - notificationSent: - type: boolean - description: Whether customer was notified of this update - example: true - Waypoint: - type: object - title: Waypoint - description: 'A Waypoint is an intermediate stop or checkpoint on a logistics - route, such as a sorting hub, relay station, or customs checkpoint. Maps to - beckn:Stop. - - ' - required: - - id - - place - properties: - id: - type: string - example: WPT-HYD-001 - name: - type: string - example: Hyderabad Sorting Hub - place: - $ref: '#/$defs/LogisticsPlace' - type: - type: string - enum: - - HUB - - RELAY_POINT - - CUSTOMS - - PICKUP - - DELIVERY - example: HUB - sequenceNumber: - type: integer - description: Order of this waypoint in the route - example: 2 - scheduledArrival: - type: string - format: date-time - scheduledDeparture: - type: string - format: date-time - actualArrival: - type: string - format: date-time - actualDeparture: - type: string - format: date-time - dwellTimeMinutes: - type: integer - description: Expected dwell time at this waypoint in minutes - example: 120 - handoverRequired: - type: boolean - description: Whether shipment changes carrier/vehicle at this point - example: true - status: - type: string - enum: - - PENDING - - REACHED - - DEPARTED - - SKIPPED diff --git a/schema/Logistics/v2.0/attributes.yaml b/schema/Logistics/v2.0/attributes.yaml index c1db722..bd0dab0 100644 --- a/schema/Logistics/v2.0/attributes.yaml +++ b/schema/Logistics/v2.0/attributes.yaml @@ -1,23 +1,21 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: Logistics version: 2.0.0 description: Master schema package for Beckn Logistics domain. contact: - name: Beckn Foundation - url: https://beckn.org + name: Beckn Labs + url: https://beckn.io license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + url: https://creativecommons.org/licenses/by-nc-sa/4.0/ components: schemas: Carrier: + x-iri: https://schema.beckn.io/Carrier/v2.0 type: object title: Carrier - description: 'A Carrier is a transport service provider responsible for moving - goods across distances. Carriers operate fleets of vehicles and may own/manage - logistics hubs. Maps to beckn:Provider. + description: 'A Carrier is a transport service provider responsible for moving goods across distances. Carriers operate fleets of vehicles and may own/manage logistics hubs. Maps to beckn:Provider. ' required: @@ -100,11 +98,10 @@ components: description: Whether carrier is currently active on network example: true Consignment: + x-iri: https://schema.beckn.io/Consignment/v2.0 type: object title: Consignment - description: 'A Consignment is a collection of packages or shipments grouped - together under a single commercial transaction between a shipper and consignee. - Maps to beckn:Order. + description: 'A Consignment is a collection of packages or shipments grouped together under a single commercial transaction between a shipper and consignee. Maps to beckn:Order. ' required: @@ -175,6 +172,7 @@ components: type: string format: date-time Contact: + x-iri: https://schema.beckn.io/Contact/v2.0 type: object title: Contact description: Contact information for sender, receiver, driver, or operator. @@ -198,11 +196,10 @@ components: type: string description: GST number for B2B invoicing Courier: + x-iri: https://schema.beckn.io/Courier/v2.0 type: object title: Courier - description: 'A Courier is an individual delivery agent responsible for last-mile - pickup and delivery of packages, typically in hyperlocal or urban delivery - contexts. Maps to beckn:Agent. + description: 'A Courier is an individual delivery agent responsible for last-mile pickup and delivery of packages, typically in hyperlocal or urban delivery contexts. Maps to beckn:Agent. ' required: @@ -274,10 +271,10 @@ components: format: date description: Date the courier joined the network DeliverySlot: + x-iri: https://schema.beckn.io/DeliverySlot/v2.0 type: object title: DeliverySlot - description: 'A DeliverySlot is a time window offered or agreed upon for delivery - of a shipment. Maps to beckn:TimeSlot. + description: 'A DeliverySlot is a time window offered or agreed upon for delivery of a shipment. Maps to beckn:TimeSlot. ' required: @@ -338,11 +335,10 @@ components: description: Last time to book this slot example: '2024-03-14T22:00:00+05:30' Hub: + x-iri: https://schema.beckn.io/Hub/v2.0 type: object title: Hub - description: 'A Hub is a logistics fulfillment center, sorting facility, or - distribution point where goods are consolidated, sorted, and dispatched for - onward delivery. Maps to beckn:Location. + description: 'A Hub is a logistics fulfillment center, sorting facility, or distribution point where goods are consolidated, sorted, and dispatched for onward delivery. Maps to beckn:Location. ' required: @@ -421,10 +417,10 @@ components: type: boolean example: true LogisticsAlert: + x-iri: https://schema.beckn.io/LogisticsAlert/v2.0 type: object title: LogisticsAlert - description: 'An Alert is a notification or warning related to a shipment, such - as delays, exceptions, damage reports, or SLA breaches. Maps to beckn:Event. + description: 'An Alert is a notification or warning related to a shipment, such as delays, exceptions, damage reports, or SLA breaches. Maps to beckn:Event. ' required: @@ -505,6 +501,7 @@ components: type: string example: Please reschedule delivery for tomorrow. LogisticsCancellationPolicy: + x-iri: https://schema.beckn.io/LogisticsCancellationPolicy/v2.0 type: object title: LogisticsCancellationPolicy description: Defines terms under which a shipment booking can be cancelled. @@ -564,11 +561,10 @@ components: - EXPRESS - COURIER LogisticsDriver: + x-iri: https://schema.beckn.io/LogisticsDriver/v2.0 type: object title: LogisticsDriver - description: 'A Driver is an individual who operates a vehicle for logistics - delivery. Drivers are assigned to shipments and responsible for physical transport. - Maps to beckn:Agent. + description: 'A Driver is an individual who operates a vehicle for logistics delivery. Drivers are assigned to shipments and responsible for physical transport. Maps to beckn:Agent. ' required: @@ -653,10 +649,10 @@ components: - Bangalore North - Bangalore East LogisticsFare: + x-iri: https://schema.beckn.io/LogisticsFare/v2.0 type: object title: LogisticsFare - description: Total cost charged for a logistics service including base freight, - surcharges, taxes. + description: Total cost charged for a logistics service including base freight, surcharges, taxes. required: - currency - totalAmount @@ -714,6 +710,7 @@ components: - CREDIT example: PREPAID LogisticsFareBreakup: + x-iri: https://schema.beckn.io/LogisticsFareBreakup/v2.0 type: object title: LogisticsFareBreakup description: A single line item in the fare breakup for a logistics service. @@ -760,10 +757,10 @@ components: description: Whether this component was waived example: false LogisticsFeedback: + x-iri: https://schema.beckn.io/LogisticsFeedback/v2.0 type: object title: LogisticsFeedback - description: Qualitative feedback from sender or receiver about a logistics - experience. + description: Qualitative feedback from sender or receiver about a logistics experience. properties: id: type: string @@ -799,10 +796,10 @@ components: description: Whether feedback is publicly visible example: true LogisticsOperator: + x-iri: https://schema.beckn.io/LogisticsOperator/v2.0 type: object title: LogisticsOperator - description: Entity operating a logistics network or fleet, responsible for - end-to-end delivery service. + description: Entity operating a logistics network or fleet, responsible for end-to-end delivery service. required: - id - name @@ -861,11 +858,10 @@ components: - ISO9001 - GDPR_COMPLIANT LogisticsPlace: + x-iri: https://schema.beckn.io/LogisticsPlace/v2.0 type: object title: LogisticsPlace - description: 'A geographic location relevant to logistics such as origin, destination, - hub, or waypoint. Includes structured address and GPS coordinates. Maps to - beckn:Location and schema:Place. + description: 'A geographic location relevant to logistics such as origin, destination, hub, or waypoint. Includes structured address and GPS coordinates. Maps to beckn:Location and schema:Place. ' required: @@ -932,10 +928,10 @@ components: description: Whether the address has been geocode-verified example: true LogisticsRating: + x-iri: https://schema.beckn.io/LogisticsRating/v2.0 type: object title: LogisticsRating - description: A numeric score given by a user for a logistics service, driver, - or carrier. + description: A numeric score given by a user for a logistics service, driver, or carrier. required: - value - ratingFor @@ -985,10 +981,10 @@ components: type: string format: date-time LogisticsReceipt: + x-iri: https://schema.beckn.io/LogisticsReceipt/v2.0 type: object title: LogisticsReceipt - description: Digital acknowledgment of payment and delivery for a logistics - service. + description: Digital acknowledgment of payment and delivery for a logistics service. required: - id - shipmentId @@ -1035,10 +1031,10 @@ components: format: uri description: URL to download PDF receipt LogisticsRoute: + x-iri: https://schema.beckn.io/LogisticsRoute/v2.0 type: object title: LogisticsRoute - description: 'A Route is the planned path for a shipment from origin to destination, - potentially passing through multiple hubs and waypoints. Maps to beckn:Journey. + description: 'A Route is the planned path for a shipment from origin to destination, potentially passing through multiple hubs and waypoints. Maps to beckn:Journey. ' required: @@ -1131,10 +1127,10 @@ components: - No night driving in MP - Heavy vehicle ban in city center LogisticsSupportCase: + x-iri: https://schema.beckn.io/LogisticsSupportCase/v2.0 type: object title: LogisticsSupportCase - description: Customer support ticket for shipment issues — loss, damage, delay, - or billing. + description: Customer support ticket for shipment issues — loss, damage, delay, or billing. required: - id - issueType @@ -1209,11 +1205,10 @@ components: type: string format: date-time LogisticsVehicle: + x-iri: https://schema.beckn.io/LogisticsVehicle/v2.0 type: object title: LogisticsVehicle - description: 'A Vehicle is a transport asset used for logistics operations. - Vehicle types range from bicycles for hyperlocal delivery to heavy trucks - for long haul freight. Maps to beckn:Asset. + description: 'A Vehicle is a transport asset used for logistics operations. Vehicle types range from bicycles for hyperlocal delivery to heavy trucks for long haul freight. Maps to beckn:Asset. ' required: @@ -1338,10 +1333,10 @@ components: - INACTIVE example: ON_ROUTE Package: + x-iri: https://schema.beckn.io/Package/v2.0 type: object title: Package - description: 'A Package is a physical unit of goods prepared for transport within - a shipment. Maps to beckn:Item. + description: 'A Package is a physical unit of goods prepared for transport within a shipment. Maps to beckn:Item. ' required: @@ -1450,10 +1445,10 @@ components: description: Whether insurance is required for this package example: false Proof: + x-iri: https://schema.beckn.io/Proof/v2.0 type: object title: Proof - description: 'Proof of delivery or pickup evidence, including photos, signatures, - OTP confirmations, or digital receipts. Maps to beckn:Document. + description: 'Proof of delivery or pickup evidence, including photos, signatures, OTP confirmations, or digital receipts. Maps to beckn:Document. ' required: @@ -1521,6 +1516,7 @@ components: description: Driver confirmed successful delivery example: true ReturnPolicy: + x-iri: https://schema.beckn.io/ReturnPolicy/v2.0 type: object title: ReturnPolicy description: Defines conditions for returning goods and reverse logistics workflows. @@ -1574,11 +1570,10 @@ components: returnHubAddress: $ref: '#/components/schemas/LogisticsPlace' Shipment: + x-iri: https://schema.beckn.io/Shipment/v2.0 type: object title: Shipment - description: 'A Shipment represents the movement of one or more packages from - an origin to a destination. It is the top-level fulfillment entity in a logistics - transaction and maps to beckn:Fulfillment. + description: 'A Shipment represents the movement of one or more packages from an origin to a destination. It is the top-level fulfillment entity in a logistics transaction and maps to beckn:Fulfillment. ' required: @@ -1684,10 +1679,10 @@ components: format: date-time description: Timestamp of last update TrackingUpdate: + x-iri: https://schema.beckn.io/TrackingUpdate/v2.0 type: object title: TrackingUpdate - description: 'A TrackingUpdate is a real-time or periodic update on the status - and location of a shipment during transit. Maps to beckn:Event. + description: 'A TrackingUpdate is a real-time or periodic update on the status and location of a shipment during transit. Maps to beckn:Event. ' required: @@ -1766,11 +1761,10 @@ components: description: Whether customer was notified of this update example: true Waypoint: + x-iri: https://schema.beckn.io/Waypoint/v2.0 type: object title: Waypoint - description: 'A Waypoint is an intermediate stop or checkpoint on a logistics - route, such as a sorting hub, relay station, or customs checkpoint. Maps to - beckn:Stop. + description: 'A Waypoint is an intermediate stop or checkpoint on a logistics route, such as a sorting hub, relay station, or customs checkpoint. Maps to beckn:Stop. ' required: diff --git a/schema/Logistics/v2.0/context.jsonld b/schema/Logistics/v2.0/context.jsonld index 895c23c..108a87a 100644 --- a/schema/Logistics/v2.0/context.jsonld +++ b/schema/Logistics/v2.0/context.jsonld @@ -1,31 +1,272 @@ { "@context": { - "beckn": "https://schema.beckn.io/core/v2.0/", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", "@vocab": "https://schema.beckn.io/core/v2.0/", - "LogisticsAlert": "beckn:Event", - "LogisticsCancellationPolicy": "beckn:Policy", - "Carrier": "beckn:Provider", - "Consignment": "beckn:Order", + "LogisticsAlert": "beckn:LogisticsAlert", + "LogisticsCancellationPolicy": "beckn:LogisticsCancellationPolicy", + "Carrier": "beckn:Carrier", + "Consignment": "beckn:Consignment", "Contact": "beckn:Contact", - "Courier": "beckn:Agent", - "DeliverySlot": "beckn:TimeSlot", - "LogisticsDriver": "beckn:Agent", - "LogisticsFare": "beckn:Price", - "LogisticsFareBreakup": "beckn:Price", - "LogisticsFeedback": "beckn:Feedback", - "Hub": "beckn:Location", - "LogisticsOperator": "beckn:Provider", - "Package": "beckn:Item", - "LogisticsPlace": "beckn:Location", - "Proof": "beckn:Document", - "LogisticsRating": "beckn:Rating", - "LogisticsReceipt": "beckn:Document", - "ReturnPolicy": "beckn:Policy", - "LogisticsRoute": "beckn:Journey", - "Shipment": "beckn:Fulfillment", - "LogisticsSupportCase": "beckn:Issue", - "TrackingUpdate": "beckn:Event", - "LogisticsVehicle": "beckn:Asset", - "Waypoint": "beckn:Stop" + "Courier": "beckn:Courier", + "DeliverySlot": "beckn:DeliverySlot", + "LogisticsDriver": "beckn:LogisticsDriver", + "LogisticsFare": "beckn:LogisticsFare", + "LogisticsFareBreakup": "beckn:LogisticsFareBreakup", + "LogisticsFeedback": "beckn:LogisticsFeedback", + "Hub": "beckn:Hub", + "LogisticsOperator": "beckn:LogisticsOperator", + "Package": "beckn:Package", + "LogisticsPlace": "beckn:LogisticsPlace", + "Proof": "beckn:Proof", + "LogisticsRating": "beckn:LogisticsRating", + "LogisticsReceipt": "beckn:LogisticsReceipt", + "ReturnPolicy": "beckn:ReturnPolicy", + "LogisticsRoute": "beckn:LogisticsRoute", + "Shipment": "beckn:Shipment", + "LogisticsSupportCase": "beckn:LogisticsSupportCase", + "TrackingUpdate": "beckn:TrackingUpdate", + "LogisticsVehicle": "beckn:LogisticsVehicle", + "Waypoint": "beckn:Waypoint", + "Logistics": "beckn:Logistics", + "accessInstructions": "beckn:accessInstructions", + "actionRequired": "beckn:actionRequired", + "active": "beckn:active", + "activeCarriers": "beckn:activeCarriers", + "activeDrivers": "beckn:activeDrivers", + "activeShipments": "beckn:activeShipments", + "actualArrival": "beckn:actualArrival", + "actualDelivery": "beckn:actualDelivery", + "actualDeparture": "beckn:actualDeparture", + "address": "beckn:address", + "alerts": "beckn:alerts", + "alternatePhone": "beckn:alternatePhone", + "amount": "beckn:amount", + "applicableServiceTypes": "beckn:applicableServiceTypes", + "assignedAgent": "beckn:assignedAgent", + "attachments": "beckn:attachments", + "available": "beckn:available", + "backgroundVerified": "beckn:backgroundVerified", + "barcode": "beckn:barcode", + "baseFreight": "beckn:baseFreight", + "breakup": "beckn:breakup", + "cancellableUntil": "beckn:cancellableUntil", + "cancellationFee": "beckn:cancellationFee", + "cancellationPolicy": "beckn:cancellationPolicy", + "capacity": "beckn:capacity", + "carrier": "beckn:carrier", + "categories": "beckn:categories", + "cause": "beckn:cause", + "certifications": "beckn:certifications", + "cities": "beckn:cities", + "city": "beckn:city", + "claimAmount": "beckn:claimAmount", + "close": "beckn:close", + "codCharge": "beckn:codCharge", + "code": "beckn:code", + "color": "beckn:color", + "commercialInvoiceNumber": "beckn:commercialInvoiceNumber", + "communication": "beckn:communication", + "company": "beckn:company", + "components": "beckn:components", + "conditions": "beckn:conditions", + "consignee": "beckn:consignee", + "contact": "beckn:contact", + "contactPhone": "beckn:contactPhone", + "coordinates": "beckn:coordinates", + "countries": "beckn:countries", + "country": "beckn:country", + "createdAt": "beckn:createdAt", + "currency": "beckn:currency", + "currentLocation": "beckn:currentLocation", + "customsDeclaration": "beckn:customsDeclaration", + "cutoffTime": "beckn:cutoffTime", + "date": "beckn:date", + "declaredValue": "beckn:declaredValue", + "deliveriesPerDay": "beckn:deliveriesPerDay", + "deliveryProof": "beckn:deliveryProof", + "deliverySlot": "beckn:deliverySlot", + "description": "beckn:description", + "destination": "beckn:destination", + "dimensions": "beckn:dimensions", + "discount": "beckn:discount", + "downloadUrl": "beckn:downloadUrl", + "driver": "beckn:driver", + "driverSignoff": "beckn:driverSignoff", + "dwellTimeMinutes": "beckn:dwellTimeMinutes", + "email": "beckn:email", + "endTime": "beckn:endTime", + "estimatedDelivery": "beckn:estimatedDelivery", + "estimatedDuration": "beckn:estimatedDuration", + "estimatedFare": "beckn:estimatedFare", + "exceptionDetails": "beckn:exceptionDetails", + "experienceYears": "beckn:experienceYears", + "facilities": "beckn:facilities", + "fare": "beckn:fare", + "fitnessExpiry": "beckn:fitnessExpiry", + "fleetSize": "beckn:fleetSize", + "fragile": "beckn:fragile", + "fuelSurcharge": "beckn:fuelSurcharge", + "fuelType": "beckn:fuelType", + "geometry": "beckn:geometry", + "gps": "beckn:gps", + "gpsEnabled": "beckn:gpsEnabled", + "gst": "beckn:gst", + "gstNumber": "beckn:gstNumber", + "handling": "beckn:handling", + "handoverRequired": "beckn:handoverRequired", + "hasRefrigeration": "beckn:hasRefrigeration", + "hazardous": "beckn:hazardous", + "heading": "beckn:heading", + "height": "beckn:height", + "hub": "beckn:hub", + "hubs": "beckn:hubs", + "id": "beckn:id", + "impactedETA": "beckn:impactedETA", + "insuranceCharge": "beckn:insuranceCharge", + "insuranceExpiry": "beckn:insuranceExpiry", + "insuranceRequired": "beckn:insuranceRequired", + "invoiceNumber": "beckn:invoiceNumber", + "is24x7": "beckn:is24x7", + "isPublic": "beckn:isPublic", + "isVerified": "beckn:isVerified", + "issueType": "beckn:issueType", + "issuedAt": "beckn:issuedAt", + "joiningDate": "beckn:joiningDate", + "kycVerified": "beckn:kycVerified", + "label": "beckn:label", + "landmark": "beckn:landmark", + "languagesSpoken": "beckn:languagesSpoken", + "lat": "beckn:lat", + "length": "beckn:length", + "licenseExpiry": "beckn:licenseExpiry", + "licenseNumber": "beckn:licenseNumber", + "line1": "beckn:line1", + "line2": "beckn:line2", + "lng": "beckn:lng", + "location": "beckn:location", + "logo": "beckn:logo", + "make": "beckn:make", + "maxTemp": "beckn:maxTemp", + "mediaUrl": "beckn:mediaUrl", + "message": "beckn:message", + "minTemp": "beckn:minTemp", + "model": "beckn:model", + "name": "beckn:name", + "nextAction": "beckn:nextAction", + "notificationChannels": "beckn:notificationChannels", + "notificationSent": "beckn:notificationSent", + "odaSurcharge": "beckn:odaSurcharge", + "open": "beckn:open", + "operatingHours": "beckn:operatingHours", + "operatingZones": "beckn:operatingZones", + "operator": "beckn:operator", + "origin": "beckn:origin", + "otherCharges": "beckn:otherCharges", + "otpVerified": "beckn:otpVerified", + "packageType": "beckn:packageType", + "packages": "beckn:packages", + "packaging": "beckn:packaging", + "paidAt": "beckn:paidAt", + "panNumber": "beckn:panNumber", + "payloadCapacity": "beckn:payloadCapacity", + "paymentMode": "beckn:paymentMode", + "paymentTransactionId": "beckn:paymentTransactionId", + "percent": "beckn:percent", + "phone": "beckn:phone", + "pincode": "beckn:pincode", + "pincodes": "beckn:pincodes", + "place": "beckn:place", + "pollutionCertExpiry": "beckn:pollutionCertExpiry", + "priority": "beckn:priority", + "processingCapacity": "beckn:processingCapacity", + "processingDays": "beckn:processingDays", + "profilePhoto": "beckn:profilePhoto", + "proof": "beckn:proof", + "raisedBy": "beckn:raisedBy", + "ratedBy": "beckn:ratedBy", + "rating": "beckn:rating", + "ratingFor": "beckn:ratingFor", + "reason": "beckn:reason", + "receipt": "beckn:receipt", + "recipientName": "beckn:recipientName", + "recipientRelation": "beckn:recipientRelation", + "refundOnReturn": "beckn:refundOnReturn", + "refundPercentage": "beckn:refundPercentage", + "refundPolicy": "beckn:refundPolicy", + "refundable": "beckn:refundable", + "registrationNumber": "beckn:registrationNumber", + "remainingCapacity": "beckn:remainingCapacity", + "remarks": "beckn:remarks", + "required": "beckn:required", + "resolution": "beckn:resolution", + "resolvedAt": "beckn:resolvedAt", + "restrictions": "beckn:restrictions", + "returnHubAddress": "beckn:returnHubAddress", + "returnPolicy": "beckn:returnPolicy", + "returnReason": "beckn:returnReason", + "returnWindow": "beckn:returnWindow", + "returnsAccepted": "beckn:returnsAccepted", + "reversePickupCharge": "beckn:reversePickupCharge", + "review": "beckn:review", + "route": "beckn:route", + "routeType": "beckn:routeType", + "scheduledArrival": "beckn:scheduledArrival", + "scheduledDeparture": "beckn:scheduledDeparture", + "scheduledPickup": "beckn:scheduledPickup", + "schemas": "beckn:schemas", + "sequenceNumber": "beckn:sequenceNumber", + "serviceCoverage": "beckn:serviceCoverage", + "serviceType": "beckn:serviceType", + "serviceTypes": "beckn:serviceTypes", + "serviceablePincodes": "beckn:serviceablePincodes", + "severity": "beckn:severity", + "shipmentId": "beckn:shipmentId", + "shipments": "beckn:shipments", + "shipper": "beckn:shipper", + "signatureData": "beckn:signatureData", + "specialInstructions": "beckn:specialInstructions", + "speed": "beckn:speed", + "startTime": "beckn:startTime", + "state": "beckn:state", + "states": "beckn:states", + "status": "beckn:status", + "subType": "beckn:subType", + "submittedAt": "beckn:submittedAt", + "submittedBy": "beckn:submittedBy", + "suggestedAction": "beckn:suggestedAction", + "supportEmail": "beckn:supportEmail", + "supportPhone": "beckn:supportPhone", + "surcharge": "beckn:surcharge", + "tags": "beckn:tags", + "taxBreakup": "beckn:taxBreakup", + "temperatureControl": "beckn:temperatureControl", + "timeliness": "beckn:timeliness", + "timestamp": "beckn:timestamp", + "title": "beckn:title", + "tollCost": "beckn:tollCost", + "totalAmount": "beckn:totalAmount", + "totalDistance": "beckn:totalDistance", + "totalPackages": "beckn:totalPackages", + "totalWeight": "beckn:totalWeight", + "trackingId": "beckn:trackingId", + "trackingUpdates": "beckn:trackingUpdates", + "transportMode": "beckn:transportMode", + "type": "beckn:type", + "unit": "beckn:unit", + "updatedAt": "beckn:updatedAt", + "url": "beckn:url", + "value": "beckn:value", + "vehicle": "beckn:vehicle", + "vehicleNumber": "beckn:vehicleNumber", + "vehicleType": "beckn:vehicleType", + "volumeCapacity": "beckn:volumeCapacity", + "volumetricWeight": "beckn:volumetricWeight", + "waived": "beckn:waived", + "waypoints": "beckn:waypoints", + "website": "beckn:website", + "weight": "beckn:weight", + "width": "beckn:width", + "wouldRecommend": "beckn:wouldRecommend", + "year": "beckn:year" } } diff --git a/schema/Logistics/v2.0/schema.json b/schema/Logistics/v2.0/schema.json new file mode 100644 index 0000000..9bda6d2 --- /dev/null +++ b/schema/Logistics/v2.0/schema.json @@ -0,0 +1,2422 @@ +{ + "$id": "https://schema.beckn.io/Logistics/v2.0", + "x-iri": "https://schema.beckn.io/Logistics/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Logistics JSON Schema", + "type": "object", + "properties": { + "components": { + "type": "object", + "properties": { + "schemas": { + "type": "object", + "properties": { + "Carrier": { + "$ref": "#/$defs/Carrier" + }, + "Consignment": { + "$ref": "#/$defs/Consignment" + }, + "Contact": { + "$ref": "#/$defs/Contact" + }, + "Courier": { + "$ref": "#/$defs/Courier" + }, + "DeliverySlot": { + "$ref": "#/$defs/DeliverySlot" + }, + "Hub": { + "$ref": "#/$defs/Hub" + }, + "LogisticsAlert": { + "$ref": "#/$defs/LogisticsAlert" + }, + "LogisticsCancellationPolicy": { + "$ref": "#/$defs/LogisticsCancellationPolicy" + }, + "LogisticsDriver": { + "$ref": "#/$defs/LogisticsDriver" + }, + "LogisticsFare": { + "$ref": "#/$defs/LogisticsFare" + }, + "LogisticsFareBreakup": { + "$ref": "#/$defs/LogisticsFareBreakup" + }, + "LogisticsFeedback": { + "$ref": "#/$defs/LogisticsFeedback" + }, + "LogisticsOperator": { + "$ref": "#/$defs/LogisticsOperator" + }, + "LogisticsPlace": { + "$ref": "#/$defs/LogisticsPlace" + }, + "LogisticsRating": { + "$ref": "#/$defs/LogisticsRating" + }, + "LogisticsReceipt": { + "$ref": "#/$defs/LogisticsReceipt" + }, + "LogisticsRoute": { + "$ref": "#/$defs/LogisticsRoute" + }, + "LogisticsSupportCase": { + "$ref": "#/$defs/LogisticsSupportCase" + }, + "LogisticsVehicle": { + "$ref": "#/$defs/LogisticsVehicle" + }, + "Package": { + "$ref": "#/$defs/Package" + }, + "Proof": { + "$ref": "#/$defs/Proof" + }, + "ReturnPolicy": { + "$ref": "#/$defs/ReturnPolicy" + }, + "Shipment": { + "$ref": "#/$defs/Shipment" + }, + "TrackingUpdate": { + "$ref": "#/$defs/TrackingUpdate" + }, + "Waypoint": { + "$ref": "#/$defs/Waypoint" + } + }, + "additionalProperties": false + } + }, + "required": [ + "schemas" + ], + "additionalProperties": false + } + }, + "required": [ + "components" + ], + "additionalProperties": false, + "$defs": { + "Carrier": { + "type": "object", + "title": "Carrier", + "description": "A Carrier is a transport service provider responsible for moving goods across distances. Carriers operate fleets of vehicles and may own/manage logistics hubs. Maps to beckn:Provider. ", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique carrier identifier", + "example": "CAR-DTDC-001" + }, + "name": { + "type": "string", + "description": "Legal name of the carrier", + "example": "DTDC Express Limited" + }, + "code": { + "type": "string", + "description": "Short carrier code", + "example": "DTDC" + }, + "logo": { + "type": "string", + "format": "uri", + "description": "URL to carrier logo" + }, + "website": { + "type": "string", + "format": "uri" + }, + "contact": { + "$ref": "#/$defs/Contact" + }, + "rating": { + "type": "number", + "minimum": 1, + "maximum": 5, + "example": 4.2 + }, + "serviceTypes": { + "type": "array", + "description": "Types of logistics services offered", + "items": { + "type": "string", + "enum": [ + "HYPERLOCAL", + "COURIER", + "INTERSTATE", + "LONG_HAUL", + "EXPRESS" + ] + } + }, + "serviceCoverage": { + "type": "array", + "description": "Geographic regions served", + "items": { + "type": "object", + "properties": { + "country": { + "type": "string" + }, + "states": { + "type": "array", + "items": { + "type": "string" + } + }, + "pincodes": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "fleetSize": { + "type": "integer", + "description": "Number of vehicles in fleet", + "example": 500 + }, + "hubs": { + "type": "array", + "description": "Logistics hubs operated by this carrier", + "items": { + "$ref": "#/$defs/Hub" + } + }, + "licenseNumber": { + "type": "string", + "description": "Transport license number" + }, + "gstNumber": { + "type": "string", + "description": "GST registration number" + }, + "panNumber": { + "type": "string", + "description": "PAN for tax purposes" + }, + "active": { + "type": "boolean", + "description": "Whether carrier is currently active on network", + "example": true + } + } + }, + "Consignment": { + "type": "object", + "title": "Consignment", + "description": "A Consignment is a collection of packages or shipments grouped together under a single commercial transaction between a shipper and consignee. Maps to beckn:Order. ", + "required": [ + "id", + "shipper", + "consignee" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique consignment identifier (e.g. AWB number)", + "example": "AWB-2024-9900123" + }, + "shipper": { + "$ref": "#/$defs/Contact" + }, + "consignee": { + "$ref": "#/$defs/Contact" + }, + "shipments": { + "type": "array", + "description": "List of shipments in this consignment", + "items": { + "$ref": "#/$defs/Shipment" + } + }, + "carrier": { + "$ref": "#/$defs/Carrier" + }, + "totalWeight": { + "type": "object", + "properties": { + "value": { + "type": "number" + }, + "unit": { + "type": "string", + "enum": [ + "kg", + "ton" + ] + } + } + }, + "totalPackages": { + "type": "integer", + "description": "Total number of packages in this consignment" + }, + "serviceType": { + "type": "string", + "enum": [ + "COURIER", + "INTERSTATE", + "LONG_HAUL", + "EXPRESS" + ] + }, + "paymentMode": { + "type": "string", + "enum": [ + "PREPAID", + "TO_PAY", + "COD" + ], + "description": "Payment responsibility" + }, + "commercialInvoiceNumber": { + "type": "string", + "description": "Commercial invoice number for customs" + }, + "customsDeclaration": { + "type": "boolean", + "description": "Whether customs declaration is required" + }, + "status": { + "type": "string", + "enum": [ + "CREATED", + "BOOKED", + "IN_TRANSIT", + "DELIVERED", + "CANCELLED" + ] + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "estimatedDelivery": { + "type": "string", + "format": "date-time" + } + } + }, + "Contact": { + "type": "object", + "title": "Contact", + "description": "Contact information for sender, receiver, driver, or operator.", + "properties": { + "name": { + "type": "string", + "example": "Priya Mehta" + }, + "phone": { + "type": "string", + "example": "+919876543210" + }, + "email": { + "type": "string", + "format": "email", + "example": "priya.mehta@email.com" + }, + "alternatePhone": { + "type": "string" + }, + "company": { + "type": "string", + "description": "Company name if B2B contact" + }, + "gstNumber": { + "type": "string", + "description": "GST number for B2B invoicing" + } + } + }, + "Courier": { + "type": "object", + "title": "Courier", + "description": "A Courier is an individual delivery agent responsible for last-mile pickup and delivery of packages, typically in hyperlocal or urban delivery contexts. Maps to beckn:Agent. ", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique courier identifier", + "example": "CRR-001234" + }, + "name": { + "type": "string", + "description": "Full name of the courier", + "example": "Ramesh Kumar" + }, + "phone": { + "type": "string", + "description": "Contact phone number", + "example": "+919876543210" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email address" + }, + "profilePhoto": { + "type": "string", + "format": "uri", + "description": "URL to courier's profile photo" + }, + "rating": { + "type": "number", + "description": "Average rating (1-5)", + "minimum": 1, + "maximum": 5, + "example": 4.6 + }, + "vehicleType": { + "type": "string", + "description": "Type of vehicle used", + "enum": [ + "BICYCLE", + "MOTORCYCLE", + "ELECTRIC_SCOOTER", + "CAR", + "VAN" + ], + "example": "MOTORCYCLE" + }, + "vehicleNumber": { + "type": "string", + "description": "Vehicle registration number", + "example": "KA05AB1234" + }, + "currentLocation": { + "$ref": "#/$defs/LogisticsPlace" + }, + "status": { + "type": "string", + "enum": [ + "AVAILABLE", + "ASSIGNED", + "ON_PICKUP", + "ON_DELIVERY", + "OFFLINE" + ], + "example": "ON_DELIVERY" + }, + "activeShipments": { + "type": "array", + "description": "Currently assigned shipments", + "items": { + "type": "string" + } + }, + "kycVerified": { + "type": "boolean", + "description": "Whether courier has completed KYC verification", + "example": true + }, + "joiningDate": { + "type": "string", + "format": "date", + "description": "Date the courier joined the network" + } + } + }, + "DeliverySlot": { + "type": "object", + "title": "DeliverySlot", + "description": "A DeliverySlot is a time window offered or agreed upon for delivery of a shipment. Maps to beckn:TimeSlot. ", + "required": [ + "id", + "date", + "startTime", + "endTime" + ], + "properties": { + "id": { + "type": "string", + "example": "SLOT-2024-03-15-AM" + }, + "date": { + "type": "string", + "format": "date", + "example": "2024-03-15" + }, + "startTime": { + "type": "string", + "example": "10:00" + }, + "endTime": { + "type": "string", + "example": "13:00" + }, + "label": { + "type": "string", + "description": "Human-readable label", + "enum": [ + "EXPRESS_1HR", + "EXPRESS_2HR", + "MORNING", + "AFTERNOON", + "EVENING", + "FULL_DAY", + "NEXT_DAY" + ], + "example": "MORNING" + }, + "available": { + "type": "boolean", + "description": "Whether this slot is still available", + "example": true + }, + "surcharge": { + "type": "object", + "description": "Additional charge for this slot (e.g. express slot)", + "properties": { + "amount": { + "type": "number", + "example": 49 + }, + "currency": { + "type": "string", + "example": "INR" + } + } + }, + "capacity": { + "type": "integer", + "description": "Maximum deliveries in this slot", + "example": 100 + }, + "remainingCapacity": { + "type": "integer", + "example": 34 + }, + "cutoffTime": { + "type": "string", + "format": "date-time", + "description": "Last time to book this slot", + "example": "2024-03-14T22:00:00+05:30" + } + } + }, + "Hub": { + "type": "object", + "title": "Hub", + "description": "A Hub is a logistics fulfillment center, sorting facility, or distribution point where goods are consolidated, sorted, and dispatched for onward delivery. Maps to beckn:Location. ", + "required": [ + "id", + "name", + "place" + ], + "properties": { + "id": { + "type": "string", + "example": "HUB-BLR-MAIN" + }, + "name": { + "type": "string", + "example": "Bengaluru Main Sorting Hub" + }, + "code": { + "type": "string", + "description": "Short hub code", + "example": "BLR-MAIN" + }, + "place": { + "$ref": "#/$defs/LogisticsPlace" + }, + "type": { + "type": "string", + "enum": [ + "FULFILLMENT_CENTER", + "SORTING_HUB", + "COLLECTION_POINT", + "LAST_MILE_HUB", + "DARK_STORE", + "CUSTOMS_WAREHOUSE" + ], + "example": "SORTING_HUB" + }, + "operator": { + "$ref": "#/$defs/LogisticsOperator" + }, + "operatingHours": { + "type": "object", + "properties": { + "open": { + "type": "string", + "example": "06:00" + }, + "close": { + "type": "string", + "example": "23:00" + }, + "is24x7": { + "type": "boolean", + "example": false + } + } + }, + "processingCapacity": { + "type": "object", + "description": "Maximum packages processed per day", + "properties": { + "value": { + "type": "integer", + "example": 50000 + }, + "unit": { + "type": "string", + "example": "packages/day" + } + } + }, + "serviceablePincodes": { + "type": "array", + "description": "PIN codes serviced from this hub", + "items": { + "type": "string" + }, + "example": [ + "560001", + "560002", + "560068" + ] + }, + "facilities": { + "type": "array", + "description": "Facilities available at hub", + "items": { + "type": "string" + }, + "example": [ + "cold_storage", + "hazmat_storage", + "customer_service_desk" + ] + }, + "contactPhone": { + "type": "string", + "example": "+918028001234" + }, + "active": { + "type": "boolean", + "example": true + } + } + }, + "LogisticsAlert": { + "type": "object", + "title": "LogisticsAlert", + "description": "An Alert is a notification or warning related to a shipment, such as delays, exceptions, damage reports, or SLA breaches. Maps to beckn:Event. ", + "required": [ + "id", + "type", + "severity", + "message", + "timestamp" + ], + "properties": { + "id": { + "type": "string", + "example": "ALT-0001" + }, + "shipmentId": { + "type": "string", + "example": "SHP-2024-001234" + }, + "type": { + "type": "string", + "enum": [ + "DELAY", + "DAMAGE", + "LOSS", + "FAILED_DELIVERY", + "CUSTOMS_HOLD", + "WEATHER_DISRUPTION", + "ROUTE_DEVIATION", + "SLA_BREACH", + "ADDRESS_ISSUE", + "PAYMENT_FAILED" + ], + "example": "DELAY" + }, + "severity": { + "type": "string", + "enum": [ + "INFO", + "WARNING", + "CRITICAL" + ], + "example": "WARNING" + }, + "message": { + "type": "string", + "example": "Your shipment is delayed by 4 hours due to traffic at NH-44." + }, + "cause": { + "type": "string", + "description": "Root cause of the alert", + "example": "Highway accident causing major traffic backlog" + }, + "impactedETA": { + "type": "string", + "format": "date-time", + "description": "Revised ETA due to alert" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "resolvedAt": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string", + "enum": [ + "OPEN", + "ACKNOWLEDGED", + "RESOLVED" + ], + "example": "OPEN" + }, + "notificationChannels": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "SMS", + "EMAIL", + "PUSH", + "WHATSAPP" + ] + }, + "example": [ + "SMS", + "PUSH" + ] + }, + "actionRequired": { + "type": "boolean", + "description": "Whether customer action is needed", + "example": false + }, + "suggestedAction": { + "type": "string", + "example": "Please reschedule delivery for tomorrow." + } + } + }, + "LogisticsCancellationPolicy": { + "type": "object", + "title": "LogisticsCancellationPolicy", + "description": "Defines terms under which a shipment booking can be cancelled.", + "properties": { + "id": { + "type": "string", + "example": "CP-EXPRESS-001" + }, + "cancellableUntil": { + "type": "string", + "description": "Cancellation allowed until this lifecycle stage", + "enum": [ + "BEFORE_PICKUP", + "BEFORE_DISPATCH", + "ANYTIME", + "NON_CANCELLABLE" + ], + "example": "BEFORE_PICKUP" + }, + "cancellationFee": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "FLAT", + "PERCENTAGE", + "NIL" + ], + "example": "FLAT" + }, + "value": { + "type": "number", + "example": 50 + }, + "currency": { + "type": "string", + "example": "INR" + } + } + }, + "refundPolicy": { + "type": "object", + "properties": { + "refundable": { + "type": "boolean", + "example": true + }, + "refundPercentage": { + "type": "number", + "example": 100 + }, + "processingDays": { + "type": "integer", + "example": 5 + } + } + }, + "conditions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Full refund if cancelled before pickup", + "50% refund if cancelled after pickup" + ] + }, + "applicableServiceTypes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "EXPRESS", + "COURIER" + ] + } + } + }, + "LogisticsDriver": { + "type": "object", + "title": "LogisticsDriver", + "description": "A Driver is an individual who operates a vehicle for logistics delivery. Drivers are assigned to shipments and responsible for physical transport. Maps to beckn:Agent. ", + "required": [ + "id", + "name", + "licenseNumber" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique driver identifier", + "example": "DRV-00456" + }, + "name": { + "type": "string", + "description": "Full name of the driver", + "example": "Suresh Patil" + }, + "phone": { + "type": "string", + "example": "+919845001234" + }, + "email": { + "type": "string", + "format": "email" + }, + "profilePhoto": { + "type": "string", + "format": "uri" + }, + "licenseNumber": { + "type": "string", + "description": "Driving license number", + "example": "MH1420210012345" + }, + "licenseExpiry": { + "type": "string", + "format": "date", + "description": "License expiry date" + }, + "rating": { + "type": "number", + "minimum": 1, + "maximum": 5, + "example": 4.5 + }, + "currentLocation": { + "type": "object", + "description": "Real-time GPS location", + "properties": { + "lat": { + "type": "number", + "example": 12.9716 + }, + "lng": { + "type": "number", + "example": 77.5946 + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "status": { + "type": "string", + "enum": [ + "AVAILABLE", + "ASSIGNED", + "ON_ROUTE", + "OFFLINE" + ], + "example": "ON_ROUTE" + }, + "vehicle": { + "$ref": "#/$defs/LogisticsVehicle" + }, + "experienceYears": { + "type": "integer", + "description": "Years of driving experience", + "example": 5 + }, + "backgroundVerified": { + "type": "boolean", + "description": "Whether background verification is complete", + "example": true + }, + "languagesSpoken": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Hindi", + "Kannada" + ] + }, + "operatingZones": { + "type": "array", + "description": "Geographic zones the driver operates in", + "items": { + "type": "string" + }, + "example": [ + "Bangalore North", + "Bangalore East" + ] + } + } + }, + "LogisticsFare": { + "type": "object", + "title": "LogisticsFare", + "description": "Total cost charged for a logistics service including base freight, surcharges, taxes.", + "required": [ + "currency", + "totalAmount" + ], + "properties": { + "currency": { + "type": "string", + "example": "INR" + }, + "baseFreight": { + "type": "number", + "description": "Base freight charge", + "example": 450 + }, + "fuelSurcharge": { + "type": "number", + "example": 45 + }, + "odaSurcharge": { + "type": "number", + "description": "Out of Delivery Area surcharge", + "example": 0 + }, + "codCharge": { + "type": "number", + "description": "Cash on delivery charge", + "example": 30 + }, + "insuranceCharge": { + "type": "number", + "example": 25 + }, + "gst": { + "type": "number", + "description": "GST amount", + "example": 81 + }, + "otherCharges": { + "type": "number", + "example": 0 + }, + "discount": { + "type": "number", + "example": 50 + }, + "totalAmount": { + "type": "number", + "description": "Final total payable", + "example": 581 + }, + "breakup": { + "type": "array", + "description": "Detailed fare breakup line items", + "items": { + "$ref": "#/$defs/LogisticsFareBreakup" + } + }, + "estimatedFare": { + "type": "boolean", + "description": "Whether this is an estimate or confirmed fare", + "example": false + }, + "paymentMode": { + "type": "string", + "enum": [ + "PREPAID", + "COD", + "TO_PAY", + "CREDIT" + ], + "example": "PREPAID" + } + } + }, + "LogisticsFareBreakup": { + "type": "object", + "title": "LogisticsFareBreakup", + "description": "A single line item in the fare breakup for a logistics service.", + "required": [ + "title", + "amount" + ], + "properties": { + "title": { + "type": "string", + "description": "Name of the fare component", + "example": "Base Freight" + }, + "amount": { + "type": "number", + "example": 450 + }, + "currency": { + "type": "string", + "example": "INR" + }, + "type": { + "type": "string", + "enum": [ + "ITEM", + "SURCHARGE", + "TAX", + "DISCOUNT", + "FEE" + ], + "example": "ITEM" + }, + "taxBreakup": { + "type": "array", + "description": "Tax sub-components if applicable", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "CGST @ 9%" + }, + "percent": { + "type": "number", + "example": 9 + }, + "amount": { + "type": "number", + "example": 40.5 + } + } + } + }, + "waived": { + "type": "boolean", + "description": "Whether this component was waived", + "example": false + } + } + }, + "LogisticsFeedback": { + "type": "object", + "title": "LogisticsFeedback", + "description": "Qualitative feedback from sender or receiver about a logistics experience.", + "properties": { + "id": { + "type": "string", + "example": "FBK-001" + }, + "shipmentId": { + "type": "string" + }, + "rating": { + "$ref": "#/$defs/LogisticsRating" + }, + "review": { + "type": "string", + "description": "Free text review", + "example": "Driver was very professional and delivered on time." + }, + "tags": { + "type": "array", + "description": "Structured feedback tags", + "items": { + "type": "string" + }, + "example": [ + "ON_TIME", + "PROFESSIONAL_DRIVER", + "GOOD_PACKAGING" + ] + }, + "wouldRecommend": { + "type": "boolean", + "example": true + }, + "submittedBy": { + "type": "string", + "description": "User ID of feedback submitter" + }, + "submittedAt": { + "type": "string", + "format": "date-time" + }, + "isPublic": { + "type": "boolean", + "description": "Whether feedback is publicly visible", + "example": true + } + } + }, + "LogisticsOperator": { + "type": "object", + "title": "LogisticsOperator", + "description": "Entity operating a logistics network or fleet, responsible for end-to-end delivery service.", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "example": "OPR-DELHIVERY-001" + }, + "name": { + "type": "string", + "example": "Delhivery" + }, + "type": { + "type": "string", + "enum": [ + "3PL", + "CAPTIVE", + "AGGREGATOR", + "POSTAL" + ], + "example": "3PL" + }, + "contact": { + "$ref": "#/$defs/Contact" + }, + "website": { + "type": "string", + "format": "uri" + }, + "supportEmail": { + "type": "string", + "format": "email" + }, + "supportPhone": { + "type": "string" + }, + "rating": { + "type": "number", + "minimum": 1, + "maximum": 5 + }, + "activeCarriers": { + "type": "integer", + "description": "Number of carriers on the operator's network" + }, + "activeDrivers": { + "type": "integer" + }, + "deliveriesPerDay": { + "type": "integer" + }, + "serviceCoverage": { + "type": "object", + "properties": { + "countries": { + "type": "array", + "items": { + "type": "string" + } + }, + "cities": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "certifications": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "ISO9001", + "GDPR_COMPLIANT" + ] + } + } + }, + "LogisticsPlace": { + "type": "object", + "title": "LogisticsPlace", + "description": "A geographic location relevant to logistics such as origin, destination, hub, or waypoint. Includes structured address and GPS coordinates. Maps to beckn:Location and schema:Place. ", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "example": "PLC-BLR-001" + }, + "name": { + "type": "string", + "description": "Name of the place", + "example": "Anita's Home" + }, + "type": { + "type": "string", + "enum": [ + "PICKUP", + "DELIVERY", + "HUB", + "WAYPOINT", + "STORE", + "WAREHOUSE" + ], + "example": "DELIVERY" + }, + "address": { + "type": "object", + "properties": { + "line1": { + "type": "string", + "example": "42, 5th Cross Road" + }, + "line2": { + "type": "string", + "example": "Indiranagar" + }, + "landmark": { + "type": "string", + "example": "Near Total Mall" + }, + "city": { + "type": "string", + "example": "Bengaluru" + }, + "state": { + "type": "string", + "example": "Karnataka" + }, + "country": { + "type": "string", + "example": "India" + }, + "pincode": { + "type": "string", + "example": "560038" + } + } + }, + "gps": { + "type": "object", + "properties": { + "lat": { + "type": "number", + "example": 12.9719 + }, + "lng": { + "type": "number", + "example": 77.6412 + } + } + }, + "contact": { + "$ref": "#/$defs/Contact" + }, + "accessInstructions": { + "type": "string", + "description": "Instructions for courier to reach the place", + "example": "Ring bell twice. Building B, 3rd floor." + }, + "isVerified": { + "type": "boolean", + "description": "Whether the address has been geocode-verified", + "example": true + } + } + }, + "LogisticsRating": { + "type": "object", + "title": "LogisticsRating", + "description": "A numeric score given by a user for a logistics service, driver, or carrier.", + "required": [ + "value", + "ratingFor" + ], + "properties": { + "id": { + "type": "string", + "example": "RTG-00456" + }, + "value": { + "type": "number", + "minimum": 1, + "maximum": 5, + "example": 4.5 + }, + "ratingFor": { + "type": "string", + "enum": [ + "DRIVER", + "CARRIER", + "SERVICE", + "PACKAGING" + ], + "example": "DRIVER" + }, + "ratedBy": { + "type": "string", + "description": "User ID who gave the rating" + }, + "shipmentId": { + "type": "string" + }, + "categories": { + "type": "object", + "description": "Category-wise ratings", + "properties": { + "timeliness": { + "type": "number", + "minimum": 1, + "maximum": 5 + }, + "packaging": { + "type": "number", + "minimum": 1, + "maximum": 5 + }, + "handling": { + "type": "number", + "minimum": 1, + "maximum": 5 + }, + "communication": { + "type": "number", + "minimum": 1, + "maximum": 5 + } + } + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + } + }, + "LogisticsReceipt": { + "type": "object", + "title": "LogisticsReceipt", + "description": "Digital acknowledgment of payment and delivery for a logistics service.", + "required": [ + "id", + "shipmentId", + "fare" + ], + "properties": { + "id": { + "type": "string", + "example": "RCP-2024-001234" + }, + "shipmentId": { + "type": "string", + "example": "SHP-2024-001234" + }, + "invoiceNumber": { + "type": "string", + "example": "INV-2024-9900" + }, + "issuedAt": { + "type": "string", + "format": "date-time" + }, + "fare": { + "$ref": "#/$defs/LogisticsFare" + }, + "paymentMode": { + "type": "string", + "enum": [ + "PREPAID", + "COD", + "TO_PAY", + "CREDIT" + ], + "example": "PREPAID" + }, + "paymentTransactionId": { + "type": "string", + "example": "TXN-UPI-2024-123456" + }, + "paidAt": { + "type": "string", + "format": "date-time" + }, + "shipper": { + "$ref": "#/$defs/Contact" + }, + "consignee": { + "$ref": "#/$defs/Contact" + }, + "carrier": { + "$ref": "#/$defs/Carrier" + }, + "deliveryProof": { + "$ref": "#/$defs/Proof" + }, + "downloadUrl": { + "type": "string", + "format": "uri", + "description": "URL to download PDF receipt" + } + } + }, + "LogisticsRoute": { + "type": "object", + "title": "LogisticsRoute", + "description": "A Route is the planned path for a shipment from origin to destination, potentially passing through multiple hubs and waypoints. Maps to beckn:Journey. ", + "required": [ + "id", + "origin", + "destination" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique route identifier", + "example": "RTE-BLR-DEL-001" + }, + "name": { + "type": "string", + "description": "Human-readable route name", + "example": "Bangalore to Delhi via Hyderabad" + }, + "origin": { + "$ref": "#/$defs/LogisticsPlace" + }, + "destination": { + "$ref": "#/$defs/LogisticsPlace" + }, + "waypoints": { + "type": "array", + "description": "Intermediate waypoints/hubs on the route", + "items": { + "$ref": "#/$defs/Waypoint" + } + }, + "totalDistance": { + "type": "object", + "properties": { + "value": { + "type": "number", + "example": 2150 + }, + "unit": { + "type": "string", + "enum": [ + "km", + "miles" + ], + "example": "km" + } + } + }, + "estimatedDuration": { + "type": "object", + "properties": { + "value": { + "type": "number", + "example": 36 + }, + "unit": { + "type": "string", + "enum": [ + "hours", + "days" + ], + "example": "hours" + } + } + }, + "transportMode": { + "type": "string", + "enum": [ + "ROAD", + "AIR", + "RAIL", + "MULTIMODAL" + ], + "example": "ROAD" + }, + "routeType": { + "type": "string", + "description": "Classification of route", + "enum": [ + "HYPERLOCAL", + "LAST_MILE", + "FIRST_MILE", + "LINE_HAUL", + "CROSS_DOCKING" + ], + "example": "LINE_HAUL" + }, + "geometry": { + "type": "object", + "description": "GeoJSON LineString of route geometry", + "properties": { + "type": { + "type": "string", + "example": "LineString" + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "tollCost": { + "type": "number", + "description": "Estimated toll charges in INR", + "example": 1250 + }, + "restrictions": { + "type": "array", + "description": "Route restrictions (e.g. night driving ban)", + "items": { + "type": "string" + }, + "example": [ + "No night driving in MP", + "Heavy vehicle ban in city center" + ] + } + } + }, + "LogisticsSupportCase": { + "type": "object", + "title": "LogisticsSupportCase", + "description": "Customer support ticket for shipment issues — loss, damage, delay, or billing.", + "required": [ + "id", + "issueType", + "shipmentId" + ], + "properties": { + "id": { + "type": "string", + "example": "SUP-2024-00789" + }, + "shipmentId": { + "type": "string" + }, + "issueType": { + "type": "string", + "enum": [ + "SHIPMENT_LOST", + "SHIPMENT_DAMAGED", + "DELIVERY_DELAYED", + "WRONG_ITEM_DELIVERED", + "BILLING_DISPUTE", + "DRIVER_MISCONDUCT", + "OTHER" + ], + "example": "DELIVERY_DELAYED" + }, + "description": { + "type": "string", + "example": "My package was supposed to be delivered yesterday but has not arrived." + }, + "priority": { + "type": "string", + "enum": [ + "LOW", + "MEDIUM", + "HIGH", + "URGENT" + ], + "example": "MEDIUM" + }, + "status": { + "type": "string", + "enum": [ + "OPEN", + "IN_PROGRESS", + "AWAITING_CUSTOMER", + "RESOLVED", + "CLOSED" + ], + "example": "OPEN" + }, + "raisedBy": { + "type": "string", + "description": "User ID who raised the ticket" + }, + "assignedAgent": { + "type": "string", + "description": "Support agent ID" + }, + "attachments": { + "type": "array", + "description": "Photo/document evidence", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "type": { + "type": "string", + "enum": [ + "PHOTO", + "DOCUMENT" + ] + } + } + } + }, + "claimAmount": { + "type": "number", + "description": "Amount claimed for loss/damage" + }, + "resolution": { + "type": "string", + "description": "Resolution details" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "resolvedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "LogisticsVehicle": { + "type": "object", + "title": "LogisticsVehicle", + "description": "A Vehicle is a transport asset used for logistics operations. Vehicle types range from bicycles for hyperlocal delivery to heavy trucks for long haul freight. Maps to beckn:Asset. ", + "required": [ + "id", + "registrationNumber", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique vehicle identifier", + "example": "VEH-00789" + }, + "registrationNumber": { + "type": "string", + "description": "Vehicle registration/license plate number", + "example": "KA01AB5678" + }, + "type": { + "type": "string", + "description": "Type of vehicle", + "enum": [ + "BICYCLE", + "ELECTRIC_SCOOTER", + "MOTORCYCLE", + "THREE_WHEELER", + "CAR", + "VAN", + "MINI_TRUCK", + "TRUCK_LCV", + "TRUCK_HCV", + "CONTAINER_TRUCK", + "TRAILER" + ], + "example": "TRUCK_LCV" + }, + "make": { + "type": "string", + "description": "Vehicle manufacturer", + "example": "Tata Motors" + }, + "model": { + "type": "string", + "description": "Vehicle model", + "example": "Tata Ace Gold" + }, + "year": { + "type": "integer", + "description": "Year of manufacture", + "example": 2022 + }, + "color": { + "type": "string", + "example": "White" + }, + "fuelType": { + "type": "string", + "enum": [ + "PETROL", + "DIESEL", + "CNG", + "ELECTRIC", + "HYBRID" + ], + "example": "DIESEL" + }, + "payloadCapacity": { + "type": "object", + "description": "Maximum cargo capacity", + "properties": { + "value": { + "type": "number", + "example": 750 + }, + "unit": { + "type": "string", + "enum": [ + "kg", + "ton" + ], + "example": "kg" + } + } + }, + "volumeCapacity": { + "type": "object", + "description": "Cargo volume capacity", + "properties": { + "value": { + "type": "number", + "example": 6 + }, + "unit": { + "type": "string", + "enum": [ + "cubic_feet", + "cubic_meters" + ], + "example": "cubic_feet" + } + } + }, + "hasRefrigeration": { + "type": "boolean", + "description": "Whether vehicle has refrigeration (cold chain)", + "example": false + }, + "gpsEnabled": { + "type": "boolean", + "description": "Whether vehicle has GPS tracking", + "example": true + }, + "insuranceExpiry": { + "type": "string", + "format": "date" + }, + "pollutionCertExpiry": { + "type": "string", + "format": "date" + }, + "fitnessExpiry": { + "type": "string", + "format": "date" + }, + "currentLocation": { + "type": "object", + "properties": { + "lat": { + "type": "number" + }, + "lng": { + "type": "number" + }, + "speed": { + "type": "number", + "description": "Speed in km/h" + }, + "heading": { + "type": "number", + "description": "Bearing in degrees" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "status": { + "type": "string", + "enum": [ + "AVAILABLE", + "ASSIGNED", + "ON_ROUTE", + "MAINTENANCE", + "INACTIVE" + ], + "example": "ON_ROUTE" + } + } + }, + "Package": { + "type": "object", + "title": "Package", + "description": "A Package is a physical unit of goods prepared for transport within a shipment. Maps to beckn:Item. ", + "required": [ + "id", + "weight" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the package", + "example": "PKG-001" + }, + "description": { + "type": "string", + "description": "Description of package contents", + "example": "Electronics - Laptop" + }, + "weight": { + "type": "object", + "description": "Weight of the package", + "properties": { + "value": { + "type": "number", + "example": 2.5 + }, + "unit": { + "type": "string", + "enum": [ + "kg", + "g", + "lb" + ], + "example": "kg" + } + } + }, + "dimensions": { + "type": "object", + "description": "Physical dimensions of the package", + "properties": { + "length": { + "type": "number", + "example": 40 + }, + "width": { + "type": "number", + "example": 30 + }, + "height": { + "type": "number", + "example": 10 + }, + "unit": { + "type": "string", + "enum": [ + "cm", + "in" + ], + "example": "cm" + } + } + }, + "volumetricWeight": { + "type": "number", + "description": "Calculated volumetric weight in kg", + "example": 3.0 + }, + "fragile": { + "type": "boolean", + "description": "Whether the package requires fragile handling", + "example": false + }, + "hazardous": { + "type": "boolean", + "description": "Whether the package contains hazardous materials", + "example": false + }, + "declaredValue": { + "type": "object", + "description": "Declared monetary value of contents", + "properties": { + "amount": { + "type": "number", + "example": 50000 + }, + "currency": { + "type": "string", + "example": "INR" + } + } + }, + "packageType": { + "type": "string", + "description": "Type of packaging", + "enum": [ + "BOX", + "ENVELOPE", + "PALLET", + "DRUM", + "BAG", + "TUBE" + ], + "example": "BOX" + }, + "barcode": { + "type": "string", + "description": "Package-level barcode or QR code", + "example": "4012345678901" + }, + "temperatureControl": { + "type": "object", + "description": "Temperature control requirements for cold chain", + "properties": { + "required": { + "type": "boolean", + "example": false + }, + "minTemp": { + "type": "number", + "example": 2 + }, + "maxTemp": { + "type": "number", + "example": 8 + }, + "unit": { + "type": "string", + "enum": [ + "C", + "F" + ], + "example": "C" + } + } + }, + "insuranceRequired": { + "type": "boolean", + "description": "Whether insurance is required for this package", + "example": false + } + } + }, + "Proof": { + "type": "object", + "title": "Proof", + "description": "Proof of delivery or pickup evidence, including photos, signatures, OTP confirmations, or digital receipts. Maps to beckn:Document. ", + "required": [ + "id", + "type", + "timestamp" + ], + "properties": { + "id": { + "type": "string", + "example": "POD-SHP001-001" + }, + "shipmentId": { + "type": "string", + "example": "SHP-2024-001234" + }, + "type": { + "type": "string", + "enum": [ + "PHOTO", + "SIGNATURE", + "OTP", + "BIOMETRIC", + "DIGITAL_RECEIPT", + "DOCUMENT_SCAN" + ], + "example": "PHOTO" + }, + "subType": { + "type": "string", + "description": "What was captured", + "enum": [ + "DELIVERED_AT_DOOR", + "DELIVERED_TO_PERSON", + "LEFT_AT_SAFE_PLACE", + "HANDED_TO_NEIGHBOUR", + "PICKUP_CONFIRMED" + ], + "example": "DELIVERED_TO_PERSON" + }, + "mediaUrl": { + "type": "string", + "format": "uri", + "description": "URL to proof media (photo/signature image)" + }, + "signatureData": { + "type": "string", + "description": "Base64-encoded signature data" + }, + "otpVerified": { + "type": "boolean", + "description": "Whether OTP was verified for delivery", + "example": true + }, + "recipientName": { + "type": "string", + "description": "Name of person who received the package", + "example": "Anita Sharma" + }, + "recipientRelation": { + "type": "string", + "description": "Relation to consignee if not consignee", + "example": "Spouse" + }, + "location": { + "type": "object", + "properties": { + "lat": { + "type": "number" + }, + "lng": { + "type": "number" + } + } + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "driverSignoff": { + "type": "boolean", + "description": "Driver confirmed successful delivery", + "example": true + } + } + }, + "ReturnPolicy": { + "type": "object", + "title": "ReturnPolicy", + "description": "Defines conditions for returning goods and reverse logistics workflows.", + "properties": { + "id": { + "type": "string", + "example": "RP-STD-001" + }, + "returnsAccepted": { + "type": "boolean", + "example": true + }, + "returnWindow": { + "type": "object", + "properties": { + "value": { + "type": "integer", + "example": 7 + }, + "unit": { + "type": "string", + "enum": [ + "days", + "hours" + ], + "example": "days" + } + } + }, + "returnReason": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "DAMAGED_IN_TRANSIT", + "WRONG_ITEM", + "CONSIGNEE_REFUSED", + "ADDRESS_NOT_FOUND" + ] + }, + "reversePickupCharge": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "FREE", + "FLAT", + "PERCENTAGE" + ], + "example": "FREE" + }, + "value": { + "type": "number", + "example": 0 + }, + "currency": { + "type": "string", + "example": "INR" + } + } + }, + "refundOnReturn": { + "type": "boolean", + "example": true + }, + "returnHubAddress": { + "$ref": "#/$defs/LogisticsPlace" + } + } + }, + "Shipment": { + "type": "object", + "title": "Shipment", + "description": "A Shipment represents the movement of one or more packages from an origin to a destination. It is the top-level fulfillment entity in a logistics transaction and maps to beckn:Fulfillment. ", + "required": [ + "id", + "status", + "origin", + "destination" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the shipment", + "example": "SHP-2024-001234" + }, + "trackingId": { + "type": "string", + "description": "Public tracking identifier shared with sender/receiver", + "example": "TRK9876543210IN" + }, + "status": { + "type": "string", + "description": "Current status of the shipment", + "enum": [ + "CREATED", + "PICKUP_PENDING", + "PICKED_UP", + "IN_TRANSIT", + "AT_HUB", + "OUT_FOR_DELIVERY", + "DELIVERED", + "FAILED_DELIVERY", + "RETURNED", + "CANCELLED" + ], + "example": "IN_TRANSIT" + }, + "origin": { + "$ref": "#/$defs/LogisticsPlace" + }, + "destination": { + "$ref": "#/$defs/LogisticsPlace" + }, + "packages": { + "type": "array", + "description": "List of packages in this shipment", + "items": { + "$ref": "#/$defs/Package" + } + }, + "carrier": { + "$ref": "#/$defs/Carrier" + }, + "driver": { + "$ref": "#/$defs/LogisticsDriver" + }, + "vehicle": { + "$ref": "#/$defs/LogisticsVehicle" + }, + "route": { + "$ref": "#/$defs/LogisticsRoute" + }, + "scheduledPickup": { + "type": "string", + "format": "date-time", + "description": "Scheduled pickup time" + }, + "estimatedDelivery": { + "type": "string", + "format": "date-time", + "description": "Estimated delivery date and time" + }, + "actualDelivery": { + "type": "string", + "format": "date-time", + "description": "Actual delivery date and time" + }, + "deliverySlot": { + "$ref": "#/$defs/DeliverySlot" + }, + "serviceType": { + "type": "string", + "description": "Type of logistics service", + "enum": [ + "HYPERLOCAL", + "COURIER", + "INTERSTATE", + "LONG_HAUL", + "EXPRESS" + ], + "example": "EXPRESS" + }, + "specialInstructions": { + "type": "string", + "description": "Special handling instructions for the shipment", + "example": "Handle with care. Do not tilt." + }, + "proof": { + "$ref": "#/$defs/Proof" + }, + "fare": { + "$ref": "#/$defs/LogisticsFare" + }, + "receipt": { + "$ref": "#/$defs/LogisticsReceipt" + }, + "cancellationPolicy": { + "$ref": "#/$defs/LogisticsCancellationPolicy" + }, + "returnPolicy": { + "$ref": "#/$defs/ReturnPolicy" + }, + "alerts": { + "type": "array", + "description": "Alerts raised for this shipment", + "items": { + "$ref": "#/$defs/LogisticsAlert" + } + }, + "trackingUpdates": { + "type": "array", + "description": "History of tracking updates", + "items": { + "$ref": "#/$defs/TrackingUpdate" + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Timestamp when shipment was created" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "Timestamp of last update" + } + } + }, + "TrackingUpdate": { + "type": "object", + "title": "TrackingUpdate", + "description": "A TrackingUpdate is a real-time or periodic update on the status and location of a shipment during transit. Maps to beckn:Event. ", + "required": [ + "id", + "shipmentId", + "status", + "timestamp" + ], + "properties": { + "id": { + "type": "string", + "example": "TRK-EVT-00123" + }, + "shipmentId": { + "type": "string", + "example": "SHP-2024-001234" + }, + "status": { + "type": "string", + "enum": [ + "BOOKED", + "PICKED_UP", + "IN_TRANSIT", + "AT_HUB", + "OUT_FOR_DELIVERY", + "DELIVERED", + "FAILED_DELIVERY", + "RETURNED", + "EXCEPTION" + ], + "example": "IN_TRANSIT" + }, + "location": { + "type": "object", + "properties": { + "lat": { + "type": "number", + "example": 17.385 + }, + "lng": { + "type": "number", + "example": 78.4867 + }, + "address": { + "type": "string", + "example": "Near Hyderabad Sorting Hub, NH-44" + } + } + }, + "timestamp": { + "type": "string", + "format": "date-time", + "example": "2024-03-15T14:30:00+05:30" + }, + "message": { + "type": "string", + "description": "Human-readable status message", + "example": "Your shipment has arrived at Hyderabad hub and is being sorted." + }, + "hub": { + "$ref": "#/$defs/Hub" + }, + "driver": { + "$ref": "#/$defs/LogisticsDriver" + }, + "vehicle": { + "$ref": "#/$defs/LogisticsVehicle" + }, + "exceptionDetails": { + "type": "object", + "description": "Details if this update is an exception", + "properties": { + "reason": { + "type": "string", + "enum": [ + "ADDRESS_NOT_FOUND", + "CONSIGNEE_UNAVAILABLE", + "ACCESS_DENIED", + "NATURAL_DISASTER", + "VEHICLE_BREAKDOWN", + "CUSTOMS_HOLD" + ], + "example": "CONSIGNEE_UNAVAILABLE" + }, + "remarks": { + "type": "string" + } + } + }, + "nextAction": { + "type": "string", + "description": "Next planned action", + "example": "Re-delivery attempt scheduled for tomorrow 10 AM - 1 PM" + }, + "notificationSent": { + "type": "boolean", + "description": "Whether customer was notified of this update", + "example": true + } + } + }, + "Waypoint": { + "type": "object", + "title": "Waypoint", + "description": "A Waypoint is an intermediate stop or checkpoint on a logistics route, such as a sorting hub, relay station, or customs checkpoint. Maps to beckn:Stop. ", + "required": [ + "id", + "place" + ], + "properties": { + "id": { + "type": "string", + "example": "WPT-HYD-001" + }, + "name": { + "type": "string", + "example": "Hyderabad Sorting Hub" + }, + "place": { + "$ref": "#/$defs/LogisticsPlace" + }, + "type": { + "type": "string", + "enum": [ + "HUB", + "RELAY_POINT", + "CUSTOMS", + "PICKUP", + "DELIVERY" + ], + "example": "HUB" + }, + "sequenceNumber": { + "type": "integer", + "description": "Order of this waypoint in the route", + "example": 2 + }, + "scheduledArrival": { + "type": "string", + "format": "date-time" + }, + "scheduledDeparture": { + "type": "string", + "format": "date-time" + }, + "actualArrival": { + "type": "string", + "format": "date-time" + }, + "actualDeparture": { + "type": "string", + "format": "date-time" + }, + "dwellTimeMinutes": { + "type": "integer", + "description": "Expected dwell time at this waypoint in minutes", + "example": 120 + }, + "handoverRequired": { + "type": "boolean", + "description": "Whether shipment changes carrier/vehicle at this point", + "example": true + }, + "status": { + "type": "string", + "enum": [ + "PENDING", + "REACHED", + "DEPARTED", + "SKIPPED" + ] + } + } + } + } +} diff --git a/schema/Logistics/v2.0/vocab.jsonld b/schema/Logistics/v2.0/vocab.jsonld index 5ca61ef..71b086e 100644 --- a/schema/Logistics/v2.0/vocab.jsonld +++ b/schema/Logistics/v2.0/vocab.jsonld @@ -1,11 +1,278 @@ { "@context": { "log": "https://schema.beckn.io/logistics/v2.0/", - "beckn": "https://schema.beckn.io/core/v2.0/", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", "owl": "http://www.w3.org/2002/07/owl#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - "skos": "http://www.w3.org/2004/02/skos/core#" + "skos": "http://www.w3.org/2004/02/skos/core#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "Logistics": "beckn:Logistics", + "Carrier": "beckn:Carrier", + "Consignment": "beckn:Consignment", + "Contact": "beckn:Contact", + "Courier": "beckn:Courier", + "DeliverySlot": "beckn:DeliverySlot", + "Hub": "beckn:Hub", + "LogisticsAlert": "beckn:LogisticsAlert", + "LogisticsCancellationPolicy": "beckn:LogisticsCancellationPolicy", + "LogisticsDriver": "beckn:LogisticsDriver", + "LogisticsFare": "beckn:LogisticsFare", + "LogisticsFareBreakup": "beckn:LogisticsFareBreakup", + "LogisticsFeedback": "beckn:LogisticsFeedback", + "LogisticsOperator": "beckn:LogisticsOperator", + "LogisticsPlace": "beckn:LogisticsPlace", + "LogisticsRating": "beckn:LogisticsRating", + "LogisticsReceipt": "beckn:LogisticsReceipt", + "LogisticsRoute": "beckn:LogisticsRoute", + "LogisticsSupportCase": "beckn:LogisticsSupportCase", + "LogisticsVehicle": "beckn:LogisticsVehicle", + "Package": "beckn:Package", + "Proof": "beckn:Proof", + "ReturnPolicy": "beckn:ReturnPolicy", + "Shipment": "beckn:Shipment", + "TrackingUpdate": "beckn:TrackingUpdate", + "Waypoint": "beckn:Waypoint", + "accessInstructions": "beckn:accessInstructions", + "actionRequired": "beckn:actionRequired", + "active": "beckn:active", + "activeCarriers": "beckn:activeCarriers", + "activeDrivers": "beckn:activeDrivers", + "activeShipments": "beckn:activeShipments", + "actualArrival": "beckn:actualArrival", + "actualDelivery": "beckn:actualDelivery", + "actualDeparture": "beckn:actualDeparture", + "address": "beckn:address", + "alerts": "beckn:alerts", + "alternatePhone": "beckn:alternatePhone", + "amount": "beckn:amount", + "applicableServiceTypes": "beckn:applicableServiceTypes", + "assignedAgent": "beckn:assignedAgent", + "attachments": "beckn:attachments", + "available": "beckn:available", + "backgroundVerified": "beckn:backgroundVerified", + "barcode": "beckn:barcode", + "baseFreight": "beckn:baseFreight", + "breakup": "beckn:breakup", + "cancellableUntil": "beckn:cancellableUntil", + "cancellationFee": "beckn:cancellationFee", + "cancellationPolicy": "beckn:cancellationPolicy", + "capacity": "beckn:capacity", + "carrier": "beckn:carrier", + "categories": "beckn:categories", + "cause": "beckn:cause", + "certifications": "beckn:certifications", + "cities": "beckn:cities", + "city": "beckn:city", + "claimAmount": "beckn:claimAmount", + "close": "beckn:close", + "codCharge": "beckn:codCharge", + "code": "beckn:code", + "color": "beckn:color", + "commercialInvoiceNumber": "beckn:commercialInvoiceNumber", + "communication": "beckn:communication", + "company": "beckn:company", + "components": "beckn:components", + "conditions": "beckn:conditions", + "consignee": "beckn:consignee", + "contact": "beckn:contact", + "contactPhone": "beckn:contactPhone", + "coordinates": "beckn:coordinates", + "countries": "beckn:countries", + "country": "beckn:country", + "createdAt": "beckn:createdAt", + "currency": "beckn:currency", + "currentLocation": "beckn:currentLocation", + "customsDeclaration": "beckn:customsDeclaration", + "cutoffTime": "beckn:cutoffTime", + "date": "beckn:date", + "declaredValue": "beckn:declaredValue", + "deliveriesPerDay": "beckn:deliveriesPerDay", + "deliveryProof": "beckn:deliveryProof", + "deliverySlot": "beckn:deliverySlot", + "description": "beckn:description", + "destination": "beckn:destination", + "dimensions": "beckn:dimensions", + "discount": "beckn:discount", + "downloadUrl": "beckn:downloadUrl", + "driver": "beckn:driver", + "driverSignoff": "beckn:driverSignoff", + "dwellTimeMinutes": "beckn:dwellTimeMinutes", + "email": "beckn:email", + "endTime": "beckn:endTime", + "estimatedDelivery": "beckn:estimatedDelivery", + "estimatedDuration": "beckn:estimatedDuration", + "estimatedFare": "beckn:estimatedFare", + "exceptionDetails": "beckn:exceptionDetails", + "experienceYears": "beckn:experienceYears", + "facilities": "beckn:facilities", + "fare": "beckn:fare", + "fitnessExpiry": "beckn:fitnessExpiry", + "fleetSize": "beckn:fleetSize", + "fragile": "beckn:fragile", + "fuelSurcharge": "beckn:fuelSurcharge", + "fuelType": "beckn:fuelType", + "geometry": "beckn:geometry", + "gps": "beckn:gps", + "gpsEnabled": "beckn:gpsEnabled", + "gst": "beckn:gst", + "gstNumber": "beckn:gstNumber", + "handling": "beckn:handling", + "handoverRequired": "beckn:handoverRequired", + "hasRefrigeration": "beckn:hasRefrigeration", + "hazardous": "beckn:hazardous", + "heading": "beckn:heading", + "height": "beckn:height", + "hub": "beckn:hub", + "hubs": "beckn:hubs", + "id": "beckn:id", + "impactedETA": "beckn:impactedETA", + "insuranceCharge": "beckn:insuranceCharge", + "insuranceExpiry": "beckn:insuranceExpiry", + "insuranceRequired": "beckn:insuranceRequired", + "invoiceNumber": "beckn:invoiceNumber", + "is24x7": "beckn:is24x7", + "isPublic": "beckn:isPublic", + "isVerified": "beckn:isVerified", + "issueType": "beckn:issueType", + "issuedAt": "beckn:issuedAt", + "joiningDate": "beckn:joiningDate", + "kycVerified": "beckn:kycVerified", + "label": "beckn:label", + "landmark": "beckn:landmark", + "languagesSpoken": "beckn:languagesSpoken", + "lat": "beckn:lat", + "length": "beckn:length", + "licenseExpiry": "beckn:licenseExpiry", + "licenseNumber": "beckn:licenseNumber", + "line1": "beckn:line1", + "line2": "beckn:line2", + "lng": "beckn:lng", + "location": "beckn:location", + "logo": "beckn:logo", + "make": "beckn:make", + "maxTemp": "beckn:maxTemp", + "mediaUrl": "beckn:mediaUrl", + "message": "beckn:message", + "minTemp": "beckn:minTemp", + "model": "beckn:model", + "name": "beckn:name", + "nextAction": "beckn:nextAction", + "notificationChannels": "beckn:notificationChannels", + "notificationSent": "beckn:notificationSent", + "odaSurcharge": "beckn:odaSurcharge", + "open": "beckn:open", + "operatingHours": "beckn:operatingHours", + "operatingZones": "beckn:operatingZones", + "operator": "beckn:operator", + "origin": "beckn:origin", + "otherCharges": "beckn:otherCharges", + "otpVerified": "beckn:otpVerified", + "packageType": "beckn:packageType", + "packages": "beckn:packages", + "packaging": "beckn:packaging", + "paidAt": "beckn:paidAt", + "panNumber": "beckn:panNumber", + "payloadCapacity": "beckn:payloadCapacity", + "paymentMode": "beckn:paymentMode", + "paymentTransactionId": "beckn:paymentTransactionId", + "percent": "beckn:percent", + "phone": "beckn:phone", + "pincode": "beckn:pincode", + "pincodes": "beckn:pincodes", + "place": "beckn:place", + "pollutionCertExpiry": "beckn:pollutionCertExpiry", + "priority": "beckn:priority", + "processingCapacity": "beckn:processingCapacity", + "processingDays": "beckn:processingDays", + "profilePhoto": "beckn:profilePhoto", + "proof": "beckn:proof", + "raisedBy": "beckn:raisedBy", + "ratedBy": "beckn:ratedBy", + "rating": "beckn:rating", + "ratingFor": "beckn:ratingFor", + "reason": "beckn:reason", + "receipt": "beckn:receipt", + "recipientName": "beckn:recipientName", + "recipientRelation": "beckn:recipientRelation", + "refundOnReturn": "beckn:refundOnReturn", + "refundPercentage": "beckn:refundPercentage", + "refundPolicy": "beckn:refundPolicy", + "refundable": "beckn:refundable", + "registrationNumber": "beckn:registrationNumber", + "remainingCapacity": "beckn:remainingCapacity", + "remarks": "beckn:remarks", + "required": "beckn:required", + "resolution": "beckn:resolution", + "resolvedAt": "beckn:resolvedAt", + "restrictions": "beckn:restrictions", + "returnHubAddress": "beckn:returnHubAddress", + "returnPolicy": "beckn:returnPolicy", + "returnReason": "beckn:returnReason", + "returnWindow": "beckn:returnWindow", + "returnsAccepted": "beckn:returnsAccepted", + "reversePickupCharge": "beckn:reversePickupCharge", + "review": "beckn:review", + "route": "beckn:route", + "routeType": "beckn:routeType", + "scheduledArrival": "beckn:scheduledArrival", + "scheduledDeparture": "beckn:scheduledDeparture", + "scheduledPickup": "beckn:scheduledPickup", + "schemas": "beckn:schemas", + "sequenceNumber": "beckn:sequenceNumber", + "serviceCoverage": "beckn:serviceCoverage", + "serviceType": "beckn:serviceType", + "serviceTypes": "beckn:serviceTypes", + "serviceablePincodes": "beckn:serviceablePincodes", + "severity": "beckn:severity", + "shipmentId": "beckn:shipmentId", + "shipments": "beckn:shipments", + "shipper": "beckn:shipper", + "signatureData": "beckn:signatureData", + "specialInstructions": "beckn:specialInstructions", + "speed": "beckn:speed", + "startTime": "beckn:startTime", + "state": "beckn:state", + "states": "beckn:states", + "status": "beckn:status", + "subType": "beckn:subType", + "submittedAt": "beckn:submittedAt", + "submittedBy": "beckn:submittedBy", + "suggestedAction": "beckn:suggestedAction", + "supportEmail": "beckn:supportEmail", + "supportPhone": "beckn:supportPhone", + "surcharge": "beckn:surcharge", + "tags": "beckn:tags", + "taxBreakup": "beckn:taxBreakup", + "temperatureControl": "beckn:temperatureControl", + "timeliness": "beckn:timeliness", + "timestamp": "beckn:timestamp", + "title": "beckn:title", + "tollCost": "beckn:tollCost", + "totalAmount": "beckn:totalAmount", + "totalDistance": "beckn:totalDistance", + "totalPackages": "beckn:totalPackages", + "totalWeight": "beckn:totalWeight", + "trackingId": "beckn:trackingId", + "trackingUpdates": "beckn:trackingUpdates", + "transportMode": "beckn:transportMode", + "type": "beckn:type", + "unit": "beckn:unit", + "updatedAt": "beckn:updatedAt", + "url": "beckn:url", + "value": "beckn:value", + "vehicle": "beckn:vehicle", + "vehicleNumber": "beckn:vehicleNumber", + "vehicleType": "beckn:vehicleType", + "volumeCapacity": "beckn:volumeCapacity", + "volumetricWeight": "beckn:volumetricWeight", + "waived": "beckn:waived", + "waypoints": "beckn:waypoints", + "website": "beckn:website", + "weight": "beckn:weight", + "width": "beckn:width", + "wouldRecommend": "beckn:wouldRecommend", + "year": "beckn:year" }, "@graph": [ { diff --git a/schema/LogisticsAlert/README.md b/schema/LogisticsAlert/README.md index 57ec5e2..23d162f 100644 --- a/schema/LogisticsAlert/README.md +++ b/schema/LogisticsAlert/README.md @@ -1,13 +1,9 @@ # LogisticsAlert -A schema.beckn.io Type +An Alert is a notification or warning related to a shipment, such as delays, exceptions, damage reports, or SLA breaches. Maps to beckn:Event. -Exception events: `DELAY`, `DAMAGE`, `LOSS`, `FAILED_DELIVERY`, `CUSTOMS_HOLD`, `SLA_BREACH` +## Versions -**Canonical IRI :** `log:LogisticsAlert` - -**Canonical URL:** https://schema.beckn.io/logistics/LogisticsAlert - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/LogisticsAlert/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsAlert/v2.0/attributes.yaml) | [https://schema.beckn.io/LogisticsAlert/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsAlert/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/LogisticsAlert/v2.0/context.jsonld](https://schema.beckn.io/LogisticsAlert/v2.0/context.jsonld) | [https://schema.beckn.io/LogisticsAlert/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsAlert/v2.0/vocab.jsonld) | [https://schema.beckn.io/LogisticsAlert/v2.0/README.md](https://schema.beckn.io/LogisticsAlert/v2.0/README.md) | diff --git a/schema/LogisticsAlert/v2.0/README.md b/schema/LogisticsAlert/v2.0/README.md new file mode 100644 index 0000000..0b54d29 --- /dev/null +++ b/schema/LogisticsAlert/v2.0/README.md @@ -0,0 +1,34 @@ +# LogisticsAlert — v2.0 + +An Alert is a notification or warning related to a shipment, such as delays, exceptions, damage reports, or SLA breaches. Maps to beckn:Event. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/LogisticsAlert/attributes.yaml](https://schema.beckn.io/LogisticsAlert/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/LogisticsAlert/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsAlert/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/LogisticsAlert/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsAlert/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/LogisticsAlert/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsAlert/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/LogisticsAlert/context.jsonld](https://schema.beckn.io/LogisticsAlert/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/LogisticsAlert/v2.0/context.jsonld](https://schema.beckn.io/LogisticsAlert/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/LogisticsAlert/vocab.jsonld](https://schema.beckn.io/LogisticsAlert/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/LogisticsAlert/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsAlert/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | - | +| `shipmentId` | no | string | - | +| `type` | yes | string | - | +| `severity` | yes | string | - | +| `message` | yes | string | - | +| `cause` | no | string | Root cause of the alert | +| `impactedETA` | no | string | Revised ETA due to alert | +| `timestamp` | yes | string | - | +| `resolvedAt` | no | string | - | +| `status` | no | string | - | +| `notificationChannels` | no | array | - | +| `actionRequired` | no | boolean | Whether customer action is needed | +| `suggestedAction` | no | string | - | diff --git a/schema/LogisticsAlert/v2.0/attributes.jsonschema.yaml b/schema/LogisticsAlert/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index ce6cb20..0000000 --- a/schema/LogisticsAlert/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,104 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: LogisticsAlert JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - LogisticsAlert: - $ref: '#/$defs/LogisticsAlert' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - LogisticsAlert: - type: object - title: LogisticsAlert - description: 'An Alert is a notification or warning related to a shipment, such - as delays, exceptions, damage reports, or SLA breaches. Maps to beckn:Event. - - ' - required: - - id - - type - - severity - - message - - timestamp - properties: - id: - type: string - example: ALT-0001 - shipmentId: - type: string - example: SHP-2024-001234 - type: - type: string - enum: - - DELAY - - DAMAGE - - LOSS - - FAILED_DELIVERY - - CUSTOMS_HOLD - - WEATHER_DISRUPTION - - ROUTE_DEVIATION - - SLA_BREACH - - ADDRESS_ISSUE - - PAYMENT_FAILED - example: DELAY - severity: - type: string - enum: - - INFO - - WARNING - - CRITICAL - example: WARNING - message: - type: string - example: Your shipment is delayed by 4 hours due to traffic at NH-44. - cause: - type: string - description: Root cause of the alert - example: Highway accident causing major traffic backlog - impactedETA: - type: string - format: date-time - description: Revised ETA due to alert - timestamp: - type: string - format: date-time - resolvedAt: - type: string - format: date-time - status: - type: string - enum: - - OPEN - - ACKNOWLEDGED - - RESOLVED - example: OPEN - notificationChannels: - type: array - items: - type: string - enum: - - SMS - - EMAIL - - PUSH - - WHATSAPP - example: - - SMS - - PUSH - actionRequired: - type: boolean - description: Whether customer action is needed - example: false - suggestedAction: - type: string - example: Please reschedule delivery for tomorrow. diff --git a/schema/LogisticsAlert/v2.0/attributes.yaml b/schema/LogisticsAlert/v2.0/attributes.yaml index 78ea577..9c57793 100644 --- a/schema/LogisticsAlert/v2.0/attributes.yaml +++ b/schema/LogisticsAlert/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: - title: LogisticsAlert + title: Alert version: 2.0.0 - description: Schema definition for the LogisticsAlert entity in the Beckn Logistics - domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the Alert entity in the Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: LogisticsAlert: + x-iri: https://schema.beckn.io/LogisticsAlert/v2.0 type: object - title: LogisticsAlert - description: 'An Alert is a notification or warning related to a shipment, such - as delays, exceptions, damage reports, or SLA breaches. Maps to beckn:Event. + title: Alert + description: 'An Alert is a notification or warning related to a shipment, such as delays, exceptions, damage reports, or SLA breaches. Maps to beckn:Event. ' required: diff --git a/schema/LogisticsAlert/v2.0/context.jsonld b/schema/LogisticsAlert/v2.0/context.jsonld new file mode 100644 index 0000000..6aff88b --- /dev/null +++ b/schema/LogisticsAlert/v2.0/context.jsonld @@ -0,0 +1,24 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "LogisticsAlert": "beckn:LogisticsAlert", + "actionRequired": "beckn:actionRequired", + "cause": "beckn:cause", + "id": "beckn:id", + "impactedETA": "beckn:impactedETA", + "message": "beckn:message", + "notificationChannels": "beckn:notificationChannels", + "resolvedAt": "beckn:resolvedAt", + "severity": "beckn:severity", + "shipmentId": "beckn:shipmentId", + "status": "beckn:status", + "suggestedAction": "beckn:suggestedAction", + "timestamp": "beckn:timestamp", + "type": "beckn:type" + } +} diff --git a/schema/LogisticsAlert/v2.0/schema.json b/schema/LogisticsAlert/v2.0/schema.json new file mode 100644 index 0000000..54eeb9c --- /dev/null +++ b/schema/LogisticsAlert/v2.0/schema.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "title": "Alert", + "description": "An Alert is a notification or warning related to a shipment, such as delays, exceptions, damage reports, or SLA breaches. Maps to beckn:Event. ", + "required": [ + "id", + "type", + "severity", + "message", + "timestamp" + ], + "properties": { + "id": { + "type": "string", + "example": "ALT-0001" + }, + "shipmentId": { + "type": "string", + "example": "SHP-2024-001234" + }, + "type": { + "type": "string", + "enum": [ + "DELAY", + "DAMAGE", + "LOSS", + "FAILED_DELIVERY", + "CUSTOMS_HOLD", + "WEATHER_DISRUPTION", + "ROUTE_DEVIATION", + "SLA_BREACH", + "ADDRESS_ISSUE", + "PAYMENT_FAILED" + ], + "example": "DELAY" + }, + "severity": { + "type": "string", + "enum": [ + "INFO", + "WARNING", + "CRITICAL" + ], + "example": "WARNING" + }, + "message": { + "type": "string", + "example": "Your shipment is delayed by 4 hours due to traffic at NH-44." + }, + "cause": { + "type": "string", + "description": "Root cause of the alert", + "example": "Highway accident causing major traffic backlog" + }, + "impactedETA": { + "type": "string", + "format": "date-time", + "description": "Revised ETA due to alert" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "resolvedAt": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string", + "enum": [ + "OPEN", + "ACKNOWLEDGED", + "RESOLVED" + ], + "example": "OPEN" + }, + "notificationChannels": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "SMS", + "EMAIL", + "PUSH", + "WHATSAPP" + ] + }, + "example": [ + "SMS", + "PUSH" + ] + }, + "actionRequired": { + "type": "boolean", + "description": "Whether customer action is needed", + "example": false + }, + "suggestedAction": { + "type": "string", + "example": "Please reschedule delivery for tomorrow." + } + }, + "$id": "https://schema.beckn.io/LogisticsAlert/v2.0", + "x-iri": "https://schema.beckn.io/LogisticsAlert/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/LogisticsAlert/v2.0/vocab.jsonld b/schema/LogisticsAlert/v2.0/vocab.jsonld new file mode 100644 index 0000000..be4469f --- /dev/null +++ b/schema/LogisticsAlert/v2.0/vocab.jsonld @@ -0,0 +1,33 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "LogisticsAlert": "beckn:LogisticsAlert", + "actionRequired": "beckn:actionRequired", + "cause": "beckn:cause", + "id": "beckn:id", + "impactedETA": "beckn:impactedETA", + "message": "beckn:message", + "notificationChannels": "beckn:notificationChannels", + "resolvedAt": "beckn:resolvedAt", + "severity": "beckn:severity", + "shipmentId": "beckn:shipmentId", + "status": "beckn:status", + "suggestedAction": "beckn:suggestedAction", + "timestamp": "beckn:timestamp", + "type": "beckn:type" + }, + "@graph": [ + { + "@id": "beckn:LogisticsAlert", + "@type": "rdfs:Class", + "rdfs:label": "Logistics Alert", + "rdfs:comment": "TODO: Description Needed - LogisticsAlert" + } + ] +} diff --git a/schema/LogisticsCancellationPolicy/README.md b/schema/LogisticsCancellationPolicy/README.md index c159fe2..e50b61a 100644 --- a/schema/LogisticsCancellationPolicy/README.md +++ b/schema/LogisticsCancellationPolicy/README.md @@ -1,13 +1,9 @@ # LogisticsCancellationPolicy -A schema.beckn.io Type +Defines terms under which a shipment booking can be cancelled. -Cancellable until: `BEFORE_PICKUP`, `BEFORE_DISPATCH`, `ANYTIME`, `NON_CANCELLABLE` +## Versions -**Canonical IRI :** `log:LogisticsCancellationPolicy` - -**Canonical URL:** https://schema.beckn.io/logistics/LogisticsCancellationPolicy - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/attributes.yaml) | [https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/context.jsonld](https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/context.jsonld) | [https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/vocab.jsonld) | [https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/README.md](https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/README.md) | diff --git a/schema/LogisticsCancellationPolicy/v2.0/README.md b/schema/LogisticsCancellationPolicy/v2.0/README.md new file mode 100644 index 0000000..8b91165 --- /dev/null +++ b/schema/LogisticsCancellationPolicy/v2.0/README.md @@ -0,0 +1,27 @@ +# LogisticsCancellationPolicy — v2.0 + +Defines terms under which a shipment booking can be cancelled. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/LogisticsCancellationPolicy/attributes.yaml](https://schema.beckn.io/LogisticsCancellationPolicy/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/LogisticsCancellationPolicy/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsCancellationPolicy/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/LogisticsCancellationPolicy/context.jsonld](https://schema.beckn.io/LogisticsCancellationPolicy/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/context.jsonld](https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/LogisticsCancellationPolicy/vocab.jsonld](https://schema.beckn.io/LogisticsCancellationPolicy/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | no | string | - | +| `cancellableUntil` | no | string | Cancellation allowed until this lifecycle stage | +| `cancellationFee` | no | object | - | +| `refundPolicy` | no | object | - | +| `conditions` | no | array | - | +| `applicableServiceTypes` | no | array | - | diff --git a/schema/LogisticsCancellationPolicy/v2.0/attributes.jsonschema.yaml b/schema/LogisticsCancellationPolicy/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index ed25a90..0000000 --- a/schema/LogisticsCancellationPolicy/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,79 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: LogisticsCancellationPolicy JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - LogisticsCancellationPolicy: - $ref: '#/$defs/LogisticsCancellationPolicy' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - LogisticsCancellationPolicy: - type: object - title: LogisticsCancellationPolicy - description: Defines terms under which a shipment booking can be cancelled. - properties: - id: - type: string - example: CP-EXPRESS-001 - cancellableUntil: - type: string - description: Cancellation allowed until this lifecycle stage - enum: - - BEFORE_PICKUP - - BEFORE_DISPATCH - - ANYTIME - - NON_CANCELLABLE - example: BEFORE_PICKUP - cancellationFee: - type: object - properties: - type: - type: string - enum: - - FLAT - - PERCENTAGE - - NIL - example: FLAT - value: - type: number - example: 50 - currency: - type: string - example: INR - refundPolicy: - type: object - properties: - refundable: - type: boolean - example: true - refundPercentage: - type: number - example: 100 - processingDays: - type: integer - example: 5 - conditions: - type: array - items: - type: string - example: - - Full refund if cancelled before pickup - - 50% refund if cancelled after pickup - applicableServiceTypes: - type: array - items: - type: string - example: - - EXPRESS - - COURIER diff --git a/schema/LogisticsCancellationPolicy/v2.0/attributes.yaml b/schema/LogisticsCancellationPolicy/v2.0/attributes.yaml index 35da55a..1b19c2e 100644 --- a/schema/LogisticsCancellationPolicy/v2.0/attributes.yaml +++ b/schema/LogisticsCancellationPolicy/v2.0/attributes.yaml @@ -1,21 +1,19 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: - title: LogisticsCancellationPolicy + title: CancellationPolicy version: 2.0.0 - description: Schema definition for the LogisticsCancellationPolicy entity in the - Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema for CancellationPolicy in Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: LogisticsCancellationPolicy: + x-iri: https://schema.beckn.io/LogisticsCancellationPolicy/v2.0 type: object - title: LogisticsCancellationPolicy + title: CancellationPolicy description: Defines terms under which a shipment booking can be cancelled. properties: id: diff --git a/schema/LogisticsCancellationPolicy/v2.0/context.jsonld b/schema/LogisticsCancellationPolicy/v2.0/context.jsonld new file mode 100644 index 0000000..28abf33 --- /dev/null +++ b/schema/LogisticsCancellationPolicy/v2.0/context.jsonld @@ -0,0 +1,23 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "LogisticsCancellationPolicy": "beckn:LogisticsCancellationPolicy", + "applicableServiceTypes": "beckn:applicableServiceTypes", + "cancellableUntil": "beckn:cancellableUntil", + "cancellationFee": "beckn:cancellationFee", + "conditions": "beckn:conditions", + "currency": "beckn:currency", + "id": "beckn:id", + "processingDays": "beckn:processingDays", + "refundPercentage": "beckn:refundPercentage", + "refundPolicy": "beckn:refundPolicy", + "refundable": "beckn:refundable", + "type": "beckn:type", + "value": "beckn:value" + } +} diff --git a/schema/LogisticsCancellationPolicy/v2.0/schema.json b/schema/LogisticsCancellationPolicy/v2.0/schema.json new file mode 100644 index 0000000..4f89a73 --- /dev/null +++ b/schema/LogisticsCancellationPolicy/v2.0/schema.json @@ -0,0 +1,84 @@ +{ + "type": "object", + "title": "CancellationPolicy", + "description": "Defines terms under which a shipment booking can be cancelled.", + "properties": { + "id": { + "type": "string", + "example": "CP-EXPRESS-001" + }, + "cancellableUntil": { + "type": "string", + "description": "Cancellation allowed until this lifecycle stage", + "enum": [ + "BEFORE_PICKUP", + "BEFORE_DISPATCH", + "ANYTIME", + "NON_CANCELLABLE" + ], + "example": "BEFORE_PICKUP" + }, + "cancellationFee": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "FLAT", + "PERCENTAGE", + "NIL" + ], + "example": "FLAT" + }, + "value": { + "type": "number", + "example": 50 + }, + "currency": { + "type": "string", + "example": "INR" + } + } + }, + "refundPolicy": { + "type": "object", + "properties": { + "refundable": { + "type": "boolean", + "example": true + }, + "refundPercentage": { + "type": "number", + "example": 100 + }, + "processingDays": { + "type": "integer", + "example": 5 + } + } + }, + "conditions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Full refund if cancelled before pickup", + "50% refund if cancelled after pickup" + ] + }, + "applicableServiceTypes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "EXPRESS", + "COURIER" + ] + } + }, + "$id": "https://schema.beckn.io/LogisticsCancellationPolicy/v2.0", + "x-iri": "https://schema.beckn.io/LogisticsCancellationPolicy/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/LogisticsCancellationPolicy/v2.0/vocab.jsonld b/schema/LogisticsCancellationPolicy/v2.0/vocab.jsonld new file mode 100644 index 0000000..aa86269 --- /dev/null +++ b/schema/LogisticsCancellationPolicy/v2.0/vocab.jsonld @@ -0,0 +1,32 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "LogisticsCancellationPolicy": "beckn:LogisticsCancellationPolicy", + "applicableServiceTypes": "beckn:applicableServiceTypes", + "cancellableUntil": "beckn:cancellableUntil", + "cancellationFee": "beckn:cancellationFee", + "conditions": "beckn:conditions", + "currency": "beckn:currency", + "id": "beckn:id", + "processingDays": "beckn:processingDays", + "refundPercentage": "beckn:refundPercentage", + "refundPolicy": "beckn:refundPolicy", + "refundable": "beckn:refundable", + "type": "beckn:type", + "value": "beckn:value" + }, + "@graph": [ + { + "@id": "beckn:LogisticsCancellationPolicy", + "@type": "rdfs:Class", + "rdfs:label": "Logistics Cancellation Policy", + "rdfs:comment": "TODO: Description Needed - LogisticsCancellationPolicy" + } + ] +} diff --git a/schema/LogisticsDriver/README.md b/schema/LogisticsDriver/README.md index 0bf1c02..c3dca5e 100644 --- a/schema/LogisticsDriver/README.md +++ b/schema/LogisticsDriver/README.md @@ -1,13 +1,9 @@ # LogisticsDriver -A schema.beckn.io Type +A Driver is an individual who operates a vehicle for logistics delivery. Drivers are assigned to shipments and responsible for physical transport. Maps to beckn:Agent. -Vehicle operator assigned to shipments. +## Versions -**Canonical IRI :** `log:LogisticsDriver` - -**Canonical URL:** https://schema.beckn.io/logistics/LogisticsDriver - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/LogisticsDriver/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsDriver/v2.0/attributes.yaml) | [https://schema.beckn.io/LogisticsDriver/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsDriver/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/LogisticsDriver/v2.0/context.jsonld](https://schema.beckn.io/LogisticsDriver/v2.0/context.jsonld) | [https://schema.beckn.io/LogisticsDriver/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsDriver/v2.0/vocab.jsonld) | [https://schema.beckn.io/LogisticsDriver/v2.0/README.md](https://schema.beckn.io/LogisticsDriver/v2.0/README.md) | diff --git a/schema/LogisticsDriver/v2.0/README.md b/schema/LogisticsDriver/v2.0/README.md new file mode 100644 index 0000000..df515b6 --- /dev/null +++ b/schema/LogisticsDriver/v2.0/README.md @@ -0,0 +1,36 @@ +# LogisticsDriver — v2.0 + +A Driver is an individual who operates a vehicle for logistics delivery. Drivers are assigned to shipments and responsible for physical transport. Maps to beckn:Agent. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/LogisticsDriver/attributes.yaml](https://schema.beckn.io/LogisticsDriver/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/LogisticsDriver/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsDriver/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/LogisticsDriver/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsDriver/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/LogisticsDriver/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsDriver/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/LogisticsDriver/context.jsonld](https://schema.beckn.io/LogisticsDriver/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/LogisticsDriver/v2.0/context.jsonld](https://schema.beckn.io/LogisticsDriver/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/LogisticsDriver/vocab.jsonld](https://schema.beckn.io/LogisticsDriver/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/LogisticsDriver/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsDriver/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | Unique driver identifier | +| `name` | yes | string | Full name of the driver | +| `phone` | no | string | - | +| `email` | no | string | - | +| `profilePhoto` | no | string | - | +| `licenseNumber` | yes | string | Driving license number | +| `licenseExpiry` | no | string | License expiry date | +| `rating` | no | number | - | +| `currentLocation` | no | object | Real-time GPS location | +| `status` | no | string | - | +| `vehicle` | no | $ref: https://schema.beckn.io/Vehicle/v2.0/attributes.yaml#/components/schemas/Vehicle | - | +| `experienceYears` | no | integer | Years of driving experience | +| `backgroundVerified` | no | boolean | Whether background verification is complete | +| `languagesSpoken` | no | array | - | +| `operatingZones` | no | array | Geographic zones the driver operates in | diff --git a/schema/LogisticsDriver/v2.0/attributes.jsonschema.yaml b/schema/LogisticsDriver/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 814b49a..0000000 --- a/schema/LogisticsDriver/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,109 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: LogisticsDriver JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - LogisticsDriver: - $ref: '#/$defs/LogisticsDriver' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - LogisticsDriver: - type: object - title: LogisticsDriver - description: 'A Driver is an individual who operates a vehicle for logistics delivery. - Drivers are assigned to shipments and responsible for physical transport. Maps - to beckn:Agent. - - ' - required: - - id - - name - - licenseNumber - properties: - id: - type: string - description: Unique driver identifier - example: DRV-00456 - name: - type: string - description: Full name of the driver - example: Suresh Patil - phone: - type: string - example: '+919845001234' - email: - type: string - format: email - profilePhoto: - type: string - format: uri - licenseNumber: - type: string - description: Driving license number - example: MH1420210012345 - licenseExpiry: - type: string - format: date - description: License expiry date - rating: - type: number - minimum: 1 - maximum: 5 - example: 4.5 - currentLocation: - type: object - description: Real-time GPS location - properties: - lat: - type: number - example: 12.9716 - lng: - type: number - example: 77.5946 - updatedAt: - type: string - format: date-time - status: - type: string - enum: - - AVAILABLE - - ASSIGNED - - ON_ROUTE - - OFFLINE - example: ON_ROUTE - vehicle: - $ref: https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsVehicle - experienceYears: - type: integer - description: Years of driving experience - example: 5 - backgroundVerified: - type: boolean - description: Whether background verification is complete - example: true - languagesSpoken: - type: array - items: - type: string - example: - - Hindi - - Kannada - operatingZones: - type: array - description: Geographic zones the driver operates in - items: - type: string - example: - - Bangalore North - - Bangalore East diff --git a/schema/LogisticsDriver/v2.0/attributes.yaml b/schema/LogisticsDriver/v2.0/attributes.yaml index 3d6d17b..180f851 100644 --- a/schema/LogisticsDriver/v2.0/attributes.yaml +++ b/schema/LogisticsDriver/v2.0/attributes.yaml @@ -1,24 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: - title: LogisticsDriver + title: Driver version: 2.0.0 - description: Schema definition for the LogisticsDriver entity in the Beckn Logistics - domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the Driver entity in the Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: LogisticsDriver: + x-iri: https://schema.beckn.io/LogisticsDriver/v2.0 type: object - title: LogisticsDriver - description: 'A Driver is an individual who operates a vehicle for logistics - delivery. Drivers are assigned to shipments and responsible for physical transport. - Maps to beckn:Agent. + title: Driver + description: 'A Driver is an individual who operates a vehicle for logistics delivery. Drivers are assigned to shipments and responsible for physical transport. Maps to beckn:Agent. ' required: @@ -78,7 +74,7 @@ components: - OFFLINE example: ON_ROUTE vehicle: - $ref: https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.yaml#/components/schemas/LogisticsVehicle + $ref: https://schema.beckn.io/Vehicle/v2.0/attributes.yaml#/components/schemas/Vehicle experienceYears: type: integer description: Years of driving experience diff --git a/schema/LogisticsDriver/v2.0/context.jsonld b/schema/LogisticsDriver/v2.0/context.jsonld new file mode 100644 index 0000000..c04c849 --- /dev/null +++ b/schema/LogisticsDriver/v2.0/context.jsonld @@ -0,0 +1,29 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "LogisticsDriver": "beckn:LogisticsDriver", + "backgroundVerified": "beckn:backgroundVerified", + "currentLocation": "beckn:currentLocation", + "email": "beckn:email", + "experienceYears": "beckn:experienceYears", + "id": "beckn:id", + "languagesSpoken": "beckn:languagesSpoken", + "lat": "beckn:lat", + "licenseExpiry": "beckn:licenseExpiry", + "licenseNumber": "beckn:licenseNumber", + "lng": "beckn:lng", + "name": "beckn:name", + "operatingZones": "beckn:operatingZones", + "phone": "beckn:phone", + "profilePhoto": "beckn:profilePhoto", + "rating": "beckn:rating", + "status": "beckn:status", + "updatedAt": "beckn:updatedAt", + "vehicle": "beckn:vehicle" + } +} diff --git a/schema/LogisticsDriver/v2.0/schema.json b/schema/LogisticsDriver/v2.0/schema.json new file mode 100644 index 0000000..7315567 --- /dev/null +++ b/schema/LogisticsDriver/v2.0/schema.json @@ -0,0 +1,115 @@ +{ + "type": "object", + "title": "Driver", + "description": "A Driver is an individual who operates a vehicle for logistics delivery. Drivers are assigned to shipments and responsible for physical transport. Maps to beckn:Agent. ", + "required": [ + "id", + "name", + "licenseNumber" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique driver identifier", + "example": "DRV-00456" + }, + "name": { + "type": "string", + "description": "Full name of the driver", + "example": "Suresh Patil" + }, + "phone": { + "type": "string", + "example": "+919845001234" + }, + "email": { + "type": "string", + "format": "email" + }, + "profilePhoto": { + "type": "string", + "format": "uri" + }, + "licenseNumber": { + "type": "string", + "description": "Driving license number", + "example": "MH1420210012345" + }, + "licenseExpiry": { + "type": "string", + "format": "date", + "description": "License expiry date" + }, + "rating": { + "type": "number", + "minimum": 1, + "maximum": 5, + "example": 4.5 + }, + "currentLocation": { + "type": "object", + "description": "Real-time GPS location", + "properties": { + "lat": { + "type": "number", + "example": 12.9716 + }, + "lng": { + "type": "number", + "example": 77.5946 + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "status": { + "type": "string", + "enum": [ + "AVAILABLE", + "ASSIGNED", + "ON_ROUTE", + "OFFLINE" + ], + "example": "ON_ROUTE" + }, + "vehicle": { + "$ref": "https://schema.beckn.io/Vehicle/v2.0/schema.json" + }, + "experienceYears": { + "type": "integer", + "description": "Years of driving experience", + "example": 5 + }, + "backgroundVerified": { + "type": "boolean", + "description": "Whether background verification is complete", + "example": true + }, + "languagesSpoken": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Hindi", + "Kannada" + ] + }, + "operatingZones": { + "type": "array", + "description": "Geographic zones the driver operates in", + "items": { + "type": "string" + }, + "example": [ + "Bangalore North", + "Bangalore East" + ] + } + }, + "$id": "https://schema.beckn.io/LogisticsDriver/v2.0", + "x-iri": "https://schema.beckn.io/LogisticsDriver/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/LogisticsDriver/v2.0/vocab.jsonld b/schema/LogisticsDriver/v2.0/vocab.jsonld new file mode 100644 index 0000000..6221c7b --- /dev/null +++ b/schema/LogisticsDriver/v2.0/vocab.jsonld @@ -0,0 +1,38 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "LogisticsDriver": "beckn:LogisticsDriver", + "backgroundVerified": "beckn:backgroundVerified", + "currentLocation": "beckn:currentLocation", + "email": "beckn:email", + "experienceYears": "beckn:experienceYears", + "id": "beckn:id", + "languagesSpoken": "beckn:languagesSpoken", + "lat": "beckn:lat", + "licenseExpiry": "beckn:licenseExpiry", + "licenseNumber": "beckn:licenseNumber", + "lng": "beckn:lng", + "name": "beckn:name", + "operatingZones": "beckn:operatingZones", + "phone": "beckn:phone", + "profilePhoto": "beckn:profilePhoto", + "rating": "beckn:rating", + "status": "beckn:status", + "updatedAt": "beckn:updatedAt", + "vehicle": "beckn:vehicle" + }, + "@graph": [ + { + "@id": "beckn:LogisticsDriver", + "@type": "rdfs:Class", + "rdfs:label": "Logistics Driver", + "rdfs:comment": "TODO: Description Needed - LogisticsDriver" + } + ] +} diff --git a/schema/LogisticsFare/README.md b/schema/LogisticsFare/README.md index 02baab4..afb3084 100644 --- a/schema/LogisticsFare/README.md +++ b/schema/LogisticsFare/README.md @@ -1,13 +1,9 @@ # LogisticsFare -A schema.beckn.io Type +Total cost charged for a logistics service including base freight, surcharges, taxes. -Total cost = Base Freight + Fuel Surcharge + ODA + COD + Insurance + GST − Discount +## Versions -**Canonical IRI :** `log:LogisticsFare` - -**Canonical URL:** https://schema.beckn.io/logistics/LogisticsFare - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/LogisticsFare/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsFare/v2.0/attributes.yaml) | [https://schema.beckn.io/LogisticsFare/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsFare/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/LogisticsFare/v2.0/context.jsonld](https://schema.beckn.io/LogisticsFare/v2.0/context.jsonld) | [https://schema.beckn.io/LogisticsFare/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsFare/v2.0/vocab.jsonld) | [https://schema.beckn.io/LogisticsFare/v2.0/README.md](https://schema.beckn.io/LogisticsFare/v2.0/README.md) | diff --git a/schema/LogisticsFare/v2.0/README.md b/schema/LogisticsFare/v2.0/README.md new file mode 100644 index 0000000..c4d221a --- /dev/null +++ b/schema/LogisticsFare/v2.0/README.md @@ -0,0 +1,34 @@ +# LogisticsFare — v2.0 + +Total cost charged for a logistics service including base freight, surcharges, taxes. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/LogisticsFare/attributes.yaml](https://schema.beckn.io/LogisticsFare/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/LogisticsFare/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsFare/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/LogisticsFare/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsFare/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/LogisticsFare/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsFare/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/LogisticsFare/context.jsonld](https://schema.beckn.io/LogisticsFare/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/LogisticsFare/v2.0/context.jsonld](https://schema.beckn.io/LogisticsFare/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/LogisticsFare/vocab.jsonld](https://schema.beckn.io/LogisticsFare/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/LogisticsFare/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsFare/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `currency` | yes | string | - | +| `baseFreight` | no | number | Base freight charge | +| `fuelSurcharge` | no | number | - | +| `odaSurcharge` | no | number | Out of Delivery Area surcharge | +| `codCharge` | no | number | Cash on delivery charge | +| `insuranceCharge` | no | number | - | +| `gst` | no | number | GST amount | +| `otherCharges` | no | number | - | +| `discount` | no | number | - | +| `totalAmount` | yes | number | Final total payable | +| `breakup` | no | array | Detailed fare breakup line items | +| `estimatedFare` | no | boolean | Whether this is an estimate or confirmed fare | +| `paymentMode` | no | string | - | diff --git a/schema/LogisticsFare/v2.0/attributes.jsonschema.yaml b/schema/LogisticsFare/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index c63163a..0000000 --- a/schema/LogisticsFare/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,81 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: LogisticsFare JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - LogisticsFare: - $ref: '#/$defs/LogisticsFare' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - LogisticsFare: - type: object - title: LogisticsFare - description: Total cost charged for a logistics service including base freight, - surcharges, taxes. - required: - - currency - - totalAmount - properties: - currency: - type: string - example: INR - baseFreight: - type: number - description: Base freight charge - example: 450 - fuelSurcharge: - type: number - example: 45 - odaSurcharge: - type: number - description: Out of Delivery Area surcharge - example: 0 - codCharge: - type: number - description: Cash on delivery charge - example: 30 - insuranceCharge: - type: number - example: 25 - gst: - type: number - description: GST amount - example: 81 - otherCharges: - type: number - example: 0 - discount: - type: number - example: 50 - totalAmount: - type: number - description: Final total payable - example: 581 - breakup: - type: array - description: Detailed fare breakup line items - items: - $ref: https://schema.beckn.io/LogisticsFareBreakup/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsFareBreakup - estimatedFare: - type: boolean - description: Whether this is an estimate or confirmed fare - example: false - paymentMode: - type: string - enum: - - PREPAID - - COD - - TO_PAY - - CREDIT - example: PREPAID diff --git a/schema/LogisticsFare/v2.0/attributes.yaml b/schema/LogisticsFare/v2.0/attributes.yaml index 3f42ac9..b7e69a0 100644 --- a/schema/LogisticsFare/v2.0/attributes.yaml +++ b/schema/LogisticsFare/v2.0/attributes.yaml @@ -1,23 +1,21 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: LogisticsFare version: 2.0.0 - description: Schema definition for the LogisticsFare entity in the Beckn Logistics - domain. + description: Schema definition for the LogisticsFare entity in the Beckn Logistics domain. contact: - name: Beckn Foundation - url: https://beckn.org + name: Beckn Labs + url: https://beckn.io license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + url: https://creativecommons.org/licenses/by-nc-sa/4.0/ components: schemas: LogisticsFare: + x-iri: https://schema.beckn.io/LogisticsFare/v2.0 type: object title: LogisticsFare - description: Total cost charged for a logistics service including base freight, - surcharges, taxes. + description: Total cost charged for a logistics service including base freight, surcharges, taxes. required: - currency - totalAmount diff --git a/schema/LogisticsFare/v2.0/context.jsonld b/schema/LogisticsFare/v2.0/context.jsonld new file mode 100644 index 0000000..eba9b7e --- /dev/null +++ b/schema/LogisticsFare/v2.0/context.jsonld @@ -0,0 +1,21 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "beckn": "https://schema.beckn.io/LinkedData/v2.0/context.jsonld", + "LogisticsFare": "beckn:LogisticsFare", + "baseFreight": "beckn:baseFreight", + "breakup": "beckn:breakup", + "codCharge": "beckn:codCharge", + "currency": "beckn:currency", + "discount": "beckn:discount", + "estimatedFare": "beckn:estimatedFare", + "fuelSurcharge": "beckn:fuelSurcharge", + "gst": "beckn:gst", + "insuranceCharge": "beckn:insuranceCharge", + "odaSurcharge": "beckn:odaSurcharge", + "otherCharges": "beckn:otherCharges", + "paymentMode": "beckn:paymentMode", + "totalAmount": "beckn:totalAmount" + } +} diff --git a/schema/LogisticsFare/v2.0/schema.json b/schema/LogisticsFare/v2.0/schema.json new file mode 100644 index 0000000..f9c6152 --- /dev/null +++ b/schema/LogisticsFare/v2.0/schema.json @@ -0,0 +1,111 @@ +{ + "$id": "https://schema.beckn.io/LogisticsFare/v2.0", + "x-iri": "https://schema.beckn.io/LogisticsFare/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LogisticsFare JSON Schema", + "type": "object", + "properties": { + "components": { + "type": "object", + "properties": { + "schemas": { + "type": "object", + "properties": { + "LogisticsFare": { + "$ref": "#/$defs/LogisticsFare" + } + }, + "additionalProperties": false + } + }, + "required": [ + "schemas" + ], + "additionalProperties": false + } + }, + "required": [ + "components" + ], + "additionalProperties": false, + "$defs": { + "LogisticsFare": { + "type": "object", + "title": "LogisticsFare", + "description": "Total cost charged for a logistics service including base freight, surcharges, taxes.", + "required": [ + "currency", + "totalAmount" + ], + "properties": { + "currency": { + "type": "string", + "example": "INR" + }, + "baseFreight": { + "type": "number", + "description": "Base freight charge", + "example": 450 + }, + "fuelSurcharge": { + "type": "number", + "example": 45 + }, + "odaSurcharge": { + "type": "number", + "description": "Out of Delivery Area surcharge", + "example": 0 + }, + "codCharge": { + "type": "number", + "description": "Cash on delivery charge", + "example": 30 + }, + "insuranceCharge": { + "type": "number", + "example": 25 + }, + "gst": { + "type": "number", + "description": "GST amount", + "example": 81 + }, + "otherCharges": { + "type": "number", + "example": 0 + }, + "discount": { + "type": "number", + "example": 50 + }, + "totalAmount": { + "type": "number", + "description": "Final total payable", + "example": 581 + }, + "breakup": { + "type": "array", + "description": "Detailed fare breakup line items", + "items": { + "$ref": "https://schema.beckn.io/LogisticsFareBreakup/v2.0/schema.json" + } + }, + "estimatedFare": { + "type": "boolean", + "description": "Whether this is an estimate or confirmed fare", + "example": false + }, + "paymentMode": { + "type": "string", + "enum": [ + "PREPAID", + "COD", + "TO_PAY", + "CREDIT" + ], + "example": "PREPAID" + } + } + } + } +} diff --git a/schema/LogisticsFare/v2.0/vocab.jsonld b/schema/LogisticsFare/v2.0/vocab.jsonld new file mode 100644 index 0000000..d0802cb --- /dev/null +++ b/schema/LogisticsFare/v2.0/vocab.jsonld @@ -0,0 +1,108 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/LinkedData/v2.0/context.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "LogisticsFare": "beckn:LogisticsFare", + "baseFreight": "beckn:baseFreight", + "breakup": "beckn:breakup", + "codCharge": "beckn:codCharge", + "currency": "beckn:currency", + "discount": "beckn:discount", + "estimatedFare": "beckn:estimatedFare", + "fuelSurcharge": "beckn:fuelSurcharge", + "gst": "beckn:gst", + "insuranceCharge": "beckn:insuranceCharge", + "odaSurcharge": "beckn:odaSurcharge", + "otherCharges": "beckn:otherCharges", + "paymentMode": "beckn:paymentMode", + "totalAmount": "beckn:totalAmount" + }, + "@graph": [ + { + "@id": "beckn:LogisticsFare", + "@type": "rdfs:Class", + "rdfs:label": "LogisticsFare", + "rdfs:comment": "Total cost charged for a logistics service including base freight, surcharges, taxes." + }, + { + "@id": "beckn:baseFreight", + "@type": "rdf:Property", + "rdfs:label": "baseFreight", + "rdfs:comment": "Base freight charge" + }, + { + "@id": "beckn:breakup", + "@type": "rdf:Property", + "rdfs:label": "breakup", + "rdfs:comment": "Detailed fare breakup line items" + }, + { + "@id": "beckn:codCharge", + "@type": "rdf:Property", + "rdfs:label": "codCharge", + "rdfs:comment": "Cash on delivery charge" + }, + { + "@id": "beckn:currency", + "@type": "rdf:Property", + "rdfs:label": "currency", + "rdfs:comment": "Property currency" + }, + { + "@id": "beckn:discount", + "@type": "rdf:Property", + "rdfs:label": "discount", + "rdfs:comment": "Property discount" + }, + { + "@id": "beckn:estimatedFare", + "@type": "rdf:Property", + "rdfs:label": "estimatedFare", + "rdfs:comment": "Whether this is an estimate or confirmed fare" + }, + { + "@id": "beckn:fuelSurcharge", + "@type": "rdf:Property", + "rdfs:label": "fuelSurcharge", + "rdfs:comment": "Property fuelSurcharge" + }, + { + "@id": "beckn:gst", + "@type": "rdf:Property", + "rdfs:label": "gst", + "rdfs:comment": "GST amount" + }, + { + "@id": "beckn:insuranceCharge", + "@type": "rdf:Property", + "rdfs:label": "insuranceCharge", + "rdfs:comment": "Property insuranceCharge" + }, + { + "@id": "beckn:odaSurcharge", + "@type": "rdf:Property", + "rdfs:label": "odaSurcharge", + "rdfs:comment": "Out of Delivery Area surcharge" + }, + { + "@id": "beckn:otherCharges", + "@type": "rdf:Property", + "rdfs:label": "otherCharges", + "rdfs:comment": "Property otherCharges" + }, + { + "@id": "beckn:paymentMode", + "@type": "rdf:Property", + "rdfs:label": "paymentMode", + "rdfs:comment": "Property paymentMode" + }, + { + "@id": "beckn:totalAmount", + "@type": "rdf:Property", + "rdfs:label": "totalAmount", + "rdfs:comment": "Final total payable" + } + ] +} diff --git a/schema/LogisticsFareBreakup/README.md b/schema/LogisticsFareBreakup/README.md index 04eb27e..fb27e28 100644 --- a/schema/LogisticsFareBreakup/README.md +++ b/schema/LogisticsFareBreakup/README.md @@ -1,13 +1,9 @@ # LogisticsFareBreakup -A schema.beckn.io Type +A single line item in the fare breakup for a logistics service. -Individual line items: `ITEM`, `SURCHARGE`, `TAX`, `DISCOUNT`, `FEE` +## Versions -**Canonical IRI :** `log:LogisticsFareBreakup` - -**Canonical URL:** https://schema.beckn.io/logistics/LogisticsFareBreakup - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/LogisticsFareBreakup/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsFareBreakup/v2.0/attributes.yaml) | [https://schema.beckn.io/LogisticsFareBreakup/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsFareBreakup/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/LogisticsFareBreakup/v2.0/context.jsonld](https://schema.beckn.io/LogisticsFareBreakup/v2.0/context.jsonld) | [https://schema.beckn.io/LogisticsFareBreakup/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsFareBreakup/v2.0/vocab.jsonld) | [https://schema.beckn.io/LogisticsFareBreakup/v2.0/README.md](https://schema.beckn.io/LogisticsFareBreakup/v2.0/README.md) | diff --git a/schema/LogisticsFareBreakup/v2.0/README.md b/schema/LogisticsFareBreakup/v2.0/README.md new file mode 100644 index 0000000..a763762 --- /dev/null +++ b/schema/LogisticsFareBreakup/v2.0/README.md @@ -0,0 +1,27 @@ +# LogisticsFareBreakup — v2.0 + +A single line item in the fare breakup for a logistics service. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/LogisticsFareBreakup/attributes.yaml](https://schema.beckn.io/LogisticsFareBreakup/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/LogisticsFareBreakup/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsFareBreakup/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/LogisticsFareBreakup/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsFareBreakup/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/LogisticsFareBreakup/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsFareBreakup/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/LogisticsFareBreakup/context.jsonld](https://schema.beckn.io/LogisticsFareBreakup/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/LogisticsFareBreakup/v2.0/context.jsonld](https://schema.beckn.io/LogisticsFareBreakup/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/LogisticsFareBreakup/vocab.jsonld](https://schema.beckn.io/LogisticsFareBreakup/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/LogisticsFareBreakup/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsFareBreakup/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `title` | yes | string | Name of the fare component | +| `amount` | yes | number | - | +| `currency` | no | string | - | +| `type` | no | string | - | +| `taxBreakup` | no | array | Tax sub-components if applicable | +| `waived` | no | boolean | Whether this component was waived | diff --git a/schema/LogisticsFareBreakup/v2.0/attributes.jsonschema.yaml b/schema/LogisticsFareBreakup/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 59bb1c9..0000000 --- a/schema/LogisticsFareBreakup/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,66 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: LogisticsFareBreakup JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - LogisticsFareBreakup: - $ref: '#/$defs/LogisticsFareBreakup' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - LogisticsFareBreakup: - type: object - title: LogisticsFareBreakup - description: A single line item in the fare breakup for a logistics service. - required: - - title - - amount - properties: - title: - type: string - description: Name of the fare component - example: Base Freight - amount: - type: number - example: 450 - currency: - type: string - example: INR - type: - type: string - enum: - - ITEM - - SURCHARGE - - TAX - - DISCOUNT - - FEE - example: ITEM - taxBreakup: - type: array - description: Tax sub-components if applicable - items: - type: object - properties: - name: - type: string - example: CGST @ 9% - percent: - type: number - example: 9 - amount: - type: number - example: 40.5 - waived: - type: boolean - description: Whether this component was waived - example: false diff --git a/schema/LogisticsFareBreakup/v2.0/attributes.yaml b/schema/LogisticsFareBreakup/v2.0/attributes.yaml index fa9e478..e4bad85 100644 --- a/schema/LogisticsFareBreakup/v2.0/attributes.yaml +++ b/schema/LogisticsFareBreakup/v2.0/attributes.yaml @@ -1,19 +1,18 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: LogisticsFareBreakup version: 2.0.0 - description: Schema definition for the LogisticsFareBreakup entity in the Beckn - Logistics domain. + description: Schema definition for the LogisticsFareBreakup entity in the Beckn Logistics domain. contact: - name: Beckn Foundation - url: https://beckn.org + name: Beckn Labs + url: https://beckn.io license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + url: https://creativecommons.org/licenses/by-nc-sa/4.0/ components: schemas: LogisticsFareBreakup: + x-iri: https://schema.beckn.io/LogisticsFareBreakup/v2.0 type: object title: LogisticsFareBreakup description: A single line item in the fare breakup for a logistics service. diff --git a/schema/LogisticsFareBreakup/v2.0/context.jsonld b/schema/LogisticsFareBreakup/v2.0/context.jsonld new file mode 100644 index 0000000..1d05403 --- /dev/null +++ b/schema/LogisticsFareBreakup/v2.0/context.jsonld @@ -0,0 +1,16 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "beckn": "https://schema.beckn.io/LinkedData/v2.0/context.jsonld", + "LogisticsFareBreakup": "beckn:LogisticsFareBreakup", + "amount": "beckn:amount", + "currency": "beckn:currency", + "name": "beckn:name", + "percent": "beckn:percent", + "taxBreakup": "beckn:taxBreakup", + "title": "beckn:title", + "type": "beckn:type", + "waived": "beckn:waived" + } +} diff --git a/schema/LogisticsFareBreakup/v2.0/schema.json b/schema/LogisticsFareBreakup/v2.0/schema.json new file mode 100644 index 0000000..af89cd9 --- /dev/null +++ b/schema/LogisticsFareBreakup/v2.0/schema.json @@ -0,0 +1,94 @@ +{ + "$id": "https://schema.beckn.io/LogisticsFareBreakup/v2.0", + "x-iri": "https://schema.beckn.io/LogisticsFareBreakup/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LogisticsFareBreakup JSON Schema", + "type": "object", + "properties": { + "components": { + "type": "object", + "properties": { + "schemas": { + "type": "object", + "properties": { + "LogisticsFareBreakup": { + "$ref": "#/$defs/LogisticsFareBreakup" + } + }, + "additionalProperties": false + } + }, + "required": [ + "schemas" + ], + "additionalProperties": false + } + }, + "required": [ + "components" + ], + "additionalProperties": false, + "$defs": { + "LogisticsFareBreakup": { + "type": "object", + "title": "LogisticsFareBreakup", + "description": "A single line item in the fare breakup for a logistics service.", + "required": [ + "title", + "amount" + ], + "properties": { + "title": { + "type": "string", + "description": "Name of the fare component", + "example": "Base Freight" + }, + "amount": { + "type": "number", + "example": 450 + }, + "currency": { + "type": "string", + "example": "INR" + }, + "type": { + "type": "string", + "enum": [ + "ITEM", + "SURCHARGE", + "TAX", + "DISCOUNT", + "FEE" + ], + "example": "ITEM" + }, + "taxBreakup": { + "type": "array", + "description": "Tax sub-components if applicable", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "CGST @ 9%" + }, + "percent": { + "type": "number", + "example": 9 + }, + "amount": { + "type": "number", + "example": 40.5 + } + } + } + }, + "waived": { + "type": "boolean", + "description": "Whether this component was waived", + "example": false + } + } + } + } +} diff --git a/schema/LogisticsFareBreakup/v2.0/vocab.jsonld b/schema/LogisticsFareBreakup/v2.0/vocab.jsonld new file mode 100644 index 0000000..8b82f52 --- /dev/null +++ b/schema/LogisticsFareBreakup/v2.0/vocab.jsonld @@ -0,0 +1,73 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/LinkedData/v2.0/context.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "LogisticsFareBreakup": "beckn:LogisticsFareBreakup", + "amount": "beckn:amount", + "currency": "beckn:currency", + "name": "beckn:name", + "percent": "beckn:percent", + "taxBreakup": "beckn:taxBreakup", + "title": "beckn:title", + "type": "beckn:type", + "waived": "beckn:waived" + }, + "@graph": [ + { + "@id": "beckn:LogisticsFareBreakup", + "@type": "rdfs:Class", + "rdfs:label": "LogisticsFareBreakup", + "rdfs:comment": "A single line item in the fare breakup for a logistics service." + }, + { + "@id": "beckn:amount", + "@type": "rdf:Property", + "rdfs:label": "amount", + "rdfs:comment": "Property amount" + }, + { + "@id": "beckn:currency", + "@type": "rdf:Property", + "rdfs:label": "currency", + "rdfs:comment": "Property currency" + }, + { + "@id": "beckn:name", + "@type": "rdf:Property", + "rdfs:label": "name", + "rdfs:comment": "Property name" + }, + { + "@id": "beckn:percent", + "@type": "rdf:Property", + "rdfs:label": "percent", + "rdfs:comment": "Property percent" + }, + { + "@id": "beckn:taxBreakup", + "@type": "rdf:Property", + "rdfs:label": "taxBreakup", + "rdfs:comment": "Tax sub-components if applicable" + }, + { + "@id": "beckn:title", + "@type": "rdf:Property", + "rdfs:label": "title", + "rdfs:comment": "Name of the fare component" + }, + { + "@id": "beckn:type", + "@type": "rdf:Property", + "rdfs:label": "type", + "rdfs:comment": "Property type" + }, + { + "@id": "beckn:waived", + "@type": "rdf:Property", + "rdfs:label": "waived", + "rdfs:comment": "Whether this component was waived" + } + ] +} diff --git a/schema/LogisticsFeedback/README.md b/schema/LogisticsFeedback/README.md index 600819c..f950e0e 100644 --- a/schema/LogisticsFeedback/README.md +++ b/schema/LogisticsFeedback/README.md @@ -1,13 +1,9 @@ # LogisticsFeedback -A schema.beckn.io Type +Qualitative feedback from sender or receiver about a logistics experience. -Free text + structured tags: `ON_TIME`, `PROFESSIONAL_DRIVER`, `GOOD_PACKAGING` +## Versions -**Canonical IRI :** `log:LogisticsFeedback` - -**Canonical URL:** https://schema.beckn.io/logistics/LogisticsFeedback - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/LogisticsFeedback/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsFeedback/v2.0/attributes.yaml) | [https://schema.beckn.io/LogisticsFeedback/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsFeedback/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/LogisticsFeedback/v2.0/context.jsonld](https://schema.beckn.io/LogisticsFeedback/v2.0/context.jsonld) | [https://schema.beckn.io/LogisticsFeedback/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsFeedback/v2.0/vocab.jsonld) | [https://schema.beckn.io/LogisticsFeedback/v2.0/README.md](https://schema.beckn.io/LogisticsFeedback/v2.0/README.md) | diff --git a/schema/LogisticsFeedback/v2.0/README.md b/schema/LogisticsFeedback/v2.0/README.md new file mode 100644 index 0000000..3e4e3e3 --- /dev/null +++ b/schema/LogisticsFeedback/v2.0/README.md @@ -0,0 +1,30 @@ +# LogisticsFeedback — v2.0 + +Qualitative feedback from sender or receiver about a logistics experience. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/LogisticsFeedback/attributes.yaml](https://schema.beckn.io/LogisticsFeedback/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/LogisticsFeedback/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsFeedback/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/LogisticsFeedback/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsFeedback/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/LogisticsFeedback/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsFeedback/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/LogisticsFeedback/context.jsonld](https://schema.beckn.io/LogisticsFeedback/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/LogisticsFeedback/v2.0/context.jsonld](https://schema.beckn.io/LogisticsFeedback/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/LogisticsFeedback/vocab.jsonld](https://schema.beckn.io/LogisticsFeedback/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/LogisticsFeedback/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsFeedback/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | no | string | - | +| `shipmentId` | no | string | - | +| `rating` | no | $ref: https://schema.beckn.io/Rating/v2.1/attributes.yaml#/components/schemas/Rating | - | +| `review` | no | string | Free text review | +| `tags` | no | array | Structured feedback tags | +| `wouldRecommend` | no | boolean | - | +| `submittedBy` | no | string | User ID of feedback submitter | +| `submittedAt` | no | string | - | +| `isPublic` | no | boolean | Whether feedback is publicly visible | diff --git a/schema/LogisticsFeedback/v2.0/attributes.jsonschema.yaml b/schema/LogisticsFeedback/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 962125a..0000000 --- a/schema/LogisticsFeedback/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,58 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: LogisticsFeedback JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - LogisticsFeedback: - $ref: '#/$defs/LogisticsFeedback' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - LogisticsFeedback: - type: object - title: LogisticsFeedback - description: Qualitative feedback from sender or receiver about a logistics experience. - properties: - id: - type: string - example: FBK-001 - shipmentId: - type: string - rating: - $ref: https://schema.beckn.io/LogisticsRating/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsRating - review: - type: string - description: Free text review - example: Driver was very professional and delivered on time. - tags: - type: array - description: Structured feedback tags - items: - type: string - example: - - ON_TIME - - PROFESSIONAL_DRIVER - - GOOD_PACKAGING - wouldRecommend: - type: boolean - example: true - submittedBy: - type: string - description: User ID of feedback submitter - submittedAt: - type: string - format: date-time - isPublic: - type: boolean - description: Whether feedback is publicly visible - example: true diff --git a/schema/LogisticsFeedback/v2.0/attributes.yaml b/schema/LogisticsFeedback/v2.0/attributes.yaml index 010c1e8..8a997e6 100644 --- a/schema/LogisticsFeedback/v2.0/attributes.yaml +++ b/schema/LogisticsFeedback/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: - title: LogisticsFeedback + title: Feedback version: 2.0.0 - description: Schema definition for the LogisticsFeedback entity in the Beckn Logistics - domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema for Feedback in Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: LogisticsFeedback: + x-iri: https://schema.beckn.io/LogisticsFeedback/v2.0 type: object - title: LogisticsFeedback - description: Qualitative feedback from sender or receiver about a logistics - experience. + title: Feedback + description: Qualitative feedback from sender or receiver about a logistics experience. properties: id: type: string @@ -25,7 +22,7 @@ components: shipmentId: type: string rating: - $ref: https://schema.beckn.io/LogisticsRating/v2.0/attributes.yaml#/components/schemas/LogisticsRating + $ref: https://schema.beckn.io/Rating/v2.1/attributes.yaml#/components/schemas/Rating review: type: string description: Free text review diff --git a/schema/LogisticsFeedback/v2.0/context.jsonld b/schema/LogisticsFeedback/v2.0/context.jsonld new file mode 100644 index 0000000..3179cb7 --- /dev/null +++ b/schema/LogisticsFeedback/v2.0/context.jsonld @@ -0,0 +1,20 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "LogisticsFeedback": "beckn:LogisticsFeedback", + "id": "beckn:id", + "isPublic": "beckn:isPublic", + "rating": "beckn:rating", + "review": "beckn:review", + "shipmentId": "beckn:shipmentId", + "submittedAt": "beckn:submittedAt", + "submittedBy": "beckn:submittedBy", + "tags": "beckn:tags", + "wouldRecommend": "beckn:wouldRecommend" + } +} diff --git a/schema/LogisticsFeedback/v2.0/schema.json b/schema/LogisticsFeedback/v2.0/schema.json new file mode 100644 index 0000000..a22187f --- /dev/null +++ b/schema/LogisticsFeedback/v2.0/schema.json @@ -0,0 +1,54 @@ +{ + "type": "object", + "title": "Feedback", + "description": "Qualitative feedback from sender or receiver about a logistics experience.", + "properties": { + "id": { + "type": "string", + "example": "FBK-001" + }, + "shipmentId": { + "type": "string" + }, + "rating": { + "$ref": "https://schema.beckn.io/Rating/v2.1/schema.json" + }, + "review": { + "type": "string", + "description": "Free text review", + "example": "Driver was very professional and delivered on time." + }, + "tags": { + "type": "array", + "description": "Structured feedback tags", + "items": { + "type": "string" + }, + "example": [ + "ON_TIME", + "PROFESSIONAL_DRIVER", + "GOOD_PACKAGING" + ] + }, + "wouldRecommend": { + "type": "boolean", + "example": true + }, + "submittedBy": { + "type": "string", + "description": "User ID of feedback submitter" + }, + "submittedAt": { + "type": "string", + "format": "date-time" + }, + "isPublic": { + "type": "boolean", + "description": "Whether feedback is publicly visible", + "example": true + } + }, + "$id": "https://schema.beckn.io/LogisticsFeedback/v2.0", + "x-iri": "https://schema.beckn.io/LogisticsFeedback/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/LogisticsFeedback/v2.0/vocab.jsonld b/schema/LogisticsFeedback/v2.0/vocab.jsonld new file mode 100644 index 0000000..2d6e0c1 --- /dev/null +++ b/schema/LogisticsFeedback/v2.0/vocab.jsonld @@ -0,0 +1,29 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "LogisticsFeedback": "beckn:LogisticsFeedback", + "id": "beckn:id", + "isPublic": "beckn:isPublic", + "rating": "beckn:rating", + "review": "beckn:review", + "shipmentId": "beckn:shipmentId", + "submittedAt": "beckn:submittedAt", + "submittedBy": "beckn:submittedBy", + "tags": "beckn:tags", + "wouldRecommend": "beckn:wouldRecommend" + }, + "@graph": [ + { + "@id": "beckn:LogisticsFeedback", + "@type": "rdfs:Class", + "rdfs:label": "Logistics Feedback", + "rdfs:comment": "TODO: Description Needed - LogisticsFeedback" + } + ] +} diff --git a/schema/LogisticsOperator/README.md b/schema/LogisticsOperator/README.md index be5f668..fd15ea2 100644 --- a/schema/LogisticsOperator/README.md +++ b/schema/LogisticsOperator/README.md @@ -1,13 +1,9 @@ # LogisticsOperator -A schema.beckn.io Type +Entity operating a logistics network or fleet, responsible for end-to-end delivery service. -Network manager. Operators coordinate carriers, drivers, and platform policies. +## Versions -**Canonical IRI :** `log:LogisticsOperator` - -**Canonical URL:** https://schema.beckn.io/logistics/LogisticsOperator - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/LogisticsOperator/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsOperator/v2.0/attributes.yaml) | [https://schema.beckn.io/LogisticsOperator/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsOperator/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/LogisticsOperator/v2.0/context.jsonld](https://schema.beckn.io/LogisticsOperator/v2.0/context.jsonld) | [https://schema.beckn.io/LogisticsOperator/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsOperator/v2.0/vocab.jsonld) | [https://schema.beckn.io/LogisticsOperator/v2.0/README.md](https://schema.beckn.io/LogisticsOperator/v2.0/README.md) | diff --git a/schema/LogisticsOperator/v2.0/README.md b/schema/LogisticsOperator/v2.0/README.md new file mode 100644 index 0000000..222414a --- /dev/null +++ b/schema/LogisticsOperator/v2.0/README.md @@ -0,0 +1,34 @@ +# LogisticsOperator — v2.0 + +Entity operating a logistics network or fleet, responsible for end-to-end delivery service. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/LogisticsOperator/attributes.yaml](https://schema.beckn.io/LogisticsOperator/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/LogisticsOperator/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsOperator/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/LogisticsOperator/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsOperator/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/LogisticsOperator/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsOperator/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/LogisticsOperator/context.jsonld](https://schema.beckn.io/LogisticsOperator/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/LogisticsOperator/v2.0/context.jsonld](https://schema.beckn.io/LogisticsOperator/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/LogisticsOperator/vocab.jsonld](https://schema.beckn.io/LogisticsOperator/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/LogisticsOperator/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsOperator/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | - | +| `name` | yes | string | - | +| `type` | no | string | - | +| `contact` | no | $ref: https://schema.beckn.io/Contact/v2.0/attributes.yaml#/components/schemas/Contact | - | +| `website` | no | string | - | +| `supportEmail` | no | string | - | +| `supportPhone` | no | string | - | +| `rating` | no | number | - | +| `activeCarriers` | no | integer | Number of carriers on the operator's network | +| `activeDrivers` | no | integer | - | +| `deliveriesPerDay` | no | integer | - | +| `serviceCoverage` | no | object | - | +| `certifications` | no | array | - | diff --git a/schema/LogisticsOperator/v2.0/attributes.jsonschema.yaml b/schema/LogisticsOperator/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 64a84cc..0000000 --- a/schema/LogisticsOperator/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,82 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: LogisticsOperator JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - LogisticsOperator: - $ref: '#/$defs/LogisticsOperator' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - LogisticsOperator: - type: object - title: LogisticsOperator - description: Entity operating a logistics network or fleet, responsible for end-to-end - delivery service. - required: - - id - - name - properties: - id: - type: string - example: OPR-DELHIVERY-001 - name: - type: string - example: Delhivery - type: - type: string - enum: - - 3PL - - CAPTIVE - - AGGREGATOR - - POSTAL - example: 3PL - contact: - $ref: https://schema.beckn.io/Contact/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Contact - website: - type: string - format: uri - supportEmail: - type: string - format: email - supportPhone: - type: string - rating: - type: number - minimum: 1 - maximum: 5 - activeCarriers: - type: integer - description: Number of carriers on the operator's network - activeDrivers: - type: integer - deliveriesPerDay: - type: integer - serviceCoverage: - type: object - properties: - countries: - type: array - items: - type: string - cities: - type: array - items: - type: string - certifications: - type: array - items: - type: string - example: - - ISO9001 - - GDPR_COMPLIANT diff --git a/schema/LogisticsOperator/v2.0/attributes.yaml b/schema/LogisticsOperator/v2.0/attributes.yaml index 32a5c20..5d06273 100644 --- a/schema/LogisticsOperator/v2.0/attributes.yaml +++ b/schema/LogisticsOperator/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: - title: LogisticsOperator + title: Operator version: 2.0.0 - description: Schema definition for the LogisticsOperator entity in the Beckn Logistics - domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema for Operator in Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: LogisticsOperator: + x-iri: https://schema.beckn.io/LogisticsOperator/v2.0 type: object - title: LogisticsOperator - description: Entity operating a logistics network or fleet, responsible for - end-to-end delivery service. + title: Operator + description: Entity operating a logistics network or fleet, responsible for end-to-end delivery service. required: - id - name diff --git a/schema/LogisticsOperator/v2.0/context.jsonld b/schema/LogisticsOperator/v2.0/context.jsonld new file mode 100644 index 0000000..f409a89 --- /dev/null +++ b/schema/LogisticsOperator/v2.0/context.jsonld @@ -0,0 +1,26 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "LogisticsOperator": "beckn:LogisticsOperator", + "activeCarriers": "beckn:activeCarriers", + "activeDrivers": "beckn:activeDrivers", + "certifications": "beckn:certifications", + "cities": "beckn:cities", + "contact": "beckn:contact", + "countries": "beckn:countries", + "deliveriesPerDay": "beckn:deliveriesPerDay", + "id": "beckn:id", + "name": "beckn:name", + "rating": "beckn:rating", + "serviceCoverage": "beckn:serviceCoverage", + "supportEmail": "beckn:supportEmail", + "supportPhone": "beckn:supportPhone", + "type": "beckn:type", + "website": "beckn:website" + } +} diff --git a/schema/LogisticsOperator/v2.0/schema.json b/schema/LogisticsOperator/v2.0/schema.json new file mode 100644 index 0000000..6310a5f --- /dev/null +++ b/schema/LogisticsOperator/v2.0/schema.json @@ -0,0 +1,88 @@ +{ + "type": "object", + "title": "Operator", + "description": "Entity operating a logistics network or fleet, responsible for end-to-end delivery service.", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "example": "OPR-DELHIVERY-001" + }, + "name": { + "type": "string", + "example": "Delhivery" + }, + "type": { + "type": "string", + "enum": [ + "3PL", + "CAPTIVE", + "AGGREGATOR", + "POSTAL" + ], + "example": "3PL" + }, + "contact": { + "$ref": "https://schema.beckn.io/Contact/v2.0/schema.json" + }, + "website": { + "type": "string", + "format": "uri" + }, + "supportEmail": { + "type": "string", + "format": "email" + }, + "supportPhone": { + "type": "string" + }, + "rating": { + "type": "number", + "minimum": 1, + "maximum": 5 + }, + "activeCarriers": { + "type": "integer", + "description": "Number of carriers on the operator's network" + }, + "activeDrivers": { + "type": "integer" + }, + "deliveriesPerDay": { + "type": "integer" + }, + "serviceCoverage": { + "type": "object", + "properties": { + "countries": { + "type": "array", + "items": { + "type": "string" + } + }, + "cities": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "certifications": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "ISO9001", + "GDPR_COMPLIANT" + ] + } + }, + "$id": "https://schema.beckn.io/LogisticsOperator/v2.0", + "x-iri": "https://schema.beckn.io/LogisticsOperator/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/LogisticsOperator/v2.0/vocab.jsonld b/schema/LogisticsOperator/v2.0/vocab.jsonld new file mode 100644 index 0000000..ee5bf5e --- /dev/null +++ b/schema/LogisticsOperator/v2.0/vocab.jsonld @@ -0,0 +1,35 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "LogisticsOperator": "beckn:LogisticsOperator", + "activeCarriers": "beckn:activeCarriers", + "activeDrivers": "beckn:activeDrivers", + "certifications": "beckn:certifications", + "cities": "beckn:cities", + "contact": "beckn:contact", + "countries": "beckn:countries", + "deliveriesPerDay": "beckn:deliveriesPerDay", + "id": "beckn:id", + "name": "beckn:name", + "rating": "beckn:rating", + "serviceCoverage": "beckn:serviceCoverage", + "supportEmail": "beckn:supportEmail", + "supportPhone": "beckn:supportPhone", + "type": "beckn:type", + "website": "beckn:website" + }, + "@graph": [ + { + "@id": "beckn:LogisticsOperator", + "@type": "rdfs:Class", + "rdfs:label": "Logistics Operator", + "rdfs:comment": "TODO: Description Needed - LogisticsOperator" + } + ] +} diff --git a/schema/LogisticsPlace/README.md b/schema/LogisticsPlace/README.md index f66ac8a..815e8da 100644 --- a/schema/LogisticsPlace/README.md +++ b/schema/LogisticsPlace/README.md @@ -1,13 +1,9 @@ # LogisticsPlace -A schema.beckn.io Type +A geographic location relevant to logistics such as origin, destination, hub, or waypoint. Includes structured address and GPS coordinates. Maps to beckn:Location and schema:Place. -Geographic location with structured address and GPS coordinates. +## Versions -**Canonical IRI :** `log:LogisticsPlace` - -**Canonical URL:** https://schema.beckn.io/logistics/LogisticsPlace - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/LogisticsPlace/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsPlace/v2.0/attributes.yaml) | [https://schema.beckn.io/LogisticsPlace/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsPlace/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/LogisticsPlace/v2.0/context.jsonld](https://schema.beckn.io/LogisticsPlace/v2.0/context.jsonld) | [https://schema.beckn.io/LogisticsPlace/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsPlace/v2.0/vocab.jsonld) | [https://schema.beckn.io/LogisticsPlace/v2.0/README.md](https://schema.beckn.io/LogisticsPlace/v2.0/README.md) | diff --git a/schema/LogisticsPlace/v2.0/README.md b/schema/LogisticsPlace/v2.0/README.md new file mode 100644 index 0000000..d1c9aa1 --- /dev/null +++ b/schema/LogisticsPlace/v2.0/README.md @@ -0,0 +1,29 @@ +# LogisticsPlace — v2.0 + +A geographic location relevant to logistics such as origin, destination, hub, or waypoint. Includes structured address and GPS coordinates. Maps to beckn:Location and schema:Place. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/LogisticsPlace/attributes.yaml](https://schema.beckn.io/LogisticsPlace/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/LogisticsPlace/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsPlace/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/LogisticsPlace/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsPlace/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/LogisticsPlace/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsPlace/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/LogisticsPlace/context.jsonld](https://schema.beckn.io/LogisticsPlace/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/LogisticsPlace/v2.0/context.jsonld](https://schema.beckn.io/LogisticsPlace/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/LogisticsPlace/vocab.jsonld](https://schema.beckn.io/LogisticsPlace/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/LogisticsPlace/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsPlace/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | - | +| `name` | no | string | Name of the place | +| `type` | no | string | - | +| `address` | no | object | - | +| `gps` | no | object | - | +| `contact` | no | $ref: https://schema.beckn.io/Contact/v2.0/attributes.yaml#/components/schemas/Contact | - | +| `accessInstructions` | no | string | Instructions for courier to reach the place | +| `isVerified` | no | boolean | Whether the address has been geocode-verified | diff --git a/schema/LogisticsPlace/v2.0/attributes.jsonschema.yaml b/schema/LogisticsPlace/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 1c930f3..0000000 --- a/schema/LogisticsPlace/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,91 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: LogisticsPlace JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - LogisticsPlace: - $ref: '#/$defs/LogisticsPlace' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - LogisticsPlace: - type: object - title: LogisticsPlace - description: 'A geographic location relevant to logistics such as origin, destination, - hub, or waypoint. Includes structured address and GPS coordinates. Maps to beckn:Location - and schema:Place. - - ' - required: - - id - properties: - id: - type: string - example: PLC-BLR-001 - name: - type: string - description: Name of the place - example: Anita's Home - type: - type: string - enum: - - PICKUP - - DELIVERY - - HUB - - WAYPOINT - - STORE - - WAREHOUSE - example: DELIVERY - address: - type: object - properties: - line1: - type: string - example: 42, 5th Cross Road - line2: - type: string - example: Indiranagar - landmark: - type: string - example: Near Total Mall - city: - type: string - example: Bengaluru - state: - type: string - example: Karnataka - country: - type: string - example: India - pincode: - type: string - example: '560038' - gps: - type: object - properties: - lat: - type: number - example: 12.9719 - lng: - type: number - example: 77.6412 - contact: - $ref: https://schema.beckn.io/Contact/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Contact - accessInstructions: - type: string - description: Instructions for courier to reach the place - example: Ring bell twice. Building B, 3rd floor. - isVerified: - type: boolean - description: Whether the address has been geocode-verified - example: true diff --git a/schema/LogisticsPlace/v2.0/attributes.yaml b/schema/LogisticsPlace/v2.0/attributes.yaml index ac278fb..b58f352 100644 --- a/schema/LogisticsPlace/v2.0/attributes.yaml +++ b/schema/LogisticsPlace/v2.0/attributes.yaml @@ -1,24 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: - title: LogisticsPlace + title: Place version: 2.0.0 - description: Schema definition for the LogisticsPlace entity in the Beckn Logistics - domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the Place entity in the Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: LogisticsPlace: + x-iri: https://schema.beckn.io/LogisticsPlace/v2.0 type: object - title: LogisticsPlace - description: 'A geographic location relevant to logistics such as origin, destination, - hub, or waypoint. Includes structured address and GPS coordinates. Maps to - beckn:Location and schema:Place. + title: Place + description: 'A geographic location relevant to logistics such as origin, destination, hub, or waypoint. Includes structured address and GPS coordinates. Maps to beckn:Location and schema:Place. ' required: diff --git a/schema/LogisticsPlace/v2.0/context.jsonld b/schema/LogisticsPlace/v2.0/context.jsonld new file mode 100644 index 0000000..fa834fd --- /dev/null +++ b/schema/LogisticsPlace/v2.0/context.jsonld @@ -0,0 +1,28 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "LogisticsPlace": "beckn:LogisticsPlace", + "accessInstructions": "beckn:accessInstructions", + "address": "beckn:address", + "city": "beckn:city", + "contact": "beckn:contact", + "country": "beckn:country", + "gps": "beckn:gps", + "id": "beckn:id", + "isVerified": "beckn:isVerified", + "landmark": "beckn:landmark", + "lat": "beckn:lat", + "line1": "beckn:line1", + "line2": "beckn:line2", + "lng": "beckn:lng", + "name": "beckn:name", + "pincode": "beckn:pincode", + "state": "beckn:state", + "type": "beckn:type" + } +} diff --git a/schema/LogisticsPlace/v2.0/schema.json b/schema/LogisticsPlace/v2.0/schema.json new file mode 100644 index 0000000..db19df4 --- /dev/null +++ b/schema/LogisticsPlace/v2.0/schema.json @@ -0,0 +1,93 @@ +{ + "type": "object", + "title": "Place", + "description": "A geographic location relevant to logistics such as origin, destination, hub, or waypoint. Includes structured address and GPS coordinates. Maps to beckn:Location and schema:Place. ", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "example": "PLC-BLR-001" + }, + "name": { + "type": "string", + "description": "Name of the place", + "example": "Anita's Home" + }, + "type": { + "type": "string", + "enum": [ + "PICKUP", + "DELIVERY", + "HUB", + "WAYPOINT", + "STORE", + "WAREHOUSE" + ], + "example": "DELIVERY" + }, + "address": { + "type": "object", + "properties": { + "line1": { + "type": "string", + "example": "42, 5th Cross Road" + }, + "line2": { + "type": "string", + "example": "Indiranagar" + }, + "landmark": { + "type": "string", + "example": "Near Total Mall" + }, + "city": { + "type": "string", + "example": "Bengaluru" + }, + "state": { + "type": "string", + "example": "Karnataka" + }, + "country": { + "type": "string", + "example": "India" + }, + "pincode": { + "type": "string", + "example": "560038" + } + } + }, + "gps": { + "type": "object", + "properties": { + "lat": { + "type": "number", + "example": 12.9719 + }, + "lng": { + "type": "number", + "example": 77.6412 + } + } + }, + "contact": { + "$ref": "https://schema.beckn.io/Contact/v2.0/schema.json" + }, + "accessInstructions": { + "type": "string", + "description": "Instructions for courier to reach the place", + "example": "Ring bell twice. Building B, 3rd floor." + }, + "isVerified": { + "type": "boolean", + "description": "Whether the address has been geocode-verified", + "example": true + } + }, + "$id": "https://schema.beckn.io/LogisticsPlace/v2.0", + "x-iri": "https://schema.beckn.io/LogisticsPlace/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/LogisticsPlace/v2.0/vocab.jsonld b/schema/LogisticsPlace/v2.0/vocab.jsonld new file mode 100644 index 0000000..369857d --- /dev/null +++ b/schema/LogisticsPlace/v2.0/vocab.jsonld @@ -0,0 +1,37 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "LogisticsPlace": "beckn:LogisticsPlace", + "accessInstructions": "beckn:accessInstructions", + "address": "beckn:address", + "city": "beckn:city", + "contact": "beckn:contact", + "country": "beckn:country", + "gps": "beckn:gps", + "id": "beckn:id", + "isVerified": "beckn:isVerified", + "landmark": "beckn:landmark", + "lat": "beckn:lat", + "line1": "beckn:line1", + "line2": "beckn:line2", + "lng": "beckn:lng", + "name": "beckn:name", + "pincode": "beckn:pincode", + "state": "beckn:state", + "type": "beckn:type" + }, + "@graph": [ + { + "@id": "beckn:LogisticsPlace", + "@type": "rdfs:Class", + "rdfs:label": "Logistics Place", + "rdfs:comment": "TODO: Description Needed - LogisticsPlace" + } + ] +} diff --git a/schema/LogisticsRating/README.md b/schema/LogisticsRating/README.md index 9f80f6c..03665ea 100644 --- a/schema/LogisticsRating/README.md +++ b/schema/LogisticsRating/README.md @@ -1,13 +1,9 @@ # LogisticsRating -A schema.beckn.io Type +A numeric score given by a user for a logistics service, driver, or carrier. -Categories: `DRIVER`, `CARRIER`, `SERVICE`, `PACKAGING` +## Versions -**Canonical IRI :** `log:LogisticsRating` - -**Canonical URL:** https://schema.beckn.io/logistics/LogisticsRating - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/LogisticsRating/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsRating/v2.0/attributes.yaml) | [https://schema.beckn.io/LogisticsRating/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsRating/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/LogisticsRating/v2.0/context.jsonld](https://schema.beckn.io/LogisticsRating/v2.0/context.jsonld) | [https://schema.beckn.io/LogisticsRating/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsRating/v2.0/vocab.jsonld) | [https://schema.beckn.io/LogisticsRating/v2.0/README.md](https://schema.beckn.io/LogisticsRating/v2.0/README.md) | diff --git a/schema/LogisticsRating/v2.0/README.md b/schema/LogisticsRating/v2.0/README.md new file mode 100644 index 0000000..7976b09 --- /dev/null +++ b/schema/LogisticsRating/v2.0/README.md @@ -0,0 +1,28 @@ +# LogisticsRating — v2.0 + +A numeric score given by a user for a logistics service, driver, or carrier. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/LogisticsRating/attributes.yaml](https://schema.beckn.io/LogisticsRating/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/LogisticsRating/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsRating/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/LogisticsRating/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsRating/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/LogisticsRating/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsRating/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/LogisticsRating/context.jsonld](https://schema.beckn.io/LogisticsRating/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/LogisticsRating/v2.0/context.jsonld](https://schema.beckn.io/LogisticsRating/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/LogisticsRating/vocab.jsonld](https://schema.beckn.io/LogisticsRating/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/LogisticsRating/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsRating/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | no | string | - | +| `value` | yes | number | - | +| `ratingFor` | yes | string | - | +| `ratedBy` | no | string | User ID who gave the rating | +| `shipmentId` | no | string | - | +| `categories` | no | object | Category-wise ratings | +| `timestamp` | no | string | - | diff --git a/schema/LogisticsRating/v2.0/attributes.jsonschema.yaml b/schema/LogisticsRating/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index ceddfab..0000000 --- a/schema/LogisticsRating/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,73 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: LogisticsRating JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - LogisticsRating: - $ref: '#/$defs/LogisticsRating' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - LogisticsRating: - type: object - title: LogisticsRating - description: A numeric score given by a user for a logistics service, driver, - or carrier. - required: - - value - - ratingFor - properties: - id: - type: string - example: RTG-00456 - value: - type: number - minimum: 1 - maximum: 5 - example: 4.5 - ratingFor: - type: string - enum: - - DRIVER - - CARRIER - - SERVICE - - PACKAGING - example: DRIVER - ratedBy: - type: string - description: User ID who gave the rating - shipmentId: - type: string - categories: - type: object - description: Category-wise ratings - properties: - timeliness: - type: number - minimum: 1 - maximum: 5 - packaging: - type: number - minimum: 1 - maximum: 5 - handling: - type: number - minimum: 1 - maximum: 5 - communication: - type: number - minimum: 1 - maximum: 5 - timestamp: - type: string - format: date-time diff --git a/schema/LogisticsRating/v2.0/attributes.yaml b/schema/LogisticsRating/v2.0/attributes.yaml index 3e15eb1..7ae7e62 100644 --- a/schema/LogisticsRating/v2.0/attributes.yaml +++ b/schema/LogisticsRating/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: - title: LogisticsRating + title: Rating version: 2.0.0 - description: Schema definition for the LogisticsRating entity in the Beckn Logistics - domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema for Rating in Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: LogisticsRating: + x-iri: https://schema.beckn.io/LogisticsRating/v2.0 type: object - title: LogisticsRating - description: A numeric score given by a user for a logistics service, driver, - or carrier. + title: Rating + description: A numeric score given by a user for a logistics service, driver, or carrier. required: - value - ratingFor diff --git a/schema/LogisticsRating/v2.0/context.jsonld b/schema/LogisticsRating/v2.0/context.jsonld new file mode 100644 index 0000000..054383f --- /dev/null +++ b/schema/LogisticsRating/v2.0/context.jsonld @@ -0,0 +1,22 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "LogisticsRating": "beckn:LogisticsRating", + "categories": "beckn:categories", + "communication": "beckn:communication", + "handling": "beckn:handling", + "id": "beckn:id", + "packaging": "beckn:packaging", + "ratedBy": "beckn:ratedBy", + "ratingFor": "beckn:ratingFor", + "shipmentId": "beckn:shipmentId", + "timeliness": "beckn:timeliness", + "timestamp": "beckn:timestamp", + "value": "beckn:value" + } +} diff --git a/schema/LogisticsRating/v2.0/schema.json b/schema/LogisticsRating/v2.0/schema.json new file mode 100644 index 0000000..e466ce3 --- /dev/null +++ b/schema/LogisticsRating/v2.0/schema.json @@ -0,0 +1,71 @@ +{ + "type": "object", + "title": "Rating", + "description": "A numeric score given by a user for a logistics service, driver, or carrier.", + "required": [ + "value", + "ratingFor" + ], + "properties": { + "id": { + "type": "string", + "example": "RTG-00456" + }, + "value": { + "type": "number", + "minimum": 1, + "maximum": 5, + "example": 4.5 + }, + "ratingFor": { + "type": "string", + "enum": [ + "DRIVER", + "CARRIER", + "SERVICE", + "PACKAGING" + ], + "example": "DRIVER" + }, + "ratedBy": { + "type": "string", + "description": "User ID who gave the rating" + }, + "shipmentId": { + "type": "string" + }, + "categories": { + "type": "object", + "description": "Category-wise ratings", + "properties": { + "timeliness": { + "type": "number", + "minimum": 1, + "maximum": 5 + }, + "packaging": { + "type": "number", + "minimum": 1, + "maximum": 5 + }, + "handling": { + "type": "number", + "minimum": 1, + "maximum": 5 + }, + "communication": { + "type": "number", + "minimum": 1, + "maximum": 5 + } + } + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + }, + "$id": "https://schema.beckn.io/LogisticsRating/v2.0", + "x-iri": "https://schema.beckn.io/LogisticsRating/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/LogisticsRating/v2.0/vocab.jsonld b/schema/LogisticsRating/v2.0/vocab.jsonld new file mode 100644 index 0000000..c96ccf1 --- /dev/null +++ b/schema/LogisticsRating/v2.0/vocab.jsonld @@ -0,0 +1,31 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "LogisticsRating": "beckn:LogisticsRating", + "categories": "beckn:categories", + "communication": "beckn:communication", + "handling": "beckn:handling", + "id": "beckn:id", + "packaging": "beckn:packaging", + "ratedBy": "beckn:ratedBy", + "ratingFor": "beckn:ratingFor", + "shipmentId": "beckn:shipmentId", + "timeliness": "beckn:timeliness", + "timestamp": "beckn:timestamp", + "value": "beckn:value" + }, + "@graph": [ + { + "@id": "beckn:LogisticsRating", + "@type": "rdfs:Class", + "rdfs:label": "Logistics Rating", + "rdfs:comment": "TODO: Description Needed - LogisticsRating" + } + ] +} diff --git a/schema/LogisticsReceipt/README.md b/schema/LogisticsReceipt/README.md index 266b3d5..43ed75f 100644 --- a/schema/LogisticsReceipt/README.md +++ b/schema/LogisticsReceipt/README.md @@ -1,13 +1,9 @@ # LogisticsReceipt -A schema.beckn.io Type +Digital acknowledgment of payment and delivery for a logistics service. -Transaction acknowledgment with fare details and payment confirmation. +## Versions -**Canonical IRI :** `log:LogisticsReceipt` - -**Canonical URL:** https://schema.beckn.io/logistics/LogisticsReceipt - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/LogisticsReceipt/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsReceipt/v2.0/attributes.yaml) | [https://schema.beckn.io/LogisticsReceipt/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsReceipt/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/LogisticsReceipt/v2.0/context.jsonld](https://schema.beckn.io/LogisticsReceipt/v2.0/context.jsonld) | [https://schema.beckn.io/LogisticsReceipt/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsReceipt/v2.0/vocab.jsonld) | [https://schema.beckn.io/LogisticsReceipt/v2.0/README.md](https://schema.beckn.io/LogisticsReceipt/v2.0/README.md) | diff --git a/schema/LogisticsReceipt/v2.0/README.md b/schema/LogisticsReceipt/v2.0/README.md new file mode 100644 index 0000000..720c71f --- /dev/null +++ b/schema/LogisticsReceipt/v2.0/README.md @@ -0,0 +1,34 @@ +# LogisticsReceipt — v2.0 + +Digital acknowledgment of payment and delivery for a logistics service. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/LogisticsReceipt/attributes.yaml](https://schema.beckn.io/LogisticsReceipt/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/LogisticsReceipt/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsReceipt/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/LogisticsReceipt/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsReceipt/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/LogisticsReceipt/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsReceipt/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/LogisticsReceipt/context.jsonld](https://schema.beckn.io/LogisticsReceipt/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/LogisticsReceipt/v2.0/context.jsonld](https://schema.beckn.io/LogisticsReceipt/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/LogisticsReceipt/vocab.jsonld](https://schema.beckn.io/LogisticsReceipt/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/LogisticsReceipt/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsReceipt/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | - | +| `shipmentId` | yes | string | - | +| `invoiceNumber` | no | string | - | +| `issuedAt` | no | string | - | +| `fare` | yes | $ref: https://schema.beckn.io/Fare/v2.0/attributes.yaml#/components/schemas/Fare | - | +| `paymentMode` | no | string | - | +| `paymentTransactionId` | no | string | - | +| `paidAt` | no | string | - | +| `shipper` | no | $ref: https://schema.beckn.io/Contact/v2.0/attributes.yaml#/components/schemas/Contact | - | +| `consignee` | no | $ref: https://schema.beckn.io/Contact/v2.0/attributes.yaml#/components/schemas/Contact | - | +| `carrier` | no | $ref: https://schema.beckn.io/Carrier/v2.0/attributes.yaml#/components/schemas/Carrier | - | +| `deliveryProof` | no | $ref: https://schema.beckn.io/Proof/v2.0/attributes.yaml#/components/schemas/Proof | - | +| `downloadUrl` | no | string | URL to download PDF receipt | diff --git a/schema/LogisticsReceipt/v2.0/attributes.jsonschema.yaml b/schema/LogisticsReceipt/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index a42a059..0000000 --- a/schema/LogisticsReceipt/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,69 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: LogisticsReceipt JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - LogisticsReceipt: - $ref: '#/$defs/LogisticsReceipt' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - LogisticsReceipt: - type: object - title: LogisticsReceipt - description: Digital acknowledgment of payment and delivery for a logistics service. - required: - - id - - shipmentId - - fare - properties: - id: - type: string - example: RCP-2024-001234 - shipmentId: - type: string - example: SHP-2024-001234 - invoiceNumber: - type: string - example: INV-2024-9900 - issuedAt: - type: string - format: date-time - fare: - $ref: https://schema.beckn.io/LogisticsFare/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsFare - paymentMode: - type: string - enum: - - PREPAID - - COD - - TO_PAY - - CREDIT - example: PREPAID - paymentTransactionId: - type: string - example: TXN-UPI-2024-123456 - paidAt: - type: string - format: date-time - shipper: - $ref: https://schema.beckn.io/Contact/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Contact - consignee: - $ref: https://schema.beckn.io/Contact/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Contact - carrier: - $ref: https://schema.beckn.io/Carrier/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Carrier - deliveryProof: - $ref: https://schema.beckn.io/Proof/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Proof - downloadUrl: - type: string - format: uri - description: URL to download PDF receipt diff --git a/schema/LogisticsReceipt/v2.0/attributes.yaml b/schema/LogisticsReceipt/v2.0/attributes.yaml index bce622d..4a26924 100644 --- a/schema/LogisticsReceipt/v2.0/attributes.yaml +++ b/schema/LogisticsReceipt/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: - title: LogisticsReceipt + title: Receipt version: 2.0.0 - description: Schema definition for the LogisticsReceipt entity in the Beckn Logistics - domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema for Receipt in Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: LogisticsReceipt: + x-iri: https://schema.beckn.io/LogisticsReceipt/v2.0 type: object - title: LogisticsReceipt - description: Digital acknowledgment of payment and delivery for a logistics - service. + title: Receipt + description: Digital acknowledgment of payment and delivery for a logistics service. required: - id - shipmentId @@ -36,7 +33,7 @@ components: type: string format: date-time fare: - $ref: https://schema.beckn.io/LogisticsFare/v2.0/attributes.yaml#/components/schemas/LogisticsFare + $ref: https://schema.beckn.io/Fare/v2.0/attributes.yaml#/components/schemas/Fare paymentMode: type: string enum: diff --git a/schema/LogisticsReceipt/v2.0/context.jsonld b/schema/LogisticsReceipt/v2.0/context.jsonld new file mode 100644 index 0000000..0498026 --- /dev/null +++ b/schema/LogisticsReceipt/v2.0/context.jsonld @@ -0,0 +1,24 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "LogisticsReceipt": "beckn:LogisticsReceipt", + "carrier": "beckn:carrier", + "consignee": "beckn:consignee", + "deliveryProof": "beckn:deliveryProof", + "downloadUrl": "beckn:downloadUrl", + "fare": "beckn:fare", + "id": "beckn:id", + "invoiceNumber": "beckn:invoiceNumber", + "issuedAt": "beckn:issuedAt", + "paidAt": "beckn:paidAt", + "paymentMode": "beckn:paymentMode", + "paymentTransactionId": "beckn:paymentTransactionId", + "shipmentId": "beckn:shipmentId", + "shipper": "beckn:shipper" + } +} diff --git a/schema/LogisticsReceipt/v2.0/schema.json b/schema/LogisticsReceipt/v2.0/schema.json new file mode 100644 index 0000000..00e3e67 --- /dev/null +++ b/schema/LogisticsReceipt/v2.0/schema.json @@ -0,0 +1,69 @@ +{ + "type": "object", + "title": "Receipt", + "description": "Digital acknowledgment of payment and delivery for a logistics service.", + "required": [ + "id", + "shipmentId", + "fare" + ], + "properties": { + "id": { + "type": "string", + "example": "RCP-2024-001234" + }, + "shipmentId": { + "type": "string", + "example": "SHP-2024-001234" + }, + "invoiceNumber": { + "type": "string", + "example": "INV-2024-9900" + }, + "issuedAt": { + "type": "string", + "format": "date-time" + }, + "fare": { + "$ref": "https://schema.beckn.io/Fare/v2.0/schema.json" + }, + "paymentMode": { + "type": "string", + "enum": [ + "PREPAID", + "COD", + "TO_PAY", + "CREDIT" + ], + "example": "PREPAID" + }, + "paymentTransactionId": { + "type": "string", + "example": "TXN-UPI-2024-123456" + }, + "paidAt": { + "type": "string", + "format": "date-time" + }, + "shipper": { + "$ref": "https://schema.beckn.io/Contact/v2.0/schema.json" + }, + "consignee": { + "$ref": "https://schema.beckn.io/Contact/v2.0/schema.json" + }, + "carrier": { + "$ref": "https://schema.beckn.io/Carrier/v2.0/schema.json" + }, + "deliveryProof": { + "$ref": "https://schema.beckn.io/Proof/v2.0/schema.json" + }, + "downloadUrl": { + "type": "string", + "format": "uri", + "description": "URL to download PDF receipt" + } + }, + "$id": "https://schema.beckn.io/LogisticsReceipt/v2.0", + "x-iri": "https://schema.beckn.io/LogisticsReceipt/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/LogisticsReceipt/v2.0/vocab.jsonld b/schema/LogisticsReceipt/v2.0/vocab.jsonld new file mode 100644 index 0000000..f9e527e --- /dev/null +++ b/schema/LogisticsReceipt/v2.0/vocab.jsonld @@ -0,0 +1,33 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "LogisticsReceipt": "beckn:LogisticsReceipt", + "carrier": "beckn:carrier", + "consignee": "beckn:consignee", + "deliveryProof": "beckn:deliveryProof", + "downloadUrl": "beckn:downloadUrl", + "fare": "beckn:fare", + "id": "beckn:id", + "invoiceNumber": "beckn:invoiceNumber", + "issuedAt": "beckn:issuedAt", + "paidAt": "beckn:paidAt", + "paymentMode": "beckn:paymentMode", + "paymentTransactionId": "beckn:paymentTransactionId", + "shipmentId": "beckn:shipmentId", + "shipper": "beckn:shipper" + }, + "@graph": [ + { + "@id": "beckn:LogisticsReceipt", + "@type": "rdfs:Class", + "rdfs:label": "Logistics Receipt", + "rdfs:comment": "TODO: Description Needed - LogisticsReceipt" + } + ] +} diff --git a/schema/LogisticsRoute/README.md b/schema/LogisticsRoute/README.md index a8f9aa2..25c8d72 100644 --- a/schema/LogisticsRoute/README.md +++ b/schema/LogisticsRoute/README.md @@ -1,13 +1,9 @@ # LogisticsRoute -A schema.beckn.io Type +A Route is the planned path for a shipment from origin to destination, potentially passing through multiple hubs and waypoints. Maps to beckn:Journey. -Planned path with total distance, duration, and transport mode. +## Versions -**Canonical IRI :** `log:LogisticsRoute` - -**Canonical URL:** https://schema.beckn.io/logistics/LogisticsRoute - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/LogisticsRoute/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsRoute/v2.0/attributes.yaml) | [https://schema.beckn.io/LogisticsRoute/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsRoute/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/LogisticsRoute/v2.0/context.jsonld](https://schema.beckn.io/LogisticsRoute/v2.0/context.jsonld) | [https://schema.beckn.io/LogisticsRoute/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsRoute/v2.0/vocab.jsonld) | [https://schema.beckn.io/LogisticsRoute/v2.0/README.md](https://schema.beckn.io/LogisticsRoute/v2.0/README.md) | diff --git a/schema/LogisticsRoute/v2.0/README.md b/schema/LogisticsRoute/v2.0/README.md new file mode 100644 index 0000000..809c919 --- /dev/null +++ b/schema/LogisticsRoute/v2.0/README.md @@ -0,0 +1,33 @@ +# LogisticsRoute — v2.0 + +A Route is the planned path for a shipment from origin to destination, potentially passing through multiple hubs and waypoints. Maps to beckn:Journey. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/LogisticsRoute/attributes.yaml](https://schema.beckn.io/LogisticsRoute/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/LogisticsRoute/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsRoute/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/LogisticsRoute/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsRoute/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/LogisticsRoute/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsRoute/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/LogisticsRoute/context.jsonld](https://schema.beckn.io/LogisticsRoute/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/LogisticsRoute/v2.0/context.jsonld](https://schema.beckn.io/LogisticsRoute/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/LogisticsRoute/vocab.jsonld](https://schema.beckn.io/LogisticsRoute/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/LogisticsRoute/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsRoute/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | Unique route identifier | +| `name` | no | string | Human-readable route name | +| `origin` | yes | $ref: https://schema.beckn.io/Place/v2.0/attributes.yaml#/components/schemas/Place | - | +| `destination` | yes | $ref: https://schema.beckn.io/Place/v2.0/attributes.yaml#/components/schemas/Place | - | +| `waypoints` | no | array | Intermediate waypoints/hubs on the route | +| `totalDistance` | no | object | - | +| `estimatedDuration` | no | object | - | +| `transportMode` | no | string | - | +| `routeType` | no | string | Classification of route | +| `geometry` | no | object | GeoJSON LineString of route geometry | +| `tollCost` | no | number | Estimated toll charges in INR | +| `restrictions` | no | array | Route restrictions (e.g. night driving ban) | diff --git a/schema/LogisticsRoute/v2.0/attributes.jsonschema.yaml b/schema/LogisticsRoute/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 7e623cc..0000000 --- a/schema/LogisticsRoute/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,116 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: LogisticsRoute JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - LogisticsRoute: - $ref: '#/$defs/LogisticsRoute' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - LogisticsRoute: - type: object - title: LogisticsRoute - description: 'A Route is the planned path for a shipment from origin to destination, - potentially passing through multiple hubs and waypoints. Maps to beckn:Journey. - - ' - required: - - id - - origin - - destination - properties: - id: - type: string - description: Unique route identifier - example: RTE-BLR-DEL-001 - name: - type: string - description: Human-readable route name - example: Bangalore to Delhi via Hyderabad - origin: - $ref: https://schema.beckn.io/LogisticsPlace/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsPlace - destination: - $ref: https://schema.beckn.io/LogisticsPlace/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsPlace - waypoints: - type: array - description: Intermediate waypoints/hubs on the route - items: - $ref: https://schema.beckn.io/Waypoint/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Waypoint - totalDistance: - type: object - properties: - value: - type: number - example: 2150 - unit: - type: string - enum: - - km - - miles - example: km - estimatedDuration: - type: object - properties: - value: - type: number - example: 36 - unit: - type: string - enum: - - hours - - days - example: hours - transportMode: - type: string - enum: - - ROAD - - AIR - - RAIL - - MULTIMODAL - example: ROAD - routeType: - type: string - description: Classification of route - enum: - - HYPERLOCAL - - LAST_MILE - - FIRST_MILE - - LINE_HAUL - - CROSS_DOCKING - example: LINE_HAUL - geometry: - type: object - description: GeoJSON LineString of route geometry - properties: - type: - type: string - example: LineString - coordinates: - type: array - items: - type: array - items: - type: number - tollCost: - type: number - description: Estimated toll charges in INR - example: 1250 - restrictions: - type: array - description: Route restrictions (e.g. night driving ban) - items: - type: string - example: - - No night driving in MP - - Heavy vehicle ban in city center diff --git a/schema/LogisticsRoute/v2.0/attributes.yaml b/schema/LogisticsRoute/v2.0/attributes.yaml index bb34b26..ca24f99 100644 --- a/schema/LogisticsRoute/v2.0/attributes.yaml +++ b/schema/LogisticsRoute/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: - title: LogisticsRoute + title: Route version: 2.0.0 - description: Schema definition for the LogisticsRoute entity in the Beckn Logistics - domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the Route entity in the Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: LogisticsRoute: + x-iri: https://schema.beckn.io/LogisticsRoute/v2.0 type: object - title: LogisticsRoute - description: 'A Route is the planned path for a shipment from origin to destination, - potentially passing through multiple hubs and waypoints. Maps to beckn:Journey. + title: Route + description: 'A Route is the planned path for a shipment from origin to destination, potentially passing through multiple hubs and waypoints. Maps to beckn:Journey. ' required: diff --git a/schema/LogisticsRoute/v2.0/context.jsonld b/schema/LogisticsRoute/v2.0/context.jsonld new file mode 100644 index 0000000..30f2880 --- /dev/null +++ b/schema/LogisticsRoute/v2.0/context.jsonld @@ -0,0 +1,27 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "LogisticsRoute": "beckn:LogisticsRoute", + "coordinates": "beckn:coordinates", + "destination": "beckn:destination", + "estimatedDuration": "beckn:estimatedDuration", + "geometry": "beckn:geometry", + "id": "beckn:id", + "name": "beckn:name", + "origin": "beckn:origin", + "restrictions": "beckn:restrictions", + "routeType": "beckn:routeType", + "tollCost": "beckn:tollCost", + "totalDistance": "beckn:totalDistance", + "transportMode": "beckn:transportMode", + "type": "beckn:type", + "unit": "beckn:unit", + "value": "beckn:value", + "waypoints": "beckn:waypoints" + } +} diff --git a/schema/LogisticsRoute/v2.0/schema.json b/schema/LogisticsRoute/v2.0/schema.json new file mode 100644 index 0000000..16a003e --- /dev/null +++ b/schema/LogisticsRoute/v2.0/schema.json @@ -0,0 +1,129 @@ +{ + "type": "object", + "title": "Route", + "description": "A Route is the planned path for a shipment from origin to destination, potentially passing through multiple hubs and waypoints. Maps to beckn:Journey. ", + "required": [ + "id", + "origin", + "destination" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique route identifier", + "example": "RTE-BLR-DEL-001" + }, + "name": { + "type": "string", + "description": "Human-readable route name", + "example": "Bangalore to Delhi via Hyderabad" + }, + "origin": { + "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + }, + "destination": { + "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + }, + "waypoints": { + "type": "array", + "description": "Intermediate waypoints/hubs on the route", + "items": { + "$ref": "https://schema.beckn.io/Waypoint/v2.0/schema.json" + } + }, + "totalDistance": { + "type": "object", + "properties": { + "value": { + "type": "number", + "example": 2150 + }, + "unit": { + "type": "string", + "enum": [ + "km", + "miles" + ], + "example": "km" + } + } + }, + "estimatedDuration": { + "type": "object", + "properties": { + "value": { + "type": "number", + "example": 36 + }, + "unit": { + "type": "string", + "enum": [ + "hours", + "days" + ], + "example": "hours" + } + } + }, + "transportMode": { + "type": "string", + "enum": [ + "ROAD", + "AIR", + "RAIL", + "MULTIMODAL" + ], + "example": "ROAD" + }, + "routeType": { + "type": "string", + "description": "Classification of route", + "enum": [ + "HYPERLOCAL", + "LAST_MILE", + "FIRST_MILE", + "LINE_HAUL", + "CROSS_DOCKING" + ], + "example": "LINE_HAUL" + }, + "geometry": { + "type": "object", + "description": "GeoJSON LineString of route geometry", + "properties": { + "type": { + "type": "string", + "example": "LineString" + }, + "coordinates": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + } + }, + "tollCost": { + "type": "number", + "description": "Estimated toll charges in INR", + "example": 1250 + }, + "restrictions": { + "type": "array", + "description": "Route restrictions (e.g. night driving ban)", + "items": { + "type": "string" + }, + "example": [ + "No night driving in MP", + "Heavy vehicle ban in city center" + ] + } + }, + "$id": "https://schema.beckn.io/LogisticsRoute/v2.0", + "x-iri": "https://schema.beckn.io/LogisticsRoute/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/LogisticsRoute/v2.0/vocab.jsonld b/schema/LogisticsRoute/v2.0/vocab.jsonld new file mode 100644 index 0000000..b922f0d --- /dev/null +++ b/schema/LogisticsRoute/v2.0/vocab.jsonld @@ -0,0 +1,36 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "LogisticsRoute": "beckn:LogisticsRoute", + "coordinates": "beckn:coordinates", + "destination": "beckn:destination", + "estimatedDuration": "beckn:estimatedDuration", + "geometry": "beckn:geometry", + "id": "beckn:id", + "name": "beckn:name", + "origin": "beckn:origin", + "restrictions": "beckn:restrictions", + "routeType": "beckn:routeType", + "tollCost": "beckn:tollCost", + "totalDistance": "beckn:totalDistance", + "transportMode": "beckn:transportMode", + "type": "beckn:type", + "unit": "beckn:unit", + "value": "beckn:value", + "waypoints": "beckn:waypoints" + }, + "@graph": [ + { + "@id": "beckn:LogisticsRoute", + "@type": "rdfs:Class", + "rdfs:label": "Logistics Route", + "rdfs:comment": "TODO: Description Needed - LogisticsRoute" + } + ] +} diff --git a/schema/LogisticsSupportCase/README.md b/schema/LogisticsSupportCase/README.md index 2fdfd86..517590b 100644 --- a/schema/LogisticsSupportCase/README.md +++ b/schema/LogisticsSupportCase/README.md @@ -1,13 +1,9 @@ # LogisticsSupportCase -A schema.beckn.io Type +Customer support ticket for shipment issues — loss, damage, delay, or billing. -Issue types: `SHIPMENT_LOST`, `SHIPMENT_DAMAGED`, `DELIVERY_DELAYED`, `BILLING_DISPUTE`, `DRIVER_MISCONDUCT` +## Versions -**Canonical IRI :** `log:LogisticsSupportCase` - -**Canonical URL:** https://schema.beckn.io/logistics/LogisticsSupportCase - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/LogisticsSupportCase/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsSupportCase/v2.0/attributes.yaml) | [https://schema.beckn.io/LogisticsSupportCase/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsSupportCase/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/LogisticsSupportCase/v2.0/context.jsonld](https://schema.beckn.io/LogisticsSupportCase/v2.0/context.jsonld) | [https://schema.beckn.io/LogisticsSupportCase/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsSupportCase/v2.0/vocab.jsonld) | [https://schema.beckn.io/LogisticsSupportCase/v2.0/README.md](https://schema.beckn.io/LogisticsSupportCase/v2.0/README.md) | diff --git a/schema/LogisticsSupportCase/v2.0/README.md b/schema/LogisticsSupportCase/v2.0/README.md new file mode 100644 index 0000000..d2cb78c --- /dev/null +++ b/schema/LogisticsSupportCase/v2.0/README.md @@ -0,0 +1,34 @@ +# LogisticsSupportCase — v2.0 + +Customer support ticket for shipment issues — loss, damage, delay, or billing. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/LogisticsSupportCase/attributes.yaml](https://schema.beckn.io/LogisticsSupportCase/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/LogisticsSupportCase/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsSupportCase/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/LogisticsSupportCase/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsSupportCase/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/LogisticsSupportCase/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsSupportCase/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/LogisticsSupportCase/context.jsonld](https://schema.beckn.io/LogisticsSupportCase/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/LogisticsSupportCase/v2.0/context.jsonld](https://schema.beckn.io/LogisticsSupportCase/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/LogisticsSupportCase/vocab.jsonld](https://schema.beckn.io/LogisticsSupportCase/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/LogisticsSupportCase/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsSupportCase/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | - | +| `shipmentId` | yes | string | - | +| `issueType` | yes | string | - | +| `description` | no | string | - | +| `priority` | no | string | - | +| `status` | no | string | - | +| `raisedBy` | no | string | User ID who raised the ticket | +| `assignedAgent` | no | string | Support agent ID | +| `attachments` | no | array | Photo/document evidence | +| `claimAmount` | no | number | Amount claimed for loss/damage | +| `resolution` | no | string | Resolution details | +| `createdAt` | no | string | - | +| `resolvedAt` | no | string | - | diff --git a/schema/LogisticsSupportCase/v2.0/attributes.jsonschema.yaml b/schema/LogisticsSupportCase/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 5af93dc..0000000 --- a/schema/LogisticsSupportCase/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,98 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: LogisticsSupportCase JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - LogisticsSupportCase: - $ref: '#/$defs/LogisticsSupportCase' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - LogisticsSupportCase: - type: object - title: LogisticsSupportCase - description: Customer support ticket for shipment issues — loss, damage, delay, - or billing. - required: - - id - - issueType - - shipmentId - properties: - id: - type: string - example: SUP-2024-00789 - shipmentId: - type: string - issueType: - type: string - enum: - - SHIPMENT_LOST - - SHIPMENT_DAMAGED - - DELIVERY_DELAYED - - WRONG_ITEM_DELIVERED - - BILLING_DISPUTE - - DRIVER_MISCONDUCT - - OTHER - example: DELIVERY_DELAYED - description: - type: string - example: My package was supposed to be delivered yesterday but has not arrived. - priority: - type: string - enum: - - LOW - - MEDIUM - - HIGH - - URGENT - example: MEDIUM - status: - type: string - enum: - - OPEN - - IN_PROGRESS - - AWAITING_CUSTOMER - - RESOLVED - - CLOSED - example: OPEN - raisedBy: - type: string - description: User ID who raised the ticket - assignedAgent: - type: string - description: Support agent ID - attachments: - type: array - description: Photo/document evidence - items: - type: object - properties: - url: - type: string - format: uri - type: - type: string - enum: - - PHOTO - - DOCUMENT - claimAmount: - type: number - description: Amount claimed for loss/damage - resolution: - type: string - description: Resolution details - createdAt: - type: string - format: date-time - resolvedAt: - type: string - format: date-time diff --git a/schema/LogisticsSupportCase/v2.0/attributes.yaml b/schema/LogisticsSupportCase/v2.0/attributes.yaml index bce37d8..82f7d2a 100644 --- a/schema/LogisticsSupportCase/v2.0/attributes.yaml +++ b/schema/LogisticsSupportCase/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: - title: LogisticsSupportCase + title: SupportCase version: 2.0.0 - description: Schema definition for the LogisticsSupportCase entity in the Beckn - Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema for SupportCase in Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: LogisticsSupportCase: + x-iri: https://schema.beckn.io/LogisticsSupportCase/v2.0 type: object - title: LogisticsSupportCase - description: Customer support ticket for shipment issues — loss, damage, delay, - or billing. + title: SupportCase + description: Customer support ticket for shipment issues — loss, damage, delay, or billing. required: - id - issueType diff --git a/schema/LogisticsSupportCase/v2.0/context.jsonld b/schema/LogisticsSupportCase/v2.0/context.jsonld new file mode 100644 index 0000000..53222d1 --- /dev/null +++ b/schema/LogisticsSupportCase/v2.0/context.jsonld @@ -0,0 +1,26 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "LogisticsSupportCase": "beckn:LogisticsSupportCase", + "assignedAgent": "beckn:assignedAgent", + "attachments": "beckn:attachments", + "claimAmount": "beckn:claimAmount", + "createdAt": "beckn:createdAt", + "description": "beckn:description", + "id": "beckn:id", + "issueType": "beckn:issueType", + "priority": "beckn:priority", + "raisedBy": "beckn:raisedBy", + "resolution": "beckn:resolution", + "resolvedAt": "beckn:resolvedAt", + "shipmentId": "beckn:shipmentId", + "status": "beckn:status", + "type": "beckn:type", + "url": "beckn:url" + } +} diff --git a/schema/LogisticsSupportCase/v2.0/schema.json b/schema/LogisticsSupportCase/v2.0/schema.json new file mode 100644 index 0000000..5ccd197 --- /dev/null +++ b/schema/LogisticsSupportCase/v2.0/schema.json @@ -0,0 +1,104 @@ +{ + "type": "object", + "title": "SupportCase", + "description": "Customer support ticket for shipment issues — loss, damage, delay, or billing.", + "required": [ + "id", + "issueType", + "shipmentId" + ], + "properties": { + "id": { + "type": "string", + "example": "SUP-2024-00789" + }, + "shipmentId": { + "type": "string" + }, + "issueType": { + "type": "string", + "enum": [ + "SHIPMENT_LOST", + "SHIPMENT_DAMAGED", + "DELIVERY_DELAYED", + "WRONG_ITEM_DELIVERED", + "BILLING_DISPUTE", + "DRIVER_MISCONDUCT", + "OTHER" + ], + "example": "DELIVERY_DELAYED" + }, + "description": { + "type": "string", + "example": "My package was supposed to be delivered yesterday but has not arrived." + }, + "priority": { + "type": "string", + "enum": [ + "LOW", + "MEDIUM", + "HIGH", + "URGENT" + ], + "example": "MEDIUM" + }, + "status": { + "type": "string", + "enum": [ + "OPEN", + "IN_PROGRESS", + "AWAITING_CUSTOMER", + "RESOLVED", + "CLOSED" + ], + "example": "OPEN" + }, + "raisedBy": { + "type": "string", + "description": "User ID who raised the ticket" + }, + "assignedAgent": { + "type": "string", + "description": "Support agent ID" + }, + "attachments": { + "type": "array", + "description": "Photo/document evidence", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "type": { + "type": "string", + "enum": [ + "PHOTO", + "DOCUMENT" + ] + } + } + } + }, + "claimAmount": { + "type": "number", + "description": "Amount claimed for loss/damage" + }, + "resolution": { + "type": "string", + "description": "Resolution details" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "resolvedAt": { + "type": "string", + "format": "date-time" + } + }, + "$id": "https://schema.beckn.io/LogisticsSupportCase/v2.0", + "x-iri": "https://schema.beckn.io/LogisticsSupportCase/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/LogisticsSupportCase/v2.0/vocab.jsonld b/schema/LogisticsSupportCase/v2.0/vocab.jsonld new file mode 100644 index 0000000..ea3c5fd --- /dev/null +++ b/schema/LogisticsSupportCase/v2.0/vocab.jsonld @@ -0,0 +1,35 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "LogisticsSupportCase": "beckn:LogisticsSupportCase", + "assignedAgent": "beckn:assignedAgent", + "attachments": "beckn:attachments", + "claimAmount": "beckn:claimAmount", + "createdAt": "beckn:createdAt", + "description": "beckn:description", + "id": "beckn:id", + "issueType": "beckn:issueType", + "priority": "beckn:priority", + "raisedBy": "beckn:raisedBy", + "resolution": "beckn:resolution", + "resolvedAt": "beckn:resolvedAt", + "shipmentId": "beckn:shipmentId", + "status": "beckn:status", + "type": "beckn:type", + "url": "beckn:url" + }, + "@graph": [ + { + "@id": "beckn:LogisticsSupportCase", + "@type": "rdfs:Class", + "rdfs:label": "Logistics Support Case", + "rdfs:comment": "TODO: Description Needed - LogisticsSupportCase" + } + ] +} diff --git a/schema/LogisticsVehicle/README.md b/schema/LogisticsVehicle/README.md index fd65e73..6bfdee4 100644 --- a/schema/LogisticsVehicle/README.md +++ b/schema/LogisticsVehicle/README.md @@ -1,13 +1,9 @@ # LogisticsVehicle -A schema.beckn.io Type +A Vehicle is a transport asset used for logistics operations. Vehicle types range from bicycles for hyperlocal delivery to heavy trucks for long haul freight. Maps to beckn:Asset. -Transport asset ranging from bicycles to container trucks. +## Versions -**Canonical IRI :** `log:LogisticsVehicle` - -**Canonical URL:** https://schema.beckn.io/logistics/LogisticsVehicle - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.yaml) | [https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/LogisticsVehicle/v2.0/context.jsonld](https://schema.beckn.io/LogisticsVehicle/v2.0/context.jsonld) | [https://schema.beckn.io/LogisticsVehicle/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsVehicle/v2.0/vocab.jsonld) | [https://schema.beckn.io/LogisticsVehicle/v2.0/README.md](https://schema.beckn.io/LogisticsVehicle/v2.0/README.md) | diff --git a/schema/LogisticsVehicle/v2.0/README.md b/schema/LogisticsVehicle/v2.0/README.md new file mode 100644 index 0000000..3ec7b1a --- /dev/null +++ b/schema/LogisticsVehicle/v2.0/README.md @@ -0,0 +1,38 @@ +# LogisticsVehicle — v2.0 + +A Vehicle is a transport asset used for logistics operations. Vehicle types range from bicycles for hyperlocal delivery to heavy trucks for long haul freight. Maps to beckn:Asset. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/LogisticsVehicle/attributes.yaml](https://schema.beckn.io/LogisticsVehicle/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.yaml](https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/LogisticsVehicle/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsVehicle/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/LogisticsVehicle/context.jsonld](https://schema.beckn.io/LogisticsVehicle/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/LogisticsVehicle/v2.0/context.jsonld](https://schema.beckn.io/LogisticsVehicle/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/LogisticsVehicle/vocab.jsonld](https://schema.beckn.io/LogisticsVehicle/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/LogisticsVehicle/v2.0/vocab.jsonld](https://schema.beckn.io/LogisticsVehicle/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | Unique vehicle identifier | +| `registrationNumber` | yes | string | Vehicle registration/license plate number | +| `type` | yes | string | Type of vehicle | +| `make` | no | string | Vehicle manufacturer | +| `model` | no | string | Vehicle model | +| `year` | no | integer | Year of manufacture | +| `color` | no | string | - | +| `fuelType` | no | string | - | +| `payloadCapacity` | no | object | Maximum cargo capacity | +| `volumeCapacity` | no | object | Cargo volume capacity | +| `hasRefrigeration` | no | boolean | Whether vehicle has refrigeration (cold chain) | +| `gpsEnabled` | no | boolean | Whether vehicle has GPS tracking | +| `insuranceExpiry` | no | string | - | +| `pollutionCertExpiry` | no | string | - | +| `fitnessExpiry` | no | string | - | +| `currentLocation` | no | object | - | +| `status` | no | string | - | diff --git a/schema/LogisticsVehicle/v2.0/attributes.jsonschema.yaml b/schema/LogisticsVehicle/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 2287dfc..0000000 --- a/schema/LogisticsVehicle/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,149 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: LogisticsVehicle JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - LogisticsVehicle: - $ref: '#/$defs/LogisticsVehicle' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - LogisticsVehicle: - type: object - title: LogisticsVehicle - description: 'A Vehicle is a transport asset used for logistics operations. Vehicle - types range from bicycles for hyperlocal delivery to heavy trucks for long haul - freight. Maps to beckn:Asset. - - ' - required: - - id - - registrationNumber - - type - properties: - id: - type: string - description: Unique vehicle identifier - example: VEH-00789 - registrationNumber: - type: string - description: Vehicle registration/license plate number - example: KA01AB5678 - type: - type: string - description: Type of vehicle - enum: - - BICYCLE - - ELECTRIC_SCOOTER - - MOTORCYCLE - - THREE_WHEELER - - CAR - - VAN - - MINI_TRUCK - - TRUCK_LCV - - TRUCK_HCV - - CONTAINER_TRUCK - - TRAILER - example: TRUCK_LCV - make: - type: string - description: Vehicle manufacturer - example: Tata Motors - model: - type: string - description: Vehicle model - example: Tata Ace Gold - year: - type: integer - description: Year of manufacture - example: 2022 - color: - type: string - example: White - fuelType: - type: string - enum: - - PETROL - - DIESEL - - CNG - - ELECTRIC - - HYBRID - example: DIESEL - payloadCapacity: - type: object - description: Maximum cargo capacity - properties: - value: - type: number - example: 750 - unit: - type: string - enum: - - kg - - ton - example: kg - volumeCapacity: - type: object - description: Cargo volume capacity - properties: - value: - type: number - example: 6 - unit: - type: string - enum: - - cubic_feet - - cubic_meters - example: cubic_feet - hasRefrigeration: - type: boolean - description: Whether vehicle has refrigeration (cold chain) - example: false - gpsEnabled: - type: boolean - description: Whether vehicle has GPS tracking - example: true - insuranceExpiry: - type: string - format: date - pollutionCertExpiry: - type: string - format: date - fitnessExpiry: - type: string - format: date - currentLocation: - type: object - properties: - lat: - type: number - lng: - type: number - speed: - type: number - description: Speed in km/h - heading: - type: number - description: Bearing in degrees - updatedAt: - type: string - format: date-time - status: - type: string - enum: - - AVAILABLE - - ASSIGNED - - ON_ROUTE - - MAINTENANCE - - INACTIVE - example: ON_ROUTE diff --git a/schema/LogisticsVehicle/v2.0/attributes.yaml b/schema/LogisticsVehicle/v2.0/attributes.yaml index eea6100..e082e70 100644 --- a/schema/LogisticsVehicle/v2.0/attributes.yaml +++ b/schema/LogisticsVehicle/v2.0/attributes.yaml @@ -1,24 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: - title: LogisticsVehicle + title: Vehicle version: 2.0.0 - description: Schema definition for the LogisticsVehicle entity in the Beckn Logistics - domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the Vehicle entity in the Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: LogisticsVehicle: + x-iri: https://schema.beckn.io/LogisticsVehicle/v2.0 type: object - title: LogisticsVehicle - description: 'A Vehicle is a transport asset used for logistics operations. - Vehicle types range from bicycles for hyperlocal delivery to heavy trucks - for long haul freight. Maps to beckn:Asset. + title: Vehicle + description: 'A Vehicle is a transport asset used for logistics operations. Vehicle types range from bicycles for hyperlocal delivery to heavy trucks for long haul freight. Maps to beckn:Asset. ' required: diff --git a/schema/LogisticsVehicle/v2.0/context.jsonld b/schema/LogisticsVehicle/v2.0/context.jsonld new file mode 100644 index 0000000..9ccee09 --- /dev/null +++ b/schema/LogisticsVehicle/v2.0/context.jsonld @@ -0,0 +1,35 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "LogisticsVehicle": "beckn:LogisticsVehicle", + "color": "beckn:color", + "currentLocation": "beckn:currentLocation", + "fitnessExpiry": "beckn:fitnessExpiry", + "fuelType": "beckn:fuelType", + "gpsEnabled": "beckn:gpsEnabled", + "hasRefrigeration": "beckn:hasRefrigeration", + "heading": "beckn:heading", + "id": "beckn:id", + "insuranceExpiry": "beckn:insuranceExpiry", + "lat": "beckn:lat", + "lng": "beckn:lng", + "make": "beckn:make", + "model": "beckn:model", + "payloadCapacity": "beckn:payloadCapacity", + "pollutionCertExpiry": "beckn:pollutionCertExpiry", + "registrationNumber": "beckn:registrationNumber", + "speed": "beckn:speed", + "status": "beckn:status", + "type": "beckn:type", + "unit": "beckn:unit", + "updatedAt": "beckn:updatedAt", + "value": "beckn:value", + "volumeCapacity": "beckn:volumeCapacity", + "year": "beckn:year" + } +} diff --git a/schema/LogisticsVehicle/v2.0/schema.json b/schema/LogisticsVehicle/v2.0/schema.json new file mode 100644 index 0000000..5da0a88 --- /dev/null +++ b/schema/LogisticsVehicle/v2.0/schema.json @@ -0,0 +1,165 @@ +{ + "type": "object", + "title": "Vehicle", + "description": "A Vehicle is a transport asset used for logistics operations. Vehicle types range from bicycles for hyperlocal delivery to heavy trucks for long haul freight. Maps to beckn:Asset. ", + "required": [ + "id", + "registrationNumber", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique vehicle identifier", + "example": "VEH-00789" + }, + "registrationNumber": { + "type": "string", + "description": "Vehicle registration/license plate number", + "example": "KA01AB5678" + }, + "type": { + "type": "string", + "description": "Type of vehicle", + "enum": [ + "BICYCLE", + "ELECTRIC_SCOOTER", + "MOTORCYCLE", + "THREE_WHEELER", + "CAR", + "VAN", + "MINI_TRUCK", + "TRUCK_LCV", + "TRUCK_HCV", + "CONTAINER_TRUCK", + "TRAILER" + ], + "example": "TRUCK_LCV" + }, + "make": { + "type": "string", + "description": "Vehicle manufacturer", + "example": "Tata Motors" + }, + "model": { + "type": "string", + "description": "Vehicle model", + "example": "Tata Ace Gold" + }, + "year": { + "type": "integer", + "description": "Year of manufacture", + "example": 2022 + }, + "color": { + "type": "string", + "example": "White" + }, + "fuelType": { + "type": "string", + "enum": [ + "PETROL", + "DIESEL", + "CNG", + "ELECTRIC", + "HYBRID" + ], + "example": "DIESEL" + }, + "payloadCapacity": { + "type": "object", + "description": "Maximum cargo capacity", + "properties": { + "value": { + "type": "number", + "example": 750 + }, + "unit": { + "type": "string", + "enum": [ + "kg", + "ton" + ], + "example": "kg" + } + } + }, + "volumeCapacity": { + "type": "object", + "description": "Cargo volume capacity", + "properties": { + "value": { + "type": "number", + "example": 6 + }, + "unit": { + "type": "string", + "enum": [ + "cubic_feet", + "cubic_meters" + ], + "example": "cubic_feet" + } + } + }, + "hasRefrigeration": { + "type": "boolean", + "description": "Whether vehicle has refrigeration (cold chain)", + "example": false + }, + "gpsEnabled": { + "type": "boolean", + "description": "Whether vehicle has GPS tracking", + "example": true + }, + "insuranceExpiry": { + "type": "string", + "format": "date" + }, + "pollutionCertExpiry": { + "type": "string", + "format": "date" + }, + "fitnessExpiry": { + "type": "string", + "format": "date" + }, + "currentLocation": { + "type": "object", + "properties": { + "lat": { + "type": "number" + }, + "lng": { + "type": "number" + }, + "speed": { + "type": "number", + "description": "Speed in km/h" + }, + "heading": { + "type": "number", + "description": "Bearing in degrees" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "status": { + "type": "string", + "enum": [ + "AVAILABLE", + "ASSIGNED", + "ON_ROUTE", + "MAINTENANCE", + "INACTIVE" + ], + "example": "ON_ROUTE" + } + }, + "$id": "https://schema.beckn.io/LogisticsVehicle/v2.0", + "x-iri": "https://schema.beckn.io/LogisticsVehicle/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/LogisticsVehicle/v2.0/vocab.jsonld b/schema/LogisticsVehicle/v2.0/vocab.jsonld new file mode 100644 index 0000000..302a668 --- /dev/null +++ b/schema/LogisticsVehicle/v2.0/vocab.jsonld @@ -0,0 +1,44 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "LogisticsVehicle": "beckn:LogisticsVehicle", + "color": "beckn:color", + "currentLocation": "beckn:currentLocation", + "fitnessExpiry": "beckn:fitnessExpiry", + "fuelType": "beckn:fuelType", + "gpsEnabled": "beckn:gpsEnabled", + "hasRefrigeration": "beckn:hasRefrigeration", + "heading": "beckn:heading", + "id": "beckn:id", + "insuranceExpiry": "beckn:insuranceExpiry", + "lat": "beckn:lat", + "lng": "beckn:lng", + "make": "beckn:make", + "model": "beckn:model", + "payloadCapacity": "beckn:payloadCapacity", + "pollutionCertExpiry": "beckn:pollutionCertExpiry", + "registrationNumber": "beckn:registrationNumber", + "speed": "beckn:speed", + "status": "beckn:status", + "type": "beckn:type", + "unit": "beckn:unit", + "updatedAt": "beckn:updatedAt", + "value": "beckn:value", + "volumeCapacity": "beckn:volumeCapacity", + "year": "beckn:year" + }, + "@graph": [ + { + "@id": "beckn:LogisticsVehicle", + "@type": "rdfs:Class", + "rdfs:label": "Logistics Vehicle", + "rdfs:comment": "TODO: Description Needed - LogisticsVehicle" + } + ] +} diff --git a/schema/Operator/README.md b/schema/Operator/README.md index ab2b8f3..f7bcc4a 100644 --- a/schema/Operator/README.md +++ b/schema/Operator/README.md @@ -1,16 +1,9 @@ # Operator -## Overview -An **Operator** is the entity that manages a logistics network or fleet, setting standards for service quality and coordinating carriers and drivers. +An organization that provides and operates public transport or shared mobility services under a defined service agreement. -## IRI -`https://schema.beckn.org/logistics/Operator` +## Versions -## Operator Types -- 3PL: Third-party logistics provider (Delhivery, XpressBees) -- CAPTIVE: Own fleet operator (Amazon Logistics) -- AGGREGATOR: Multi-carrier platform -- POSTAL: Government postal services (India Post) - -## Version -Current version: **v2.0** — [v2.0/attributes.yaml](./v2.0/attributes.yaml) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Operator/v2.0/attributes.yaml](https://schema.beckn.io/Operator/v2.0/attributes.yaml) | [https://schema.beckn.io/Operator/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Operator/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Operator/v2.0/context.jsonld](https://schema.beckn.io/Operator/v2.0/context.jsonld) | [https://schema.beckn.io/Operator/v2.0/vocab.jsonld](https://schema.beckn.io/Operator/v2.0/vocab.jsonld) | [https://schema.beckn.io/Operator/v2.0/README.md](https://schema.beckn.io/Operator/v2.0/README.md) | diff --git a/schema/Operator/v2.0/README.md b/schema/Operator/v2.0/README.md new file mode 100644 index 0000000..b09ab01 --- /dev/null +++ b/schema/Operator/v2.0/README.md @@ -0,0 +1,33 @@ +# Operator — v2.0 + +An organization that provides and operates public transport or shared mobility services under a defined service agreement. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Operator/attributes.yaml](https://schema.beckn.io/Operator/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Operator/v2.0/attributes.yaml](https://schema.beckn.io/Operator/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Operator/attributes.jsonschema.yaml](https://schema.beckn.io/Operator/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Operator/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Operator/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Operator/context.jsonld](https://schema.beckn.io/Operator/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Operator/v2.0/context.jsonld](https://schema.beckn.io/Operator/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Operator/vocab.jsonld](https://schema.beckn.io/Operator/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Operator/v2.0/vocab.jsonld](https://schema.beckn.io/Operator/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `operatorId` | no | string | Unique identifier for the operator | +| `operatingRegions` | no | string | Geographic regions where the operator provides services | +| `licenseNumber` | no | string | Regulatory license or accreditation number | +| `contactInfo` | no | string | Public contact information for the operator | +| `id` | no | string | Unique identifier for the provider | +| `descriptor` | no | $ref: https://schema.beckn.io/core/v2.0/Descriptor/attributes.yaml#components/schemas/Descriptor | Human-readable description of the provider | +| `categories` | no | $ref: https://schema.beckn.io/CategoryCode/v2.1/attributes.yaml#/components/schemas/CategoryCode | Service categories offered by the provider | +| `locations` | no | $ref: https://schema.beckn.io/Location/v2.0/attributes.yaml#/components/schemas/Location | Locations where the provider offers services | +| `items` | no | $ref: https://schema.beckn.io/Item/v2.1/attributes.yaml#/components/schemas/Item | Items available for discovery from this provider | +| `fulfillments` | no | $ref: https://schema.beckn.io/Fulfillment/v2.1/attributes.yaml#/components/schemas/Fulfillment | Fulfillment options offered by this provider | +| `ratingsTotal` | no | number | Total number of ratings received | +| `rating` | no | $ref: https://schema.beckn.io/Rating/v2.0/attributes.yaml#/components/schemas/Rating | Aggregate rating of the provider | diff --git a/schema/Operator/v2.0/attributes.yaml b/schema/Operator/v2.0/attributes.yaml index 6127346..da46ee2 100644 --- a/schema/Operator/v2.0/attributes.yaml +++ b/schema/Operator/v2.0/attributes.yaml @@ -2,72 +2,61 @@ openapi: 3.1.0 info: title: Operator version: 2.0.0 - description: Schema for Operator in Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the Operator entity in the Beckn Mobility domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + url: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Operator: + x-iri: https://schema.beckn.io/Operator/v2.0 type: object title: Operator - description: Entity operating a logistics network or fleet, responsible for end-to-end delivery service. - required: - - id - - name + description: An organization that provides and operates public transport or + shared mobility services under a defined service agreement. + x-tags: + - mobility + - schema-org + - transmodel-netex + - ride-hailing properties: - id: - type: string - example: "OPR-DELHIVERY-001" - name: + operatorId: + description: Unique identifier for the operator type: string - example: "Delhivery" - type: + operatingRegions: + description: Geographic regions where the operator provides services type: string - enum: - - 3PL - - CAPTIVE - - AGGREGATOR - - POSTAL - example: "3PL" - contact: - $ref: '#/components/schemas/Contact' - website: + licenseNumber: + description: Regulatory license or accreditation number type: string - format: uri - supportEmail: + contactInfo: + description: Public contact information for the operator type: string - format: email - supportPhone: + id: + description: Unique identifier for the provider type: string - rating: + descriptor: + description: Human-readable description of the provider + $ref: https://schema.beckn.io/Descriptor/v2.0/attributes.yaml#/components/schemas/Descriptor + categories: + description: Service categories offered by the provider + $ref: https://schema.beckn.io/CategoryCode/v2.1/attributes.yaml#/components/schemas/CategoryCode + locations: + description: Locations where the provider offers services + $ref: https://schema.beckn.io/Location/v2.0/attributes.yaml#/components/schemas/Location + items: + description: Items available for discovery from this provider + $ref: https://schema.beckn.io/Item/v2.1/attributes.yaml#/components/schemas/Item + fulfillments: + description: Fulfillment options offered by this provider + $ref: https://schema.beckn.io/Fulfillment/v2.1/attributes.yaml#/components/schemas/Fulfillment + ratingsTotal: + description: Total number of ratings received type: number - minimum: 1 - maximum: 5 - activeCarriers: - type: integer - description: Number of carriers on the operator's network - activeDrivers: - type: integer - deliveriesPerDay: - type: integer - serviceCoverage: - type: object - properties: - countries: - type: array - items: - type: string - cities: - type: array - items: - type: string - certifications: - type: array - items: - type: string - example: ["ISO9001", "GDPR_COMPLIANT"] + rating: + description: Aggregate rating of the provider + $ref: https://schema.beckn.io/Rating/v2.0/attributes.yaml#/components/schemas/Rating + additionalProperties: false diff --git a/schema/Operator/v2.0/context.jsonld b/schema/Operator/v2.0/context.jsonld new file mode 100644 index 0000000..e630ce5 --- /dev/null +++ b/schema/Operator/v2.0/context.jsonld @@ -0,0 +1,18 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/mobility/v2.0/", + "Operator": "beckn:Operator", + "operatorId": "beckn:operatorId", + "operatingRegions": "beckn:operatingRegions", + "licenseNumber": "beckn:licenseNumber", + "contactInfo": "beckn:contactInfo", + "id": "beckn:id", + "descriptor": "beckn:descriptor", + "categories": "beckn:categories", + "locations": "beckn:locations", + "items": "beckn:items", + "fulfillments": "beckn:fulfillments", + "ratingsTotal": "beckn:ratingsTotal", + "rating": "beckn:rating" + } +} diff --git a/schema/Operator/v2.0/schema.json b/schema/Operator/v2.0/schema.json new file mode 100644 index 0000000..de74264 --- /dev/null +++ b/schema/Operator/v2.0/schema.json @@ -0,0 +1,65 @@ +{ + "$id": "https://schema.beckn.io/Operator/v2.0", + "x-iri": "https://schema.beckn.io/Operator/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Operator", + "type": "object", + "description": "An organization that provides and operates public transport or shared mobility services under a defined service agreement.", + "properties": { + "operatorId": { + "description": "Unique identifier for the operator", + "type": "string" + }, + "operatingRegions": { + "description": "Geographic regions where the operator provides services", + "type": "string" + }, + "licenseNumber": { + "description": "Regulatory license or accreditation number", + "type": "string" + }, + "contactInfo": { + "description": "Public contact information for the operator", + "type": "string" + }, + "id": { + "description": "Unique identifier for the provider", + "type": "string" + }, + "descriptor": { + "description": "Human-readable description of the provider", + "$ref": "https://schema.beckn.io/Descriptor/v2.1/schema.json" + }, + "categories": { + "description": "Service categories offered by the provider", + "$ref": "https://schema.beckn.io/CategoryCode/v2.1/schema.json" + }, + "locations": { + "description": "Locations where the provider offers services", + "$ref": "https://schema.beckn.io/Location/v2.0/schema.json" + }, + "items": { + "description": "Items available for discovery from this provider", + "$ref": "https://schema.beckn.io/Item/v2.1/schema.json" + }, + "fulfillments": { + "description": "Fulfillment options offered by this provider", + "$ref": "https://schema.beckn.io/Fulfillment/v2.1/schema.json" + }, + "ratingsTotal": { + "description": "Total number of ratings received", + "type": "number" + }, + "rating": { + "description": "Aggregate rating of the provider", + "$ref": "https://schema.beckn.io/Rating/v2.0/schema.json" + } + }, + "additionalProperties": false, + "x-tags": [ + "mobility", + "schema-org", + "transmodel-netex", + "ride-hailing" + ] +} diff --git a/schema/Operator/v2.0/vocab.jsonld b/schema/Operator/v2.0/vocab.jsonld new file mode 100644 index 0000000..deddfac --- /dev/null +++ b/schema/Operator/v2.0/vocab.jsonld @@ -0,0 +1,262 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/linked-data/latest-context.jsonld", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "skos": "http://www.w3.org/2004/02/skos/core#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "beckn:Operator", + "@type": "owl:Class", + "rdfs:label": { + "@value": "Operator", + "@language": "en" + }, + "rdfs:comment": { + "@value": "An organization that provides and operates public transport or shared mobility services under a defined service agreement.", + "@language": "en" + }, + "rdfs:subClassOf": { + "@id": "https://schema.org/Organization" + } + }, + { + "@id": "beckn:operatorId", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "operatorId", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Unique identifier for the operator", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Operator" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:operatingRegions", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "operatingRegions", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Geographic regions where the operator provides services", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Operator" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:licenseNumber", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "licenseNumber", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Regulatory license or accreditation number", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Operator" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:contactInfo", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "contactInfo", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Public contact information for the operator", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Operator" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:id", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "id", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Unique identifier for the provider", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Operator" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:descriptor", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "descriptor", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Human-readable description of the provider", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Operator" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#Descriptor" + } + }, + { + "@id": "beckn:categories", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "categories", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Service categories offered by the provider", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Operator" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#CategoryCode" + } + }, + { + "@id": "beckn:locations", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "locations", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Locations where the provider offers services", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Operator" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#Location" + } + }, + { + "@id": "beckn:items", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "items", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Items available for discovery from this provider", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Operator" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#Item" + } + }, + { + "@id": "beckn:fulfillments", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "fulfillments", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Fulfillment options offered by this provider", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Operator" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#Fulfillment" + } + }, + { + "@id": "beckn:ratingsTotal", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "ratingsTotal", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Total number of ratings received", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Operator" + }, + "rdfs:range": { + "@id": "xsd:decimal" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Number" + } + }, + { + "@id": "beckn:rating", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "rating", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Aggregate rating of the provider", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Operator" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#Rating" + } + } + ] +} diff --git a/schema/Package/README.md b/schema/Package/README.md index 9d41503..15e28db 100644 --- a/schema/Package/README.md +++ b/schema/Package/README.md @@ -1,13 +1,9 @@ # Package -A schema.beckn.io Type +A Package is a physical unit of goods prepared for transport within a shipment. Maps to beckn:Item. -Physical unit of goods. Multiple packages constitute a shipment. +## Versions -**Canonical IRI :** `log:Package` - -**Canonical URL:** https://schema.beckn.io/logistics/Package - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Package/v2.0/attributes.yaml](https://schema.beckn.io/Package/v2.0/attributes.yaml) | [https://schema.beckn.io/Package/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Package/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Package/v2.0/context.jsonld](https://schema.beckn.io/Package/v2.0/context.jsonld) | [https://schema.beckn.io/Package/v2.0/vocab.jsonld](https://schema.beckn.io/Package/v2.0/vocab.jsonld) | [https://schema.beckn.io/Package/v2.0/README.md](https://schema.beckn.io/Package/v2.0/README.md) | diff --git a/schema/Package/v2.0/README.md b/schema/Package/v2.0/README.md new file mode 100644 index 0000000..a4e562d --- /dev/null +++ b/schema/Package/v2.0/README.md @@ -0,0 +1,33 @@ +# Package — v2.0 + +A Package is a physical unit of goods prepared for transport within a shipment. Maps to beckn:Item. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Package/attributes.yaml](https://schema.beckn.io/Package/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Package/v2.0/attributes.yaml](https://schema.beckn.io/Package/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Package/attributes.jsonschema.yaml](https://schema.beckn.io/Package/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Package/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Package/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Package/context.jsonld](https://schema.beckn.io/Package/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Package/v2.0/context.jsonld](https://schema.beckn.io/Package/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Package/vocab.jsonld](https://schema.beckn.io/Package/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Package/v2.0/vocab.jsonld](https://schema.beckn.io/Package/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | Unique identifier for the package | +| `description` | no | string | Description of package contents | +| `weight` | yes | object | Weight of the package | +| `dimensions` | no | object | Physical dimensions of the package | +| `volumetricWeight` | no | number | Calculated volumetric weight in kg | +| `fragile` | no | boolean | Whether the package requires fragile handling | +| `hazardous` | no | boolean | Whether the package contains hazardous materials | +| `declaredValue` | no | object | Declared monetary value of contents | +| `packageType` | no | string | Type of packaging | +| `barcode` | no | string | Package-level barcode or QR code | +| `temperatureControl` | no | object | Temperature control requirements for cold chain | +| `insuranceRequired` | no | boolean | Whether insurance is required for this package | diff --git a/schema/Package/v2.0/attributes.jsonschema.yaml b/schema/Package/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 35d6a93..0000000 --- a/schema/Package/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,132 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: Package JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - Package: - $ref: '#/$defs/Package' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - Package: - type: object - title: Package - description: 'A Package is a physical unit of goods prepared for transport within - a shipment. Maps to beckn:Item. - - ' - required: - - id - - weight - properties: - id: - type: string - description: Unique identifier for the package - example: PKG-001 - description: - type: string - description: Description of package contents - example: Electronics - Laptop - weight: - type: object - description: Weight of the package - properties: - value: - type: number - example: 2.5 - unit: - type: string - enum: - - kg - - g - - lb - example: kg - dimensions: - type: object - description: Physical dimensions of the package - properties: - length: - type: number - example: 40 - width: - type: number - example: 30 - height: - type: number - example: 10 - unit: - type: string - enum: - - cm - - in - example: cm - volumetricWeight: - type: number - description: Calculated volumetric weight in kg - example: 3.0 - fragile: - type: boolean - description: Whether the package requires fragile handling - example: false - hazardous: - type: boolean - description: Whether the package contains hazardous materials - example: false - declaredValue: - type: object - description: Declared monetary value of contents - properties: - amount: - type: number - example: 50000 - currency: - type: string - example: INR - packageType: - type: string - description: Type of packaging - enum: - - BOX - - ENVELOPE - - PALLET - - DRUM - - BAG - - TUBE - example: BOX - barcode: - type: string - description: Package-level barcode or QR code - example: '4012345678901' - temperatureControl: - type: object - description: Temperature control requirements for cold chain - properties: - required: - type: boolean - example: false - minTemp: - type: number - example: 2 - maxTemp: - type: number - example: 8 - unit: - type: string - enum: - - C - - F - example: C - insuranceRequired: - type: boolean - description: Whether insurance is required for this package - example: false diff --git a/schema/Package/v2.0/attributes.yaml b/schema/Package/v2.0/attributes.yaml index 9171ccf..1ee133c 100644 --- a/schema/Package/v2.0/attributes.yaml +++ b/schema/Package/v2.0/attributes.yaml @@ -1,22 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: Package version: 2.0.0 description: Schema definition for the Package entity in the Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Package: + x-iri: https://schema.beckn.io/Package/v2.0 type: object title: Package - description: 'A Package is a physical unit of goods prepared for transport within - a shipment. Maps to beckn:Item. + description: 'A Package is a physical unit of goods prepared for transport within a shipment. Maps to beckn:Item. ' required: diff --git a/schema/Package/v2.0/context.jsonld b/schema/Package/v2.0/context.jsonld new file mode 100644 index 0000000..84fbfc4 --- /dev/null +++ b/schema/Package/v2.0/context.jsonld @@ -0,0 +1,33 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "Package": "beckn:Package", + "amount": "beckn:amount", + "barcode": "beckn:barcode", + "currency": "beckn:currency", + "declaredValue": "beckn:declaredValue", + "description": "beckn:description", + "dimensions": "beckn:dimensions", + "fragile": "beckn:fragile", + "hazardous": "beckn:hazardous", + "height": "beckn:height", + "id": "beckn:id", + "insuranceRequired": "beckn:insuranceRequired", + "length": "beckn:length", + "maxTemp": "beckn:maxTemp", + "minTemp": "beckn:minTemp", + "packageType": "beckn:packageType", + "required": "beckn:required", + "temperatureControl": "beckn:temperatureControl", + "unit": "beckn:unit", + "value": "beckn:value", + "volumetricWeight": "beckn:volumetricWeight", + "weight": "beckn:weight", + "width": "beckn:width" + } +} diff --git a/schema/Package/v2.0/schema.json b/schema/Package/v2.0/schema.json new file mode 100644 index 0000000..e4c3525 --- /dev/null +++ b/schema/Package/v2.0/schema.json @@ -0,0 +1,147 @@ +{ + "type": "object", + "title": "Package", + "description": "A Package is a physical unit of goods prepared for transport within a shipment. Maps to beckn:Item. ", + "required": [ + "id", + "weight" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the package", + "example": "PKG-001" + }, + "description": { + "type": "string", + "description": "Description of package contents", + "example": "Electronics - Laptop" + }, + "weight": { + "type": "object", + "description": "Weight of the package", + "properties": { + "value": { + "type": "number", + "example": 2.5 + }, + "unit": { + "type": "string", + "enum": [ + "kg", + "g", + "lb" + ], + "example": "kg" + } + } + }, + "dimensions": { + "type": "object", + "description": "Physical dimensions of the package", + "properties": { + "length": { + "type": "number", + "example": 40 + }, + "width": { + "type": "number", + "example": 30 + }, + "height": { + "type": "number", + "example": 10 + }, + "unit": { + "type": "string", + "enum": [ + "cm", + "in" + ], + "example": "cm" + } + } + }, + "volumetricWeight": { + "type": "number", + "description": "Calculated volumetric weight in kg", + "example": 3.0 + }, + "fragile": { + "type": "boolean", + "description": "Whether the package requires fragile handling", + "example": false + }, + "hazardous": { + "type": "boolean", + "description": "Whether the package contains hazardous materials", + "example": false + }, + "declaredValue": { + "type": "object", + "description": "Declared monetary value of contents", + "properties": { + "amount": { + "type": "number", + "example": 50000 + }, + "currency": { + "type": "string", + "example": "INR" + } + } + }, + "packageType": { + "type": "string", + "description": "Type of packaging", + "enum": [ + "BOX", + "ENVELOPE", + "PALLET", + "DRUM", + "BAG", + "TUBE" + ], + "example": "BOX" + }, + "barcode": { + "type": "string", + "description": "Package-level barcode or QR code", + "example": "4012345678901" + }, + "temperatureControl": { + "type": "object", + "description": "Temperature control requirements for cold chain", + "properties": { + "required": { + "type": "boolean", + "example": false + }, + "minTemp": { + "type": "number", + "example": 2 + }, + "maxTemp": { + "type": "number", + "example": 8 + }, + "unit": { + "type": "string", + "enum": [ + "C", + "F" + ], + "example": "C" + } + } + }, + "insuranceRequired": { + "type": "boolean", + "description": "Whether insurance is required for this package", + "example": false + } + }, + "$id": "https://schema.beckn.io/Package/v2.0", + "x-iri": "https://schema.beckn.io/Package/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/Package/v2.0/vocab.jsonld b/schema/Package/v2.0/vocab.jsonld new file mode 100644 index 0000000..dabf45a --- /dev/null +++ b/schema/Package/v2.0/vocab.jsonld @@ -0,0 +1,42 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "Package": "beckn:Package", + "amount": "beckn:amount", + "barcode": "beckn:barcode", + "currency": "beckn:currency", + "declaredValue": "beckn:declaredValue", + "description": "beckn:description", + "dimensions": "beckn:dimensions", + "fragile": "beckn:fragile", + "hazardous": "beckn:hazardous", + "height": "beckn:height", + "id": "beckn:id", + "insuranceRequired": "beckn:insuranceRequired", + "length": "beckn:length", + "maxTemp": "beckn:maxTemp", + "minTemp": "beckn:minTemp", + "packageType": "beckn:packageType", + "required": "beckn:required", + "temperatureControl": "beckn:temperatureControl", + "unit": "beckn:unit", + "value": "beckn:value", + "volumetricWeight": "beckn:volumetricWeight", + "weight": "beckn:weight", + "width": "beckn:width" + }, + "@graph": [ + { + "@id": "beckn:Package", + "@type": "rdfs:Class", + "rdfs:label": "Package", + "rdfs:comment": "TODO: Description Needed - Package" + } + ] +} diff --git a/schema/Place/README.md b/schema/Place/README.md deleted file mode 100644 index f9f5e25..0000000 --- a/schema/Place/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Place - -## Overview -**Place** represents any geographic location relevant to a logistics transaction — origin, destination, hub, store, or warehouse — including structured address and GPS coordinates. - -## IRI -`https://schema.beckn.org/logistics/Place` - -## Version -Current version: **v2.0** — [v2.0/attributes.yaml](./v2.0/attributes.yaml) diff --git a/schema/Place/v2.0/attributes.yaml b/schema/Place/v2.0/attributes.yaml deleted file mode 100644 index 1a3a1bc..0000000 --- a/schema/Place/v2.0/attributes.yaml +++ /dev/null @@ -1,83 +0,0 @@ -openapi: 3.1.0 -info: - title: Place - version: 2.0.0 - description: Schema definition for the Place entity in the Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org - license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} -components: - schemas: - Place: - type: object - title: Place - description: > - A geographic location relevant to logistics such as origin, destination, hub, or waypoint. - Includes structured address and GPS coordinates. Maps to beckn:Location and schema:Place. - required: - - id - properties: - id: - type: string - example: "PLC-BLR-001" - name: - type: string - description: Name of the place - example: "Anita's Home" - type: - type: string - enum: - - PICKUP - - DELIVERY - - HUB - - WAYPOINT - - STORE - - WAREHOUSE - example: "DELIVERY" - address: - type: object - properties: - line1: - type: string - example: "42, 5th Cross Road" - line2: - type: string - example: "Indiranagar" - landmark: - type: string - example: "Near Total Mall" - city: - type: string - example: "Bengaluru" - state: - type: string - example: "Karnataka" - country: - type: string - example: "India" - pincode: - type: string - example: "560038" - gps: - type: object - properties: - lat: - type: number - example: 12.9719 - lng: - type: number - example: 77.6412 - contact: - $ref: '#/components/schemas/Contact' - accessInstructions: - type: string - description: Instructions for courier to reach the place - example: "Ring bell twice. Building B, 3rd floor." - isVerified: - type: boolean - description: Whether the address has been geocode-verified - example: true diff --git a/schema/Proof/README.md b/schema/Proof/README.md index 84d7ca1..7edbdec 100644 --- a/schema/Proof/README.md +++ b/schema/Proof/README.md @@ -1,13 +1,9 @@ # Proof -A schema.beckn.io Type +Proof of delivery or pickup evidence, including photos, signatures, OTP confirmations, or digital receipts. Maps to beckn:Document. -Delivery evidence types: `PHOTO`, `SIGNATURE`, `OTP`, `BIOMETRIC`, `DIGITAL_RECEIPT` +## Versions -**Canonical IRI :** `log:Proof` - -**Canonical URL:** https://schema.beckn.io/logistics/Proof - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Proof/v2.0/attributes.yaml](https://schema.beckn.io/Proof/v2.0/attributes.yaml) | [https://schema.beckn.io/Proof/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Proof/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Proof/v2.0/context.jsonld](https://schema.beckn.io/Proof/v2.0/context.jsonld) | [https://schema.beckn.io/Proof/v2.0/vocab.jsonld](https://schema.beckn.io/Proof/v2.0/vocab.jsonld) | [https://schema.beckn.io/Proof/v2.0/README.md](https://schema.beckn.io/Proof/v2.0/README.md) | diff --git a/schema/Proof/v2.0/README.md b/schema/Proof/v2.0/README.md new file mode 100644 index 0000000..10c8388 --- /dev/null +++ b/schema/Proof/v2.0/README.md @@ -0,0 +1,33 @@ +# Proof — v2.0 + +Proof of delivery or pickup evidence, including photos, signatures, OTP confirmations, or digital receipts. Maps to beckn:Document. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Proof/attributes.yaml](https://schema.beckn.io/Proof/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Proof/v2.0/attributes.yaml](https://schema.beckn.io/Proof/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Proof/attributes.jsonschema.yaml](https://schema.beckn.io/Proof/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Proof/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Proof/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Proof/context.jsonld](https://schema.beckn.io/Proof/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Proof/v2.0/context.jsonld](https://schema.beckn.io/Proof/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Proof/vocab.jsonld](https://schema.beckn.io/Proof/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Proof/v2.0/vocab.jsonld](https://schema.beckn.io/Proof/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | - | +| `shipmentId` | no | string | - | +| `type` | yes | string | - | +| `subType` | no | string | What was captured | +| `mediaUrl` | no | string | URL to proof media (photo/signature image) | +| `signatureData` | no | string | Base64-encoded signature data | +| `otpVerified` | no | boolean | Whether OTP was verified for delivery | +| `recipientName` | no | string | Name of person who received the package | +| `recipientRelation` | no | string | Relation to consignee if not consignee | +| `location` | no | object | - | +| `timestamp` | yes | string | - | +| `driverSignoff` | no | boolean | Driver confirmed successful delivery | diff --git a/schema/Proof/v2.0/attributes.jsonschema.yaml b/schema/Proof/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 1e4e9a5..0000000 --- a/schema/Proof/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,91 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: Proof JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - Proof: - $ref: '#/$defs/Proof' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - Proof: - type: object - title: Proof - description: 'Proof of delivery or pickup evidence, including photos, signatures, - OTP confirmations, or digital receipts. Maps to beckn:Document. - - ' - required: - - id - - type - - timestamp - properties: - id: - type: string - example: POD-SHP001-001 - shipmentId: - type: string - example: SHP-2024-001234 - type: - type: string - enum: - - PHOTO - - SIGNATURE - - OTP - - BIOMETRIC - - DIGITAL_RECEIPT - - DOCUMENT_SCAN - example: PHOTO - subType: - type: string - description: What was captured - enum: - - DELIVERED_AT_DOOR - - DELIVERED_TO_PERSON - - LEFT_AT_SAFE_PLACE - - HANDED_TO_NEIGHBOUR - - PICKUP_CONFIRMED - example: DELIVERED_TO_PERSON - mediaUrl: - type: string - format: uri - description: URL to proof media (photo/signature image) - signatureData: - type: string - description: Base64-encoded signature data - otpVerified: - type: boolean - description: Whether OTP was verified for delivery - example: true - recipientName: - type: string - description: Name of person who received the package - example: Anita Sharma - recipientRelation: - type: string - description: Relation to consignee if not consignee - example: Spouse - location: - type: object - properties: - lat: - type: number - lng: - type: number - timestamp: - type: string - format: date-time - driverSignoff: - type: boolean - description: Driver confirmed successful delivery - example: true diff --git a/schema/Proof/v2.0/attributes.yaml b/schema/Proof/v2.0/attributes.yaml index 54b0400..63fb58c 100644 --- a/schema/Proof/v2.0/attributes.yaml +++ b/schema/Proof/v2.0/attributes.yaml @@ -1,22 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: Proof version: 2.0.0 description: Schema definition for the Proof entity in the Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Proof: + x-iri: https://schema.beckn.io/Proof/v2.0 type: object title: Proof - description: 'Proof of delivery or pickup evidence, including photos, signatures, - OTP confirmations, or digital receipts. Maps to beckn:Document. + description: 'Proof of delivery or pickup evidence, including photos, signatures, OTP confirmations, or digital receipts. Maps to beckn:Document. ' required: diff --git a/schema/Proof/v2.0/context.jsonld b/schema/Proof/v2.0/context.jsonld new file mode 100644 index 0000000..895ba98 --- /dev/null +++ b/schema/Proof/v2.0/context.jsonld @@ -0,0 +1,25 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "Proof": "beckn:Proof", + "driverSignoff": "beckn:driverSignoff", + "id": "beckn:id", + "lat": "beckn:lat", + "lng": "beckn:lng", + "location": "beckn:location", + "mediaUrl": "beckn:mediaUrl", + "otpVerified": "beckn:otpVerified", + "recipientName": "beckn:recipientName", + "recipientRelation": "beckn:recipientRelation", + "shipmentId": "beckn:shipmentId", + "signatureData": "beckn:signatureData", + "subType": "beckn:subType", + "timestamp": "beckn:timestamp", + "type": "beckn:type" + } +} diff --git a/schema/Proof/v2.0/schema.json b/schema/Proof/v2.0/schema.json new file mode 100644 index 0000000..9855693 --- /dev/null +++ b/schema/Proof/v2.0/schema.json @@ -0,0 +1,91 @@ +{ + "type": "object", + "title": "Proof", + "description": "Proof of delivery or pickup evidence, including photos, signatures, OTP confirmations, or digital receipts. Maps to beckn:Document. ", + "required": [ + "id", + "type", + "timestamp" + ], + "properties": { + "id": { + "type": "string", + "example": "POD-SHP001-001" + }, + "shipmentId": { + "type": "string", + "example": "SHP-2024-001234" + }, + "type": { + "type": "string", + "enum": [ + "PHOTO", + "SIGNATURE", + "OTP", + "BIOMETRIC", + "DIGITAL_RECEIPT", + "DOCUMENT_SCAN" + ], + "example": "PHOTO" + }, + "subType": { + "type": "string", + "description": "What was captured", + "enum": [ + "DELIVERED_AT_DOOR", + "DELIVERED_TO_PERSON", + "LEFT_AT_SAFE_PLACE", + "HANDED_TO_NEIGHBOUR", + "PICKUP_CONFIRMED" + ], + "example": "DELIVERED_TO_PERSON" + }, + "mediaUrl": { + "type": "string", + "format": "uri", + "description": "URL to proof media (photo/signature image)" + }, + "signatureData": { + "type": "string", + "description": "Base64-encoded signature data" + }, + "otpVerified": { + "type": "boolean", + "description": "Whether OTP was verified for delivery", + "example": true + }, + "recipientName": { + "type": "string", + "description": "Name of person who received the package", + "example": "Anita Sharma" + }, + "recipientRelation": { + "type": "string", + "description": "Relation to consignee if not consignee", + "example": "Spouse" + }, + "location": { + "type": "object", + "properties": { + "lat": { + "type": "number" + }, + "lng": { + "type": "number" + } + } + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "driverSignoff": { + "type": "boolean", + "description": "Driver confirmed successful delivery", + "example": true + } + }, + "$id": "https://schema.beckn.io/Proof/v2.0", + "x-iri": "https://schema.beckn.io/Proof/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/Proof/v2.0/vocab.jsonld b/schema/Proof/v2.0/vocab.jsonld new file mode 100644 index 0000000..a4d642f --- /dev/null +++ b/schema/Proof/v2.0/vocab.jsonld @@ -0,0 +1,34 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "Proof": "beckn:Proof", + "driverSignoff": "beckn:driverSignoff", + "id": "beckn:id", + "lat": "beckn:lat", + "lng": "beckn:lng", + "location": "beckn:location", + "mediaUrl": "beckn:mediaUrl", + "otpVerified": "beckn:otpVerified", + "recipientName": "beckn:recipientName", + "recipientRelation": "beckn:recipientRelation", + "shipmentId": "beckn:shipmentId", + "signatureData": "beckn:signatureData", + "subType": "beckn:subType", + "timestamp": "beckn:timestamp", + "type": "beckn:type" + }, + "@graph": [ + { + "@id": "beckn:Proof", + "@type": "rdfs:Class", + "rdfs:label": "Proof", + "rdfs:comment": "TODO: Description Needed - Proof" + } + ] +} diff --git a/schema/Rating/README.md b/schema/Rating/README.md index bedbb4d..e522450 100644 --- a/schema/Rating/README.md +++ b/schema/Rating/README.md @@ -1,10 +1,10 @@ # Rating -## Overview -**Rating** captures a user's numeric score for a logistics service, driver, carrier, or packaging quality. +Aggregated rating information for an entity. Aligns with schema.org/AggregateRating semantics. -## IRI -`https://schema.beckn.org/logistics/Rating` +## Versions -## Version -Current version: **v2.0** — [v2.0/attributes.yaml](./v2.0/attributes.yaml) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Rating/v2.0/attributes.yaml](https://schema.beckn.io/Rating/v2.0/attributes.yaml) | [https://schema.beckn.io/Rating/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Rating/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Rating/v2.0/context.jsonld](https://schema.beckn.io/Rating/v2.0/context.jsonld) | [https://schema.beckn.io/Rating/v2.0/vocab.jsonld](https://schema.beckn.io/Rating/v2.0/vocab.jsonld) | [https://schema.beckn.io/Rating/v2.0/README.md](https://schema.beckn.io/Rating/v2.0/README.md) | +| **v2.1** | [https://schema.beckn.io/Rating/v2.1/attributes.yaml](https://schema.beckn.io/Rating/v2.1/attributes.yaml) | [https://schema.beckn.io/Rating/v2.1/attributes.jsonschema.yaml](https://schema.beckn.io/Rating/v2.1/attributes.jsonschema.yaml) | [https://schema.beckn.io/Rating/v2.1/context.jsonld](https://schema.beckn.io/Rating/v2.1/context.jsonld) | [https://schema.beckn.io/Rating/v2.1/vocab.jsonld](https://schema.beckn.io/Rating/v2.1/vocab.jsonld) | [https://schema.beckn.io/Rating/v2.1/README.md](https://schema.beckn.io/Rating/v2.1/README.md) | diff --git a/schema/Rating/v2.0/README.md b/schema/Rating/v2.0/README.md new file mode 100644 index 0000000..9f93bc0 --- /dev/null +++ b/schema/Rating/v2.0/README.md @@ -0,0 +1,24 @@ +# Rating — v2.0 + +Schema definition for Rating in the Beckn Protocol + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Rating/attributes.yaml](https://schema.beckn.io/Rating/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Rating/v2.0/attributes.yaml](https://schema.beckn.io/Rating/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Rating/attributes.jsonschema.yaml](https://schema.beckn.io/Rating/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Rating/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Rating/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Rating/context.jsonld](https://schema.beckn.io/Rating/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Rating/v2.0/context.jsonld](https://schema.beckn.io/Rating/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Rating/vocab.jsonld](https://schema.beckn.io/Rating/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Rating/v2.0/vocab.jsonld](https://schema.beckn.io/Rating/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `@type` | yes | string | Type of the rating | +| `beckn:ratingValue` | no | number | Rating value (0-5) | +| `beckn:ratingCount` | no | integer | Number of ratings | diff --git a/schema/Rating/v2.0/attributes.yaml b/schema/Rating/v2.0/attributes.yaml index 41e5b9a..bccb5ac 100644 --- a/schema/Rating/v2.0/attributes.yaml +++ b/schema/Rating/v2.0/attributes.yaml @@ -1,66 +1,37 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: Rating version: 2.0.0 - description: Schema for Rating in Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for Rating in the Beckn Protocol license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Rating: - type: object + x-iri: https://schema.beckn.io/Rating/v2.0 + description: Schema definition for Rating in the Beckn Protocol title: Rating - description: A numeric score given by a user for a logistics service, driver, or carrier. - required: - - value - - ratingFor + type: object properties: - id: + '@type': type: string - example: "RTG-00456" - value: + enum: + - beckn:Rating + description: Type of the rating + example: beckn:Rating + beckn:ratingValue: type: number - minimum: 1 + minimum: 0 maximum: 5 - example: 4.5 - ratingFor: - type: string - enum: - - DRIVER - - CARRIER - - SERVICE - - PACKAGING - example: "DRIVER" - ratedBy: - type: string - description: User ID who gave the rating - shipmentId: - type: string - categories: - type: object - description: Category-wise ratings - properties: - timeliness: - type: number - minimum: 1 - maximum: 5 - packaging: - type: number - minimum: 1 - maximum: 5 - handling: - type: number - minimum: 1 - maximum: 5 - communication: - type: number - minimum: 1 - maximum: 5 - timestamp: - type: string - format: date-time + description: Rating value (0-5) + example: 4.8 + beckn:ratingCount: + type: integer + minimum: 0 + description: Number of ratings + example: 1250 + required: + - '@type' diff --git a/schema/Rating/v2.0/context.jsonld b/schema/Rating/v2.0/context.jsonld new file mode 100644 index 0000000..09cc4e5 --- /dev/null +++ b/schema/Rating/v2.0/context.jsonld @@ -0,0 +1,15 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/", + "Rating": "beckn:Rating", + "@context": "beckn:@context", + "@type": "beckn:@type", + "ratingValue": "beckn:ratingValue", + "ratingCount": "beckn:ratingCount" + } +} \ No newline at end of file diff --git a/schema/Rating/v2.0/schema.json b/schema/Rating/v2.0/schema.json new file mode 100644 index 0000000..310be7f --- /dev/null +++ b/schema/Rating/v2.0/schema.json @@ -0,0 +1,34 @@ +{ + "$id": "https://schema.beckn.io/Rating/v2.0", + "x-iri": "https://schema.beckn.io/Rating/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Schema definition for Rating in the Beckn Protocol", + "title": "Rating", + "type": "object", + "properties": { + "@type": { + "type": "string", + "enum": [ + "beckn:Rating" + ], + "description": "Type of the rating", + "example": "beckn:Rating" + }, + "beckn:ratingValue": { + "type": "number", + "minimum": 0, + "maximum": 5, + "description": "Rating value (0-5)", + "example": 4.8 + }, + "beckn:ratingCount": { + "type": "integer", + "minimum": 0, + "description": "Number of ratings", + "example": 1250 + } + }, + "required": [ + "@type" + ] +} diff --git a/schema/Rating/v2.0/vocab.jsonld b/schema/Rating/v2.0/vocab.jsonld new file mode 100644 index 0000000..984f694 --- /dev/null +++ b/schema/Rating/v2.0/vocab.jsonld @@ -0,0 +1,37 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "beckn:Rating", + "@type": "rdfs:Class", + "rdfs:label": "Rating", + "rdfs:comment": "Schema definition for Rating in the Beckn Protocol" + }, + { + "@id": "beckn:type", + "@type": "rdf:Property", + "rdfs:label": "type", + "rdfs:comment": "type property of Rating" + }, + { + "@id": "beckn:ratingValue", + "@type": "rdf:Property", + "rdfs:label": "ratingValue", + "rdfs:comment": "ratingValue property of Rating" + }, + { + "@id": "beckn:ratingCount", + "@type": "rdf:Property", + "rdfs:label": "ratingCount", + "rdfs:comment": "ratingCount property of Rating" + } + ] +} \ No newline at end of file diff --git a/schema/Rating/v2.1/README.md b/schema/Rating/v2.1/README.md new file mode 100644 index 0000000..705645d --- /dev/null +++ b/schema/Rating/v2.1/README.md @@ -0,0 +1,26 @@ +# Rating — v2.1 + +Aggregated rating information for an entity. Aligns with schema.org/AggregateRating semantics. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Rating/attributes.yaml](https://schema.beckn.io/Rating/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Rating/v2.1/attributes.yaml](https://schema.beckn.io/Rating/v2.1/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Rating/attributes.jsonschema.yaml](https://schema.beckn.io/Rating/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Rating/v2.1/attributes.jsonschema.yaml](https://schema.beckn.io/Rating/v2.1/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Rating/context.jsonld](https://schema.beckn.io/Rating/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Rating/v2.1/context.jsonld](https://schema.beckn.io/Rating/v2.1/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Rating/vocab.jsonld](https://schema.beckn.io/Rating/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Rating/v2.1/vocab.jsonld](https://schema.beckn.io/Rating/v2.1/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `@context` | no | string | - | +| `@type` | no | string | - | +| `ratingValue` | no | number | Rating value (typically 0-5) | +| `ratingCount` | no | integer | Number of ratings | +| `reviewText` | no | string | Optional textual review or comment | diff --git a/schema/Rating/v2.1/attributes.yaml b/schema/Rating/v2.1/attributes.yaml new file mode 100644 index 0000000..e85929a --- /dev/null +++ b/schema/Rating/v2.1/attributes.yaml @@ -0,0 +1,41 @@ +openapi: 3.1.1 +info: + title: Rating + version: 2.1.0 + description: Aggregated rating information for an entity. Aligns with schema.org/AggregateRating + semantics. + license: + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io +components: + schemas: + Rating: + x-iri: https://schema.beckn.io/Rating/v2.1 + description: Aggregated rating information for an entity. Aligns with schema.org/AggregateRating + semantics. + title: Rating + type: object + properties: + ratingValue: + description: Rating value (typically 0-5) + type: number + minimum: 0 + maximum: 5 + x-jsonld: + '@id': schema:ratingValue + ratingCount: + description: Number of ratings + type: integer + minimum: 0 + x-jsonld: + '@id': schema:ratingCount + reviewText: + description: Optional textual review or comment + type: string + x-jsonld: + '@id': schema:reviewBody + additionalProperties: false + x-tags: + - common diff --git a/schema/Rating/v2.1/context.jsonld b/schema/Rating/v2.1/context.jsonld new file mode 100644 index 0000000..0ca7f0f --- /dev/null +++ b/schema/Rating/v2.1/context.jsonld @@ -0,0 +1,16 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "Rating": "beckn:Rating", + "@context": "beckn:@context", + "@type": "beckn:@type", + "ratingValue": "beckn:ratingValue", + "ratingCount": "beckn:ratingCount", + "reviewText": "beckn:reviewText" + } +} diff --git a/schema/Rating/v2.1/schema.json b/schema/Rating/v2.1/schema.json new file mode 100644 index 0000000..c09acfd --- /dev/null +++ b/schema/Rating/v2.1/schema.json @@ -0,0 +1,38 @@ +{ + "$id": "https://schema.beckn.io/Rating/v2.1", + "x-iri": "https://schema.beckn.io/Rating/v2.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Aggregated rating information for an entity. Aligns with schema.org/AggregateRating semantics.", + "title": "Rating", + "type": "object", + "properties": { + "ratingValue": { + "description": "Rating value (typically 0-5)", + "type": "number", + "minimum": 0, + "maximum": 5, + "x-jsonld": { + "@id": "schema:ratingValue" + } + }, + "ratingCount": { + "description": "Number of ratings", + "type": "integer", + "minimum": 0, + "x-jsonld": { + "@id": "schema:ratingCount" + } + }, + "reviewText": { + "description": "Optional textual review or comment", + "type": "string", + "x-jsonld": { + "@id": "schema:reviewBody" + } + } + }, + "additionalProperties": false, + "x-tags": [ + "common" + ] +} diff --git a/schema/Rating/v2.1/vocab.jsonld b/schema/Rating/v2.1/vocab.jsonld new file mode 100644 index 0000000..88e4021 --- /dev/null +++ b/schema/Rating/v2.1/vocab.jsonld @@ -0,0 +1,54 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "Rating": "beckn:Rating", + "@type": "beckn:@type", + "ratingCount": "beckn:ratingCount", + "ratingValue": "beckn:ratingValue", + "reviewText": "beckn:reviewText" + }, + "@graph": [ + { + "@id": "beckn:Rating", + "@type": "rdfs:Class", + "rdfs:label": "Rating", + "rdfs:comment": "Aggregated rating information for an entity. Aligns with schema.org/AggregateRating semantics." + }, + { + "@id": "beckn:@context", + "@type": "rdf:Property", + "rdfs:label": "@context", + "rdfs:comment": "TODO: Description Needed - @context" + }, + { + "@id": "beckn:@type", + "@type": "rdf:Property", + "rdfs:label": "@type", + "rdfs:comment": "TODO: Description Needed - @type" + }, + { + "@id": "beckn:ratingValue", + "@type": "rdf:Property", + "rdfs:label": "rating Value", + "rdfs:comment": "Rating value (typically 0-5)" + }, + { + "@id": "beckn:ratingCount", + "@type": "rdf:Property", + "rdfs:label": "rating Count", + "rdfs:comment": "Number of ratings" + }, + { + "@id": "beckn:reviewText", + "@type": "rdf:Property", + "rdfs:label": "review Text", + "rdfs:comment": "Optional textual review or comment" + } + ] +} diff --git a/schema/ReturnPolicy/README.md b/schema/ReturnPolicy/README.md index 2447bd6..b2fd2bb 100644 --- a/schema/ReturnPolicy/README.md +++ b/schema/ReturnPolicy/README.md @@ -1,13 +1,9 @@ # ReturnPolicy -A schema.beckn.io Type +Defines conditions for returning goods and reverse logistics workflows. -Return reasons: `DAMAGED_IN_TRANSIT`, `WRONG_ITEM`, `CONSIGNEE_REFUSED`, `ADDRESS_NOT_FOUND` +## Versions -**Canonical IRI :** `log:ReturnPolicy` - -**Canonical URL:** https://schema.beckn.io/logistics/ReturnPolicy - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/ReturnPolicy/v2.0/attributes.yaml](https://schema.beckn.io/ReturnPolicy/v2.0/attributes.yaml) | [https://schema.beckn.io/ReturnPolicy/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/ReturnPolicy/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/ReturnPolicy/v2.0/context.jsonld](https://schema.beckn.io/ReturnPolicy/v2.0/context.jsonld) | [https://schema.beckn.io/ReturnPolicy/v2.0/vocab.jsonld](https://schema.beckn.io/ReturnPolicy/v2.0/vocab.jsonld) | [https://schema.beckn.io/ReturnPolicy/v2.0/README.md](https://schema.beckn.io/ReturnPolicy/v2.0/README.md) | diff --git a/schema/ReturnPolicy/v2.0/README.md b/schema/ReturnPolicy/v2.0/README.md new file mode 100644 index 0000000..c1c4c7a --- /dev/null +++ b/schema/ReturnPolicy/v2.0/README.md @@ -0,0 +1,28 @@ +# ReturnPolicy — v2.0 + +Defines conditions for returning goods and reverse logistics workflows. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/ReturnPolicy/attributes.yaml](https://schema.beckn.io/ReturnPolicy/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/ReturnPolicy/v2.0/attributes.yaml](https://schema.beckn.io/ReturnPolicy/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/ReturnPolicy/attributes.jsonschema.yaml](https://schema.beckn.io/ReturnPolicy/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/ReturnPolicy/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/ReturnPolicy/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/ReturnPolicy/context.jsonld](https://schema.beckn.io/ReturnPolicy/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/ReturnPolicy/v2.0/context.jsonld](https://schema.beckn.io/ReturnPolicy/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/ReturnPolicy/vocab.jsonld](https://schema.beckn.io/ReturnPolicy/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/ReturnPolicy/v2.0/vocab.jsonld](https://schema.beckn.io/ReturnPolicy/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | no | string | - | +| `returnsAccepted` | no | boolean | - | +| `returnWindow` | no | object | - | +| `returnReason` | no | array | - | +| `reversePickupCharge` | no | object | - | +| `refundOnReturn` | no | boolean | - | +| `returnHubAddress` | no | $ref: https://schema.beckn.io/Place/v2.0/attributes.yaml#/components/schemas/Place | - | diff --git a/schema/ReturnPolicy/v2.0/attributes.jsonschema.yaml b/schema/ReturnPolicy/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 71325cf..0000000 --- a/schema/ReturnPolicy/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,73 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: ReturnPolicy JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - ReturnPolicy: - $ref: '#/$defs/ReturnPolicy' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - ReturnPolicy: - type: object - title: ReturnPolicy - description: Defines conditions for returning goods and reverse logistics workflows. - properties: - id: - type: string - example: RP-STD-001 - returnsAccepted: - type: boolean - example: true - returnWindow: - type: object - properties: - value: - type: integer - example: 7 - unit: - type: string - enum: - - days - - hours - example: days - returnReason: - type: array - items: - type: string - example: - - DAMAGED_IN_TRANSIT - - WRONG_ITEM - - CONSIGNEE_REFUSED - - ADDRESS_NOT_FOUND - reversePickupCharge: - type: object - properties: - type: - type: string - enum: - - FREE - - FLAT - - PERCENTAGE - example: FREE - value: - type: number - example: 0 - currency: - type: string - example: INR - refundOnReturn: - type: boolean - example: true - returnHubAddress: - $ref: https://schema.beckn.io/LogisticsPlace/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsPlace diff --git a/schema/ReturnPolicy/v2.0/attributes.yaml b/schema/ReturnPolicy/v2.0/attributes.yaml index 35afb3d..e41c820 100644 --- a/schema/ReturnPolicy/v2.0/attributes.yaml +++ b/schema/ReturnPolicy/v2.0/attributes.yaml @@ -1,19 +1,17 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: ReturnPolicy version: 2.0.0 - description: Schema definition for the ReturnPolicy entity in the Beckn Logistics - domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema for ReturnPolicy in Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: ReturnPolicy: + x-iri: https://schema.beckn.io/ReturnPolicy/v2.0 type: object title: ReturnPolicy description: Defines conditions for returning goods and reverse logistics workflows. diff --git a/schema/ReturnPolicy/v2.0/context.jsonld b/schema/ReturnPolicy/v2.0/context.jsonld new file mode 100644 index 0000000..a61a1bb --- /dev/null +++ b/schema/ReturnPolicy/v2.0/context.jsonld @@ -0,0 +1,22 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "ReturnPolicy": "beckn:ReturnPolicy", + "currency": "beckn:currency", + "id": "beckn:id", + "refundOnReturn": "beckn:refundOnReturn", + "returnHubAddress": "beckn:returnHubAddress", + "returnReason": "beckn:returnReason", + "returnWindow": "beckn:returnWindow", + "returnsAccepted": "beckn:returnsAccepted", + "reversePickupCharge": "beckn:reversePickupCharge", + "type": "beckn:type", + "unit": "beckn:unit", + "value": "beckn:value" + } +} diff --git a/schema/ReturnPolicy/v2.0/schema.json b/schema/ReturnPolicy/v2.0/schema.json new file mode 100644 index 0000000..33af8ca --- /dev/null +++ b/schema/ReturnPolicy/v2.0/schema.json @@ -0,0 +1,76 @@ +{ + "type": "object", + "title": "ReturnPolicy", + "description": "Defines conditions for returning goods and reverse logistics workflows.", + "properties": { + "id": { + "type": "string", + "example": "RP-STD-001" + }, + "returnsAccepted": { + "type": "boolean", + "example": true + }, + "returnWindow": { + "type": "object", + "properties": { + "value": { + "type": "integer", + "example": 7 + }, + "unit": { + "type": "string", + "enum": [ + "days", + "hours" + ], + "example": "days" + } + } + }, + "returnReason": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "DAMAGED_IN_TRANSIT", + "WRONG_ITEM", + "CONSIGNEE_REFUSED", + "ADDRESS_NOT_FOUND" + ] + }, + "reversePickupCharge": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "FREE", + "FLAT", + "PERCENTAGE" + ], + "example": "FREE" + }, + "value": { + "type": "number", + "example": 0 + }, + "currency": { + "type": "string", + "example": "INR" + } + } + }, + "refundOnReturn": { + "type": "boolean", + "example": true + }, + "returnHubAddress": { + "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + } + }, + "$id": "https://schema.beckn.io/ReturnPolicy/v2.0", + "x-iri": "https://schema.beckn.io/ReturnPolicy/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/ReturnPolicy/v2.0/vocab.jsonld b/schema/ReturnPolicy/v2.0/vocab.jsonld new file mode 100644 index 0000000..82facf1 --- /dev/null +++ b/schema/ReturnPolicy/v2.0/vocab.jsonld @@ -0,0 +1,31 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "ReturnPolicy": "beckn:ReturnPolicy", + "currency": "beckn:currency", + "id": "beckn:id", + "refundOnReturn": "beckn:refundOnReturn", + "returnHubAddress": "beckn:returnHubAddress", + "returnReason": "beckn:returnReason", + "returnWindow": "beckn:returnWindow", + "returnsAccepted": "beckn:returnsAccepted", + "reversePickupCharge": "beckn:reversePickupCharge", + "type": "beckn:type", + "unit": "beckn:unit", + "value": "beckn:value" + }, + "@graph": [ + { + "@id": "beckn:ReturnPolicy", + "@type": "rdfs:Class", + "rdfs:label": "Return Policy", + "rdfs:comment": "TODO: Description Needed - ReturnPolicy" + } + ] +} diff --git a/schema/Route/README.md b/schema/Route/README.md index 8c9b59f..ff96965 100644 --- a/schema/Route/README.md +++ b/schema/Route/README.md @@ -1,14 +1,9 @@ # Route -## Overview -A **Route** defines the planned path from origin to destination for a logistics shipment, including intermediate waypoints, hubs, distance, and transport mode. +The physical or logical path followed by a transport service, defined as an ordered sequence of stops or waypoints. -## IRI -`https://schema.beckn.org/logistics/Route` +## Versions -## Use Cases -- Interstate/Long Haul: Multi-state routes with hub stops -- Hyperlocal: Optimized last-mile delivery paths - -## Version -Current version: **v2.0** — [v2.0/attributes.yaml](./v2.0/attributes.yaml) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Route/v2.0/attributes.yaml](https://schema.beckn.io/Route/v2.0/attributes.yaml) | [https://schema.beckn.io/Route/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Route/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Route/v2.0/context.jsonld](https://schema.beckn.io/Route/v2.0/context.jsonld) | [https://schema.beckn.io/Route/v2.0/vocab.jsonld](https://schema.beckn.io/Route/v2.0/vocab.jsonld) | [https://schema.beckn.io/Route/v2.0/README.md](https://schema.beckn.io/Route/v2.0/README.md) | diff --git a/schema/Route/v2.0/README.md b/schema/Route/v2.0/README.md new file mode 100644 index 0000000..06da786 --- /dev/null +++ b/schema/Route/v2.0/README.md @@ -0,0 +1,33 @@ +# Route — v2.0 + +The physical or logical path followed by a transport service, defined as an ordered sequence of stops or waypoints. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Route/attributes.yaml](https://schema.beckn.io/Route/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Route/v2.0/attributes.yaml](https://schema.beckn.io/Route/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Route/attributes.jsonschema.yaml](https://schema.beckn.io/Route/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Route/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Route/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Route/context.jsonld](https://schema.beckn.io/Route/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Route/v2.0/context.jsonld](https://schema.beckn.io/Route/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Route/vocab.jsonld](https://schema.beckn.io/Route/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Route/v2.0/vocab.jsonld](https://schema.beckn.io/Route/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `routeId` | no | string | Unique identifier for the route | +| `shortName` | no | string | Short public-facing name (e.g. 42A) | +| `longName` | no | string | Full descriptive name of the route | +| `routeType` | no | string | Mode of transport (e.g. BUS, RAIL, TRAM, FERRY) | +| `operatorRef` | no | $ref: https://schema.beckn.io/Operator/v2.0/attributes.yaml#/components/schemas/Operator | Operator providing this route | +| `networkRef` | no | $ref: https://schema.beckn.io/Network/v2.0/attributes.yaml#/components/schemas/Network | Network this route belongs to | +| `id` | no | string | Unique identifier for the item | +| `descriptor` | no | $ref: https://schema.beckn.io/core/v2.0/Descriptor/attributes.yaml#components/schemas/Descriptor | Human-readable description of the item | +| `categoryId` | no | $ref: https://schema.beckn.io/CategoryCode/v2.1/attributes.yaml#/components/schemas/CategoryCode | Category code classifying the item | +| `price` | no | $ref: https://schema.beckn.io/PriceSpecification/v2.1/attributes.yaml#/components/schemas/PriceSpecification | Price specification for this item | +| `quantity` | no | $ref: https://schema.beckn.io/Quantity/v2.0/attributes.yaml#/components/schemas/Quantity | Available quantity of the item | +| `tags` | no | string | Tags associated with the item | diff --git a/schema/Route/v2.0/attributes.yaml b/schema/Route/v2.0/attributes.yaml index 2758014..540e8ec 100644 --- a/schema/Route/v2.0/attributes.yaml +++ b/schema/Route/v2.0/attributes.yaml @@ -2,102 +2,61 @@ openapi: 3.1.0 info: title: Route version: 2.0.0 - description: Schema definition for the Route entity in the Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the Route entity in the Beckn Mobility domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + url: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Route: + x-iri: https://schema.beckn.io/Route/v2.0 type: object title: Route - description: > - A Route is the planned path for a shipment from origin to destination, potentially - passing through multiple hubs and waypoints. Maps to beckn:Journey. - required: - - id - - origin - - destination + description: The physical or logical path followed by a transport service, defined + as an ordered sequence of stops or waypoints. + x-tags: + - mobility + - schema-org + - transmodel-netex + - ride-hailing properties: - id: + routeId: + description: Unique identifier for the route type: string - description: Unique route identifier - example: "RTE-BLR-DEL-001" - name: + shortName: + description: Short public-facing name (e.g. 42A) type: string - description: Human-readable route name - example: "Bangalore to Delhi via Hyderabad" - origin: - $ref: '#/components/schemas/Place' - destination: - $ref: '#/components/schemas/Place' - waypoints: - type: array - description: Intermediate waypoints/hubs on the route - items: - $ref: '#/components/schemas/Waypoint' - totalDistance: - type: object - properties: - value: - type: number - example: 2150 - unit: - type: string - enum: [km, miles] - example: "km" - estimatedDuration: - type: object - properties: - value: - type: number - example: 36 - unit: - type: string - enum: [hours, days] - example: "hours" - transportMode: + longName: + description: Full descriptive name of the route type: string - enum: - - ROAD - - AIR - - RAIL - - MULTIMODAL - example: "ROAD" routeType: + description: Mode of transport (e.g. BUS, RAIL, TRAM, FERRY) + type: string + operatorRef: + description: Operator providing this route + $ref: https://schema.beckn.io/Operator/v2.0/attributes.yaml#/components/schemas/Operator + networkRef: + description: Network this route belongs to + $ref: https://schema.beckn.io/Network/v2.0/attributes.yaml#/components/schemas/Network + id: + description: Unique identifier for the item + type: string + descriptor: + description: Human-readable description of the item + $ref: https://schema.beckn.io/Descriptor/v2.0/attributes.yaml#/components/schemas/Descriptor + categoryId: + description: Category code classifying the item + $ref: https://schema.beckn.io/CategoryCode/v2.1/attributes.yaml#/components/schemas/CategoryCode + price: + description: Price specification for this item + $ref: https://schema.beckn.io/PriceSpecification/v2.1/attributes.yaml#/components/schemas/PriceSpecification + quantity: + description: Available quantity of the item + $ref: https://schema.beckn.io/Quantity/v2.0/attributes.yaml#/components/schemas/Quantity + tags: + description: Tags associated with the item type: string - description: Classification of route - enum: - - HYPERLOCAL - - LAST_MILE - - FIRST_MILE - - LINE_HAUL - - CROSS_DOCKING - example: "LINE_HAUL" - geometry: - type: object - description: GeoJSON LineString of route geometry - properties: - type: - type: string - example: "LineString" - coordinates: - type: array - items: - type: array - items: - type: number - tollCost: - type: number - description: Estimated toll charges in INR - example: 1250 - restrictions: - type: array - description: Route restrictions (e.g. night driving ban) - items: - type: string - example: ["No night driving in MP", "Heavy vehicle ban in city center"] + additionalProperties: false diff --git a/schema/Route/v2.0/context.jsonld b/schema/Route/v2.0/context.jsonld new file mode 100644 index 0000000..310d67e --- /dev/null +++ b/schema/Route/v2.0/context.jsonld @@ -0,0 +1,18 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/mobility/v2.0/", + "Route": "beckn:Route", + "routeId": "beckn:routeId", + "shortName": "beckn:shortName", + "longName": "beckn:longName", + "routeType": "beckn:routeType", + "operatorRef": "beckn:operatorRef", + "networkRef": "beckn:networkRef", + "id": "beckn:id", + "descriptor": "beckn:descriptor", + "categoryId": "beckn:categoryId", + "price": "beckn:price", + "quantity": "beckn:quantity", + "tags": "beckn:tags" + } +} diff --git a/schema/Route/v2.0/schema.json b/schema/Route/v2.0/schema.json new file mode 100644 index 0000000..922f2c9 --- /dev/null +++ b/schema/Route/v2.0/schema.json @@ -0,0 +1,65 @@ +{ + "$id": "https://schema.beckn.io/Route/v2.0", + "x-iri": "https://schema.beckn.io/Route/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Route", + "type": "object", + "description": "The physical or logical path followed by a transport service, defined as an ordered sequence of stops or waypoints.", + "properties": { + "routeId": { + "description": "Unique identifier for the route", + "type": "string" + }, + "shortName": { + "description": "Short public-facing name (e.g. 42A)", + "type": "string" + }, + "longName": { + "description": "Full descriptive name of the route", + "type": "string" + }, + "routeType": { + "description": "Mode of transport (e.g. BUS, RAIL, TRAM, FERRY)", + "type": "string" + }, + "operatorRef": { + "description": "Operator providing this route", + "$ref": "https://schema.beckn.io/Operator/v2.0/schema.json" + }, + "networkRef": { + "description": "Network this route belongs to", + "$ref": "https://schema.beckn.io/Network/v2.0/schema.json" + }, + "id": { + "description": "Unique identifier for the item", + "type": "string" + }, + "descriptor": { + "description": "Human-readable description of the item", + "$ref": "https://schema.beckn.io/Descriptor/v2.1/schema.json" + }, + "categoryId": { + "description": "Category code classifying the item", + "$ref": "https://schema.beckn.io/CategoryCode/v2.1/schema.json" + }, + "price": { + "description": "Price specification for this item", + "$ref": "https://schema.beckn.io/PriceSpecification/v2.1/schema.json" + }, + "quantity": { + "description": "Available quantity of the item", + "$ref": "https://schema.beckn.io/Quantity/v2.0/schema.json" + }, + "tags": { + "description": "Tags associated with the item", + "type": "string" + } + }, + "additionalProperties": false, + "x-tags": [ + "mobility", + "schema-org", + "transmodel-netex", + "ride-hailing" + ] +} diff --git a/schema/Route/v2.0/vocab.jsonld b/schema/Route/v2.0/vocab.jsonld new file mode 100644 index 0000000..3cf38a8 --- /dev/null +++ b/schema/Route/v2.0/vocab.jsonld @@ -0,0 +1,276 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/linked-data/latest-context.jsonld", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "skos": "http://www.w3.org/2004/02/skos/core#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "beckn:Route", + "@type": "owl:Class", + "rdfs:label": { + "@value": "Route", + "@language": "en" + }, + "rdfs:comment": { + "@value": "The physical or logical path followed by a transport service, defined as an ordered sequence of stops or waypoints.", + "@language": "en" + }, + "rdfs:seeAlso": [ + { + "@id": "https://schema.org/Trip" + }, + { + "@id": "beckn:Network" + }, + { + "@id": "beckn:Operator" + } + ] + }, + { + "@id": "beckn:routeId", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "routeId", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Unique identifier for the route", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Route" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:shortName", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "shortName", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Short public-facing name (e.g. 42A)", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Route" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:longName", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "longName", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Full descriptive name of the route", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Route" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:routeType", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "routeType", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Mode of transport (e.g. BUS, RAIL, TRAM, FERRY)", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Route" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:operatorRef", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "operatorRef", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Operator providing this route", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Route" + }, + "rdfs:range": { + "@id": "beckn:Operator" + }, + "rdfs:seeAlso": { + "@id": "../Operator/v2.0/vocab.jsonld#beckn:Operator" + } + }, + { + "@id": "beckn:networkRef", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "networkRef", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Network this route belongs to", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Route" + }, + "rdfs:range": { + "@id": "beckn:Network" + }, + "rdfs:seeAlso": { + "@id": "../Network/v2.0/vocab.jsonld#beckn:Network" + } + }, + { + "@id": "beckn:id", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "id", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Unique identifier for the item", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Route" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:descriptor", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "descriptor", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Human-readable description of the item", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Route" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#Descriptor" + } + }, + { + "@id": "beckn:categoryId", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "categoryId", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Category code classifying the item", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Route" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#CategoryCode" + } + }, + { + "@id": "beckn:price", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "price", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Price specification for this item", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Route" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#PriceSpecification" + } + }, + { + "@id": "beckn:quantity", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "quantity", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Available quantity of the item", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Route" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#Quantity" + } + }, + { + "@id": "beckn:tags", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "tags", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Tags associated with the item", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Route" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + } + ] +} diff --git a/schema/Shipment/README.md b/schema/Shipment/README.md index 18a03e4..edb21ea 100644 --- a/schema/Shipment/README.md +++ b/schema/Shipment/README.md @@ -1,13 +1,9 @@ # Shipment -A schema.beckn.io Type +A Shipment represents the movement of one or more packages from an origin to a destination. It is the top-level fulfillment entity in a logistics transaction and maps to beckn:Fulfillment. -The root fulfillment entity. A Shipment tracks the complete lifecycle of goods movement. +## Versions -**Canonical IRI :** `log:Shipment` - -**Canonical URL:** https://schema.beckn.io/logistics/Shipment - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Shipment/v2.0/attributes.yaml](https://schema.beckn.io/Shipment/v2.0/attributes.yaml) | [https://schema.beckn.io/Shipment/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Shipment/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Shipment/v2.0/context.jsonld](https://schema.beckn.io/Shipment/v2.0/context.jsonld) | [https://schema.beckn.io/Shipment/v2.0/vocab.jsonld](https://schema.beckn.io/Shipment/v2.0/vocab.jsonld) | [https://schema.beckn.io/Shipment/v2.0/README.md](https://schema.beckn.io/Shipment/v2.0/README.md) | diff --git a/schema/Shipment/v2.0/README.md b/schema/Shipment/v2.0/README.md new file mode 100644 index 0000000..0533fbb --- /dev/null +++ b/schema/Shipment/v2.0/README.md @@ -0,0 +1,46 @@ +# Shipment — v2.0 + +A Shipment represents the movement of one or more packages from an origin to a destination. It is the top-level fulfillment entity in a logistics transaction and maps to beckn:Fulfillment. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Shipment/attributes.yaml](https://schema.beckn.io/Shipment/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Shipment/v2.0/attributes.yaml](https://schema.beckn.io/Shipment/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Shipment/attributes.jsonschema.yaml](https://schema.beckn.io/Shipment/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Shipment/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Shipment/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Shipment/context.jsonld](https://schema.beckn.io/Shipment/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Shipment/v2.0/context.jsonld](https://schema.beckn.io/Shipment/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Shipment/vocab.jsonld](https://schema.beckn.io/Shipment/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Shipment/v2.0/vocab.jsonld](https://schema.beckn.io/Shipment/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | Unique identifier for the shipment | +| `trackingId` | no | string | Public tracking identifier shared with sender/receiver | +| `status` | yes | string | Current status of the shipment | +| `origin` | yes | $ref: https://schema.beckn.io/Place/v2.0/attributes.yaml#/components/schemas/Place | - | +| `destination` | yes | $ref: https://schema.beckn.io/Place/v2.0/attributes.yaml#/components/schemas/Place | - | +| `packages` | no | array | List of packages in this shipment | +| `carrier` | no | $ref: https://schema.beckn.io/Carrier/v2.0/attributes.yaml#/components/schemas/Carrier | - | +| `driver` | no | $ref: https://schema.beckn.io/Driver/v2.0/attributes.yaml#/components/schemas/Driver | - | +| `vehicle` | no | $ref: https://schema.beckn.io/Vehicle/v2.0/attributes.yaml#/components/schemas/Vehicle | - | +| `route` | no | $ref: https://schema.beckn.io/Route/v2.0/attributes.yaml#/components/schemas/Route | - | +| `scheduledPickup` | no | string | Scheduled pickup time | +| `estimatedDelivery` | no | string | Estimated delivery date and time | +| `actualDelivery` | no | string | Actual delivery date and time | +| `deliverySlot` | no | $ref: https://schema.beckn.io/DeliverySlot/v2.0/attributes.yaml#/components/schemas/DeliverySlot | - | +| `serviceType` | no | string | Type of logistics service | +| `specialInstructions` | no | string | Special handling instructions for the shipment | +| `proof` | no | $ref: https://schema.beckn.io/Proof/v2.0/attributes.yaml#/components/schemas/Proof | - | +| `fare` | no | $ref: https://schema.beckn.io/Fare/v2.0/attributes.yaml#/components/schemas/Fare | - | +| `receipt` | no | $ref: https://schema.beckn.io/Receipt/v2.0/attributes.yaml#/components/schemas/Receipt | - | +| `cancellationPolicy` | no | $ref: https://schema.beckn.io/CancellationPolicy/v2.0/attributes.yaml#/components/schemas/CancellationPolicy | - | +| `returnPolicy` | no | $ref: https://schema.beckn.io/ReturnPolicy/v2.0/attributes.yaml#/components/schemas/ReturnPolicy | - | +| `alerts` | no | array | Alerts raised for this shipment | +| `trackingUpdates` | no | array | History of tracking updates | +| `createdAt` | no | string | Timestamp when shipment was created | +| `updatedAt` | no | string | Timestamp of last update | diff --git a/schema/Shipment/v2.0/attributes.jsonschema.yaml b/schema/Shipment/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 9321316..0000000 --- a/schema/Shipment/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,130 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: Shipment JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - Shipment: - $ref: '#/$defs/Shipment' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - Shipment: - type: object - title: Shipment - description: 'A Shipment represents the movement of one or more packages from - an origin to a destination. It is the top-level fulfillment entity in a logistics - transaction and maps to beckn:Fulfillment. - - ' - required: - - id - - status - - origin - - destination - properties: - id: - type: string - description: Unique identifier for the shipment - example: SHP-2024-001234 - trackingId: - type: string - description: Public tracking identifier shared with sender/receiver - example: TRK9876543210IN - status: - type: string - description: Current status of the shipment - enum: - - CREATED - - PICKUP_PENDING - - PICKED_UP - - IN_TRANSIT - - AT_HUB - - OUT_FOR_DELIVERY - - DELIVERED - - FAILED_DELIVERY - - RETURNED - - CANCELLED - example: IN_TRANSIT - origin: - $ref: https://schema.beckn.io/LogisticsPlace/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsPlace - destination: - $ref: https://schema.beckn.io/LogisticsPlace/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsPlace - packages: - type: array - description: List of packages in this shipment - items: - $ref: https://schema.beckn.io/Package/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Package - carrier: - $ref: https://schema.beckn.io/Carrier/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Carrier - driver: - $ref: https://schema.beckn.io/LogisticsDriver/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsDriver - vehicle: - $ref: https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsVehicle - route: - $ref: https://schema.beckn.io/LogisticsRoute/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsRoute - scheduledPickup: - type: string - format: date-time - description: Scheduled pickup time - estimatedDelivery: - type: string - format: date-time - description: Estimated delivery date and time - actualDelivery: - type: string - format: date-time - description: Actual delivery date and time - deliverySlot: - $ref: https://schema.beckn.io/DeliverySlot/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/DeliverySlot - serviceType: - type: string - description: Type of logistics service - enum: - - HYPERLOCAL - - COURIER - - INTERSTATE - - LONG_HAUL - - EXPRESS - example: EXPRESS - specialInstructions: - type: string - description: Special handling instructions for the shipment - example: Handle with care. Do not tilt. - proof: - $ref: https://schema.beckn.io/Proof/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Proof - fare: - $ref: https://schema.beckn.io/LogisticsFare/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsFare - receipt: - $ref: https://schema.beckn.io/LogisticsReceipt/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsReceipt - cancellationPolicy: - $ref: https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsCancellationPolicy - returnPolicy: - $ref: https://schema.beckn.io/ReturnPolicy/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/ReturnPolicy - alerts: - type: array - description: Alerts raised for this shipment - items: - $ref: https://schema.beckn.io/LogisticsAlert/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsAlert - trackingUpdates: - type: array - description: History of tracking updates - items: - $ref: https://schema.beckn.io/TrackingUpdate/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/TrackingUpdate - createdAt: - type: string - format: date-time - description: Timestamp when shipment was created - updatedAt: - type: string - format: date-time - description: Timestamp of last update diff --git a/schema/Shipment/v2.0/attributes.yaml b/schema/Shipment/v2.0/attributes.yaml index 9d19e04..0fdbcb1 100644 --- a/schema/Shipment/v2.0/attributes.yaml +++ b/schema/Shipment/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: Shipment version: 2.0.0 description: Schema definition for the Shipment entity in the Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Shipment: + x-iri: https://schema.beckn.io/Shipment/v2.0 type: object title: Shipment - description: 'A Shipment represents the movement of one or more packages from - an origin to a destination. It is the top-level fulfillment entity in a logistics - transaction and maps to beckn:Fulfillment. + description: 'A Shipment represents the movement of one or more packages from an origin to a destination. It is the top-level fulfillment entity in a logistics transaction and maps to beckn:Fulfillment. ' required: @@ -61,11 +58,11 @@ components: carrier: $ref: https://schema.beckn.io/Carrier/v2.0/attributes.yaml#/components/schemas/Carrier driver: - $ref: https://schema.beckn.io/LogisticsDriver/v2.0/attributes.yaml#/components/schemas/LogisticsDriver + $ref: https://schema.beckn.io/Driver/v2.0/attributes.yaml#/components/schemas/Driver vehicle: - $ref: https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.yaml#/components/schemas/LogisticsVehicle + $ref: https://schema.beckn.io/Vehicle/v2.0/attributes.yaml#/components/schemas/Vehicle route: - $ref: https://schema.beckn.io/LogisticsRoute/v2.0/attributes.yaml#/components/schemas/LogisticsRoute + $ref: https://schema.beckn.io/Route/v2.0/attributes.yaml#/components/schemas/Route scheduledPickup: type: string format: date-time @@ -97,18 +94,18 @@ components: proof: $ref: https://schema.beckn.io/Proof/v2.0/attributes.yaml#/components/schemas/Proof fare: - $ref: https://schema.beckn.io/LogisticsFare/v2.0/attributes.yaml#/components/schemas/LogisticsFare + $ref: https://schema.beckn.io/Fare/v2.0/attributes.yaml#/components/schemas/Fare receipt: $ref: https://schema.beckn.io/LogisticsReceipt/v2.0/attributes.yaml#/components/schemas/LogisticsReceipt cancellationPolicy: - $ref: https://schema.beckn.io/LogisticsCancellationPolicy/v2.0/attributes.yaml#/components/schemas/LogisticsCancellationPolicy + $ref: https://schema.beckn.io/CancellationPolicy/v2.0/attributes.yaml#/components/schemas/CancellationPolicy returnPolicy: $ref: https://schema.beckn.io/ReturnPolicy/v2.0/attributes.yaml#/components/schemas/ReturnPolicy alerts: type: array description: Alerts raised for this shipment items: - $ref: https://schema.beckn.io/LogisticsAlert/v2.0/attributes.yaml#/components/schemas/LogisticsAlert + $ref: https://schema.beckn.io/Alert/v2.0/attributes.yaml#/components/schemas/Alert trackingUpdates: type: array description: History of tracking updates diff --git a/schema/Shipment/v2.0/context.jsonld b/schema/Shipment/v2.0/context.jsonld new file mode 100644 index 0000000..a7ecc10 --- /dev/null +++ b/schema/Shipment/v2.0/context.jsonld @@ -0,0 +1,36 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "Shipment": "beckn:Shipment", + "actualDelivery": "beckn:actualDelivery", + "alerts": "beckn:alerts", + "cancellationPolicy": "beckn:cancellationPolicy", + "carrier": "beckn:carrier", + "createdAt": "beckn:createdAt", + "deliverySlot": "beckn:deliverySlot", + "destination": "beckn:destination", + "driver": "beckn:driver", + "estimatedDelivery": "beckn:estimatedDelivery", + "fare": "beckn:fare", + "id": "beckn:id", + "origin": "beckn:origin", + "packages": "beckn:packages", + "proof": "beckn:proof", + "receipt": "beckn:receipt", + "returnPolicy": "beckn:returnPolicy", + "route": "beckn:route", + "scheduledPickup": "beckn:scheduledPickup", + "serviceType": "beckn:serviceType", + "specialInstructions": "beckn:specialInstructions", + "status": "beckn:status", + "trackingId": "beckn:trackingId", + "trackingUpdates": "beckn:trackingUpdates", + "updatedAt": "beckn:updatedAt", + "vehicle": "beckn:vehicle" + } +} diff --git a/schema/Shipment/v2.0/schema.json b/schema/Shipment/v2.0/schema.json new file mode 100644 index 0000000..c6d19c4 --- /dev/null +++ b/schema/Shipment/v2.0/schema.json @@ -0,0 +1,142 @@ +{ + "type": "object", + "title": "Shipment", + "description": "A Shipment represents the movement of one or more packages from an origin to a destination. It is the top-level fulfillment entity in a logistics transaction and maps to beckn:Fulfillment. ", + "required": [ + "id", + "status", + "origin", + "destination" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the shipment", + "example": "SHP-2024-001234" + }, + "trackingId": { + "type": "string", + "description": "Public tracking identifier shared with sender/receiver", + "example": "TRK9876543210IN" + }, + "status": { + "type": "string", + "description": "Current status of the shipment", + "enum": [ + "CREATED", + "PICKUP_PENDING", + "PICKED_UP", + "IN_TRANSIT", + "AT_HUB", + "OUT_FOR_DELIVERY", + "DELIVERED", + "FAILED_DELIVERY", + "RETURNED", + "CANCELLED" + ], + "example": "IN_TRANSIT" + }, + "origin": { + "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + }, + "destination": { + "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + }, + "packages": { + "type": "array", + "description": "List of packages in this shipment", + "items": { + "$ref": "https://schema.beckn.io/Package/v2.0/schema.json" + } + }, + "carrier": { + "$ref": "https://schema.beckn.io/Carrier/v2.0/schema.json" + }, + "driver": { + "$ref": "https://schema.beckn.io/Driver/v2.0/schema.json" + }, + "vehicle": { + "$ref": "https://schema.beckn.io/Vehicle/v2.0/schema.json" + }, + "route": { + "$ref": "https://schema.beckn.io/Route/v2.0/schema.json" + }, + "scheduledPickup": { + "type": "string", + "format": "date-time", + "description": "Scheduled pickup time" + }, + "estimatedDelivery": { + "type": "string", + "format": "date-time", + "description": "Estimated delivery date and time" + }, + "actualDelivery": { + "type": "string", + "format": "date-time", + "description": "Actual delivery date and time" + }, + "deliverySlot": { + "$ref": "https://schema.beckn.io/DeliverySlot/v2.0/schema.json" + }, + "serviceType": { + "type": "string", + "description": "Type of logistics service", + "enum": [ + "HYPERLOCAL", + "COURIER", + "INTERSTATE", + "LONG_HAUL", + "EXPRESS" + ], + "example": "EXPRESS" + }, + "specialInstructions": { + "type": "string", + "description": "Special handling instructions for the shipment", + "example": "Handle with care. Do not tilt." + }, + "proof": { + "$ref": "https://schema.beckn.io/Proof/v2.0/schema.json" + }, + "fare": { + "$ref": "https://schema.beckn.io/Fare/v2.0/schema.json" + }, + "receipt": { + "$ref": "https://schema.beckn.io/Receipt/v2.0/schema.json" + }, + "cancellationPolicy": { + "$ref": "https://schema.beckn.io/CancellationPolicy/v2.0/schema.json" + }, + "returnPolicy": { + "$ref": "https://schema.beckn.io/ReturnPolicy/v2.0/schema.json" + }, + "alerts": { + "type": "array", + "description": "Alerts raised for this shipment", + "items": { + "$ref": "https://schema.beckn.io/Alert/v2.0/schema.json" + } + }, + "trackingUpdates": { + "type": "array", + "description": "History of tracking updates", + "items": { + "$ref": "https://schema.beckn.io/TrackingUpdate/v2.0/schema.json" + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Timestamp when shipment was created" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "Timestamp of last update" + } + }, + "$id": "https://schema.beckn.io/Shipment/v2.0", + "x-iri": "https://schema.beckn.io/Shipment/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/Shipment/v2.0/vocab.jsonld b/schema/Shipment/v2.0/vocab.jsonld new file mode 100644 index 0000000..ff5bd58 --- /dev/null +++ b/schema/Shipment/v2.0/vocab.jsonld @@ -0,0 +1,45 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "Shipment": "beckn:Shipment", + "actualDelivery": "beckn:actualDelivery", + "alerts": "beckn:alerts", + "cancellationPolicy": "beckn:cancellationPolicy", + "carrier": "beckn:carrier", + "createdAt": "beckn:createdAt", + "deliverySlot": "beckn:deliverySlot", + "destination": "beckn:destination", + "driver": "beckn:driver", + "estimatedDelivery": "beckn:estimatedDelivery", + "fare": "beckn:fare", + "id": "beckn:id", + "origin": "beckn:origin", + "packages": "beckn:packages", + "proof": "beckn:proof", + "receipt": "beckn:receipt", + "returnPolicy": "beckn:returnPolicy", + "route": "beckn:route", + "scheduledPickup": "beckn:scheduledPickup", + "serviceType": "beckn:serviceType", + "specialInstructions": "beckn:specialInstructions", + "status": "beckn:status", + "trackingId": "beckn:trackingId", + "trackingUpdates": "beckn:trackingUpdates", + "updatedAt": "beckn:updatedAt", + "vehicle": "beckn:vehicle" + }, + "@graph": [ + { + "@id": "beckn:Shipment", + "@type": "rdfs:Class", + "rdfs:label": "Shipment", + "rdfs:comment": "TODO: Description Needed - Shipment" + } + ] +} diff --git a/schema/SupportCase/README.md b/schema/SupportCase/README.md index 30cdbb5..bee92ed 100644 --- a/schema/SupportCase/README.md +++ b/schema/SupportCase/README.md @@ -1,13 +1,9 @@ # SupportCase -## Overview -**SupportCase** is a customer support ticket raised for shipment issues such as loss, damage, delay, billing disputes, or driver misconduct. +A domain-agnostic customer support ticket used to record an issue raised between parties — its category, priority, lifecycle status, supporting attachments, and support interaction sessions. It is independent of any particular domain; domain-specific values are carried via the category descriptor and the extensible attribute bags. A SupportCase has an `UNRESOLVED` / `RESOLVED` lifecycle and underpins disputes: a Dispute cannot be raised until at least one unresolved SupportCase is attached. -## IRI -`https://schema.beckn.org/logistics/SupportCase` +## Versions -## Issue Types -- SHIPMENT_LOST, SHIPMENT_DAMAGED, DELIVERY_DELAYED, BILLING_DISPUTE, DRIVER_MISCONDUCT - -## Version -Current version: **v2.0** — [v2.0/attributes.yaml](./v2.0/attributes.yaml) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/SupportCase/v2.0/attributes.yaml](https://schema.beckn.io/SupportCase/v2.0/attributes.yaml) | [https://schema.beckn.io/SupportCase/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/SupportCase/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/SupportCase/v2.0/context.jsonld](https://schema.beckn.io/SupportCase/v2.0/context.jsonld) | [https://schema.beckn.io/SupportCase/v2.0/vocab.jsonld](https://schema.beckn.io/SupportCase/v2.0/vocab.jsonld) | [https://schema.beckn.io/SupportCase/v2.0/README.md](https://schema.beckn.io/SupportCase/v2.0/README.md) | diff --git a/schema/SupportCase/v2.0/README.md b/schema/SupportCase/v2.0/README.md new file mode 100644 index 0000000..57d05ba --- /dev/null +++ b/schema/SupportCase/v2.0/README.md @@ -0,0 +1,38 @@ +# SupportCase — v2.0 + +A domain-agnostic customer support ticket used to record an issue raised between parties — its category, priority, lifecycle status, supporting attachments, and support interaction sessions. It is independent of any particular domain; domain-specific values are carried via the `category` descriptor and the extensible attribute bags. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/SupportCase/v2.0/attributes.yaml](https://schema.beckn.io/SupportCase/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/SupportCase/v2.0/context.jsonld](https://schema.beckn.io/SupportCase/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/SupportCase/v2.0/vocab.jsonld](https://schema.beckn.io/SupportCase/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Design notes + +- **`category`** (Descriptor) classifies the issue — the domain defines the code. +- **`priority`** is an open-enum string — suggested values `P1`, `P2`, `P3`, with custom values allowed. +- **`status`** is a Descriptor with `code` ∈ `UNRESOLVED`, `RESOLVED` (default `UNRESOLVED`). +- **`attachments`** reuse `Document/v2.0`; **`sessions`** capture support interactions over a `CommunicationChannel` with associated `MediaFile` data. + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `@context` | yes | string | JSON-LD context reference | +| `@type` | yes | string | JSON-LD type | +| `id` | yes | string | Stable support case identifier. | +| `category` | yes | $ref: Descriptor/v2.1 | Issue category; `code` defined by the domain. | +| `description` | no | string | Human-readable description of the issue. | +| `priority` | no | string (open enum) | Priority; suggested `P1`/`P2`/`P3`, custom values allowed. | +| `status` | no | allOf: Descriptor (code ∈ UNRESOLVED, RESOLVED; default UNRESOLVED) | Lifecycle state of the case. | +| `raisedBy` | no | string | Party who raised the case. | +| `assignedAgent` | no | string | Support agent the case is assigned to. | +| `attachments` | no | array of Document/v2.0 | Supporting attachments / evidence. | +| `sessions` | no | array of `{ id, supportChannel, data }` | Support interaction sessions. `supportChannel` is a CommunicationChannel/v2.0; `data` is a MediaFile/v2.0. | +| `claimAmount` | no | number | Amount claimed, if any. | +| `resolution` | no | string | Resolution details, once resolved. | +| `createdAt` | no | string (date-time) | When the case was created. | +| `resolvedAt` | no | string (date-time) | When the case was resolved. | diff --git a/schema/SupportCase/v2.0/attributes.yaml b/schema/SupportCase/v2.0/attributes.yaml index 50aab09..900b040 100644 --- a/schema/SupportCase/v2.0/attributes.yaml +++ b/schema/SupportCase/v2.0/attributes.yaml @@ -1,89 +1,105 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: SupportCase version: 2.0.0 - description: Schema for SupportCase in Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for SupportCase in the Beckn Protocol v2.0.1 license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: SupportCase: - type: object + x-iri: https://schema.beckn.io/SupportCase/v2.0 + description: A domain-agnostic customer support ticket used to record an issue + raised between parties — its category, priority, lifecycle status, supporting + attachments, and support interaction sessions. It is independent of any + particular domain; domain-specific values are carried via the category + descriptor and the extensible attribute bags. title: SupportCase - description: Customer support ticket for shipment issues — loss, damage, delay, or billing. - required: - - id - - issueType - - shipmentId + type: object properties: id: + description: Stable support case identifier. type: string - example: "SUP-2024-00789" - shipmentId: - type: string - issueType: - type: string - enum: - - SHIPMENT_LOST - - SHIPMENT_DAMAGED - - DELIVERY_DELAYED - - WRONG_ITEM_DELIVERED - - BILLING_DISPUTE - - DRIVER_MISCONDUCT - - OTHER - example: "DELIVERY_DELAYED" + example: SUP-2024-00789 + category: + description: The category of the issue, expressed as a Descriptor whose code + is defined by the domain (e.g. SHIPMENT_LOST, BILLING_DISPUTE, + SERVICE_QUALITY). + $ref: https://schema.beckn.io/Descriptor/v2.1/attributes.yaml#/components/schemas/Descriptor description: + description: Human-readable description of the issue. type: string - example: "My package was supposed to be delivered yesterday but has not arrived." priority: - type: string - enum: - - LOW - - MEDIUM - - HIGH - - URGENT - example: "MEDIUM" + description: Priority of the support case. Suggested values are P1, P2, P3; + custom string values are also allowed. + anyOf: + - type: string + enum: + - P1 + - P2 + - P3 + - type: string status: - type: string - enum: - - OPEN - - IN_PROGRESS - - AWAITING_CUSTOMER - - RESOLVED - - CLOSED - example: "OPEN" + description: The lifecycle state of the support case expressed as a Descriptor + whose code MUST be one of the standard values. + allOf: + - $ref: https://schema.beckn.io/Descriptor/v2.1/attributes.yaml#/components/schemas/Descriptor + - type: object + properties: + code: + enum: + - UNRESOLVED + - RESOLVED + default: UNRESOLVED raisedBy: + description: Identifier of the party who raised the support case. type: string - description: User ID who raised the ticket assignedAgent: + description: Identifier of the support agent the case is assigned to. type: string - description: Support agent ID attachments: + description: Supporting attachments / evidence for the case — documents, + images, or other artifacts, distinguished by mimeType. + type: array + items: + $ref: https://schema.beckn.io/Document/v2.0/attributes.yaml#/components/schemas/Document + sessions: + description: Support interaction sessions associated with this case. Each + session records the channel used and any media exchanged. type: array - description: Photo/document evidence items: type: object properties: - url: - type: string - format: uri - type: + id: + description: Identifier of this session. type: string - enum: [PHOTO, DOCUMENT] + supportChannel: + description: The channel over which this session took place. + $ref: https://schema.beckn.io/CommunicationChannel/v2.0/attributes.yaml#/components/schemas/CommunicationChannel + data: + description: Media captured or exchanged during the session. + $ref: https://schema.beckn.io/MediaFile/v2.0/attributes.yaml#/components/schemas/MediaFile + additionalProperties: false claimAmount: + description: Amount claimed in relation to this case, if any. type: number - description: Amount claimed for loss/damage resolution: + description: Resolution details, once the case is resolved. type: string - description: Resolution details createdAt: + description: Timestamp at which the case was created. type: string format: date-time resolvedAt: + description: Timestamp at which the case was resolved. type: string format: date-time + required: + - id + - category + additionalProperties: false + x-tags: + - common diff --git a/schema/SupportCase/v2.0/context.jsonld b/schema/SupportCase/v2.0/context.jsonld new file mode 100644 index 0000000..8c54ff8 --- /dev/null +++ b/schema/SupportCase/v2.0/context.jsonld @@ -0,0 +1,24 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "beckn": "https://schema.beckn.io/LinkedData/v2.0/context.jsonld", + "SupportCase": "beckn:SupportCase", + "assignedAgent": "beckn:assignedAgent", + "attachments": "beckn:attachments", + "category": "beckn:category", + "claimAmount": "beckn:claimAmount", + "code": "beckn:code", + "createdAt": "beckn:createdAt", + "data": "beckn:data", + "description": "beckn:description", + "id": "beckn:id", + "priority": "beckn:priority", + "raisedBy": "beckn:raisedBy", + "resolution": "beckn:resolution", + "resolvedAt": "beckn:resolvedAt", + "sessions": "beckn:sessions", + "status": "beckn:status", + "supportChannel": "beckn:supportChannel" + } +} diff --git a/schema/SupportCase/v2.0/schema.json b/schema/SupportCase/v2.0/schema.json new file mode 100644 index 0000000..a924ac8 --- /dev/null +++ b/schema/SupportCase/v2.0/schema.json @@ -0,0 +1,122 @@ +{ + "$id": "https://schema.beckn.io/SupportCase/v2.0", + "x-iri": "https://schema.beckn.io/SupportCase/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A domain-agnostic customer support ticket used to record an issue raised between parties — its category, priority, lifecycle status, supporting attachments, and support interaction sessions. It is independent of any particular domain; domain-specific values are carried via the category descriptor and the extensible attribute bags.", + "title": "SupportCase", + "type": "object", + "properties": { + "id": { + "description": "Stable support case identifier.", + "type": "string", + "example": "SUP-2024-00789" + }, + "category": { + "description": "The category of the issue, expressed as a Descriptor whose code is defined by the domain (e.g. SHIPMENT_LOST, BILLING_DISPUTE, SERVICE_QUALITY).", + "$ref": "https://schema.beckn.io/Descriptor/v2.1/schema.json" + }, + "description": { + "description": "Human-readable description of the issue.", + "type": "string" + }, + "priority": { + "description": "Priority of the support case. Suggested values are P1, P2, P3; custom string values are also allowed.", + "anyOf": [ + { + "type": "string", + "enum": [ + "P1", + "P2", + "P3" + ] + }, + { + "type": "string" + } + ] + }, + "status": { + "description": "The lifecycle state of the support case expressed as a Descriptor whose code MUST be one of the standard values.", + "allOf": [ + { + "$ref": "https://schema.beckn.io/Descriptor/v2.1/schema.json" + }, + { + "type": "object", + "properties": { + "code": { + "enum": [ + "UNRESOLVED", + "RESOLVED" + ], + "default": "UNRESOLVED" + } + } + } + ] + }, + "raisedBy": { + "description": "Identifier of the party who raised the support case.", + "type": "string" + }, + "assignedAgent": { + "description": "Identifier of the support agent the case is assigned to.", + "type": "string" + }, + "attachments": { + "description": "Supporting attachments / evidence for the case — documents, images, or other artifacts, distinguished by mimeType.", + "type": "array", + "items": { + "$ref": "https://schema.beckn.io/Document/v2.0/schema.json" + } + }, + "sessions": { + "description": "Support interaction sessions associated with this case. Each session records the channel used and any media exchanged.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "Identifier of this session.", + "type": "string" + }, + "supportChannel": { + "description": "The channel over which this session took place.", + "$ref": "https://schema.beckn.io/CommunicationChannel/v2.0/schema.json" + }, + "data": { + "description": "Media captured or exchanged during the session.", + "$ref": "https://schema.beckn.io/MediaFile/v2.0/schema.json" + } + }, + "additionalProperties": false + } + }, + "claimAmount": { + "description": "Amount claimed in relation to this case, if any.", + "type": "number" + }, + "resolution": { + "description": "Resolution details, once the case is resolved.", + "type": "string" + }, + "createdAt": { + "description": "Timestamp at which the case was created.", + "type": "string", + "format": "date-time" + }, + "resolvedAt": { + "description": "Timestamp at which the case was resolved.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "category" + ], + "additionalProperties": false, + "x-tags": [ + "common" + ] +} diff --git a/schema/SupportCase/v2.0/vocab.jsonld b/schema/SupportCase/v2.0/vocab.jsonld new file mode 100644 index 0000000..059221b --- /dev/null +++ b/schema/SupportCase/v2.0/vocab.jsonld @@ -0,0 +1,129 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/LinkedData/v2.0/context.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "SupportCase": "beckn:SupportCase", + "assignedAgent": "beckn:assignedAgent", + "attachments": "beckn:attachments", + "category": "beckn:category", + "claimAmount": "beckn:claimAmount", + "code": "beckn:code", + "createdAt": "beckn:createdAt", + "data": "beckn:data", + "description": "beckn:description", + "id": "beckn:id", + "priority": "beckn:priority", + "raisedBy": "beckn:raisedBy", + "resolution": "beckn:resolution", + "resolvedAt": "beckn:resolvedAt", + "sessions": "beckn:sessions", + "status": "beckn:status", + "supportChannel": "beckn:supportChannel" + }, + "@graph": [ + { + "@id": "beckn:SupportCase", + "@type": "rdfs:Class", + "rdfs:label": "SupportCase", + "rdfs:comment": "A domain-agnostic customer support ticket used to record an issue raised between parties — its category, priority, lifecycle status, supporting attachments, and support interaction sessions. It is independent of any particular domain; domain-specific values are carried via the category descriptor and the extensible attribute bags." + }, + { + "@id": "beckn:assignedAgent", + "@type": "rdf:Property", + "rdfs:label": "assignedAgent", + "rdfs:comment": "Identifier of the support agent the case is assigned to." + }, + { + "@id": "beckn:attachments", + "@type": "rdf:Property", + "rdfs:label": "attachments", + "rdfs:comment": "Supporting attachments / evidence for the case — documents, images, or other artifacts, distinguished by mimeType." + }, + { + "@id": "beckn:category", + "@type": "rdf:Property", + "rdfs:label": "category", + "rdfs:comment": "The category of the issue, expressed as a Descriptor whose code is defined by the domain (e.g. SHIPMENT_LOST, BILLING_DISPUTE, SERVICE_QUALITY)." + }, + { + "@id": "beckn:claimAmount", + "@type": "rdf:Property", + "rdfs:label": "claimAmount", + "rdfs:comment": "Amount claimed in relation to this case, if any." + }, + { + "@id": "beckn:code", + "@type": "rdf:Property", + "rdfs:label": "code", + "rdfs:comment": "Property code" + }, + { + "@id": "beckn:createdAt", + "@type": "rdf:Property", + "rdfs:label": "createdAt", + "rdfs:comment": "Timestamp at which the case was created." + }, + { + "@id": "beckn:data", + "@type": "rdf:Property", + "rdfs:label": "data", + "rdfs:comment": "Media captured or exchanged during the session." + }, + { + "@id": "beckn:description", + "@type": "rdf:Property", + "rdfs:label": "description", + "rdfs:comment": "Human-readable description of the issue." + }, + { + "@id": "beckn:id", + "@type": "rdf:Property", + "rdfs:label": "id", + "rdfs:comment": "Stable support case identifier." + }, + { + "@id": "beckn:priority", + "@type": "rdf:Property", + "rdfs:label": "priority", + "rdfs:comment": "Priority of the support case. Suggested values are P1, P2, P3; custom string values are also allowed." + }, + { + "@id": "beckn:raisedBy", + "@type": "rdf:Property", + "rdfs:label": "raisedBy", + "rdfs:comment": "Identifier of the party who raised the support case." + }, + { + "@id": "beckn:resolution", + "@type": "rdf:Property", + "rdfs:label": "resolution", + "rdfs:comment": "Resolution details, once the case is resolved." + }, + { + "@id": "beckn:resolvedAt", + "@type": "rdf:Property", + "rdfs:label": "resolvedAt", + "rdfs:comment": "Timestamp at which the case was resolved." + }, + { + "@id": "beckn:sessions", + "@type": "rdf:Property", + "rdfs:label": "sessions", + "rdfs:comment": "Support interaction sessions associated with this case. Each session records the channel used and any media exchanged." + }, + { + "@id": "beckn:status", + "@type": "rdf:Property", + "rdfs:label": "status", + "rdfs:comment": "The lifecycle state of the support case expressed as a Descriptor whose code MUST be one of the standard values." + }, + { + "@id": "beckn:supportChannel", + "@type": "rdf:Property", + "rdfs:label": "supportChannel", + "rdfs:comment": "The channel over which this session took place." + } + ] +} diff --git a/schema/TrackingUpdate/README.md b/schema/TrackingUpdate/README.md index 8e4d291..7bc1643 100644 --- a/schema/TrackingUpdate/README.md +++ b/schema/TrackingUpdate/README.md @@ -1,13 +1,9 @@ # TrackingUpdate -A schema.beckn.io Type +A TrackingUpdate is a real-time or periodic update on the status and location of a shipment during transit. Maps to beckn:Event. -Lifecycle event for shipments. Status progression: +## Versions -**Canonical IRI :** `log:TrackingUpdate` - -**Canonical URL:** https://schema.beckn.io/logistics/TrackingUpdate - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/TrackingUpdate/v2.0/attributes.yaml](https://schema.beckn.io/TrackingUpdate/v2.0/attributes.yaml) | [https://schema.beckn.io/TrackingUpdate/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/TrackingUpdate/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/TrackingUpdate/v2.0/context.jsonld](https://schema.beckn.io/TrackingUpdate/v2.0/context.jsonld) | [https://schema.beckn.io/TrackingUpdate/v2.0/vocab.jsonld](https://schema.beckn.io/TrackingUpdate/v2.0/vocab.jsonld) | [https://schema.beckn.io/TrackingUpdate/v2.0/README.md](https://schema.beckn.io/TrackingUpdate/v2.0/README.md) | diff --git a/schema/TrackingUpdate/v2.0/README.md b/schema/TrackingUpdate/v2.0/README.md new file mode 100644 index 0000000..a9bffc2 --- /dev/null +++ b/schema/TrackingUpdate/v2.0/README.md @@ -0,0 +1,33 @@ +# TrackingUpdate — v2.0 + +A TrackingUpdate is a real-time or periodic update on the status and location of a shipment during transit. Maps to beckn:Event. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/TrackingUpdate/attributes.yaml](https://schema.beckn.io/TrackingUpdate/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/TrackingUpdate/v2.0/attributes.yaml](https://schema.beckn.io/TrackingUpdate/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/TrackingUpdate/attributes.jsonschema.yaml](https://schema.beckn.io/TrackingUpdate/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/TrackingUpdate/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/TrackingUpdate/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/TrackingUpdate/context.jsonld](https://schema.beckn.io/TrackingUpdate/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/TrackingUpdate/v2.0/context.jsonld](https://schema.beckn.io/TrackingUpdate/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/TrackingUpdate/vocab.jsonld](https://schema.beckn.io/TrackingUpdate/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/TrackingUpdate/v2.0/vocab.jsonld](https://schema.beckn.io/TrackingUpdate/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | - | +| `shipmentId` | yes | string | - | +| `status` | yes | string | - | +| `location` | no | object | - | +| `timestamp` | yes | string | - | +| `message` | no | string | Human-readable status message | +| `hub` | no | $ref: https://schema.beckn.io/Hub/v2.0/attributes.yaml#/components/schemas/Hub | - | +| `driver` | no | $ref: https://schema.beckn.io/Driver/v2.0/attributes.yaml#/components/schemas/Driver | - | +| `vehicle` | no | $ref: https://schema.beckn.io/Vehicle/v2.0/attributes.yaml#/components/schemas/Vehicle | - | +| `exceptionDetails` | no | object | Details if this update is an exception | +| `nextAction` | no | string | Next planned action | +| `notificationSent` | no | boolean | Whether customer was notified of this update | diff --git a/schema/TrackingUpdate/v2.0/attributes.jsonschema.yaml b/schema/TrackingUpdate/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 72836c8..0000000 --- a/schema/TrackingUpdate/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,102 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: TrackingUpdate JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - TrackingUpdate: - $ref: '#/$defs/TrackingUpdate' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - TrackingUpdate: - type: object - title: TrackingUpdate - description: 'A TrackingUpdate is a real-time or periodic update on the status - and location of a shipment during transit. Maps to beckn:Event. - - ' - required: - - id - - shipmentId - - status - - timestamp - properties: - id: - type: string - example: TRK-EVT-00123 - shipmentId: - type: string - example: SHP-2024-001234 - status: - type: string - enum: - - BOOKED - - PICKED_UP - - IN_TRANSIT - - AT_HUB - - OUT_FOR_DELIVERY - - DELIVERED - - FAILED_DELIVERY - - RETURNED - - EXCEPTION - example: IN_TRANSIT - location: - type: object - properties: - lat: - type: number - example: 17.385 - lng: - type: number - example: 78.4867 - address: - type: string - example: Near Hyderabad Sorting Hub, NH-44 - timestamp: - type: string - format: date-time - example: '2024-03-15T14:30:00+05:30' - message: - type: string - description: Human-readable status message - example: Your shipment has arrived at Hyderabad hub and is being sorted. - hub: - $ref: https://schema.beckn.io/Hub/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/Hub - driver: - $ref: https://schema.beckn.io/LogisticsDriver/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsDriver - vehicle: - $ref: https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsVehicle - exceptionDetails: - type: object - description: Details if this update is an exception - properties: - reason: - type: string - enum: - - ADDRESS_NOT_FOUND - - CONSIGNEE_UNAVAILABLE - - ACCESS_DENIED - - NATURAL_DISASTER - - VEHICLE_BREAKDOWN - - CUSTOMS_HOLD - example: CONSIGNEE_UNAVAILABLE - remarks: - type: string - nextAction: - type: string - description: Next planned action - example: Re-delivery attempt scheduled for tomorrow 10 AM - 1 PM - notificationSent: - type: boolean - description: Whether customer was notified of this update - example: true diff --git a/schema/TrackingUpdate/v2.0/attributes.yaml b/schema/TrackingUpdate/v2.0/attributes.yaml index 512d4a6..133315b 100644 --- a/schema/TrackingUpdate/v2.0/attributes.yaml +++ b/schema/TrackingUpdate/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: TrackingUpdate version: 2.0.0 - description: Schema definition for the TrackingUpdate entity in the Beckn Logistics - domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the TrackingUpdate entity in the Beckn Logistics domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: TrackingUpdate: + x-iri: https://schema.beckn.io/TrackingUpdate/v2.0 type: object title: TrackingUpdate - description: 'A TrackingUpdate is a real-time or periodic update on the status - and location of a shipment during transit. Maps to beckn:Event. + description: 'A TrackingUpdate is a real-time or periodic update on the status and location of a shipment during transit. Maps to beckn:Event. ' required: @@ -68,9 +65,9 @@ components: hub: $ref: https://schema.beckn.io/Hub/v2.0/attributes.yaml#/components/schemas/Hub driver: - $ref: https://schema.beckn.io/LogisticsDriver/v2.0/attributes.yaml#/components/schemas/LogisticsDriver + $ref: https://schema.beckn.io/Driver/v2.0/attributes.yaml#/components/schemas/Driver vehicle: - $ref: https://schema.beckn.io/LogisticsVehicle/v2.0/attributes.yaml#/components/schemas/LogisticsVehicle + $ref: https://schema.beckn.io/Vehicle/v2.0/attributes.yaml#/components/schemas/Vehicle exceptionDetails: type: object description: Details if this update is an exception diff --git a/schema/TrackingUpdate/v2.0/context.jsonld b/schema/TrackingUpdate/v2.0/context.jsonld new file mode 100644 index 0000000..99725e4 --- /dev/null +++ b/schema/TrackingUpdate/v2.0/context.jsonld @@ -0,0 +1,28 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "TrackingUpdate": "beckn:TrackingUpdate", + "address": "beckn:address", + "driver": "beckn:driver", + "exceptionDetails": "beckn:exceptionDetails", + "hub": "beckn:hub", + "id": "beckn:id", + "lat": "beckn:lat", + "lng": "beckn:lng", + "location": "beckn:location", + "message": "beckn:message", + "nextAction": "beckn:nextAction", + "notificationSent": "beckn:notificationSent", + "reason": "beckn:reason", + "remarks": "beckn:remarks", + "shipmentId": "beckn:shipmentId", + "status": "beckn:status", + "timestamp": "beckn:timestamp", + "vehicle": "beckn:vehicle" + } +} diff --git a/schema/TrackingUpdate/v2.0/schema.json b/schema/TrackingUpdate/v2.0/schema.json new file mode 100644 index 0000000..05e1f05 --- /dev/null +++ b/schema/TrackingUpdate/v2.0/schema.json @@ -0,0 +1,106 @@ +{ + "type": "object", + "title": "TrackingUpdate", + "description": "A TrackingUpdate is a real-time or periodic update on the status and location of a shipment during transit. Maps to beckn:Event. ", + "required": [ + "id", + "shipmentId", + "status", + "timestamp" + ], + "properties": { + "id": { + "type": "string", + "example": "TRK-EVT-00123" + }, + "shipmentId": { + "type": "string", + "example": "SHP-2024-001234" + }, + "status": { + "type": "string", + "enum": [ + "BOOKED", + "PICKED_UP", + "IN_TRANSIT", + "AT_HUB", + "OUT_FOR_DELIVERY", + "DELIVERED", + "FAILED_DELIVERY", + "RETURNED", + "EXCEPTION" + ], + "example": "IN_TRANSIT" + }, + "location": { + "type": "object", + "properties": { + "lat": { + "type": "number", + "example": 17.385 + }, + "lng": { + "type": "number", + "example": 78.4867 + }, + "address": { + "type": "string", + "example": "Near Hyderabad Sorting Hub, NH-44" + } + } + }, + "timestamp": { + "type": "string", + "format": "date-time", + "example": "2024-03-15T14:30:00+05:30" + }, + "message": { + "type": "string", + "description": "Human-readable status message", + "example": "Your shipment has arrived at Hyderabad hub and is being sorted." + }, + "hub": { + "$ref": "https://schema.beckn.io/Hub/v2.0/schema.json" + }, + "driver": { + "$ref": "https://schema.beckn.io/Driver/v2.0/schema.json" + }, + "vehicle": { + "$ref": "https://schema.beckn.io/Vehicle/v2.0/schema.json" + }, + "exceptionDetails": { + "type": "object", + "description": "Details if this update is an exception", + "properties": { + "reason": { + "type": "string", + "enum": [ + "ADDRESS_NOT_FOUND", + "CONSIGNEE_UNAVAILABLE", + "ACCESS_DENIED", + "NATURAL_DISASTER", + "VEHICLE_BREAKDOWN", + "CUSTOMS_HOLD" + ], + "example": "CONSIGNEE_UNAVAILABLE" + }, + "remarks": { + "type": "string" + } + } + }, + "nextAction": { + "type": "string", + "description": "Next planned action", + "example": "Re-delivery attempt scheduled for tomorrow 10 AM - 1 PM" + }, + "notificationSent": { + "type": "boolean", + "description": "Whether customer was notified of this update", + "example": true + } + }, + "$id": "https://schema.beckn.io/TrackingUpdate/v2.0", + "x-iri": "https://schema.beckn.io/TrackingUpdate/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/TrackingUpdate/v2.0/vocab.jsonld b/schema/TrackingUpdate/v2.0/vocab.jsonld new file mode 100644 index 0000000..030b106 --- /dev/null +++ b/schema/TrackingUpdate/v2.0/vocab.jsonld @@ -0,0 +1,37 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "TrackingUpdate": "beckn:TrackingUpdate", + "address": "beckn:address", + "driver": "beckn:driver", + "exceptionDetails": "beckn:exceptionDetails", + "hub": "beckn:hub", + "id": "beckn:id", + "lat": "beckn:lat", + "lng": "beckn:lng", + "location": "beckn:location", + "message": "beckn:message", + "nextAction": "beckn:nextAction", + "notificationSent": "beckn:notificationSent", + "reason": "beckn:reason", + "remarks": "beckn:remarks", + "shipmentId": "beckn:shipmentId", + "status": "beckn:status", + "timestamp": "beckn:timestamp", + "vehicle": "beckn:vehicle" + }, + "@graph": [ + { + "@id": "beckn:TrackingUpdate", + "@type": "rdfs:Class", + "rdfs:label": "Tracking Update", + "rdfs:comment": "TODO: Description Needed - TrackingUpdate" + } + ] +} diff --git a/schema/Vehicle/README.md b/schema/Vehicle/README.md index 9400478..92e6e5b 100644 --- a/schema/Vehicle/README.md +++ b/schema/Vehicle/README.md @@ -1,25 +1,9 @@ # Vehicle -## Overview -A **Vehicle** is a transport asset used across all logistics use cases, from bicycles for last-mile delivery to heavy trucks for long haul freight. +A motorized or human-powered mobility asset used to carry passengers or goods between locations. -## IRI -`https://schema.beckn.org/logistics/Vehicle` +## Versions -## Use Cases -- Hyperlocal: Bicycle, e-scooter, motorcycle -- Courier: Van, mini-truck -- Interstate/Long Haul: HCV trucks, container trucks, trailers -- Express: Motorcycles, cars, vans - -## Key Attributes -| Attribute | Type | Description | -|---|---|---| -| type | enum | Vehicle category | -| payloadCapacity | object | Max cargo weight | -| hasRefrigeration | boolean | Cold chain capability | -| gpsEnabled | boolean | Real-time tracking | -| currentLocation | object | Live GPS with speed | - -## Version -Current version: **v2.0** — [v2.0/attributes.yaml](./v2.0/attributes.yaml) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Vehicle/v2.0/attributes.yaml](https://schema.beckn.io/Vehicle/v2.0/attributes.yaml) | [https://schema.beckn.io/Vehicle/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Vehicle/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Vehicle/v2.0/context.jsonld](https://schema.beckn.io/Vehicle/v2.0/context.jsonld) | [https://schema.beckn.io/Vehicle/v2.0/vocab.jsonld](https://schema.beckn.io/Vehicle/v2.0/vocab.jsonld) | [https://schema.beckn.io/Vehicle/v2.0/README.md](https://schema.beckn.io/Vehicle/v2.0/README.md) | diff --git a/schema/Vehicle/v2.0/README.md b/schema/Vehicle/v2.0/README.md new file mode 100644 index 0000000..977a977 --- /dev/null +++ b/schema/Vehicle/v2.0/README.md @@ -0,0 +1,34 @@ +# Vehicle — v2.0 + +A motorized or human-powered mobility asset used to carry passengers or goods between locations. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Vehicle/attributes.yaml](https://schema.beckn.io/Vehicle/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Vehicle/v2.0/attributes.yaml](https://schema.beckn.io/Vehicle/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Vehicle/attributes.jsonschema.yaml](https://schema.beckn.io/Vehicle/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Vehicle/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Vehicle/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Vehicle/context.jsonld](https://schema.beckn.io/Vehicle/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Vehicle/v2.0/context.jsonld](https://schema.beckn.io/Vehicle/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Vehicle/vocab.jsonld](https://schema.beckn.io/Vehicle/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Vehicle/v2.0/vocab.jsonld](https://schema.beckn.io/Vehicle/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `vehicleId` | no | string | Unique identifier for the vehicle | +| `licensePlate` | no | string | Vehicle registration plate number | +| `make` | no | string | Manufacturer of the vehicle | +| `model` | no | string | Model name of the vehicle | +| `year` | no | number | Year of manufacture | +| `color` | no | string | Colour of the vehicle | +| `vehicleType` | no | $ref: https://schema.beckn.io/VehicleType/v2.0/attributes.yaml#/components/schemas/VehicleType | Type classification of the vehicle | +| `id` | no | string | Unique identifier for the item | +| `descriptor` | no | $ref: https://schema.beckn.io/core/v2.0/Descriptor/attributes.yaml#components/schemas/Descriptor | Human-readable description of the item | +| `categoryId` | no | $ref: https://schema.beckn.io/CategoryCode/v2.1/attributes.yaml#/components/schemas/CategoryCode | Category code classifying the item | +| `price` | no | $ref: https://schema.beckn.io/PriceSpecification/v2.1/attributes.yaml#/components/schemas/PriceSpecification | Price specification for this item | +| `quantity` | no | $ref: https://schema.beckn.io/Quantity/v2.0/attributes.yaml#/components/schemas/Quantity | Available quantity of the item | +| `tags` | no | string | Tags associated with the item | diff --git a/schema/Vehicle/v2.0/attributes.yaml b/schema/Vehicle/v2.0/attributes.yaml index 1a050eb..1cb7f9a 100644 --- a/schema/Vehicle/v2.0/attributes.yaml +++ b/schema/Vehicle/v2.0/attributes.yaml @@ -2,136 +2,63 @@ openapi: 3.1.0 info: title: Vehicle version: 2.0.0 - description: Schema definition for the Vehicle entity in the Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org + description: Schema definition for the Vehicle entity in the Beckn Mobility domain. license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + url: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Vehicle: + x-iri: https://schema.beckn.io/Vehicle/v2.0 type: object title: Vehicle - description: > - A Vehicle is a transport asset used for logistics operations. Vehicle types range from - bicycles for hyperlocal delivery to heavy trucks for long haul freight. Maps to beckn:Asset. - required: - - id - - registrationNumber - - type + description: A motorized or human-powered mobility asset used to carry passengers + or goods between locations. + x-tags: + - mobility + - schema-org + - ride-hailing properties: - id: - type: string - description: Unique vehicle identifier - example: "VEH-00789" - registrationNumber: + vehicleId: + description: Unique identifier for the vehicle type: string - description: Vehicle registration/license plate number - example: "KA01AB5678" - type: + licensePlate: + description: Vehicle registration plate number type: string - description: Type of vehicle - enum: - - BICYCLE - - ELECTRIC_SCOOTER - - MOTORCYCLE - - THREE_WHEELER - - CAR - - VAN - - MINI_TRUCK - - TRUCK_LCV - - TRUCK_HCV - - CONTAINER_TRUCK - - TRAILER - example: "TRUCK_LCV" make: + description: Manufacturer of the vehicle type: string - description: Vehicle manufacturer - example: "Tata Motors" model: + description: Model name of the vehicle type: string - description: Vehicle model - example: "Tata Ace Gold" year: - type: integer description: Year of manufacture - example: 2022 + type: number color: + description: Colour of the vehicle type: string - example: "White" - fuelType: - type: string - enum: - - PETROL - - DIESEL - - CNG - - ELECTRIC - - HYBRID - example: "DIESEL" - payloadCapacity: - type: object - description: Maximum cargo capacity - properties: - value: - type: number - example: 750 - unit: - type: string - enum: [kg, ton] - example: "kg" - volumeCapacity: - type: object - description: Cargo volume capacity - properties: - value: - type: number - example: 6 - unit: - type: string - enum: [cubic_feet, cubic_meters] - example: "cubic_feet" - hasRefrigeration: - type: boolean - description: Whether vehicle has refrigeration (cold chain) - example: false - gpsEnabled: - type: boolean - description: Whether vehicle has GPS tracking - example: true - insuranceExpiry: - type: string - format: date - pollutionCertExpiry: - type: string - format: date - fitnessExpiry: + vehicleType: + description: Type classification of the vehicle + $ref: https://schema.beckn.io/VehicleType/v2.0/attributes.yaml#/components/schemas/VehicleType + id: + description: Unique identifier for the item type: string - format: date - currentLocation: - type: object - properties: - lat: - type: number - lng: - type: number - speed: - type: number - description: Speed in km/h - heading: - type: number - description: Bearing in degrees - updatedAt: - type: string - format: date-time - status: + descriptor: + description: Human-readable description of the item + $ref: https://schema.beckn.io/Descriptor/v2.0/attributes.yaml#/components/schemas/Descriptor + categoryId: + description: Category code classifying the item + $ref: https://schema.beckn.io/CategoryCode/v2.1/attributes.yaml#/components/schemas/CategoryCode + price: + description: Price specification for this item + $ref: https://schema.beckn.io/PriceSpecification/v2.1/attributes.yaml#/components/schemas/PriceSpecification + quantity: + description: Available quantity of the item + $ref: https://schema.beckn.io/Quantity/v2.0/attributes.yaml#/components/schemas/Quantity + tags: + description: Tags associated with the item type: string - enum: - - AVAILABLE - - ASSIGNED - - ON_ROUTE - - MAINTENANCE - - INACTIVE - example: "ON_ROUTE" + additionalProperties: false diff --git a/schema/Vehicle/v2.0/context.jsonld b/schema/Vehicle/v2.0/context.jsonld new file mode 100644 index 0000000..a6197b7 --- /dev/null +++ b/schema/Vehicle/v2.0/context.jsonld @@ -0,0 +1,19 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/mobility/v2.0/", + "Vehicle": "beckn:Vehicle", + "vehicleId": "beckn:vehicleId", + "licensePlate": "beckn:licensePlate", + "make": "beckn:make", + "model": "beckn:model", + "year": "beckn:year", + "color": "beckn:color", + "vehicleType": "beckn:vehicleType", + "id": "beckn:id", + "descriptor": "beckn:descriptor", + "categoryId": "beckn:categoryId", + "price": "beckn:price", + "quantity": "beckn:quantity", + "tags": "beckn:tags" + } +} diff --git a/schema/Vehicle/v2.0/schema.json b/schema/Vehicle/v2.0/schema.json new file mode 100644 index 0000000..56ba4ba --- /dev/null +++ b/schema/Vehicle/v2.0/schema.json @@ -0,0 +1,68 @@ +{ + "$id": "https://schema.beckn.io/Vehicle/v2.0", + "x-iri": "https://schema.beckn.io/Vehicle/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Vehicle", + "type": "object", + "description": "A motorized or human-powered mobility asset used to carry passengers or goods between locations.", + "properties": { + "vehicleId": { + "description": "Unique identifier for the vehicle", + "type": "string" + }, + "licensePlate": { + "description": "Vehicle registration plate number", + "type": "string" + }, + "make": { + "description": "Manufacturer of the vehicle", + "type": "string" + }, + "model": { + "description": "Model name of the vehicle", + "type": "string" + }, + "year": { + "description": "Year of manufacture", + "type": "number" + }, + "color": { + "description": "Colour of the vehicle", + "type": "string" + }, + "vehicleType": { + "description": "Type classification of the vehicle", + "$ref": "https://schema.beckn.io/VehicleType/v2.0/schema.json" + }, + "id": { + "description": "Unique identifier for the item", + "type": "string" + }, + "descriptor": { + "description": "Human-readable description of the item", + "$ref": "https://schema.beckn.io/Descriptor/v2.1/schema.json" + }, + "categoryId": { + "description": "Category code classifying the item", + "$ref": "https://schema.beckn.io/CategoryCode/v2.1/schema.json" + }, + "price": { + "description": "Price specification for this item", + "$ref": "https://schema.beckn.io/PriceSpecification/v2.1/schema.json" + }, + "quantity": { + "description": "Available quantity of the item", + "$ref": "https://schema.beckn.io/Quantity/v2.0/schema.json" + }, + "tags": { + "description": "Tags associated with the item", + "type": "string" + } + }, + "additionalProperties": false, + "x-tags": [ + "mobility", + "schema-org", + "ride-hailing" + ] +} diff --git a/schema/Vehicle/v2.0/vocab.jsonld b/schema/Vehicle/v2.0/vocab.jsonld new file mode 100644 index 0000000..d78c518 --- /dev/null +++ b/schema/Vehicle/v2.0/vocab.jsonld @@ -0,0 +1,294 @@ +{ + "@context": { + "beckn": "https://schema.beckn.io/linked-data/latest-context.jsonld", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "skos": "http://www.w3.org/2004/02/skos/core#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + }, + "@graph": [ + { + "@id": "beckn:Vehicle", + "@type": "owl:Class", + "rdfs:label": { + "@value": "Vehicle", + "@language": "en" + }, + "rdfs:comment": { + "@value": "A motorized or human-powered mobility asset used to carry passengers or goods between locations.", + "@language": "en" + }, + "rdfs:seeAlso": [ + { + "@id": "https://schema.org/Vehicle" + }, + { + "@id": "beckn:VehicleType" + } + ] + }, + { + "@id": "beckn:vehicleId", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "vehicleId", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Unique identifier for the vehicle", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Vehicle" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:licensePlate", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "licensePlate", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Vehicle registration plate number", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Vehicle" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:make", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "make", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Manufacturer of the vehicle", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Vehicle" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:model", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "model", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Model name of the vehicle", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Vehicle" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:year", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "year", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Year of manufacture", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Vehicle" + }, + "rdfs:range": { + "@id": "xsd:decimal" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Number" + } + }, + { + "@id": "beckn:color", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "color", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Colour of the vehicle", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Vehicle" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:vehicleType", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "vehicleType", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Type classification of the vehicle", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Vehicle" + }, + "rdfs:range": { + "@id": "beckn:VehicleType" + }, + "rdfs:seeAlso": { + "@id": "../VehicleType/v2.0/vocab.jsonld#beckn:VehicleType" + } + }, + { + "@id": "beckn:id", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "id", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Unique identifier for the item", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Vehicle" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + }, + { + "@id": "beckn:descriptor", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "descriptor", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Human-readable description of the item", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Vehicle" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#Descriptor" + } + }, + { + "@id": "beckn:categoryId", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "categoryId", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Category code classifying the item", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Vehicle" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#CategoryCode" + } + }, + { + "@id": "beckn:price", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "price", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Price specification for this item", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Vehicle" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#PriceSpecification" + } + }, + { + "@id": "beckn:quantity", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "quantity", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Available quantity of the item", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Vehicle" + }, + "rdfs:range": { + "@id": "https://schema.beckn.io/core/v2.0/#Quantity" + } + }, + { + "@id": "beckn:tags", + "@type": "rdf:Property", + "rdfs:label": { + "@value": "tags", + "@language": "en" + }, + "rdfs:comment": { + "@value": "Tags associated with the item", + "@language": "en" + }, + "rdfs:domain": { + "@id": "beckn:Vehicle" + }, + "rdfs:range": { + "@id": "xsd:string" + }, + "skos:closeMatch": { + "@id": "https://schema.org/Text" + } + } + ] +} diff --git a/schema/Waypoint/README.md b/schema/Waypoint/README.md index 83654ae..c5cdd30 100644 --- a/schema/Waypoint/README.md +++ b/schema/Waypoint/README.md @@ -1,13 +1,9 @@ # Waypoint -A schema.beckn.io Type +A Waypoint is an intermediate stop or checkpoint on a logistics route, such as a sorting hub, relay station, or customs checkpoint. Maps to beckn:Stop. -Intermediate stop: `HUB`, `RELAY_POINT`, `CUSTOMS`, `PICKUP`, `DELIVERY` +## Versions -**Canonical IRI :** `log:Waypoint` - -**Canonical URL:** https://schema.beckn.io/logistics/Waypoint - -## Open Issues - -[Open issues](https://github.com/beckn/logistics/issues) +| Version | attributes.yaml | attributes.jsonschema.yaml | context.jsonld | vocab.jsonld | README | +|---|---|---|---|---|---| +| **v2.0** | [https://schema.beckn.io/Waypoint/v2.0/attributes.yaml](https://schema.beckn.io/Waypoint/v2.0/attributes.yaml) | [https://schema.beckn.io/Waypoint/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Waypoint/v2.0/attributes.jsonschema.yaml) | [https://schema.beckn.io/Waypoint/v2.0/context.jsonld](https://schema.beckn.io/Waypoint/v2.0/context.jsonld) | [https://schema.beckn.io/Waypoint/v2.0/vocab.jsonld](https://schema.beckn.io/Waypoint/v2.0/vocab.jsonld) | [https://schema.beckn.io/Waypoint/v2.0/README.md](https://schema.beckn.io/Waypoint/v2.0/README.md) | diff --git a/schema/Waypoint/v2.0/README.md b/schema/Waypoint/v2.0/README.md new file mode 100644 index 0000000..b4c827d --- /dev/null +++ b/schema/Waypoint/v2.0/README.md @@ -0,0 +1,33 @@ +# Waypoint — v2.0 + +A Waypoint is an intermediate stop or checkpoint on a logistics route, such as a sorting hub, relay station, or customs checkpoint. Maps to beckn:Stop. + +## Files + +| File | Purpose | +|---|---| +| [https://schema.beckn.io/Waypoint/attributes.yaml](https://schema.beckn.io/Waypoint/attributes.yaml) | OpenAPI schema envelope (latest path) | +| [https://schema.beckn.io/Waypoint/v2.0/attributes.yaml](https://schema.beckn.io/Waypoint/v2.0/attributes.yaml) | OpenAPI schema envelope (versioned path) | +| [https://schema.beckn.io/Waypoint/attributes.jsonschema.yaml](https://schema.beckn.io/Waypoint/attributes.jsonschema.yaml) | JSON Schema document (latest path) | +| [https://schema.beckn.io/Waypoint/v2.0/attributes.jsonschema.yaml](https://schema.beckn.io/Waypoint/v2.0/attributes.jsonschema.yaml) | JSON Schema document (versioned path) | +| [https://schema.beckn.io/Waypoint/context.jsonld](https://schema.beckn.io/Waypoint/context.jsonld) | JSON-LD context (latest path) | +| [https://schema.beckn.io/Waypoint/v2.0/context.jsonld](https://schema.beckn.io/Waypoint/v2.0/context.jsonld) | JSON-LD context (versioned path) | +| [https://schema.beckn.io/Waypoint/vocab.jsonld](https://schema.beckn.io/Waypoint/vocab.jsonld) | RDF vocabulary (latest path) | +| [https://schema.beckn.io/Waypoint/v2.0/vocab.jsonld](https://schema.beckn.io/Waypoint/v2.0/vocab.jsonld) | RDF vocabulary (versioned path) | + +## Properties + +| Property | Required | Type | Description | +|---|---|---|---| +| `id` | yes | string | - | +| `name` | no | string | - | +| `place` | yes | $ref: https://schema.beckn.io/Place/v2.0/attributes.yaml#/components/schemas/Place | - | +| `type` | no | string | - | +| `sequenceNumber` | no | integer | Order of this waypoint in the route | +| `scheduledArrival` | no | string | - | +| `scheduledDeparture` | no | string | - | +| `actualArrival` | no | string | - | +| `actualDeparture` | no | string | - | +| `dwellTimeMinutes` | no | integer | Expected dwell time at this waypoint in minutes | +| `handoverRequired` | no | boolean | Whether shipment changes carrier/vehicle at this point | +| `status` | no | string | - | diff --git a/schema/Waypoint/v2.0/attributes.jsonschema.yaml b/schema/Waypoint/v2.0/attributes.jsonschema.yaml deleted file mode 100644 index 919e080..0000000 --- a/schema/Waypoint/v2.0/attributes.jsonschema.yaml +++ /dev/null @@ -1,80 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -title: Waypoint JSON Schema -type: object -properties: - components: - type: object - properties: - schemas: - type: object - properties: - Waypoint: - $ref: '#/$defs/Waypoint' - additionalProperties: false - required: - - schemas - additionalProperties: false -required: -- components -additionalProperties: false -$defs: - Waypoint: - type: object - title: Waypoint - description: 'A Waypoint is an intermediate stop or checkpoint on a logistics - route, such as a sorting hub, relay station, or customs checkpoint. Maps to - beckn:Stop. - - ' - required: - - id - - place - properties: - id: - type: string - example: WPT-HYD-001 - name: - type: string - example: Hyderabad Sorting Hub - place: - $ref: https://schema.beckn.io/LogisticsPlace/v2.0/attributes.jsonschema.yaml#/properties/components/properties/schemas/properties/LogisticsPlace - type: - type: string - enum: - - HUB - - RELAY_POINT - - CUSTOMS - - PICKUP - - DELIVERY - example: HUB - sequenceNumber: - type: integer - description: Order of this waypoint in the route - example: 2 - scheduledArrival: - type: string - format: date-time - scheduledDeparture: - type: string - format: date-time - actualArrival: - type: string - format: date-time - actualDeparture: - type: string - format: date-time - dwellTimeMinutes: - type: integer - description: Expected dwell time at this waypoint in minutes - example: 120 - handoverRequired: - type: boolean - description: Whether shipment changes carrier/vehicle at this point - example: true - status: - type: string - enum: - - PENDING - - REACHED - - DEPARTED - - SKIPPED diff --git a/schema/Waypoint/v2.0/attributes.yaml b/schema/Waypoint/v2.0/attributes.yaml index a81fae3..a15af7a 100644 --- a/schema/Waypoint/v2.0/attributes.yaml +++ b/schema/Waypoint/v2.0/attributes.yaml @@ -1,23 +1,20 @@ -openapi: 3.1.0 +openapi: 3.1.1 info: title: Waypoint version: 2.0.0 description: Schema definition for the Waypoint entity in the Beckn Logistics domain. - contact: - name: Beckn Foundation - url: https://beckn.org license: - name: MIT - url: https://opensource.org/licenses/MIT -paths: {} + name: CC-BY-NC-SA 4.0 International + contact: + name: Beckn Labs + url: https://beckn.io components: schemas: Waypoint: + x-iri: https://schema.beckn.io/Waypoint/v2.0 type: object title: Waypoint - description: 'A Waypoint is an intermediate stop or checkpoint on a logistics - route, such as a sorting hub, relay station, or customs checkpoint. Maps to - beckn:Stop. + description: 'A Waypoint is an intermediate stop or checkpoint on a logistics route, such as a sorting hub, relay station, or customs checkpoint. Maps to beckn:Stop. ' required: diff --git a/schema/Waypoint/v2.0/context.jsonld b/schema/Waypoint/v2.0/context.jsonld new file mode 100644 index 0000000..80d7f21 --- /dev/null +++ b/schema/Waypoint/v2.0/context.jsonld @@ -0,0 +1,23 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "xsd": "http://www.w3.org/2001/XMLSchema#", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "Waypoint": "beckn:Waypoint", + "actualArrival": "beckn:actualArrival", + "actualDeparture": "beckn:actualDeparture", + "dwellTimeMinutes": "beckn:dwellTimeMinutes", + "handoverRequired": "beckn:handoverRequired", + "id": "beckn:id", + "name": "beckn:name", + "place": "beckn:place", + "scheduledArrival": "beckn:scheduledArrival", + "scheduledDeparture": "beckn:scheduledDeparture", + "sequenceNumber": "beckn:sequenceNumber", + "status": "beckn:status", + "type": "beckn:type" + } +} diff --git a/schema/Waypoint/v2.0/schema.json b/schema/Waypoint/v2.0/schema.json new file mode 100644 index 0000000..2e4cf87 --- /dev/null +++ b/schema/Waypoint/v2.0/schema.json @@ -0,0 +1,76 @@ +{ + "type": "object", + "title": "Waypoint", + "description": "A Waypoint is an intermediate stop or checkpoint on a logistics route, such as a sorting hub, relay station, or customs checkpoint. Maps to beckn:Stop. ", + "required": [ + "id", + "place" + ], + "properties": { + "id": { + "type": "string", + "example": "WPT-HYD-001" + }, + "name": { + "type": "string", + "example": "Hyderabad Sorting Hub" + }, + "place": { + "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + }, + "type": { + "type": "string", + "enum": [ + "HUB", + "RELAY_POINT", + "CUSTOMS", + "PICKUP", + "DELIVERY" + ], + "example": "HUB" + }, + "sequenceNumber": { + "type": "integer", + "description": "Order of this waypoint in the route", + "example": 2 + }, + "scheduledArrival": { + "type": "string", + "format": "date-time" + }, + "scheduledDeparture": { + "type": "string", + "format": "date-time" + }, + "actualArrival": { + "type": "string", + "format": "date-time" + }, + "actualDeparture": { + "type": "string", + "format": "date-time" + }, + "dwellTimeMinutes": { + "type": "integer", + "description": "Expected dwell time at this waypoint in minutes", + "example": 120 + }, + "handoverRequired": { + "type": "boolean", + "description": "Whether shipment changes carrier/vehicle at this point", + "example": true + }, + "status": { + "type": "string", + "enum": [ + "PENDING", + "REACHED", + "DEPARTED", + "SKIPPED" + ] + } + }, + "$id": "https://schema.beckn.io/Waypoint/v2.0", + "x-iri": "https://schema.beckn.io/Waypoint/v2.0", + "$schema": "https://json-schema.org/draft/2020-12/schema" +} diff --git a/schema/Waypoint/v2.0/vocab.jsonld b/schema/Waypoint/v2.0/vocab.jsonld new file mode 100644 index 0000000..2d14cff --- /dev/null +++ b/schema/Waypoint/v2.0/vocab.jsonld @@ -0,0 +1,32 @@ +{ + "@context": { + "@version": 1.1, + "beckn": "https://schema.beckn.io/LinkedData/v2.1/context.jsonld", + "owl": "http://www.w3.org/2002/07/owl#", + "schema": "https://schema.org/version/latest/schemaorg-current-https.jsonld", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "Waypoint": "beckn:Waypoint", + "actualArrival": "beckn:actualArrival", + "actualDeparture": "beckn:actualDeparture", + "dwellTimeMinutes": "beckn:dwellTimeMinutes", + "handoverRequired": "beckn:handoverRequired", + "id": "beckn:id", + "name": "beckn:name", + "place": "beckn:place", + "scheduledArrival": "beckn:scheduledArrival", + "scheduledDeparture": "beckn:scheduledDeparture", + "sequenceNumber": "beckn:sequenceNumber", + "status": "beckn:status", + "type": "beckn:type" + }, + "@graph": [ + { + "@id": "beckn:Waypoint", + "@type": "rdfs:Class", + "rdfs:label": "Waypoint", + "rdfs:comment": "TODO: Description Needed - Waypoint" + } + ] +} From 302c6e900dab38da69c96dca27880a15b0941bb5 Mon Sep 17 00:00:00 2001 From: Nirmal N R Date: Fri, 12 Jun 2026 12:07:00 +0530 Subject: [PATCH 2/3] fix: re-add Place schema --- schema/Place/README.md | 10 ++++ schema/Place/v2.0/attributes.yaml | 83 +++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 schema/Place/README.md create mode 100644 schema/Place/v2.0/attributes.yaml diff --git a/schema/Place/README.md b/schema/Place/README.md new file mode 100644 index 0000000..f9f5e25 --- /dev/null +++ b/schema/Place/README.md @@ -0,0 +1,10 @@ +# Place + +## Overview +**Place** represents any geographic location relevant to a logistics transaction — origin, destination, hub, store, or warehouse — including structured address and GPS coordinates. + +## IRI +`https://schema.beckn.org/logistics/Place` + +## Version +Current version: **v2.0** — [v2.0/attributes.yaml](./v2.0/attributes.yaml) diff --git a/schema/Place/v2.0/attributes.yaml b/schema/Place/v2.0/attributes.yaml new file mode 100644 index 0000000..1a3a1bc --- /dev/null +++ b/schema/Place/v2.0/attributes.yaml @@ -0,0 +1,83 @@ +openapi: 3.1.0 +info: + title: Place + version: 2.0.0 + description: Schema definition for the Place entity in the Beckn Logistics domain. + contact: + name: Beckn Foundation + url: https://beckn.org + license: + name: MIT + url: https://opensource.org/licenses/MIT +paths: {} +components: + schemas: + Place: + type: object + title: Place + description: > + A geographic location relevant to logistics such as origin, destination, hub, or waypoint. + Includes structured address and GPS coordinates. Maps to beckn:Location and schema:Place. + required: + - id + properties: + id: + type: string + example: "PLC-BLR-001" + name: + type: string + description: Name of the place + example: "Anita's Home" + type: + type: string + enum: + - PICKUP + - DELIVERY + - HUB + - WAYPOINT + - STORE + - WAREHOUSE + example: "DELIVERY" + address: + type: object + properties: + line1: + type: string + example: "42, 5th Cross Road" + line2: + type: string + example: "Indiranagar" + landmark: + type: string + example: "Near Total Mall" + city: + type: string + example: "Bengaluru" + state: + type: string + example: "Karnataka" + country: + type: string + example: "India" + pincode: + type: string + example: "560038" + gps: + type: object + properties: + lat: + type: number + example: 12.9719 + lng: + type: number + example: 77.6412 + contact: + $ref: '#/components/schemas/Contact' + accessInstructions: + type: string + description: Instructions for courier to reach the place + example: "Ring bell twice. Building B, 3rd floor." + isVerified: + type: boolean + description: Whether the address has been geocode-verified + example: true From fa15da0a9eabdf1548769c79528e393f5cb13ae0 Mon Sep 17 00:00:00 2001 From: Nirmal N R Date: Fri, 12 Jun 2026 14:54:58 +0530 Subject: [PATCH 3/3] fix: update references in schema.json --- schema/Courier/v2.0/schema.json | 2 +- schema/Hub/v2.0/schema.json | 2 +- schema/LogisticsRoute/v2.0/schema.json | 4 ++-- schema/ReturnPolicy/v2.0/schema.json | 2 +- schema/Shipment/v2.0/schema.json | 6 +++--- schema/Waypoint/v2.0/schema.json | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/schema/Courier/v2.0/schema.json b/schema/Courier/v2.0/schema.json index 8270752..c9d0da3 100644 --- a/schema/Courier/v2.0/schema.json +++ b/schema/Courier/v2.0/schema.json @@ -57,7 +57,7 @@ "example": "KA05AB1234" }, "currentLocation": { - "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + "$ref": "https://schema.beckn.io/LogisticsPlace/v2.0/schema.json" }, "status": { "type": "string", diff --git a/schema/Hub/v2.0/schema.json b/schema/Hub/v2.0/schema.json index 63906a9..608aa6d 100644 --- a/schema/Hub/v2.0/schema.json +++ b/schema/Hub/v2.0/schema.json @@ -22,7 +22,7 @@ "example": "BLR-MAIN" }, "place": { - "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + "$ref": "https://schema.beckn.io/LogisticsPlace/v2.0/schema.json" }, "type": { "type": "string", diff --git a/schema/LogisticsRoute/v2.0/schema.json b/schema/LogisticsRoute/v2.0/schema.json index 16a003e..da08cc4 100644 --- a/schema/LogisticsRoute/v2.0/schema.json +++ b/schema/LogisticsRoute/v2.0/schema.json @@ -19,10 +19,10 @@ "example": "Bangalore to Delhi via Hyderabad" }, "origin": { - "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + "$ref": "https://schema.beckn.io/LogisticsPlace/v2.0/schema.json" }, "destination": { - "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + "$ref": "https://schema.beckn.io/LogisticsPlace/v2.0/schema.json" }, "waypoints": { "type": "array", diff --git a/schema/ReturnPolicy/v2.0/schema.json b/schema/ReturnPolicy/v2.0/schema.json index 33af8ca..1392893 100644 --- a/schema/ReturnPolicy/v2.0/schema.json +++ b/schema/ReturnPolicy/v2.0/schema.json @@ -67,7 +67,7 @@ "example": true }, "returnHubAddress": { - "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + "$ref": "https://schema.beckn.io/LogisticsPlace/v2.0/schema.json" } }, "$id": "https://schema.beckn.io/ReturnPolicy/v2.0", diff --git a/schema/Shipment/v2.0/schema.json b/schema/Shipment/v2.0/schema.json index c6d19c4..a2092f2 100644 --- a/schema/Shipment/v2.0/schema.json +++ b/schema/Shipment/v2.0/schema.json @@ -37,10 +37,10 @@ "example": "IN_TRANSIT" }, "origin": { - "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + "$ref": "https://schema.beckn.io/LogisticsPlace/v2.0/schema.json" }, "destination": { - "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + "$ref": "https://schema.beckn.io/LogisticsPlace/v2.0/schema.json" }, "packages": { "type": "array", @@ -103,7 +103,7 @@ "$ref": "https://schema.beckn.io/Fare/v2.0/schema.json" }, "receipt": { - "$ref": "https://schema.beckn.io/Receipt/v2.0/schema.json" + "$ref": "https://schema.beckn.io/LogisticsReceipt/v2.0/schema.json" }, "cancellationPolicy": { "$ref": "https://schema.beckn.io/CancellationPolicy/v2.0/schema.json" diff --git a/schema/Waypoint/v2.0/schema.json b/schema/Waypoint/v2.0/schema.json index 2e4cf87..456d3da 100644 --- a/schema/Waypoint/v2.0/schema.json +++ b/schema/Waypoint/v2.0/schema.json @@ -16,7 +16,7 @@ "example": "Hyderabad Sorting Hub" }, "place": { - "$ref": "https://schema.beckn.io/Place/v2.0/schema.json" + "$ref": "https://schema.beckn.io/LogisticsPlace/v2.0/schema.json" }, "type": { "type": "string",