Professional Documents
Culture Documents
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
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.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.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.
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
Required/
Parameter Type Description
Cardinality
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”
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
2.3.2 findByConsignmentNo
Required/
Parameter Type Description
Cardinality
2.3.3 findByConsignorReference
Required/
Parameter Type Description
Cardinality
CONSIGNMENT.WS 12 / 63
2.3.4 findByPackageId
Required/
Parameter Type Description
Cardinality
2.3.5 findByTransactionId
Required
Parameter /Cardinalit Type Description
y
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
2.4.2 printLabel
Prints single label from a consignment.
Required/
Parameter Type Description
Cardinality
Consignment number
ConsignmentNo Yes String of consignment to be
printed
CONSIGNMENT.WS 14 / 63
One to Many printed
Format of result.
format Yes String
Values: “PDF” or “ZPL”
2.4.3 printWaybill
Prints a single consignment waybill.
Required/
Parameter Type Description
Cardinality
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
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
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
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
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
Yes
arrayOfConsignmentNo One to String array Consignment no list
Many
CONSIGNMENT.WS 18 / 63
2.7 Advanced administration
2.7.1 archive
Archive the sent in consignment
Required/
Parameter Type Description
Cardinality
String
ConsignmentNo Yes Consignment number
1..35
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
Consignment number of
ConsignmentNo Yes String consignment to be
cancelled
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
2.7.4 getTransactionId
Get a unique transaction id, used in the book method.
Required/
Parameter Type Description
Cardinality
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
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
Consignment merge
key. Used to identify the
consignmentMergeKey Yes String consignment to which
the goods row should
be added.
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
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.
2.7.8 consolidate
Not implemented
Consolidate sent in consignments and return the consolidated consignment.
Required/
Parameter Type Description
Cardinality
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.
2.7.9 copy
Not implemented
Return a copy of sent in consignment.
Required/
Parameter Type Description
Cardinality
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
2.7.11 split
Not implemented
Splits consolidated consignment into parts.
Required/
Parameter Type Description
Cardinality
CONSIGNMENT.WS 23 / 63
3 Types
3.1 Consignment
Required/
Attribute name Type Description
Cardinality
Not used.
Use method book instead for
automaticBooking No String 1 automaticBooking= “Y” and
method save instead for
automaticBooking= “N”
Yes
GoodsItems One to GoodsItem array see GoodsItem.
Many
CONSIGNMENT.WS 24 / 63
Target No Target See Target
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
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
No
errors Array of Error See Error
Zero to Many
CONSIGNMENT.WS 25 / 63
3.3 PrintResult
Required/ Type/
Attribute name Description
Cardinality Length
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
3.5 PriceResult
Required/ Type/
Attribute name Description
Cardinality Length
“OK”
“PRICE_NOT_PRESENT”
statusCode yes Integer
“CONSIGNMENT_NOT_FOUND
”
CONSIGNMENT.WS 26 / 63
3.6 CalculatedPrice
Required/ Type/
Attribute name Description
Cardinality Length
3.7 PriceDetail
Required/ Type/
Attribute name Description
Cardinality Length
sortOrder No Integer
3.8 cancelResponse
Required/ Type/
Attribute name Description
Cardinality Length
CONSIGNMENT.WS 27 / 63
4 Elements
4.1 Types
4.1.1 AuthenticationToken
Required/ Type/
Attribute name Description
Cardinality Length
4.1.2 Part
Required/ Type/
Attribute name Description
Cardinality Length
CONSIGNMENT.WS 28 / 63
4.1.3 Address
Required/ Type/
Attribute name Description
Cardinality Length
String
name Yes Company or personal name
1..35
String
city Yes Name of the city
1..35
String
state No State code
1..35
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
CONSIGNMENT.WS 29 / 63
1..35
String
email No Email address
1..255
4.1.5 Reference
Required/ Type/
Attribute name Description
Cardinality Length
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
CONSIGNMENT.WS 30 / 63
Total volume for current goods
volume No Float
row
String
tag No Tag
1..35
String
goodsType No Goods type
1..70
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
CONSIGNMENT.WS 31 / 63
DangerousGoods No DangerousGoods See DangerousGoods
4.1.7 PackageIds
Required/ Type/
Attribute name Description
Cardinality Length
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
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)
String
ems No EMS
1..8
String
sp No SP
1..5
String
description No Transport designation
1..70
4.1.9 Category
Required/ Type/
Attribute name Description
Cardinality Length
4.1.10 TransportProduct
Required/ Type/
Attribute name Description
Cardinality Length
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"/>
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
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
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
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>
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
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.
String
subsidyNo No Subsidy number
1..35
4.1.16 CustomsClearance
Required/ Type/
Attribute name Description
Cardinality Length
String
customsDeclarationNo No Declaration number
1..35
CONSIGNMENT.WS 37 / 63
1..35
String
customsReference No Reference
1..35
String
invoiceNo No Invoice number
1..35
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
4.1.18 Insurance
Required/ Type/
Attribute name Description
Cardinality Length
String
currency No Currency code
3
4.1.19 ServiceOption
Required/ Type/
Attribute name Description
Cardinality Length
CONSIGNMENT.WS 38 / 63
code see Examples
No
ServiceOptionItem One to ServiceOptionItem See ServiceOptionItem
Many
4.1.20 ServiceOptionItem
Required/ Type/
Attribute name Description
Cardinality Length
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
4.1.22 Contents
Required/ Type/
Attribute name Description
Cardinality Length
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)
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
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
CONSIGNMENT.WS 40 / 63
1..255
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
4.1.26 GoodsInvoice
(only available for a few carriers)
Required/ Type/
Attribute name Description
Cardinality Length
String
invoiceNo No Invoice number
1..35
String
termsOfPayment No Terms of payment
1..255
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
String
value Yes Invoice note value.
1..35
4.1.28 Error
Required/ Type/
Attribute name Description
Cardinality Length
4.1.29 Receipt
Required/ Type/
Attribute name Description
Cardinality Length
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>
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_PALLET_SPACE
ERR_TAG
ERR_GOODS_TYPE
CONSIGNMENT.WS 59 / 63
ERR_DANGEROUS_GOODS This product does not allow Dangerous Goods.
ERR_REFERENCE
ERR_CLASS_CAST
ERR_DATE_FORMAT
ERR_NUMBER_FORMAT
ERR_MANDATORY
ERR_COD_METHOD
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
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
7.1.4 Account
Error code Description
CONSIGNMENT.WS 62 / 63
8 Appendix B
8.1 Document types
Type Name Description
1* Label Label
2* Waybill Waybill
4 Receipt Receipt
CONSIGNMENT.WS 63 / 63