Schenker Privpak AB Interface documentation for web service packageservices.asmx 2010-10-21 Version: 1.2.2 Doc. no.: I04304
Sida 2 av 14 Revision history Datum Version Sign. Kommentar 2010-02-18 1.0.0 JG First public version. 2010-03-08 1.0.1 JG Added new parameters for all methods. (Preperation for version 1.1) 2010-03-19 1.0.2 JG Added method ConsignmentPrint. 2010-03-19 1.1.0 JG Document updated for version 1.1. 2010-09-14 1.2.0 JG Document updated for version 1.2. Replaced input parameter carrier with product ID for several methods. Added methods SearchCollectionPoint and GetCollectionPointInfo. 2010-10-13 1.2.1 JG CustomerID is now a numeric input value (instead of string) in the methods SearchCollectionPoint and GetCollectionPointInfo. 2010-10-21 1.2.2 JG Added input parameter Maxhits for method SearchCollectionPoint.
Sida 3 av 14 Index Revision history... 2 1. General information... 5 1.1. Getting started... 5 1.2. Authentication... 5 2. Method: SearchCollectionPoint... 6 2.1. Information... 6 2.2. Request... 6 2.3. Response... 6 2.4. Error handling... 7 2.5. Miscellaneous... 7 3. Method: GetCollectionPointInfo... 7 3.1. Information... 7 3.2. Request... 7 3.3. Response... 7 3.4. Error handling... 7 4. Method: Consignment (N/A)... 8 5. Method: ConsignmentPrint... 8 5.1. Information... 8 5.2. Request... 8 5.3. Response... 8 6. Method: ConsignmentReturn... 9 6.1. Information... 9 6.2. Request... 9 6.3. Response... 9 7. Method: ConsignmentReturnPrint... 10 7.1. Information... 10 7.2. Request... 10 7.3. Response... 10 8. Method: Return... 11 8.1. Information... 11 8.2. Request... 11 8.3. Response... 11 9. Method: NumberSeries... 12 9.1. Information... 12 9.2. Request... 12 9.3. Response... 12
Sida 4 av 14 10. Appendix... 14 10.1. Consignment Product ID... 14 10.2. Return Product ID... 14
Sida 5 av 14 1. General information 1.1. Getting started The web service is located at the URL below: http://privpakservices.schenker.nu/package/package_1.2/packageservices.asmx 1.2. Authentication To use the methods SearchCollectionPoint and GetCollectionPointInfo a registration is required. Registration form is located at the URL below: http://privpakservices.schenker.nu/package/package_1.2/register.aspx The reason that the registration requires an email address is so that we can communicate updates made to our web services. To gain access to the other methods in this web service, you must first have an account set up. Your contact at the Schenker Privpak AB sales department can help you to set one up.
Sida 6 av 14 2. Method: SearchCollectionPoint 2.1. Information Returns a list of nearby (based on post code or city) collection points. To choose one automatically, enter the consumer s post code and then use the first item of the list. This results in a collection point with a minimal distance to the consumer. 2.2. Request Name Type Required Description CustomerID Int Yes Your customer ID in our system. If you do not have a customer ID, set to 1 for Sweden or 2 for Norway Key String Yes (1) Registration key ServiceID String No Default value = (blank) ParamID Int Yes Default value = 0 Note: If you do not have a customer ID in our system, set to 1 (this will hide subcontractors from the response) Address String No Street address Postcode String Yes (2) Post code City String Yes (2) City Maxhits Int Yes Default value = 0 (= our internal limit) Use to limit the number of hits displayed. 1: To obtain a key, see chapter 1.2. 2: Either postcode or city is required. 2.3. Response Name Description CpointID Id of collection point DisplayName Name of collection point Distance Distance to collection point AddressLine1 Address of collection point AddressLine2 Address of collection point PostCode Post code of collection point City City of collection point CountryCode Country code OpenHours Open hours OpenHours1 Open hours detail row 1 OpenHours2 Open hours detail row 2 OpenHours3 Open hours detail row 3 Directions Additional directions to the collection point CardAvailable Bank/credit card available CardName Bank/credit card information CardInfo Bank/credit card additional information Latitude Coordinate in Decimal Degrees (WGS84) Longitude Coordinate in Decimal Degrees (WGS84) ConsignmentProductID Required parameter for consignments via EDI files. Also to be used with future method Consignment (currently not implemented) See chapter 10.1 ReturnProductID Required input parameter for methods ConsignmentReturn and Return. See 10.2
Sida 7 av 14 2.4. Error handling We return an item with CpointID = -1 if an exception occurs, for example when no match is found. Error message is in that case sent in the field DisplayName. 2.5. Miscellaneous Searching by street address is not yet implemented. We may add this in a future release. 3. Method: GetCollectionPointInfo 3.1. Information This method returns information for a certain collection point. 3.2. Request Name Type Required Description CustomerID Int Yes Your customer ID in our system. If you do not have a customer ID, set to 1 for Sweden or 2 for Norway Key String Yes (1) Registration key ServiceID String No Default value = (blank) CpointID String Yes Collection point ID 1: To obtain a key, see chapter 1.2. 3.3. Response See chapter 2.3. 3.4. Error handling See chapter 2.4.
Sida 8 av 14 4. Method: Consignment (N/A) Not yet implemented. 5. Method: ConsignmentPrint 5.1. Information This method is only meant to be used to re-print labels. Requires an existing barcode as input parameter. 5.2. Request Name Type Required Description CustomerID Long int Yes Your customer ID in our system Password String Yes Your password in our system Barcode String Yes The unique package identity Printer String No Type of printer. For ZPL streams, set to ZPL 5.3. Response Name <package><response> <package><errormessage> <package><labeldata><consignor><name> <package><labeldata><consignor><address1> <package><labeldata><consignor><address2> <package><labeldata><consignor><postcode> <package><labeldata><consignor><locality> <package><labeldata><consignor><countrycode> <package><labeldata><consignor><phonenumber> <package><labeldata><returnto><name> <package><labeldata><returnto><address1> <package><labeldata><returnto><address2> <package><labeldata><returnto><postcode> <package><labeldata><returnto><locality> <package><labeldata><returnto><countrycode> <package><labeldata><consignee><name> <package><labeldata><consignee><attention> <package><labeldata><consignee><address1> <package><labeldata><consignee><address2> <package><labeldata><consignee><postcode> <package><labeldata><consignee><locality> <package><labeldata><consignee><countrycode> <package><labeldata><consignee><phonenumber> <package><labeldata><deliverto><name> <package><labeldata><deliverto><address1> <package><labeldata><deliverto><address2> <package><labeldata><deliverto><postcode> <package><labeldata><deliverto><locality> <package><labeldata><deliverto><countrycode> <package><labeldata><consumerid> <package><labeldata><reference> <package><labeldata><customerid_carrier> <package><labeldata><cod_accountnumber> Description DATA on success, otherwise ERROR On ERROR, returns reason Sender s adress Return adress Receiver s address Delivery address Consumer ID (KundID) Consumer reference (Refx) Customer ID to use for the chosen carrier Cash On Delivery account number
Sida 9 av 14 <package><labeldata><cod> <package><labeldata><weight> <package><labeldata><pp_reference> <package><labeldata><printdate> <package><labeldata><validto> <package><labeldata><productid> <package><labeldata><productcode> <package><labeldata><producttext> <package><labeldata><barcode> <package><labeldata><barcodetext> <package><labeldata><printstream> Cash On Delivery amount Weight of the parcel Schenker Privpak internal reference Date when the label is printed Date when the printed label is no longer valid Carrier product ID Carrier product code Carrier product text Contents of the barcode Text to be printed below the barcode Printer stream. Currently only ZPL format 6. Method: ConsignmentReturn 6.1. Information Used to create consignment returns. Requires an existing barcode as input parameter. 6.2. Request Name Type Required Description Countrycode String Yes Country code (examples: SE, NO, FI etc) CustomerID Long int Yes Your customer ID in our system Password String Yes Your password in our system Barcode String Yes The unique package identity Consumername String Yes Consumer s (package receiver s) name Consumeraddress1 String No Consumer s address line 1 (c/o) Consumeraddress2 String Yes Consumer s address line 2 Consumerpostcode String Yes Consumer s post code Consumerlocality String Yes Consumer s locality Consumeremail String No Consumer s email address Consumerid String No Consumer ID (KundID) Reference String No Consumer reference (Refx) ReturnproductID String Yes See chapter 2.3 Customername String No Your customer name (if left blank, your customer name in our system will be used) Printer String No Type of printer. For ZPL streams, set to ZPL Mode String No For testing purposes, set to TEST 6.3. Response Name <package><response> <package><errormessage> <package><labeldata><consignor><name> <package><labeldata><consignor><address1> <package><labeldata><consignor><address2> <package><labeldata><consignor><postcode> <package><labeldata><consignor><locality> <package><labeldata><consignor><countrycode> <package><labeldata><consignor><phonenumber> <package><labeldata><returnto><name> <package><labeldata><returnto><address1> <package><labeldata><returnto><address2> <package><labeldata><returnto><postcode> Description DATA on success, otherwise ERROR On ERROR, returns reason Sender s address Return address
Sida 10 av 14 <package><labeldata><returnto><locality> <package><labeldata><returnto><countrycode> <package><labeldata><consignee><name> <package><labeldata><consignee><attention> <package><labeldata><consignee><address1> <package><labeldata><consignee><address2> <package><labeldata><consignee><postcode> <package><labeldata><consignee><locality> <package><labeldata><consignee><countrycode> <package><labeldata><consignee><phonenumber> <package><labeldata><deliverto><name> <package><labeldata><deliverto><address1> <package><labeldata><deliverto><address2> <package><labeldata><deliverto><postcode> <package><labeldata><deliverto><locality> <package><labeldata><deliverto><countrycode> <package><labeldata><consumerid> <package><labeldata><reference> <package><labeldata><customerid_carrier> <package><labeldata><printdate> <package><labeldata><validto> <package><labeldata><productid> <package><labeldata><productcode> <package><labeldata><producttext> <package><labeldata><barcode> <package><labeldata><barcodetext> <package><labeldata><printstream> Receiver s address Delivery address Consumer ID (KundID) Consumer reference (Refx) Customer ID to use for the chosen carrier Date when the label is printed Date when the printed label is no longer valid Carrier product ID Carrier product code Carrier product text Contents of the barcode Text to be printed below the barcode Printer stream. Currently only ZPL format 7. Method: ConsignmentReturnPrint 7.1. Information This method is only meant to be used to re-print labels. Requires an existing barcode as input parameter. 7.2. Request Name Type Required Description CustomerID Long int Yes Your customer ID in our system Password String Yes Your password in our system Barcode String Yes The unique package identity Printer String No Type of printer. For ZPL streams, set to ZPL 7.3. Response See chapter 6.3.
Sida 11 av 14 8. Method: Return 8.1. Information Used to create consignment returns which do not have any connection to an existing consignment. 8.2. Request Name Type Required Description Countrycode String Yes Country code (examples: SE, NO, FI etc) CustomerID Long int Yes Your customer ID in our system Password String Yes Your password in our system Consumername String Yes Consumer s (package receiver) name Consumeraddress1 String No Consumer s address line 1 (c/o) Consumeraddress2 String Yes Consumer s address line 2 Consumerpostcode String Yes Consumer s post code Consumerlocality String Yes Consumer s locality Consumeremail String No Consumer s email address ConsumerID String No Consumer ID (KundID) Reference String No Consumer reference (Refx) ReturnproductID String Yes See chapter 2.3 Customername String No Your customer name (if left blank, your customer name in our system will be used) Printer String No Type of printer. For ZPL streams, set to ZPL Mode String No For testing purposes, set to TEST 8.3. Response See chapter 6.3.
Sida 12 av 14 9. Method: NumberSeries 9.1. Information In the cases where the online web services above are not applicable, this method can be used to extract number series to use in local/offline implementations. Please note that this is currently only valid for subcontractors, for example Bring and Posten Norden. Request Name Type Required Description ProductID String Yes See chapter 10.2 (Product ID 2000 is not valid) Countrycode String Yes Country code (examples: SE, NO, FI) CustomerID Long int Yes Your customer ID in our system Password String Yes Your password in our system Numoflabels Int Yes The size of the number series Customername String No Your customer name (if left blank = your customer name in our system) 9.3. Response Name <package><response> <package><errormessage> <package><startnum> <package><stopnum> <package><labeldata><consignor><name> <package><labeldata><consignor><address1> <package><labeldata><consignor><address2> <package><labeldata><consignor><postcode> <package><labeldata><consignor><locality> <package><labeldata><consignor><countrycode> <package><labeldata><consignor><phonenumber> <package><labeldata><returnto><name> <package><labeldata><returnto><address1> <package><labeldata><returnto><address2> <package><labeldata><returnto><postcode> <package><labeldata><returnto><locality> <package><labeldata><returnto><countrycode> <package><labeldata><consignee><name> <package><labeldata><consignee><attention> <package><labeldata><consignee><address1> <package><labeldata><consignee><address2> <package><labeldata><consignee><postcode> <package><labeldata><consignee><locality> <package><labeldata><consignee><countrycode> <package><labeldata><consignee><phonenumber> <package><labeldata><deliverto><name> <package><labeldata><deliverto><address1> <package><labeldata><deliverto><address2> <package><labeldata><deliverto><postcode> <package><labeldata><deliverto><locality> <package><labeldata><deliverto><countrycode> <package><labeldata><customerid_carrier> Description DATA on success, otherwise ERROR On ERROR, returns reason Start number of the number series Stop number of the number series Sender s address Return address Receiver s address Delivery adress Customer ID to use for the chosen carrier
Sida 13 av 14 <package><labeldata><cod_accountnumber> <package><labeldata><productid> <package><labeldata><productcode> <package><labeldata><producttext> Cash On Delivery account number Carrier product ID Carrier product code Carrier product text
Sida 14 av 14 10. Appendix 10.1. Consignment Product ID ProductID Description Note 1000 Consignment Schenker Privpak Used in EDI files only 1010 Consignment Posten Norden (Sweden) Not yet implemented 1020 Consignment Bring / Posten Norge (Norway) Not yet implemented 10.2. Return Product ID ProductID Description Note 2000 Return Schenker Privpak 2010 Return Posten Norden (Sweden) 2020 Return Bring / Posten Norge (Norway)