Um diese Snippets zu verwenden, müssen Sie die URL, die Actor ID und den Authorization Header
ändern
Schritt 1.
Buchen Sie die Sendung
curl -s -X POST "http://demo.shipmentserver.com:8080/ShipServer/64/Shipments"
-H "Authorization: Basic dW46cHc="
-H "Content-Type: application/json"
--data-raw "{
\"data\": {
\"ProdConceptID\": 1782,
\"OrderNo\": \"Test Shipment 1\",
\"Addresses\": [{
\"Kind\": 1,
\"Name1\": \"Test Receiver Name1\",
\"Street1\": \"Test Road 1\",
\"PostCode\": 7400,
\"City\": \"Herning\",
\"CountryCode\": \"DK\",
\"Phone\": \"12341234\",
\"Mobile\": \"12341234\",
\"Email\": \"noreply@nshift.com\",
\"Attention\": \"Test Attention\"
}],
\"Lines\":[{
\"Number\": 1,
\"PkgWeight\": 10000,
\"Height\": 100,
\"Length\": 100,
\"Width\": 100,
\"GoodsTypeID\": 13,
\"References\": [{
\"Kind\": 23,
\"Value\": \"Test Shipment - Do not process !\"
}]
}]
},
\"options\": { \"Labels\": \"ZPLGK\", \"ReturnShipment\": 1 }
}"
Schritt 2.
Übermitteln Sie die Sendung, um die EDI-Daten zu generieren (160786)
curl -s -X PUT "http://demo.shipmentserver.com:8080/ShipServer/64/Shipments/Manifest"
-H "Authorization: Basic dW46cHc="
-H "Content-Type: application/json"
--data-raw "{
\"data\": {
\"ShipmentCSIDs\": [160786]
},
\"options\": {}
}"
Schritt 3.
Holen Sie die Liste aller Transmitted Batches
curl -s -X POST "http://demo.shipmentserver.com:8080/ShipServer/64/Batches"
-H "Authorization: Basic dW46cHc="
-H "Content-Type: application/json"
--data-raw "{
\"data\": {
\"StartIndex\": \"0\",
\"Count\": 5,
\"SortField\": \"TransmitDt\",
\"SortDirection\": 1
},
\"options\": {}
}"
Schritt 4.
Holen Sie die Details der spezifischen Charge (156)
curl -s -X GET "http://demo.shipmentserver.com:8080/ShipServer/64/Batches/156" -H "Authorization: Basic dW46cHc=" -H "Content-Type: application/json"
Schritt 5.
Holen Sie den Inhalt der EDI-Datei im Chargebericht (314)
curl -s -X GET "http://demo.shipmentserver.com:8080/ShipServer/64/BatchReports/314" -H "Authorization: Basic dW46cHc=" -H "Content-Type: application/json"
Schritt 6.
Base64-dekodieren Sie den Content des Antwortobjekts