This article will explain how to transmit data to your carriers if you are using the Shipment Server API. It is very important to transmit your EDI files. If a carrier has not received the EDI files before they handle the goods, they may need to handle it manually and some will charge a fee for this.
Note that some carriers receive data through a web service and do not need to receive EDI-files. If you are uncertain whether your carrier requires EDI files, please ask the carrier or customer service.
Read about how to:
Transmit all shipments in a stack
After submitting a shipment it will be placed in a stack. A stack is a placeholder for shipments ready for transmitting EDI to the carrier. The response from SubmitShipment will contain a StackCSID which identifies the stack that the shipment has been placed in. The StackCSID is needed if you want to transmit all the shipments within a given stack to the carrier. You can also use the method GetStacks to retrieve the StackCSID - see the examples below.
Method:
TransmitStack
Request example:
{ "StackCSID": 60 }
Expected output:
Successful request:
{ "Messages": [ "Job successful" ], "BatchCSID": 23003 }
Successful request, timeout:
{ "Messages": [ "Transmit job started" ] }
How to retrieve the StackCSID using the GetStacks method
The GetStacks method returns data on all stacks along with the data on the carrier to which the stack belongs. When shipments are submitted they are placed in a stack at subcarrier level. The StackCSID is always included in the response from SubmitShipment but using the GetStacks method you can retrieve it without submitting more shipments.
Method:
GetStacks
Expected output:
Successful request:
{ "Carriers": [ { "CarrierCSID": "216", "CarrierConceptID": "221", "CarrierShortName": "DHL", "CarrierFullName": "DHL Express", "Subcarriers": [ { "SubcarrierCSID": "431", "SubcarrierConceptID": "434", "SubcarrierName": "DHL Express", "Stacks": [ { "StackCSID": "14014", "StackName": "Stack 1", "StackCount": "9" } ] } ] } ] }
StackCount in the response indicates how many shipments the corresponding stack contains. If a stack contains zero shipments you can skip this when transmitting. In the example above, the stack with the StackCSID 14014 contains 9 shipments.
Transmit selected shipments
It is possible to transmit selected shipments using the TransmitShipment method. This method will only transmit the specified shipment(s). ShipmentCSIDs contains a comma-delimited list of one or more ShpCSIDs which identify the shipments that should be transmitted. The ShpCSID appears in the response you get after submitting a shipment.
Method:
TransmitShipments
Request example:
{ "ShipmentCSIDs": [ 5436, 5437 ] }
Expected output:
Successful request:
{ "Messages": [ "Job successful" ], "BatchCSID": 123 }
Successful request, timeout:
{ "Messages": [ "Transmit job started" ] }
Links to other relevant articles about Shipment Server:
- Methods for Shipment Server API
- Shipment Server Appendix: Objects and Fields
- Getting started with Shipment Server integration