Skip to main content

Errors

Errors should be handled gracefully. Your users should still be able to order even if the Shipping Guide API returns an error or if there is an error establishing a connection to the API.

The Shipping Guide API return two levels of error information:

When we are not able to process one of the service requested, we will respond with a error on service level.

No applicable services found

When no services are applicable for the request you’ve made, an empty resultset is returned. Reasons can be that the shipment was too large or too small, or the requested shipment was outside the coverage area of the requested services. Your code should handle these cases, i.e. an empty result, and should not fail because of this.

To fix this, you could e.g. use a Cargo product for large shipments, or you could request other services and see which ones that fit your need and find your service by using What would you like to send?

Additional service XXX is not applicable for product YYY

If a requested additional service is not supported on requested product, API will just ignore that additional service for price calculation and return info as a trace message. Supported list of value added services on services can be found in the section Value added Services.

Warnings

Ideally, clients should not parse warning codes for any logic as they are bound to change and supposed to be treated as informational data. Warnings are sent out when Shipping Guide is able to validate the request but missed some part of response, for example price or lead time, due to unavailability of external systems.

Warning codes are documented in xsd as well.