You are on page 1of 63

ConsignmentWS

Web Service Specification

UNIFAUNSONIA RODIERE DEN 22 JANUARI 2016


TEGNÈRGATAN 34 • 113 59 STOCKHOLM • SWEDEN
+46 8 729 88 50 • WWW.UNIFAUN.COM
Revision history
Version Date Log Author

1.0 2008-03-12 Created Memnon Networks

1.1 2008-11-14 Updated element types Memnon Networks

1.2 2008-12-17 Added element types, dangerous goods Memnon Networks

Added method findByConsignmentId and


1.3 2010-04-22 Memnon Networks
comments for not implemented methods

More methods implemented and new error


1.4 2010-08-20 Memnon Networks
codes added

Extended description texts for


1.5 2010-10-21 findByConsignmentNo and Memnon Networks
findByConsignmentId methods

1.6 2011-12-01 Added getCalculatedPrice method Johan Tempelman

Edited method that are not implemented,


added 3 roles in parts (“orderingCustomer”,
1.7 2012-06-30 Sonia Rodiere
“receivingAgent”, “deliveryTerminal”) and
extended description texts

Implementing missing elements and


attributes like DangerousGoods and
ContentItems in order to follow the WSDL.
1.8 2012-09-16 Sonia Rodiere
Also implemented those attributes in the
WS response. Nothing is added, just more
compliant to the WSDL.

Information about implementation of the


1.9 2013-01-03 Sonia Rodiere
Status method and Price method

Method delete available for all nonbooked


1.9.1 2013-05-01 consignments and element dutiable added Sonia Rodiere
in CustomsClearance

1.9.2 2013-06-16 Added role “returnAddress” in parts Sonia Rodiere

CONSIGNMENT.WS 2 / 63
1.9.3 2013-10-04 Clarification about document type outprints Tom Tingstadius

Added “tunnelRestrictionCode” in
DangerousGoods.
Minor change in the handling of goodsvalue
1.9.4 2014-03-01 Sonia Rodiere
in CustomsClearance to set goodsvalue
correctly in Courier services like Fedex, DHL
Express, DHL Euroconnect

1.9.5 2014-04-07 Added element “location” in Pickup Sonia Rodiere

Added role “customsVATPayer” in Part,


1.9.6 2014-05-04 Sonia Rodiere
enabling setting a specific VAT payer

Change of external test platform from dev


1.9.7 2015-01-11 Sonia Rodiere
to at, updating URL

Added element “owner” in Consignment,


2.0 2015-03-02 the element is optional and not returned in Sonia Rodiere
the response

Added methods printLabel, addGoodsRow,


2.1 2015-04-27 Martin Grape
deletePackageId and printWaybill

Added element “statisticalNo” under


2.1 2015-10-13
”ContentItem”

Added method Cancel


To implement the new cancel call to an
existing ConsigmentWS implementation
2.11 2016-02-28 meaning installed before 28 feb 2016, just Sonia Rodiere
re-generate your clients/code with current
WSDL URI address.
Added field notes on goodrow

2.12 2017-05-17 Added role “extranotify" in parts Sonia Rodiere

2.13 2017-12-05 Clarification regarding target/pickup date Per Larsson

2.14 2017-12-06 Added getConsignmentTemplate() method Per Larsson

CONSIGNMENT.WS 3 / 63
Table of content
Revision history .................................................................................................................. 2
1 Introduction ................................................................................................................ 8
1.1 Standards .......................................................................................................................................... 8
1.2 Test Account ..................................................................................................................................... 8
1.3 Production Account .......................................................................................................................... 8
1.4 Documentation ................................................................................................................................. 8
1.5 Generating your client ...................................................................................................................... 8
1.6 Support ............................................................................................................................................. 8
1.7 Security ............................................................................................................................................. 9
1.8 IMPORTANT: PickupDate .................................................................................................................. 9
2 Methods ...................................................................................................................... 9
2.1 Consignment Templates ................................................................................................................... 9
2.1.1 getConsignmentTemplates................................................................................................... 9
2.2 Sending consignment information ................................................................................................... 9
2.2.1 book ...................................................................................................................................... 9
2.2.2 save ..................................................................................................................................... 11
2.3 Finding consignment ...................................................................................................................... 12
2.3.1 findByConsignmentId ......................................................................................................... 12
2.3.2 findByConsignmentNo ........................................................................................................ 12
2.3.3 findByConsignorReference ................................................................................................. 12
2.3.4 findByPackageId ................................................................................................................. 13
2.3.5 findByTransactionId ............................................................................................................ 13
2.3.6 findByReference ................................................................................................................. 13
2.3.7 findById ............................................................................................................................... 13
2.4 Freight documents.......................................................................................................................... 14
2.4.1 print .................................................................................................................................... 14
2.4.2 printLabel ............................................................................................................................ 14
2.4.3 printWaybill ........................................................................................................................ 15
2.5 Status .............................................................................................................................................. 16

CONSIGNMENT.WS 4 / 63
2.5.1 isBooked ............................................................................................................................. 16
2.5.2 isComplete .......................................................................................................................... 16
2.5.3 isOrdered ............................................................................................................................ 17
2.5.4 isPrinted .............................................................................................................................. 17
2.5.5 isArchived ........................................................................................................................... 18
2.5.6 isPrintable ........................................................................................................................... 18
2.6 Price ................................................................................................................................................ 18
2.6.1 getCalculatedPrice .............................................................................................................. 18
2.7 Advanced administration ............................................................................................................... 19
2.7.1 archive ................................................................................................................................ 19
2.7.2 cancel .................................................................................................................................. 19
2.7.3 delete .................................................................................................................................. 20
2.7.4 getTransactionId ................................................................................................................. 20
2.7.5 order ................................................................................................................................... 21
2.7.6 addGoodsRow..................................................................................................................... 21
2.7.7 deletePackageId ................................................................................................................. 21
2.7.8 consolidate ......................................................................................................................... 22
2.7.9 copy .................................................................................................................................... 22
2.7.10 create .................................................................................................................................. 23
2.7.11 split ..................................................................................................................................... 23
3 Types ........................................................................................................................ 24
3.1 Consignment ................................................................................................................................... 24
3.2 ConsignmentResult......................................................................................................................... 25
3.3 PrintResult ...................................................................................................................................... 26
3.4 PrintResult ...................................................................................................................................... 26
3.5 PriceResult ...................................................................................................................................... 26
3.6 CalculatedPrice ............................................................................................................................... 27
3.7 PriceDetail....................................................................................................................................... 27
3.8 cancelResponse .............................................................................................................................. 27
4 Elements ................................................................................................................... 28
4.1 Types............................................................................................................................................... 28
4.1.1 AuthenticationToken .......................................................................................................... 28

CONSIGNMENT.WS 5 / 63
4.1.2 Part ..................................................................................................................................... 28
4.1.3 Address ............................................................................................................................... 29
4.1.4 Part ..................................................................................................................................... 29
4.1.5 Reference............................................................................................................................ 30
4.1.6 GoodsItem .......................................................................................................................... 30
4.1.7 PackageIds .......................................................................................................................... 32
4.1.8 DangerousGoods ................................................................................................................ 32
4.1.9 Category.............................................................................................................................. 33
4.1.10 TransportProduct................................................................................................................ 33
4.1.11 Tod ...................................................................................................................................... 34
4.1.12 Cod ...................................................................................................................................... 35
4.1.13 Pickup ................................................................................................................................. 35
4.1.14 Delivery ............................................................................................................................... 36
4.1.15 Transport ............................................................................................................................ 37
4.1.16 CustomsClearance .............................................................................................................. 37
4.1.17 Sortcode.............................................................................................................................. 38
4.1.18 Insurance ............................................................................................................................ 38
4.1.19 ServiceOption ..................................................................................................................... 38
4.1.20 ServiceOptionItem .............................................................................................................. 39
4.1.21 Target.................................................................................................................................. 39
4.1.22 Contents ............................................................................................................................. 39
4.1.23 ContentItem........................................................................................................................ 40
4.1.24 ConsignmentReference ...................................................................................................... 41
4.1.25 Note .................................................................................................................................... 41
4.1.26 GoodsInvoice ...................................................................................................................... 41
4.1.27 InvoiceNote......................................................................................................................... 42
4.1.28 Error .................................................................................................................................... 42
4.1.29 Receipt ................................................................................................................................ 42
5 Send in client name ................................................................................................... 44
6 Examples ................................................................................................................... 45
6.1 Book consignment .......................................................................................................................... 45
6.1.1 Request ............................................................................................................................... 45

CONSIGNMENT.WS 6 / 63
6.1.2 Response OK ....................................................................................................................... 46
6.1.3 Response Failed .................................................................................................................. 47
6.2 Find consignment ........................................................................................................................... 48
6.2.1 Request ............................................................................................................................... 48
6.2.2 Response OK ....................................................................................................................... 49
6.2.3 Response failed................................................................................................................... 51
6.3 Continous labeling - create consignment ....................................................................................... 52
6.3.1 Request ............................................................................................................................... 52
6.3.2 Response OK ....................................................................................................................... 53
6.4 Add goodsrow................................................................................................................................. 54
6.4.1 Response ok ........................................................................................................................ 54
6.4.2 Response failed................................................................................................................... 55
6.5 Delete package ............................................................................................................................... 56
6.5.1 Response OK ....................................................................................................................... 56
6.5.2 Response failed................................................................................................................... 56
6.6 getConsignmentList ........................................................................................................................ 57
6.6.1 Request ............................................................................................................................... 57
6.6.2 Response............................................................................................................................. 58
7 Appendix A ................................................................................................................ 59
7.1 Error codes...................................................................................................................................... 59
7.1.1 Consignment ....................................................................................................................... 59
7.1.2 Domain ............................................................................................................................... 61
7.1.3 Account ............................................................................................................................... 62
7.1.4 Account ............................................................................................................................... 62
8 Appendix B ................................................................................................................ 63
8.1 Document types ............................................................................................................................. 63

CONSIGNMENT.WS 7 / 63
1 Introduction
This document describes the Web Service methods available for handling consignment.
It includes a detailed description of the methods in the interface. Section Elements
contains detail information of the elements to send in.

1.1 Standards
The web service conforms to WS-I Basic Profile. The WSDL binding style of the Web Services is
Document/literal wrapped.

1.2 Test Account


If you want to test our ConsignmentWS API, ask our support to a test account/domain setup. It is
possible to get a fully functional test account in our production environment. It will be 100% production,
minus the communication to carriers.

1.3 Production Account


• Account / Login to the Apport service
• An Integration agreement with Unifaun AB

1.4 Documentation
https://service.web-ta.net/np/public/integration-files
• Use templates. It is the key to an easy implementation and maintainable solution.
• For parameter specification/explanations, please look at the xml specification for integration
files.

1.5 Generating your client


Unless you intend to test new features that is only available in the test environment, always generate
your client from production:
https://service.web-ta.net/ws/services/ConsignmentWS?wsdl
For load testing or acceptance testing of new features/functionality or schema, use test environment:
https://at.memnonnetworks.com/ws/services/ConsignmentWS?wsdl

1.6 Support
We will gladly help, but if you are having problems with a request or response, you must provide our
customer service department with request and response.

CONSIGNMENT.WS 8 / 63
1.7 Security
Every method call takes an AuthenticationToken object holding login information.

1.8 IMPORTANT: PickupDate


Please read the information regarding dates, especially regarding pickup date.

2 Methods
2.1 Consignment Templates
Consignment Templates is the key to creating an easy implementation. Se separate documentation of
templates to understand how to make full use of them.

2.1.1 getConsignmentTemplates
Will return the name and description of all consignment templates that are located on the WS account
domain.

Required/
Parameter Type Description
Cardinality

AuthenticationToken Yes AuthenticationToken Login information, see


AuthenticationToken

2.2 Sending consignment information


2.2.1 book
Book the sent in consignment. Use this method to create a BOOKED consignment (found in Memnon
Apport service under tab” Shipment Status”).The ConsignmentResult contains the booked consignment
or a list of errors if the data is not sufficient to create a booked consignment.

Required/
Parameter Type Description
Cardinality

AuthenticationToken Yes AuthenticationToken Login information, see


AuthenticationToken

Consignment Yes Consignment See Consignment

transactionId Yes String Transaction ID. Use own


transaction id or id generated
by the system. The transaction
id is used for identifying a

CONSIGNMENT.WS 9 / 63
request to the web service. If
the same transaction id is used
again, the first booked
consignment is returned in the
response. This ensures that no
duplicates are created. Always
use distinct transactionId if
you want to create distinct
consignments, eg:
${=System.currentTimeMillis()}
NOTE! For method book use
“transactionId” and for
method save use
“TransactionId”

Return N/A ConsignmentResult See ConsignmentResult

CONSIGNMENT.WS 10 / 63
2.2.2 save
Save the sent in consignment to persistent storage.
Use this method to create a NON-BOOKED consignment (found in Unifaun Apport service under tab
“Book transport”).
To book the consignment, call book method
Required/
Parameter Type Description
Cardinality
Login information, see
AuthenticationToken Yes AuthenticationToken
AuthenticationToken
Consignment Yes Consignment See Consignment
TransactionId Yes String Transaction ID. Use own
transaction id or id
generated by the system.
The transaction id is used
for identifying a request
to the web service. If the
same transaction id is
used again, the first
booked consignment is
returned in the response.
This ensures that no
duplicates are created.
Always use distinct
transactionId if you want
to create distinct
consignments, eg:
${=System.currentTimeM
illis()}
NOTE! For method book
use “transactionId” and
for method save use
“TransactionId”
Return N/A ConsignmentResult See ConsignmentResult

CONSIGNMENT.WS 11 / 63
2.3 Finding consignment
2.3.1 findByConsignmentId
Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

Consignment ID i.e. the


ConsignmentId Yes String 1..35 internal ID of the
consignment in Apport

Return N/A ConsignmentResult See ConsignmentResult

2.3.2 findByConsignmentNo
Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

Consignment number i.e.


consignmentNo Yes String 1..35
the ID that is set by Carrier

Return N/A ConsignmentResult See ConsignmentResult

2.3.3 findByConsignorReference
Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

Consignor reference (also


called Order number, the
reference Yes String 1..35 consignor internal
reference to the
consignment.)

Return N/A ConsignmentResult See ConsignmentResult

CONSIGNMENT.WS 12 / 63
2.3.4 findByPackageId
Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

packageId Yes String 1..35 Package id

Return N/A ConsignmentResult See ConsignmentResult

2.3.5 findByTransactionId
Required
Parameter /Cardinalit Type Description
y

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

transactionId Yes String 1..35 Transaction id

Return N/A ConsignmentResult See ConsignmentResult

2.3.6 findByReference
Not implemented

2.3.7 findById
Not implemented

CONSIGNMENT.WS 13 / 63
2.4 Freight documents
2.4.1 print
To generate documents, use the print method. It returns an array of base64 encoded documents that
can be stored/displayed by the client.

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

While the name suggests


otherwise, each element
Yes
must contain one single
arrayOfConsignmentNo One to String array
consignment number.
Many
Element can be repeated
unlimited number of times.

Type of document. See


Type Yes Integer
document type list

Format of result. Values:


format Yes String
“PDF” or “ZPL”

Array containing the


documents needed for the
Return N/A Array of Documents consignment. The
documents are base64-
encoded

2.4.2 printLabel
Prints single label from a consignment.

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

Consignment number
ConsignmentNo Yes String of consignment to be
printed

ArrayOfPackageIds Yes String array Package ids to be

CONSIGNMENT.WS 14 / 63
One to Many printed

Format of result.
format Yes String
Values: “PDF” or “ZPL”

Array containing the


documents needed
Return N/A Array of Documents for the consignment.
The documents are
base64-encoded

2.4.3 printWaybill
Prints a single consignment waybill.

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken
Consignment number of
ConsignmentNo Yes String
consignment to be printed
Array containing the
documents needed for the
Return N/A Array of Documents consignment. The
documents are base64-
encoded

CONSIGNMENT.WS 15 / 63
2.5 Status
These methods can be used to check the booking state of the consignment and not the transport or
delivery state. Implement those methods wisely and only create request until pickup date, calling any of
this request after pickup date will only create request with no value.

2.5.1 isBooked
Is the consignment booked or not?
isBooked and isOrdered are the same method internally, and check if the consignment is booked

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

consignmentId Yes String Consignment Id

Booked consignment or
Return N/A Boolean
not?

2.5.2 isComplete
Is the consignment complete or not? An incomplete consignment cannot be booked and freight
documents cannot be printed. Incomplete consignments are found in Unifaun Apport service under tab
“Book transport”.

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

consignmentId Yes String Consignment Id

Returns whether
consignment is complete or
not. I.e. is it possible to
print freight documents?
Can consignment be
Return N/A Boolean booked?
A
ConsignmentServiceExcepti
on is returned with error
code
ERR_CONSIGNMENT_NOT_

CONSIGNMENT.WS 16 / 63
FOUND if consignment with
consignmentId was not
found in database.

2.5.3 isOrdered
Is the consignment ordered or not?
isBooked and isOrdered are the same method internally, and check if the consignment is booked

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

consignmentId Yes String Consignment Id

Ordered consignment or
not?
Note that If consignment is
not found in database a
Return N/A Boolean ConsignmentServiceExcepti
on is returned with error
code
ERR_CONSIGNMENT_NOT_
FOUND

2.5.4 isPrinted
Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

String
consignmentId Yes Consignment Id
1..35

Printed consignment or
not?
Note that If consignment is
Return N/A Boolean not found in database a
ConsignmentServiceExcepti
on is returned with error
code

CONSIGNMENT.WS 17 / 63
ERR_CONSIGNMENT_NOT_
FOUND

2.5.5 isArchived
Not implemented

2.5.6 isPrintable
Not implemented

2.6 Price
2.6.1 getCalculatedPrice
Will return calculated price for one or more consignments. This function requires that the additional
service Automatic Price is active on the domain.
Important - this method call DOES NOT trigger any price calculations. It will only return prices which
have already been calculated by the automatic price function in the Apport service.
Note:Implement this method wisely and only create request until pickup date, calling this request after
pickup date will only create request with no value as the price is never changed after pickup. Our
recommendation is not to implement a “button” on the ERP system (eg: Update price). When user hit
the Update price button, the method “getCalculatedPrice” is called and the price is updated in the ERP.
Other solutions are:
• Only direct booked shipment on WS call “book”, then call request “GetCalculatedPrice” just
once directly.
• Customer updates the shipment in the service or via WS, then call several request
“getCalculatedPrice” until pickup date but not after. (no pickup date in the request means
today)

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

Yes
arrayOfConsignmentNo One to String array Consignment no list
Many

Calculated price result,


Return N/A PriceResul
see PriceResult

CONSIGNMENT.WS 18 / 63
2.7 Advanced administration
2.7.1 archive
Archive the sent in consignment

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

String
ConsignmentNo Yes Consignment number
1..35

Return N/A ConsignmentResult See ConsignmentResult

2.7.2 cancel
A shipment can only be cancelled if:
• The transportservice have the “cancel” functionality
• The shipment is ordered/booked (if not use the delete method)
Any how the above , a shipment can never be cancelled if:

• The order for this shipment is already sent(meaning the booking can be send but not the order)
• The shipment in Apport should not archived or already cancelled
• The shipment in Apport should not be frozen (internal state in Apport, usually when order is
sent but for some specific transportservices already when booked or document printed)

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

Consignment number of
ConsignmentNo Yes String consignment to be
cancelled

Return N/A cancelResponse See cancelResponse

CONSIGNMENT.WS 19 / 63
2.7.3 delete
Only possible is the shipment is only created and saved, not booked

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

Delete consignment with


ConsignmentId Yes String 1..35
consignment Id.

Return N/A ConsignmentResult See ConsignmentResult

2.7.4 getTransactionId
Get a unique transaction id, used in the book method.

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

Return N/A String “Unique” transaction Id.

CONSIGNMENT.WS 20 / 63
2.7.5 order
Order (i.e. book) an already created consignment. This method will only work if the consignment is valid
according to product/carrier validation.

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

ConsignmentNo Yes String1..35 Consignment number

Return N/A ConsignmentResult See ConsignmentResult

2.7.6 addGoodsRow
Add goods row to an existing consignment. The method uses the consignmentMergeKey to match the
goods row to existing consignment. Domain needs sales item “Continuous labeling” in order to
successfully add goods rows.

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

GoodsItem Yes GoodsItem See GoodsItem

Consignment merge
key. Used to identify the
consignmentMergeKey Yes String consignment to which
the goods row should
be added.

Return N/A ConsignmentResult See ConsignmentResult

2.7.7 deletePackageId
Deletes the entire goods row of an existing consignment. The method uses the consignmentMergeKey
to match the goods row to existing consignment. Domain needs sales item “Continuous labeling” in
order to successfully delete a package.

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

Package id to be
packageId Yes String
removed from

CONSIGNMENT.WS 21 / 63
consignment

Consignment merge
key. Used to identify the
consignmentMergeKey Yes String consignment from
which the package id
should be removed.

Return N/A ConsignmentResult See ConsignmentResult

2.7.8 consolidate
Not implemented
Consolidate sent in consignments and return the consolidated consignment.

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

List of consignments to
consolidate identified by
Yes
Array of Consignment consignment No.The
arrayOfConsignmentNo One to
No:s. first consignment in list
Many
is the master
consignment.

Calculated price result,


Return N/A PriceResult
see PriceResult

2.7.9 copy
Not implemented
Return a copy of sent in consignment.

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

Consignment Yes Consignment See Consignment

Return N/A ConsignmentResult See ConsignmentResult

CONSIGNMENT.WS 22 / 63
2.7.10 create
Not implemented
Use the save method instead.
Creates and returns a new consignment The consignment is not sotred, to do that call save or book.

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

Return N/A String See ConsignmentResult

2.7.11 split
Not implemented
Splits consolidated consignment into parts.

Required/
Parameter Type Description
Cardinality

Login information, see


AuthenticationToken Yes AuthenticationToken
AuthenticationToken

ConsignmentNo Yes String1..35 Consignment number

Return N/A ConsignmentResult See ConsignmentResult

CONSIGNMENT.WS 23 / 63
3 Types
3.1 Consignment
Required/
Attribute name Type Description
Cardinality

consignmentNo No String 1..35 Consignment number

Internal unique identifier for


consignmentId No String 1..35
consignment

Order number, the consignor


orderNo No String 1..35 internal reference to the
consignment

orderType No String 1..35 Order type, Not used

Not used.
Use method book instead for
automaticBooking No String 1 automaticBooking= “Y” and
method save instead for
automaticBooking= “N”

Name of template in Apport to


use to fetch information to
complete the consignment.
templateName No String
Information sent in the WS
request will overwrite the
template

Name of user in Apport to own


the consignment. May be used
when other user should own
owner No String
the consignment, integration
user owns consignment per
default

Part Yes Part array See Part

Yes
GoodsItems One to GoodsItem array see GoodsItem.
Many

TransportProduct Yes TransportProduct See TransportProduct

CONSIGNMENT.WS 24 / 63
Target No Target See Target

Contents No Contents See Contents

GoodsGroup (not
GoodsGroup No GoodsGroup
recommended to use)

No
ConsignmentRefer
ConsignmentReference Zero to See ConsignmentReference
ence array
Many

No
Note Zero to Note See Note
Many

GoodsInvoice No GoodsInvoice See GoodsInvoice

3.2 ConsignmentResult
Object that holds the result from a call to a web service mehtod, except call to print, see PrintResult

Required/
Attribute name Type Description
Cardinality

statusCode Yes Integer Ok=0, Failed=1

Array of all Consignments


found/created by the
method.
Array of NB: all elements in
No
consignments Consignment consignment request are not
Zero to Many
objects returned in result. The main
attributes/elements are
returned in WS response
(not minor attributes).

No Array of Document Array of document objects if


documents
Zero to Many object method returns them.

No
errors Array of Error See Error
Zero to Many

Receipt of the operation.


receipt No Receipt
Not implemented.

CONSIGNMENT.WS 25 / 63
3.3 PrintResult
Required/ Type/
Attribute name Description
Cardinality Length

statusCode yes Integer Ok=0, Failed=1

Array of documents
No Array of Document
documents found/created by the
Zero to Many object
method

No Array of Error
errors See Error
Zero to Many objects

3.4 PrintResult
Required/ Type/
Attribute name Description
Cardinality Length

name yes String 1..35 Name of the document

type Yes Integer See Document types

Format of document. Values:


format Yes String
“PDF” or “ZPL”

Document data Base64


data Yes String
encoded

encoding Yes String Encoding of data, “BASE64”

3.5 PriceResult
Required/ Type/
Attribute name Description
Cardinality Length

consignmentNo No String 1..35 Consignment number

Internal unique identifier for


consignmentId No String 1..35
consignment

“OK”
“PRICE_NOT_PRESENT”
statusCode yes Integer
“CONSIGNMENT_NOT_FOUND

calculatedPrice No calculatedPrice See CalculatedPrice

CONSIGNMENT.WS 26 / 63
3.6 CalculatedPrice
Required/ Type/
Attribute name Description
Cardinality Length

price Yes Float Calculated price

currency Yes String 1..3 Currency

priceDetail No priceDetail See PriceDetail

3.7 PriceDetail
Required/ Type/
Attribute name Description
Cardinality Length

price Yes Float Calculated price

currency Yes String 1..3 Currency

code Yes String 1..35 Price detail code

sortOrder No Integer

3.8 cancelResponse
Required/ Type/
Attribute name Description
Cardinality Length

consignmentNo No String 1..35 Consignment number

statusCode yes Integer Ok=0, Failed=1

CONSIGNMENT.WS 27 / 63
4 Elements
4.1 Types
4.1.1 AuthenticationToken
Required/ Type/
Attribute name Description
Cardinality Length

User name in Apport/the


userName Yes String service connected to the WS
integration

Name of the domain/ Company


groupName Yes String
Id

The password for the


password Yes String
integration user

4.1.2 Part
Required/ Type/
Attribute name Description
Cardinality Length

Role: “consignor”, “consignee”,


“pickupAddress”,
“deliveryAddress”, “payer”,
“notify”, “buyer”, “seller”,
“orderingCustomer”,
role Yes String
“receivingAgent”,
“deliveryTerminal”,
”returnAddress”,
”customsVATPayer”,
“extranotify"

Name of transport account in


account No String
Apport service

Address Yes Address Address information

Communication No Communication Communication information

Reference No Reference References

CONSIGNMENT.WS 28 / 63
4.1.3 Address
Required/ Type/
Attribute name Description
Cardinality Length

String Id of address, same as in


id Yes
1..20 Apport service if existing

String
name Yes Company or personal name
1..35

String array Address line 1-3, address line 1


Address Yes
1..35 required.

String Postal code according to rules


postcode Yes
1..35 for country

String
city Yes Name of the city
1..35

String
state No State code
1..35

Two letter code according to


String
countrycode Yes ISO3166. For example “SE” for
2
Sweden.

posX No Float X coordinate. Do not use

posY No Float Y coordinate. Do not use

String Name of position system used.


posSystem No
1..35 Do not use

4.1.4 Part
Required/ Type/
Attribute name Description
Cardinality Length

String
contactPerson No Name of contact person
1..35

String
phone No Phone number
1..35

String
mobile No Mobile phone number
1..35

fax No String Fax number

CONSIGNMENT.WS 29 / 63
1..35

String
email No Email address
1..255

4.1.5 Reference
Required/ Type/
Attribute name Description
Cardinality Length

Customer number: temporary


String customer number to be used
customerNo No
1..35 when Consignee or Third party
pays

Reference: The attribute is for


example as Consignee's (i.e.
String
reference No role=consignee) reference -
1..35
usually a reference internal to
the consignee

Usually not used here.


If Cash On Delivery enter
String
accountNo No account no at
1..35
TransportProduct
>Cod>codAccountNo

String
eanCustomerNo No Not used
1..35

String
palletRegNo No Pallet registration number
1..35

String
vatNo No Value Added Tax number
1..35

4.1.6 GoodsItem
Required/ Type/
Attribute name Description
Cardinality Length

The total number of packages


noOfPackages Yes Integer
for current goods row

Total weight of item for current


weight Yes Float
goods row

CONSIGNMENT.WS 30 / 63
Total volume for current goods
volume No Float
row

Length for each item in the


length No Float
current goods row

Width for each item in the


width No Float
current goods row

Height for each item in the


height No Float
current goods row

loadingMetres No Float Loading metres

palletSpace No Integer Pallet space

Package types depending on


String carrier and product. Default
packageType No
1..3 value if not sent in:
PK=unspecified package type

String
tag No Tag
1..35

String
goodsType No Goods type
1..70

netWeight No Float Net weight

String
weightUnit No Weight units: kg, lb
1..5

String
volumeUnit No Volume units: m3, ft3, dm3
1..3

String
lengthUnit No Length units: m, dm, cm, in, ft
1..3

For stackable goods, only


stackable No Boolean available for a few specific
transport products

String Notes. Free text, not send to


notes No
1..500 carrier, usually not on label

PackageIds No PackageIds See PackageIds

CONSIGNMENT.WS 31 / 63
DangerousGoods No DangerousGoods See DangerousGoods

4.1.7 PackageIds
Required/ Type/
Attribute name Description
Cardinality Length

Yes The number of PackageIds


String
code One to need to be exact as many as
1..35
Many total number of packages

4.1.8 DangerousGoods
Required/ Type/
Attribute name Description
Cardinality Length

String
unNo No UN number
1..4

String
adrClass No ADR class
1..7

String
packGroup No Packaging group
1..5

weight No Float Gross Weight (kg)

netWeight No Float Net weight (kg)

Weight of explosive substance


netWeightExplSub No Float Need to be Float (anyhow it is
string in XSD)

noOfPackages No Integer Number of packages

String
packageType No Package type
1..10

MP
mp No Boolean Need to be boolean true/false
(anyhow it is string in XSD)

Flame point
flamePoint No Float Need to be float (anyhow it is
string in XSD)

CONSIGNMENT.WS 32 / 63
LQ
lq No Boolean Need to be boolean true/false
(anyhow it is string in XSD)

Dangerous goods category, see


Category No String
Category

String
ems No EMS
1..8

String
sp No SP
1..5

tunnelRestrictionCode No String 1..6 tunnelRestrictionCode

String
description No Transport designation
1..70

4.1.9 Category
Required/ Type/
Attribute name Description
Cardinality Length

String Category values: 0, 1, 2, 3, 4


value Yes
1 e.g: Category value="4"

4.1.10 TransportProduct
Required/ Type/
Attribute name Description
Cardinality Length

String Not used.


mode No
1..35 Mode of transport.

Not used.
code No String
Product code

Values: P, C, T
P=Prepaid
String C=Collect
PaymentInstruction Yes
1 T=Third party
Also set Part>Reference>
customerNo when C or T

CONSIGNMENT.WS 33 / 63
Additional Services, see XML
spec for values
Example: <AddService
AddService
value="EXPRESS"/>
<AddService
value="D2D"/>

advice No Boolean Advice

Tod No Tod Terms Of Delivery, see Tod

Cod No Cod Cash On Delivery, see Cod

Pickup information, see


Pickup No Pickup
Pickup

Delivery information, see


Delivery No Delivery
Delivery

Information details about the


Transport No Transport
transport, see Transport

Customs information, see


CustomsClearance No CustomsClearance
CustomsClearance

Sortcode No Sortcode See Sortcode

Insurance information, see


Insurance No Insurance
Insurance

ServiceOption, see
ServiceOption No ServiceOption
ServiceOption

4.1.11 Tod
Required/ Type/
Attribute name Description
Cardinality Length

Combiterms/Incoterms
String
combiterm Yes See separate list of codes,
1..35
check xml spec.

String
location Yes Location
1..35

countrycode No String ISO Country code

CONSIGNMENT.WS 34 / 63
2

String
notes No Notes, do not use
1..35

4.1.12 Cod
Required/ Type/
Attribute name Description
Cardinality Length

amount Yes Float Amount to pay

String
currency Yes Currency code
3

Payment method:
String
paymentMethod Yes CASH,CHEQUE,POST,BA
1..35
NK

String
accountNo No Account number
1..9

String
reference No Reference
1..35

4.1.13 Pickup
Required/ Type/
Attribute name Description
Cardinality Length

IMPORTANT: use the format


CCYY-MM-DD. Do not add
TimeZone. Pickup date is pure
No
communication between the
(Leave empty and
freight forwarder and the shipper.
book, and Apport will
It is a pure hand over of a specific
set today as pickup
date DateTime calendar day, according to
date, according to
agreement between shipper and
Stockholm Time
the forwarder. If you add time
zone! Potentially
zone, it will be re-calculated
incorrect!)
according to the time zone in
Stockholm (where our servers are
located).

CONSIGNMENT.WS 35 / 63
Note that the only thing that
Apport will extract from this
DateTime, is the actual
earliest No DateTime timestamp. The date will not be
used at all in communication with
forwarders. All date information
will be fetched from <date>

Note that the only thing that


Apport will extract from this
DateTime, is the actual
latest No DateTime timestamp. The date will not be
used at all in communication with
forwarders. All date information
will be fetched from <date>

No String array
instruction Pickup instruction
One to three 1..35

String array
location No Pickup location
1..35

4.1.14 Delivery
Required/ Type/
Attribute name Description
Cardinality Length

IMPORTANT: use the format


date No DateTime
CCYY-MM-DD

Note that the only thing that


Apport will extract from this
DateTime, is the actual
earliest No DateTime timestamp. The date will not be
used at all in communication with
forwarders. All date information
will be fetched from <date>

Note that the only thing that


Apport will extract from this
DateTime, is the actual
latest No DateTime
timestamp. The date will not be
used at all in communication with
forwarders. All date information

CONSIGNMENT.WS 36 / 63
will be fetched from <date>

No String array
instruction Delivery instruction
One to three 1..35

4.1.15 Transport
Required/ Type/
Attribute name Description
Cardinality Length

Transport instruction.
No String array
instruction Relevant for few carriers.
One to Three 1..35
Not normally used.

cooling No Boolean Cooling

heating No Boolean Heating

frozen No Boolean Frozen

tempLow No Integer Low temp

tempHigh No Integer Hight temp

String
subsidyNo No Subsidy number
1..35

valuableGoods No Boolean Valuable goods or not

carryIn No Boolean Carry in

extraCrew No Boolean Extra crew

eurPallets No Integer EurPallets

4.1.16 CustomsClearance
Required/ Type/
Attribute name Description
Cardinality Length

Set if consignment is dutiable


dutiable No Boolean (only available for specific
transportservices)

String
customsDeclarationNo No Declaration number
1..35

customsDescription No String Description

CONSIGNMENT.WS 37 / 63
1..35

String
customsReference No Reference
1..35

String Country code for origin


countryOfOrigin No
1..35 country

String
invoiceNo No Invoice number
1..35

invoiceDate No Date Invoice date

goodsValue No Float Value of goods

goodsValueCurrency No String 3 Currency code

String
statisticalNo No Statistical number
1..35

4.1.17 Sortcode
Required/ Type/
Attribute name Description
Cardinality Length

String
code No Sort code
1..35

quantity No Integer Sort quantity

4.1.18 Insurance
Required/ Type/
Attribute name Description
Cardinality Length

amount No Float Insurance amount

String
currency No Currency code
3

4.1.19 ServiceOption
Required/ Type/
Attribute name Description
Cardinality Length

type No String The additional service option

CONSIGNMENT.WS 38 / 63
code see Examples

The additional service option


value No String
value (if applicable)

No
ServiceOptionItem One to ServiceOptionItem See ServiceOptionItem
Many

4.1.20 ServiceOptionItem
Required/ Type/
Attribute name Description
Cardinality Length

The additional service


type No String
option item identifier

The additional service


value No String
option item value

Ex 1:
<ServiceOption type="dglimitedqty" />

Ex 2:
<ServiceOption type="preadvise">
<ServiceOptionItem type="method" value="driver" />
<ServiceOptionItem type="recipient" value="+46 8 1222777" />
</ServiceOption>

4.1.21 Target
Required/ Type/
Attribute name Description
Cardinality Length

date Yes DateTime Planned delivery date

earliest No DateTime Not used

latest No DateTime Not used

4.1.22 Contents
Required/ Type/
Attribute name Description
Cardinality Length

ContentItem Yes ContentItem See ContentItem

CONSIGNMENT.WS 39 / 63
One to Many

4.1.23 ContentItem
Required/ Type/
Attribute name Description
Cardinality Length

Number of products
noOfOrderedItems No Integer Need to be integer (anyhow it is string in
XSD)

Number of products delivered


noOfDeliveredItems No Integer Need to be integer (anyhow it is string in
XSD)

String
articleNo No Article number
1..35

String
productName No Name of article
1..35

No String
productAttribute Description (reference 1)
Zero to Many 1..35

weight No Float Weight (kg)

volume No Float Volume (m3)

length No Float Length (cm)

width No Float Width (cm)

height No Float Height (cm)

Price
price No Float Need to be float (anyhow it is string in
XSD)

String
packageType No Package type
1..3

String
location No Country of Origin
1..35

notes No String Notes

itemId No String Item id

CONSIGNMENT.WS 40 / 63
1..255

statisticalNo No String 1..35 Statistical number

4.1.24 ConsignmentReference
Required/ Type/
Attribute name Description
Cardinality Length

String
type No Reference type.
1..35

String
value No Reference value
1..35

4.1.25 Note
Required/ Type/
Attribute name Description
Cardinality Length

String
type No
3

value Yes String The text

4.1.26 GoodsInvoice
(only available for a few carriers)

Required/ Type/
Attribute name Description
Cardinality Length

String
invoiceNo No Invoice number
1..35

invoiceDate No Date Invoice date

orderNo No String Order number

String
termsOfPayment No Terms of payment
1..255

discount No Float Discount

freightCost No Float FreightCost

CONSIGNMENT.WS 41 / 63
String
currency No Currency code
3

No
InvoiceNote InvoiceNote See InvoiceNote.
Zero to Many

4.1.27 InvoiceNote
Required/ Type/
Attribute name Description
Cardinality Length

type No String Invoice note type

String
value Yes Invoice note value.
1..35

4.1.28 Error
Required/ Type/
Attribute name Description
Cardinality Length

code Yes String Error code, See Appendix A

description Yes String Full description of error.

The error type,


0 = Warning
1 = User error, missing
level Yes Integer information
2 = Severe error, wrong set
up, missing configuration
3 = System error

4.1.29 Receipt
Required/ Type/
Attribute name Description
Cardinality Length

HTML page containing


HTML No String
receipt, base64 encoded.

URL No String URL to the receipt.

PDF No String PDF receipt, base64

CONSIGNMENT.WS 42 / 63
encoded.

Array of documents
Resources No Document array containing resources used by
HTML page.

CONSIGNMENT.WS 43 / 63
5 Send in client name
To send in client name use the ConsignmentReference object. This should be used in special cases when
many clients use the same integration to connection to the web service and it is important to be able to
determine the origin of the consignment. The ConsignmentReference are specified on the Consignment
and must contain the following:
type=ws_client_name
value=<client name>
Example in Java:
ConsignmentReference reference = new ConsignmentReference();
reference.setType("ws_client_name");
reference.setValue(client.getClientName());
ConsignmentReference[] refs = new ConsignmentReference[1];
refs[0]=reference;
consignment.setConsignmentReference(refs);
Example in xml:
<ConsignmentReference type="ws_client_name">
<value>ACME</value>
</ConsignmentReference>

CONSIGNMENT.WS 44 / 63
6 Examples
6.1 Book consignment
6.1.1 Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ=http://www.spedpoint.com/consignment/types
xmlns:v1="http://www.spedpoint.com/consignment/types/v1_0">
<soapenv:Header/>
<soapenv:Body>
<typ:book>
<AuthenticationToken>
<userName>WS integrationUser</userName>
<groupName>CompanyID</groupName>
<password>password</password>
</AuthenticationToken>
<!--1 or more repetitions:-->
<Consignment orderNo="myorderno" TemplateName="testtemplate">
<Part role="consignor">
<Address>
<v1:id>consignorID</v1:id>
<v1:name>consignor name</v1:name>
<!--1 or more repetitions:-->
<v1:address>Testgatan 1</v1:address>
<v1:postcode>11339</v1:postcode>
<v1:city>Stockholm</v1:city>
<v1:countrycode>SE</v1:countrycode>
</Address>
</Part>
<Part role="consignee">
<Address>
<v1:id>consigneeID</v1:id>
<v1:name>consignee name</v1:name>
<!--1 or more repetitions:-->
<v1:address>Testgatan 2</v1:address>
<v1:postcode>11339</v1:postcode>
<v1:city>Stockholm</v1:city>
<v1:countrycode>SE</v1:countrycode>
</Address>
</Part>
<!--1 or more repetitions:-->
<GoodsItem>
<v1:noOfPackages>1</v1:noOfPackages>
<v1:weight>3</v1:weight>
</GoodsItem>
<TransportProduct>
<PaymentInstruction value="P"/>
</TransportProduct>
</Consignment>
<transactionId>unique transactionid4</transactionId>
</typ:book>
</soapenv:Body>
</soapenv:Envelope>

CONSIGNMENT.WS 45 / 63
6.1.2 Response OK
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ns1:bookResponse xmlns:ns1="http://www.spedpoint.com/consignment/types"
xmlns:v1="http://www.spedpoint.com/consignment/types/v1_0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<result>
<consignments consignmentNo="6267013248"
consignmentId="1344947667252df669e96" orderNo="myorderno">
<Part role="consignor">
<Address>
<v1:id>consignorID</v1:id>
<v1:name>consignor name</v1:name>
<!--1 or more repetitions:-->
<v1:address>Testgatan 1</v1:address>
<v1:postcode>11339</v1:postcode>
<v1:city>Stockholm</v1:city>
<v1:countrycode>SE</v1:countrycode>
</Address>
</Part>
<Part role="consignee">
<Address>
<v1:id>consigneeID</v1:id>
<v1:name>consignee name</v1:name>
<!--1 or more repetitions:-->
<v1:address>Testgatan 2</v1:address>
<v1:postcode>11339</v1:postcode>
<v1:city>Stockholm</v1:city>
<v1:countrycode>SE</v1:countrycode>
</Address>
</Part>
<GoodsItem>
<v1:noOfPackages>1</v1:noOfPackages>
<v1:weight>3</v1:weight>
</GoodsItem>
<TransportProduct>
<PaymentInstruction value="P"/>
</TransportProduct>
</consignments>
<errors xsi:nil="1"/>
<documents xsi:nil="1"/>
<receipt xsi:nil="true"/>
<statusCode>0</statusCode>
</result>
</ns1:bookResponse>
</env:Body>
</env:Envelope>

CONSIGNMENT.WS 46 / 63
6.1.3 Response Failed
Example of error when postcode missing on part:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ns1:bookResponse xmlns:ns1="http://www.spedpoint.com/consignment/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<result>
<consignments xsi:nil="1"/>
<errors>
<code>ERR_BOOKING_FAILED</code>
<description>Shipment n:o 1 - Order N:o : myorderno - Failed to
automaticly book consignment!</description>
<level>0</level>
</errors>
<errors>
<code>ERR_POSTCODE</code>
<description>Shipment n:o 1 - Order N:o : myorderno - You must provide a
postcode.</description>
<level>1</level>
</errors>
<documents xsi:nil="1"/>
<receipt xsi:nil="1"/>
<statusCode>1</statusCode>
</result>
</ns1:bookResponse>
</env:Body>
</env:Envelope>

CONSIGNMENT.WS 47 / 63
6.2 Find consignment
6.2.1 Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://www.spedpoint.com/consignment/types">
<soapenv:Header/>
<soapenv:Body>
<typ:findByConsignmentNo>
<AuthenticationToken>
<userName>WS integrationUser</userName>
<groupName>CompanyID</groupName>
<password>password</password>
</AuthenticationToken>
<consignmentNo>1234567890</consignmentNo>
</typ:findByConsignmentNo>
</soapenv:Body>
</soapenv:Envelope>

CONSIGNMENT.WS 48 / 63
6.2.2 Response OK
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ns1:findByConsignmentNoResponse
xmlns:ns1="http://www.spedpoint.com/consignment/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<result>
<consignments consignmentNo="1234567890" consignmentId="590"
orderNo="orderno2">
<Part role="consignee">
<Address>
<id>consigneeID</id>
<name>Mottagarkund</ name>
<address>Testgatan 3</address>
<postcode>11359</ postcode>
<city>Stockholm</city>
<countrycode>SE</countrycode>
<posX>0.0</ posX>
<posY>0.0</posY>
<posSystem>RT90</posSystem>
</Address>
<Communication>
<email notify="true">info@memnon.se</email>
</Communication>
<Reference/>
</Part>
<Part role="consignor">
<Address>
<id>consignorID</id>
<name>Consignorcustomer</ name>
<address>Testgatan 4</address>
<postcode>11359</ postcode>
<city>Stockholm</city>
<countrycode>SE</countrycode>
<posX>0.0</ posX>
<posY>0.0</posY>
<posSystem>RT90</posSystem>
</Address>
<Communication/>
<Reference>
<reference>orderno2</reference>
</Reference>
</Part>
cont.

CONSIGNMENT.WS 49 / 63
<GoodsItem>
<noOfPackages>1</noOfPackages>
<weight>5.0</weight>
<volume>0.0</volume>
<length>0.0</length>
<width>0.0</width>
<height>0.0</height>
<loadingMetres>0.0</loadingMetres>
<palletSpace>0</palletSpace>
<packageType>Z01</packageType>
<goodsType>GoodsDescription</goodsType>
<netWeight>0.0</netWeight>
<weightUnit>kg</weightUnit>
<volumeUnit>m3</volumeUnit>
<lengthUnit>cm</lengthUnit>
<DangerousGoods>
<weight>5.0</weight>
<netWeight>0.0</netWeight>
<noOfPackages>1</noOfPackages>
<packageType>Z01</packageType>
</DangerousGoods>
</GoodsItem>
<TransportProduct>
<code>dhlservicepoint</code>
<PaymentInstruction value="P"/>
<AddService/>
<advice>false</advice>
<Transport>
<cooling>false</cooling>
<tempLow>0</tempLow>
<tempHigh>0</tempHigh>
<valuableGoods>false</valuableGoods>
<carryIn>false</carryIn>
<eurPallets>0</eurPallets>
</Transport>
</TransportProduct>
</consignments>
<errors xsi:nil="1"/>
<documents xsi:nil="1"/>
<receipt xsi:nil="true"/>
<statusCode>0</statusCode>
</result>
</ns1:findByConsignmentNoResponse>
</env:Body>
</env:Envelope>

CONSIGNMENT.WS 50 / 63
6.2.3 Response failed
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ns1:findByConsignmentNoResponse
xmlns:ns1="http://www.spedpoint.com/consignment/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<result>
<consignments xsi:nil="1"/>
<errors>
<code>ERR_CONSIGNMENT_NOT_FOUND</code>
<description>Consignment not found</description>
<level>2</level>
</errors>
<documents xsi:nil="1"/>
<receipt xsi:nil="1"/>
<statusCode>1</statusCode>
</result>
</ns1:findByConsignmentNoResponse>
</env:Body>
</env:Envelope>

CONSIGNMENT.WS 51 / 63
6.3 Continous labeling - create consignment
6.3.1 Request
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://www.spedpoint.com/consignment/types"
xmlns:v1="http://www.spedpoint.com/consignment/types/v1_0">
<soap:Header/>
<soap:Body>
<save xmlns="http://www.spedpoint.com/consignment/types">
<AuthenticationToken xmlns="">
<userName>IntegrationUser </userName>
<groupName>IntegrationCompany </groupName>
<password>**Password**</password>
</AuthenticationToken>
<Consignment xmlns="" orderNo="MG001" templateName="Posten">
<Part role="consignee">
<Address>
<v1:id>T1</v1:id>
<v1:name>Test company</v1:name>
<v1:address>Testgatan 1</v1:address>
<v1:postcode>11110</v1:postcode>
<v1:city>Stockholm</v1:city>
<v1:countrycode>SE</v1:countrycode>
</Address>
<Communication>
<v1:contactPerson>Tester</v1:contactPerson>
<v1:phone>555-1234567</v1:phone>
<v1:mobile>070-5551234</v1:mobile>
<v1:email>test@test.com</v1:email>
</Communication>
</Part>
<GoodsItem>
<v1:noOfPackages>1</v1:noOfPackages>
<v1:weight>9</v1:weight>
<v1:packageType>PE</v1:packageType>
</GoodsItem>
<TransportProduct>
<PaymentInstruction>P</PaymentInstruction>
<v1:advice>true</v1:advice>
</TransportProduct>
<ConsignmentReference type="consignment_merge_key">
<v1:value>MergeKey001</v1:value>
</ConsignmentReference>
</Consignment>
<TransactionId xmlns="">${=System.currentTimeMillis()}</TransactionId>
</save>
</soap:Body>
</soap:Envelope>

CONSIGNMENT.WS 52 / 63
6.3.2 Response OK
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns4:saveResponse xmlns:ns2="http://www.spedpoint.com/consignment/types/v1_0"
xmlns:ns3="http://www.spedpoint.com/common/webservice/types/v1_0"
xmlns:ns4="http://www.spedpoint.com/consignment/types">
<result>
<consignments orderNo="MG001" consignmentId="1430133842177ac050400"
consignmentNo="91304860927SE">
...
....
.....
<ConsignmentReference type="consignment_merge_key">
<ns2:value>MergeKey001</ns2:value>
</ConsignmentReference>
</consignments>
<receipt xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"/>
<statusCode>0</statusCode>
</result>
</ns4:saveResponse>
</S:Body>
</S:Envelope>

CONSIGNMENT.WS 53 / 63
6.4 Add goodsrow
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://www.spedpoint.com/consignment/types"
xmlns:v1="http://www.spedpoint.com/consignment/types/v1_0">
<soapenv:Header/>
<soapenv:Body>
<typ:addGoodsRow>
<AuthenticationToken>
<userName>IntegrationUser </userName>
<groupName>IntegrationCompany </groupName>
<password>**Password**</password>
</AuthenticationToken>
<GoodsItem>
<v1:noOfPackages>1</v1:noOfPackages>
<v1:packageType>PE</v1:packageType>
<v1:weight>1</v1:weight>
</GoodsItem>
<consignmentMergeKey>MergeKey001</consignmentMergeKey>
<TransactionId>${=System.currentTimeMillis()}</TransactionId>
</typ:addGoodsRow>
</soapenv:Body>
</soapenv:Envelope>

6.4.1 Response ok
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns4:addGoodsRowResponse
xmlns:ns2="http://www.spedpoint.com/consignment/types/v1_0"
xmlns:ns3="http://www.spedpoint.com/common/webservice/types/v1_0"
xmlns:ns4="http://www.spedpoint.com/consignment/types">
<result>
<consignmentMergeKey>MergeKey001</consignmentMergeKey>
<consignmentNo>91304860927SE</consignmentNo>
<addedPackageId>91304860935SE</addedPackageId>
<deletedPackageId/>
</result>
</ns4:addGoodsRowResponse>
</S:Body>
</S:Envelope>

CONSIGNMENT.WS 54 / 63
6.4.2 Response failed
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
<faultcode>S:Server</faultcode>
<faultstring>APPLICATION ERROR</faultstring>
<detail>
<ns4:ConsignmentServiceException xsi:nil="true"
xmlns:ns4="http://www.spedpoint.com/consignment/types"
xmlns:ns2="http://www.spedpoint.com/consignment/types/v1_0"
xmlns:ns3="http://www.spedpoint.com/common/webservice/types/v1_0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</detail>
</S:Fault>
</S:Body>
</S:Envelope>

CONSIGNMENT.WS 55 / 63
6.5 Delete package
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://www.spedpoint.com/consignment/types">
<soapenv:Header/>
<soapenv:Body>
<typ:deletePackageId>
<AuthenticationToken>
<userName>IntegrationUser </userName>
<groupName>IntegrationCompany </groupName>
<password>**Password**</password>
</AuthenticationToken>
<consignmentMergeKey>MergeKey001</consignmentMergeKey>
<packageId>91304860935SE</packageId>
<TransactionId>b1</TransactionId>
</typ:deletePackageId>
</soapenv:Body>
</soapenv:Envelope>

6.5.1 Response OK
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns4:deletePackageIdResponse
xmlns:ns2="http://www.spedpoint.com/consignment/types/v1_0"
xmlns:ns3="http://www.spedpoint.com/common/webservice/types/v1_0"
xmlns:ns4="http://www.spedpoint.com/consignment/types">
<result>
<consignmentMergeKey>MergeKey001</consignmentMergeKey>
<consignmentNo>91304860927SE</consignmentNo>
<addedPackageId/>
<deletedPackageId>91304860935SE</deletedPackageId>
</result>
</ns4:deletePackageIdResponse>
</S:Body>
</S:Envelope>

6.5.2 Response failed


<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
<faultcode>S:Server</faultcode>
<faultstring>APPLICATION ERROR</faultstring>
<detail>
<ns4:ConsignmentServiceException xsi:nil="true"
xmlns:ns4="http://www.spedpoint.com/consignment/types"
xmlns:ns2="http://www.spedpoint.com/consignment/types/v1_0"
xmlns:ns3="http://www.spedpoint.com/common/webservice/types/v1_0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</detail>
</S:Fault>
</S:Body>
</S:Envelope>

CONSIGNMENT.WS 56 / 63
6.6 getConsignmentList
6.6.1 Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://www.spedpoint.com/consignment/types">
<soapenv:Header/>
<soapenv:Body>
<typ:getConsignmentTemplates>
<AuthenticationToken>
<userName>consignmentws</userName>
<groupName>PelleInc Enterprise</groupName>
<password>xxxxxxx</password>
</AuthenticationToken>
</typ:getConsignmentTemplates>
</soapenv:Body>
</soapenv:Envelope>

CONSIGNMENT.WS 57 / 63
6.6.2 Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns4:getConsignmentTemplatesResponse
xmlns:ns2="http://www.spedpoint.com/consignment/types/v1_0"
xmlns:ns3="http://www.spedpoint.com/common/webservice/types/v1_0"
xmlns:ns4="http://www.spedpoint.com/consignment/types">
<result>
<consignmentTemplate>
<name>DHL Sweden Parcel</name>
<description>For parcels 20-30 kg</description>
</consignmentTemplate>
<consignmentTemplate>
<name>Schenker Sweden Parcel</name>
<description>For parcels 10-20 kg</description>
</consignmentTemplate>
<consignmentTemplate>
<name>DHL Sweden Servicepoint</name>
<description>For parcels 3-10 kg</description>
</consignmentTemplate>
<consignmentTemplate>
<name>Posten Sweden Varubrev</name>
<description>For parcels 0-3 kg</description>
</consignmentTemplate>
<consignmentTemplate>
<name>International Parcel</name>
<description>Cheapest service for int. Parcel</description>
</consignmentTemplate>
<consignmentTemplate>
<name>Sweden Domestic Pallet</name>
<description>Cheapest service for domestic pallet</description>
</consignmentTemplate>
<consignmentTemplate>
<name>International Pallet</name>
<description>Cheapest service for int. pallet</description>
</consignmentTemplate>
</result>
</ns4:getConsignmentTemplatesResponse>
</S:Body>
</S:Envelope>

CONSIGNMENT.WS 58 / 63
7 Appendix A
7.1 Error codes
7.1.1 Consignment
Error code Description

ERR_ID You must provide an id.

ERR_NAME You must enter Company name

ERR_ADDRESSLINE1 You must provide an address.

ERR_PHONE You must provide a telephone number.

ERR_MOBILE You must provide a mobile telephone number.

ERR_CONTACT_PERSON You must provide a contact person.

ERR_EMAIL Format error on email address.

ERR_POSTCODE You must provide a postcode.

ERR_CITY You must provide a city.

ERR_COUNTRYCODE Missing/wrong country code.

ERR_PACKAGE_TYPE Wrong package type.

ERR_NO_PACKAGES You must enter no of packages as a number > 0

You have given a weight that is too high for this


ERR_WEIGHT
product.

You have given a volume that is too big for this


ERR_VOLUME
product.

You must enter loading metres as a decimal number


ERR_LOADINGMTR
>0

ERR_PALLET_SPACE

ERR_TAG

ERR_GOODS_TYPE

CONSIGNMENT.WS 59 / 63
ERR_DANGEROUS_GOODS This product does not allow Dangerous Goods.

ERR_REFERENCE

You must enter length, width and height as decimal


ERR_DIM
numbers > 0

You must have a transport agreement with this


ERR_AGREEMENT_CONSIGNOR carrier to be able to book a consignment. Contact
helpdesk.

ERR_AGREEMENT_CONSIGNEE Agreement missing for consignee pays

ERR_AGREEMENT_THIRD Agreement missing for third party payer

ERR_AGREEMENT_TEMPORARY The number is not correct.

ERR_CLASS_CAST

ERR_DATE_FORMAT

ERR_NUMBER_FORMAT

ERR_MANDATORY

ERR_TOD Combiterms notes must be stated.

ERR_COD All fields must contain data at Cash On Delivery.

ERR_COD_METHOD

ERR_TOD_LOCATION You must enter TOD Location (city).

ERR_TOD_COUNTRY You must enter TOD Location (country).

ERR_INSURANCE Insurance amount must be stated.

ERR_INSURANCE_EXCEEDED The insurance amount cannot exceed X.

ERR_ORDER_NO Format error

ERR_CURRENCY

ERR_INSURANCE_CURRENCY

ERR_GOODS_VALUE_CURRENCY

ERR_GOODS_VALUE

ERR_PROFORMA

ERR_CUSTOMS

CONSIGNMENT.WS 60 / 63
ERR_CUSTOMS_DESCRIPTION

ERR_CUSTOMS_STATISTICS_NO

ERR_AGREEMENT_CUSTOMER_NO

ERR_CONSIGNMENT_NOT_FOUND Consignment was not found in database

You have tried to book a consignment that was


ERR_CONSIGNMENT_ALREADY_BOOKED
already booked

You have tried to archive a consignment that was


ERR_CONSIGNMENT_ALREADY_ARCHIVED
already archived

ERR_CONSOLIDATING_CONSIGNMENTS Failed to consolidate consignments

You have tried to split a consignment that was not


ERR_CONSIGNMENT_NOT_CONSOLIDATED
consolidated

ERR_SPLITING_CONSIGNMENT Failed to split consignment

7.1.2 Domain
Error code Description

ERR_DOMAIN_NAME

ERR_DOMAIN_NAME_FORMAT

ERR_DOMAIN_SAME_NAME

ERR_DOMAIN_ADDRESS

ERR_DOMAIN_POSTCODE

ERR_DOMAIN_CITY

ERR_DOMAIN_PHONE

ERR_DOMAIN_CONTACT_PERSON

ERR_DOMAIN_EMAIL

ERR_DOMAIN_EMAIL_MATCH

ERR_DOMAIN_POSTCODE_0

ERR_DOMAIN_VAT_NO

ERR_DOMAIN_COMPANY

CONSIGNMENT.WS 61 / 63
ERR_DOMAIN_FAX

ERR_DOMAIN_ORG_NO

7.1.3 Account
Error code Description

Invalid username/Locked username provided for this


ERR_ACCOUNT_USERNAME
consignment.

ERR_ACCOUNT_PASSWORD You must provide a password.

ERR_ACCOUNT_PASSWORD2 The password must be at least five characters long.

7.1.4 Account
Error code Description

ERR_NOT_IMPLEMENTED The method called is not implemented

CONSIGNMENT.WS 62 / 63
8 Appendix B
8.1 Document types
Type Name Description

1* Label Label

2* Waybill Waybill

4 Receipt Receipt

8 Picking list Picking list


*If the transport service uses both the label and waybill, the result will contain both document types. In
those cases the document result is as follows:
printresp.result.documents(0).type = label
printresp.result.documents(1).type= waybill
Note: To print a waybill only, use the method printWaybill.

CONSIGNMENT.WS 63 / 63

You might also like