Om deze snippets te gebruiken moet u de URL, Actor ID en de Autorisatie-header
aanpassen
Stap 1.
Boek de zending
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 }
}"
Stap 2.
Zend de zending om de EDI-gegevens te genereren (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\": {}
}"
Stap 3.
Haal de lijst op van alle 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\": {}
}"
Stap 4.
Haal de details op van de specifieke Batch (156)
curl -s -X GET "http://demo.shipmentserver.com:8080/ShipServer/64/Batches/156" -H "Authorization: Basic dW46cHc=" -H "Content-Type: application/json"
Stap 5.
Haal de inhoud op van het EDI-bestand in het Batchrapport (314)
curl -s -X GET "http://demo.shipmentserver.com:8080/ShipServer/64/BatchReports/314" -H "Authorization: Basic dW46cHc=" -H "Content-Type: application/json"
Stap 6.
Base64 decodeer de Content van het response-object