To get started with Shipment Server, you need a Shipment Server license and an account. You may use our test bench to do some testing and get familiar with how to build the requests. This article will cover the basic information to get you started with the integration:
- Accessing the Shipment Server API
- Using the Shipment Server test bench
- Printing labels
- Data storage of submitted shipments
See these articles for more information:
For a non-technical introduction to Shipment Server, see this article:
Accessing the API
The connection to the Shipment Server API is through a HTTPS secure connection on the standard port for secure connections, 443. Each customer using the Shipment Server has a key that is set at Actor level. This key must be passed in all the requests. Failure to include the key will result in failure of the request. The webserver is accessed using REST and uses POST for all methods. The POST variables can be encoded as multipart/form-data or URL-encoded.
- Numeric - numeric fields with a value of 0 (zero) are not included in the JSON string exported by the web service, a value of 0 (zero) being the default.
- String - Empty strings are not included in the JSON string exported by the web service.
- DateTime - Dates and Timestamps are formatted in the ISO 8601 standard. An example of a date is: 2019-06-27 and for a timestamp: 2019-06-27T10:25:00.
Important: Please note that we only support the extended notations and not the basic notations without hyphens, so e.g. 20190627 will not be accepted. Timezones will be removed from the request and milliseconds are ignored.
- Enum - Some fields are sent as enums, meaning that they are sent as an integer value, but the value has a certain meaning. See the Shipment Server Appendix: Objects and Fields for a complete list of the possible values for these fields.
Using the Shipment Server test bench
The Shipment Server test bench (http://consignorsupport.no/testbench/ShipmentServer.aspx) is a web application that shows the main features of Shipment Server and can be used as a tool for developers during implementation of integration with Shipment Server. The test environment shows both the JSON request to the server and the JSON response from the server, so this can be used to inspect how the request is built.
Use the credentials below to get access to the test environment. This test account is a mix of carriers from multiple countries. Please contact us to get a test account that is configured for the specific carriers and products you need.
Server URL: http://sstest.consignor.com/ship/ShipmentServerModule.dll
Server Key: sample
Production Server URL: https://www.shipmentserver.com/ship/ShipmentServerModule.dll
The button Submit will submit the request to the server based on the input from the form. If PNG is chosen as Label Type, you will get this in the response from the server, and it will be displayed on the screen. The button Show JSON Only only outputs the JSON request in the JSON Request text box without submitting to server. This is useful if you only want to see the build up of the request of the different inputs, you fill out in the form.
The data text box shows JSON formatted, so it is easy to read. It can also be used to test your own written request and submit it to the server by pressing the Submit Request button.
The JSON Response text box will show the response from the server on the different methods that are executed in the test bench and the Request text box will be labeled with the name of the method that is been executed.
If you paste your shipment request into the text box, you can use the Cleanup JSON button to format the text for easy reading. If there is an error in the request to the server it will be displayed in the text box for JSON Response.
Shipment Server does not handle printing of the labels of any kind on the client side. The customer has to implement a solution that fits their environment.
To print from a Windows application you can use the Zebra label printers' own language EPL or ZPL. In this case you need a Zebra printer or a printer that supports it. When storing the label type EPL / ZPL in a file or use it from a stream, you can send it to the printer by using "move" or "copy" file to a shared printer. Printing PNG and PDF in Windows can be done through a print dialog or automated with a process using Win32API or using unmanaged code with winspool.drv and Marshalling.
If you are using thermal printers and are experiencing problems with printing, you may be able to find help in our Printers help pages. Issues with label print are often related to printer settings, calibration, missing fonts etc.
Data storage of submitted shipments
Submitted shipments are kept in the database for 90 days. Shipments older than 90 days are deleted each night to keep the database as compact as possible and ensure high performance. However, your shipments will be available in Portal for as long as you want. Portal is the place where you can view statistics and make reports.
Contact nShift to get a Portal user account.
Read more about Data storage in Portal here.