Important note: We still support the operation of Ship Advisor 1.0 but the product is discontinued and we no longer make any new deployments. Please see our documentation for Ship Advisor 2.0 which will eventually replace Ship Advisor 1.0. |
Here is a list of methods available for Ship Advisor. Click a link to jump to the method descriptions including fields and request and response examples.
CreateConfirmedOrder | GetShipmentByOrder |
GetClosestDropPoint | SearchDropPointsFromAddress |
GetDropPointByCarrierID | SearchForDropPoints |
GetFreightProductsForShipment | SearchDPsForMoreProducts |
GetPrices |
CreateConfirmedOrder
Field |
Type |
Description |
Shipment |
WebShopShipment |
Mandatory |
Product |
SelectedProduct |
Mandatory |
This method creates an order in the Ship Advisor with the data from the web shop order.
The purpose of storing the order in ship Advisor, is that it enables integration between Ship Advisor and DeliveryHub / Shipment Server. In practice, this means that you can enter the order number in DeliveryHub/ Shipment Server and get the data for the Ship Advisor order.
The method GetshipmentByOrder could be used from other systems to get the order stored in ShipAdvisor.
Request:
<soapenv:Header>
<soap:ServiceAuthenticationHeader>
<soap:Username>Flexerman21073</soap:Username>
<soap:Password>Gm15/46exRF</soap:Password>
<soap:IsEncrypted>false</soap:IsEncrypted>
</soap:ServiceAuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<ship:CreateConfirmedOrder>
<ship:Shipment>
<ship:WebShopId>104</ship:WebShopId>
<ship:OrderNumber>123</ship:OrderNumber>
<ship:CODAmount>0</ship:CODAmount>
<ship:Lines>
<ship:WebShopLine>
<ship:NumberOfPackages>1</ship:NumberOfPackages>
<ship:PackageWeight>5000</ship:PackageWeight>
</ship:WebShopLine>
</ship:Lines>
<ship:Shopper>
<ship:Name>John Doe</ship:Name>
<ship:Address>Test addresse 1</ship:Address>
<ship:PostCode>0580</ship:PostCode>
<ship:City>OSLO</ship:City>
<ship:CountryCode>NO</ship:CountryCode>
</ship:Shopper>
</ship:Shipment>
<ship:Product>
<ship:WebShopProductId>1040009</ship:WebShopProductId>
<ship:Price>100</ship:Price>
<ship:CurrencyCode>NOK</ship:CurrencyCode>
<ship:DropPoint>
<ship:OriginalId>3695236</ship:OriginalId>
<ship:Name1>COOP MEGA HASLE TORG</ship:Name1>
<ship:Address1>GRENSEV 50</ship:Address1>
<ship:PostalCode>0579</ship:PostalCode>
<ship:City>OSLO</ship:City>
<ship:CountryCode>NO</ship:CountryCode>
</ship:DropPoint>
</ship:Product>
</ship:CreateConfirmedOrder>
</soapenv:Body>
Response:
<CreateConfirmedOrderResult>
<ChODId>116609</ChODId>
<ErrorCode>0</ErrorCode>
</CreateConfirmedOrderResult>
GetClosestDropPoint
Creates a new stack on the given subcarrier level.
Field |
Type |
Description |
productConceptID |
int |
Mandatory. The conceptId returned on the products from the GetFreightProductsforshipment method. If the product(s) has SupportsPickupDropPoint set to True, then it could be used as input to this method to get the closest drop point for that product. |
InstallationID |
string |
Mandatory. DeliveryHub installation id. |
postCode |
string |
Mandatory. Receiver post code. |
country |
string |
Mandatory. Receiver country ISO2 code. |
This method could be used if client don't want to ask the end-user to choose a drop point, but the application will suggest only one, the closest drop point to the post code given as input.
Request:
<soapenv:Header>
<soap:ServiceAuthenticationHeader>
<soap:Username>Flexerman21073</soap:Username>
<soap:Password>Gm15/46exRF</soap:Password>
<soap:IsEncrypted>false</soap:IsEncrypted>
</soap:ServiceAuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<ship:GetClosestDropPoint>
<ship:productConceptID>60</ship:productConceptID>
<ship:installationID>10916000028</ship:installationID>
<ship:postCode>3050</ship:postCode>
<ship:country>NO</ship:country>
</ship:GetClosestDropPoint>
</soapenv:Body>
Response:
<GetClosestDropPointResult>
<OriginalId>3713849</OriginalId>
<ESId>60E3713849</ESId>
<RoutingCode>DRA</RoutingCode>
<Name1>COOP PRIX MJØNDALEN</Name1>
<Address1>ARBEIDERG 6</Address1>
<PostalCode>3050</PostalCode>
<City>MJØNDALEN</City>
<CountryCode>NO</CountryCode>
<MapRefX>10.0149377382</MapRefX>
<MapRefY>59.7495398181</MapRefY>
<Distance>0.32051820198493591</Distance>
<KeyValueList>
<KeyValue>
<Key>SupportedProducts</Key>
<Value>60</Value>
<Type>String</Type>
</KeyValue>
</KeyValueList>
</GetClosestDropPointResult>
GetDropPointByCarrierId
Field |
Type |
Description |
productConceptID |
int |
Required. The conceptId returned on the product from the GetFreightProductsforshipment method. If it is a custom product, set the value to 0 (zero). |
country |
string |
Mandatory. Receiver country ISO2 code. |
InstallationID |
string |
Mandatory. DeliveryHub installation id. |
OriginalId |
string |
Mandatory. Drop point id. |
This method is useful to check if a drop point still exist at the time when the order is processed.
The order could be place a long time before it is actually processed / shipped. On that time it could be that the Drop Point does not exist anymore.
Request:
<soapenv:Header>
<soap:ServiceAuthenticationHeader>
<soap:Username>Flexerman21073</soap:Username>
<soap:Password>Gm15/46exRF</soap:Password>
<soap:IsEncrypted>false</soap:IsEncrypted>
</soap:ServiceAuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<ship:GetDropPointByCarriersId>
<ship:productConceptID>60</ship:productConceptID>
<ship:country>NO</ship:country>
<ship:installationID>10916000028</ship:installationID>
<ship:OriginalId>3712353</ship:OriginalId>
</ship:GetDropPointByCarriersId>
</soapenv:Body>
Response:
<GetDropPointByCarriersIdResult>
<OriginalId>3712353</OriginalId>
<ESId>60E3712353</ESId>
<RoutingCode>DRA</RoutingCode>
<Name1>BEN-SIN-STASJON AS SVINGEN BILISTSE</Name1>
<Address1>ROSENKRANTZG 153</Address1>
<PostalCode>3023</PostalCode>
<City>DRAMMEN</City>
<CountryCode>NO</CountryCode>
<MapRefX>10.1617629393</MapRefX>
<MapRefY>59.7513337799</MapRefY>
<Distance>0</Distance>
<KeyValueList>
<KeyValue>
<Key>SupportedProducts</Key>
<Value>60</Value>
<Type>String</Type>
</KeyValue>
</KeyValueList>
</GetDropPointByCarriersIdResult>
GetFreightProductsForShipment
Name |
Type |
Description |
Shipment |
WebShopShipment |
Mandatory |
deliveryTypeOrder |
int |
Mandatory |
The method returns a list of suited products for the shipment data input by the web shop. It depends on measurement, requested COD and so on. Based on the input from the web shop, the products which pass the validations (web shop product specific and carrier / price calculation) will be returned from Ship Advisor. This ensures that only the valid freight method is displayed as freight alternatives for the end user (customer) to choose from for the shipment.
Products that gets price=0 from Ship Advisor will be removed from the returned list, expect if a product is configured with a fixed price set to 0. This enables the possibility to return a product configured to have free shipping.
deliveryTypeOrder:
10 = Home Alternatives
20 = At Work Alternatives
30 = Pick Up Alternatives (at chosen drop point)
40 = Return Alternatives
This is a way to group products if it is desired. Otherwise just one group could be used for all products. It is configured for each Ship Advisor account.
It is also possible to create custom groups, in this case it configured at the Ship Advisor account.
Request:
<soapenv:Header>
<soap:ServiceAuthenticationHeader>
<soap:Username>Flexerman21073</soap:Username>
<soap:Password>Gm15/46exRF</soap:Password>
<soap:IsEncrypted>false</soap:IsEncrypted>
</soap:ServiceAuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<ship:GetFreightProductsForShipment>
<ship:Shipment>
<ship:WebShopId>104</ship:WebShopId>
<ship:CODAmount>0</ship:CODAmount>
<ship:Lines>
<ship:WebShopLine>
<ship:NumberOfPackages>1</ship:NumberOfPackages>
<ship:PackageWeight>5000</ship:PackageWeight>
</ship:WebShopLine>
</ship:Lines>
<ship:Shopper>
<ship:PostCode>3023</ship:PostCode>
<ship:CountryCode>NO</ship:CountryCode>
</ship:Shopper>
</ship:Shipment>
<ship:deliveryTypeOrder>20</ship:deliveryTypeOrder>
</ship:GetFreightProductsForShipment>
</soapenv:Body>
Response:
<ProductInfoList>
<SuitedProductInfo>
<WebShopProductId>1040006</WebShopProductId>
<ConceptId>1032</ConceptId>
<CustomProductDBId xsi:nil="true"/>
<ServiceIds/>
<ProductName>Bedriftspakke Dør-Dør</ProductName>
<DeliveryTime>2-5 days</DeliveryTime>
<Price>138</Price>
<CurrencyCode>NOK</CurrencyCode>
<SupportsPickDropPoint>false</SupportsPickDropPoint>
</SuitedProductInfo>
<SuitedProductInfo>
<WebShopProductId>1040005</WebShopProductId>
<ConceptId>61</ConceptId>
<CustomProductDBId xsi:nil="true"/>
<ServiceIds/>
<ProductName>DPD Standard</ProductName>
<DeliveryTime>2-5 days</DeliveryTime>
<Price>185</Price>
<CurrencyCode>NOK</CurrencyCode>
<SupportsPickDropPoint>false</SupportsPickDropPoint>
</SuitedProductInfo>
<SuitedProductInfo>
<WebShopProductId>1040007</WebShopProductId>
<ConceptId>1034</ConceptId>
<CustomProductDBId xsi:nil="true"/>
<ServiceIds/>
<ProductName>Bedriftspakke Ekspress over natt 0900</ProductName>
<Description>Delivered to work before 0900 in the morning</Description>
<DeliveryTime>0900 next morning</DeliveryTime>
<Price>289</Price>
<CurrencyCode>NOK</CurrencyCode>
<SupportsPickDropPoint>false</SupportsPickDropPoint>
</SuitedProductInfo>
</ProductInfoList>
<ErrorMessage/>
GetPrices
Field
Type
Description
Shipment
WebShopShipment
Mandatory
WebShopProductIds
ArrayOfLong
Mandatory
Shipment – completed with number of packages, dimensions, sender information and all other things price calculation needs.
WebShopProductIds – a list/array of webshop product ids that you want to get prices on.
If you want all products to be returned without explicit define the WebShopProductIds in the request, then you can pass -1 as value in the WebShopProductIds array.
A WebShopProductId is an unique identifier for a product that is configured for a webshop in Ship Advisor. This means it is unique for each products and webshops in Ship Advisor.
The method will calculate the price for the required products (WebShopProductIds) calling PriceCalculation web service, using also the filtering stage.
NOTE: All the required products will be returned even if they do not pass filtering or have price zero. In these later cases, SuitedProductInfo.ErrorMessage will explain the reason why product is not valid, all other fields will have empty/null/default values.
Request:
<soapenv:Header>
<soap:ServiceAuthenticationHeader>
<soap:Username>Flexerman21073</soap:Username>
<soap:Password>Gm15/46exRF</soap:Password>
<soap:IsEncrypted>false</soap:IsEncrypted>
</soap:ServiceAuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<ship:GetPrices>
<ship:Shipment>
<ship:WebShopId>104</ship:WebShopId>
<ship:CODAmount>150</ship:CODAmount>
<ship:Lines>
<ship:WebShopLine>
<ship:NumberOfPackages>1</ship:NumberOfPackages>
<ship:PackageWeight>5000</ship:PackageWeight>
</ship:WebShopLine>
</ship:Lines>
<ship:Shopper>
<ship:PostCode>3023</ship:PostCode>
<ship:CountryCode>NO</ship:CountryCode>
</ship:Shopper>
</ship:Shipment>
<ship:WebShopProductIds>
<ship:long>1040006</ship:long>
<ship:long>1040005</ship:long>
</ship:WebShopProductIds>
</ship:GetPrices>
</soapenv:Body>
Response:
<ProductInfoList>
<SuitedProductInfo>
<WebShopProductId>1040005</WebShopProductId>
<ConceptId xsi:nil="true"/>
<CustomProductDBId xsi:nil="true"/>
<Price>0</Price>
<ErrorMessage>COD not supported.</ErrorMessage>
<SupportsPickDropPoint xsi:nil="true"/>
</SuitedProductInfo>
<SuitedProductInfo>
<WebShopProductId>1040006</WebShopProductId>
<ConceptId>1032</ConceptId>
<CustomProductDBId xsi:nil="true"/>
<ServiceIds/>
<ProductName>Bedriftspakke Dør-Dør</ProductName>
<DeliveryTime>2-5 dager</DeliveryTime>
<Price>303</Price>
<CurrencyCode>NOK</CurrencyCode>
<SupportsPickDropPoint>false</SupportsPickDropPoint>
</SuitedProductInfo>
</ProductInfoList>
GetShipmentByOrder
Field |
Type |
Description |
orderNumber |
string |
Mandatory |
installationID |
string |
Mandatory |
actorID |
string |
Mandatory |
This method is used to get the order data on the created (uploaded) order in ShipAdvisor
(see CreateConfirmedOrder method).
Request:
<soapenv:Header>
<soap:ServiceAuthenticationHeader>
<soap:Username>Flexerman21073</soap:Username>
<soap:Password>Gm15/46exRF</soap:Password>
<soap:IsEncrypted>false</soap:IsEncrypted>
</soap:ServiceAuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<ship:GetShipmentByOrder>
<ship:orderNumber>123</ship:orderNumber>
<ship:installationID>10916000028</ship:installationID>
<ship:actorID>64</ship:actorID>
</ship:GetShipmentByOrder>
</soapenv:Body>
Response:
<ResponseStatus>Success</ResponseStatus>
<Shipments>
<PortalShipment>
<Shipment>
<WebShopId>104</WebShopId>
<OrderNumber>123</OrderNumber>
<ChODId>116609</ChODId>
<InsuranceAmount xsi:nil="true"/>
<CODAmount>0</CODAmount>
<Lines>
<WebShopLine>
<NumberOfPackages>1</NumberOfPackages>
<PackageWeight>5000</PackageWeight>
<PackageHeight xsi:nil="true"/>
<PackageLength xsi:nil="true"/>
<PackageWidth xsi:nil="true"/>
<PackageVolume xsi:nil="true"/>
<NullableDangerousGoods xsi:nil="true"/>
<LoadmeterMM xsi:nil="true"/>
</WebShopLine>
</Lines>
<ExchangeRate xsi:nil="true"/>
<Shopper>
<ReceiverId xsi:nil="true"/>
<Name>John Doe</Name>
<City>OSLO</City>
<CountryCode>NO</CountryCode>
<PostCode>0580</PostCode>
<Address>Test addresse 1</Address>
</Shopper>
<RequestDate>2016-02-18T06:45:50.48Z</RequestDate>
<TotalOrderAmount xsi:nil="true"/>
<ShipLoadmeterMM xsi:nil="true"/>
<DeliveryDate xsi:nil="true"/>
</Shipment>
<WebShop>
<InstallationId>10916000028</InstallationId>
<ActorId>64</ActorId>
<Name>nShift AS</Name>
<Address>Lørenrenvangen 22</Address>
<PostCode>0580</PostCode>
<CountryCode>NO</CountryCode>
</WebShop>
<Product>
<WebShopProductId>1040009</WebShopProductId>
<ConceptId>60</ConceptId>
<CustomProductDBId xsi:nil="true"/>
<ServiceIds/>
<Price>100</Price>
<CurrencyCode>NOK</CurrencyCode>
<DropPoint>
<OriginalId>3695236</OriginalId>
<Name1>COOP MEGA HASLE TORG</Name1>
<Address1>GRENSEV 50</Address1>
<PostalCode>0579</PostalCode>
<City>OSLO</City>
<CountryCode>NO</CountryCode>
<MapRefX>0</MapRefX>
<MapRefY>0</MapRefY>
<Distance>0</Distance>
</DropPoint>
</Product>
</PortalShipment>
</Shipments>
SearchDropPointsFromAddress
Field |
Type |
Description |
ProductConceptIDs |
array |
Mandatory. The conceptId returned on the products from the GetFreightProductsforshipment method. If the product(s) has SupportsPickupDropPoint set to True, then it could be used as input to this method to get the drops point for that product.
|
installationID |
string |
Mandatory. DeliveryHub installation id. |
CountryCode |
string |
Mandatory. Receiver country ISO2 code. |
Address |
string |
Mandatory. Receiver delivery address, the distance is calculated from the address. |
PostCode |
string |
Mandatory. Receiver post code |
City |
string |
Mandatory |
limit |
int |
Optional. Maximum number of returned drop points, default is 1. |
The method is much like the method SearchForDropPoint, the difference is that it calculates the driving distance from the receiver address to the drop points for a more accurate calculation of the distance.
Note: This method need to be given access to before it could be used.
SearchForDropPoints
Field |
Type |
Description |
productConceptID |
int |
Mandatory. The conceptId returned on the products from the GetFreightProductsforshipment method. If the product(s) has SupportsPickupDropPoint set to True, then it could be used as input to this method to get the drops point for that product. |
installationID |
string |
Mandatory. DeliveryHub installation id. |
country |
string |
Required. Receiver country ISO2 code. |
address |
string |
Optional. Receiver delivery address. Supported by some carriers to get a more accurate closest drop point (rarely used). |
postCode |
string |
Mandatory. Receiver post code. |
city |
string |
Required. Even if the city is not provide drop points would be returned, however it is strongly advised to provide the city, to ensure that the results contains the amount of drop points that is asked for and that the distance is calculated. |
limit |
int |
Optional. Maximum number of returned drop points, default is 1. |
This method should be used if client use a map for showing drop points or / and a drop-down list to ask the end-user to choose a drop point.
Request:
<soapenv:Header>
<soap:ServiceAuthenticationHeader>
<soap:Username>Flexerman21073</soap:Username>
<soap:Password>Gm15/46exRF</soap:Password>
<soap:IsEncrypted>false</soap:IsEncrypted>
</soap:ServiceAuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<ship:SearchForDropPoints>
<ship:productConceptID>60</ship:productConceptID>
<ship:installationID>10916000028</ship:installationID>
<ship:country>NO</ship:country>
<ship:postCode>3023</ship:postCode>
<ship:limit>3</ship:limit>
</ship:SearchForDropPoints>
</soapenv:Body>
Response:
<SearchForDropPointsResult>
<DropPointData>
<OriginalId>3712353</OriginalId>
<ESId>60E3712353</ESId>
<RoutingCode>DRA</RoutingCode>
<Name1>BEN-SIN-STASJON AS SVINGEN BILISTSE</Name1>
<Address1>ROSENKRANTZG 153</Address1>
<PostalCode>3023</PostalCode>
<City>DRAMMEN</City>
<CountryCode>NO</CountryCode>
<MapRefX>10.1617629393</MapRefX>
<MapRefY>59.7513337799</MapRefY>
<Distance>0.085093807676340033</Distance>
<KeyValueList>
<KeyValue>
<Key>SupportedProducts</Key>
<Value>60</Value>
<Type>String</Type>
</KeyValue>
</KeyValueList>
</DropPointData>
<DropPointData>
<OriginalId>3504206</OriginalId>
<ESId>60E3504206</ESId>
<RoutingCode>DRA</RoutingCode>
<Name1>KIWI 570 GULSKOGEN</Name1>
<Address1>GULDLISTEN 35</Address1>
<PostalCode>3048</PostalCode>
<City>DRAMMEN</City>
<CountryCode>NO</CountryCode>
<MapRefX>10.157960262</MapRefX>
<MapRefY>59.7425217952</MapRefY>
<Distance>0.93739182463908122</Distance>
<KeyValueList>
<KeyValue>
<Key>SupportedProducts</Key>
<Value>60</Value>
<Type>String</Type>
</KeyValue>
</KeyValueList>
</DropPointData>
<DropPointData>
<OriginalId>3700093</OriginalId>
<ESId>60E3700093</ESId>
<RoutingCode>DRA</RoutingCode>
<Name1>MENY ÅSSIDEN</Name1>
<Address1>ING.RYDBERGS G 56</Address1>
<PostalCode>3024</PostalCode>
<City>DRAMMEN</City>
<CountryCode>NO</CountryCode>
<MapRefX>10.136690216</MapRefX>
<MapRefY>59.75384121</MapRefY>
<Distance>1.485093301964483</Distance>
<KeyValueList>
<KeyValue>
<Key>SupportedProducts</Key>
<Value>60</Value>
<Type>String</Type>
</KeyValue>
</KeyValueList>
</DropPointData>
</SearchForDropPointsResult>
SearchDPsForMoreProducts
Field |
Type |
Description |
webshipId |
int |
Mandatory. The unique id for the webshop. |
productConceptIds |
string |
Set to 0 (zero) if webshopProductIds field is used to only get custom drop points. Use the conceptId that is returned on the products from the GetFreightProductsForShipment method. If the product(s) has SupportsPickupDropPoint set to True, then it could be used as input to this method to get the drops point for that product(s). |
webshopProductIds |
string |
Optional (if productConceptIds field is used). A comma separated list of webshopProductIds. The input is the webShopProductId that is returned on the products from the GetFreightProductsforshipment method. It is used to get the drop points that is connected to a custom product. A custom product with drop points is identified by the ConceptId is zero(0), SupportsPickupDropPoint and SupportCustomDropPoint set to True; that is returned by the GetFreightProductsforshipment method. |
installationID |
string |
Mandatory. DeliveryHub installation id. |
country |
string |
Required. Receiver country ISO2 code. |
address |
string |
Optional. Receiver delivery address. Supported by some carriers to get a more accurate closest drop point (rarely used). |
postCode |
string |
Mandatory. Receiver post code. |
city |
string |
Mandatory. Even if the city is not provided, drop points would be returned, however it is strongly advised to provide the city, to ensure that the results contains the amount of drop points that is asked for and that the distance is calculated. |
limit |
int |
Optional. Maximum number of returned drop points, default is 1. If drop points for multiple products are requested, the response will contain the amount of drop point set by the limit for each product. |
This method shares the same functionality as the SearchForDropPoints method and can be used as a substitute. In addition it supports both carrier and custom drop points. It also handles drop points for multiple carrier and custom products at once.