20
Document version 2.0 – 2019-02-26 Scheduler API (TIMETABLE_PLUGIN) V 2.0 2019-02-26

Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Embed Size (px)

Citation preview

Page 1: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 1 of 20

Document version 2.0 – 2019-02-26

Scheduler API (TIMETABLE_PLUGIN)

V 2.0 2019-02-26

Page 2: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 2 of 20

Document version 2.0 – 2019-02-26

Table of Contents

Document history 3

Foreword 4

Scheduler API (TIMETABLE_PLUGIN) introduction 5

HTTP Request Definitions 6

2.1 Search Parameters 6

XML Response definitions 10

3.1 Scheduler XML Responses 10

3.1.1 Usage example 13

3.2 Appendix 1 – Country codes and descriptions 16

3.3 Appendix 2 – County codes and descriptions 17

3.4 Appendix 3 – Home page country/languages 18

XML schema definition 20

Page 3: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 3 of 20

Document version 2.0 – 2019-02-26

Document history

Revision Number

Date of Issue Details

1.5 15.12.2015 First document version

1.6 06.03.2018

layout and content revisions

• Removed all web application related information and updated the introduction text

• Updated document layout

• Updated text on request parameter topostcode when tocountry=GB

• Updated product code list and descriptions

• Updated option code list and descriptions

1.7 21.05.2018 Corrected removed information from last version.

1.8 04.12.2018 Added Fix Day 10 and Fix Day 13 in chapter 3.1

1.9 06.12.2018 Updated products in chapter 2.1 and options in chapter 3.1

2.0 26.02.2019 Added options in chapter 3.1. Applicable from April 1st.

Page 4: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 4 of 20

Document version 2.0 – 2019-02-26

Foreword

This documentation contains the request and response definitions for the Scheduler API

(TIMETABLE_PLUGIN).

This document can be subject to change, for latest current version please check DBSchenker.com/se.

Page 5: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 5 of 20

Document version 2.0 – 2019-02-26

Scheduler API (TIMETABLE_PLUGIN) introduction

The Scheduler API allows request for lead times towards the DBSchenker land transport network. Provided

a from/to country and post code combination a lead time in days will be returned considering the current

valid (including any active seasonal) schedules.

Page 6: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 6 of 20

Document version 2.0 – 2019-02-26

HTTP Request Definitions Each request to the Scheduler API should begin with the servlet location and name, followed by a query

string containing the required search parameters. The current URL for the production service as follows:-

https://was.schenker.nu/timetable/com.dcs.servicebroker.http.HttpXSLTServlet?

The definition for the query string for each search type follows.

2.1 Search Parameters

Parameter Name Allowed values Length

request.service TIMETABLE_PLUGIN -

request.method search -

request.format api -

fromcountry AT, BE, BG, BY, CH, CZ, DE, DK, EE, ES, FI,

FR, GB, GR, HR, HU, IE, IT, LI, LT, LU, LV,

MD, ME, MK, NL, NO, PL, PT, RO, RU, SE, SI,

SK, TR, UA

2

frompostcode Where fromcountry is one of AT, BE, BG, CH,

DK, HU, LI, LT, LU, LV, MD, NL, NO or SI

the postcode should be a four character

numeric.

Where fromcountry is one of CZ, DE, EE, ES,

FI, FR, GR, HR, IT, ME, MK, PL, SE, SK, TR,

UA the postcode should be a five character

numeric.

Where fromcountry is RO or RU the postcode

should be a six character numeric.

Where fromcountry is GB the postcode should

be one or two uppercase characters

representing a valid British postcode area

or a valid British postcode.

Where fromcountry is IE the postcode should

be one of CAW, CAV, CLR, ORK, CFN, DUB,

GWY, KIR, KIL, KLK, LOI, LEI, LMK, LFD,

LTH, MAO, MTH, MON, OFL, RSM, SXL, TPY,

WAT, WMT, WEX or WIC representing the Irish

counties.

variable

tocountry AL,AT, BE, BG, BY, CH, CZ, DE, DK, EE, ES,

FI, FR, GB, GR, HR, HU, IE, IT, LI, LT, LU,

LV, MD, ME, MK, NL, NO, PL, PT, RO, RU, SE,

SI, SK, TR, UA

2

Page 7: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 7 of 20

Document version 2.0 – 2019-02-26

topostcode Where tocountry is one of AT, AL, BE, BG,

CH, DK, HU, LI, LT, LU, LV, MD, NL, NO or

SI the postcode should be a four character

numeric.

Where tocountry is one of BA, CZ, DE, EE,

ES, FI, FR, GR, HR, IT, ME, MK, PL, SE, SK,

TR, UA the postcode should be a five

character numeric.

Where tocountry is RO or RU the postcode

should be a six character numeric.

Where tocountry is GB the postcode should

be a full valid GB postcode.

Where tocountry is IE the postcode should

be one of CAW, CAV, CLR, ORK, CFN, DUB,

GWY, KIR, KIL, KLK, LOI, LEI, LMK, LFD,

LTH, MAO, MTH, MON, OFL, RSM, SXL, TPY,

WAT, WMT, WEX or WIC representing the Irish

counties.

variable

Product

(Code only)

Passing no or blank product parameter

will return unspecified product. This is

equvivalent to product 44, SCHENKERsystem

premium.

When specific product code is passed, and

there is no specific product schedule

available the unspecified schedule will

be returned.

2

Code Description

No

Code

Unspecified schedule

28 SCHENKERcoldsped

Remark: only for SE-SE

43 SCHENKERsystem

44 SCHENKERsystem premium

71 SCHENKERfull load

72 SCHENKERpart load

90 SCHENKERparcel

Remark: only for NO-NO, SE-SE, PL-

PL

Page 8: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 8 of 20

Document version 2.0 – 2019-02-26

97 Parcel HomeEvening

clientid Must be a valid Customer Web ID. This is

an optional parameter to search specific

customer schedules.

Variable

(max 10)

request.country Home page country (see Appendix 3) 2

request.language Language (see Appendix 3) 2

Page 9: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 9 of 20

Document version 2.0 – 2019-02-26

Examples:

https://was.schenker.nu/timetable/com.dcs.servicebroker.http.HttpXSLTServlet?request.service=TIMETABL

E_PLUGIN&request.method=search&fromcountry=GB&frompostcode=M&tocountry=IE&topostcode=DUB&

time=on&request.format=api

Specifiy Product:

https://was.schenker.nu/timetable/com.dcs.servicebroker.http.HttpXSLTServlet?request.service=TIMETABL

E_PLUGIN&request.method=search&fromcountry=SE&frompostcode=44632&tocountry=SE&topostcode=1

1520&time=on&request.format=api&product=90

Page 10: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 10 of 20

Document version 2.0 – 2019-02-26

XML Response definitions

3.1 Scheduler XML Responses Below is the list of xml variables used in the response. Some other elements will be present in the xml stream

returned, but these are used for consistency of display in the web application, and are not relevant here.

XML response by Product ( just for illustration of format)

<xml>

<product code="90">

<trip>

<collectclient>

<day>1</day>

<time />

</collectclient>

<arriveorigterm>

<day>1</day>

<time>17:00</time>

</arriveorigterm>

<departorigterm>

<day>2</day>

<time>16:30</time>

</departorigterm>

<arrivedestterm>

<day>3</day>

<time>05:00</time>

<acc_days>2</acc_days>

</arrivedestterm>

<departdestterm>

<day>3</day>

<time>07:00</time>

</departdestterm>

<deliverclient>

<day>3</day>

<time />

<acc_days>2</acc_days>

</deliverclient>

</trip>

<trip>

<collectclient>

<day>2</day>

<time />

</collectclient>

<arriveorigterm>

<day>2</day>

<time>17:00</time>

</arriveorigterm>

<departorigterm>

<day>3</day>

<time>16:30</time>

Page 11: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 11 of 20

Document version 2.0 – 2019-02-26

</departorigterm>

<arrivedestterm>

<day>4</day>

<time>05:00</time>

<acc_days>2</acc_days>

</arrivedestterm>

<departdestterm>

<day>4</day>

<time>07:00</time>

</departdestterm>

<deliverclient>

<day>4</day>

<time />

<acc_days>2</acc_days>

</deliverclient>

</trip>

<trip>

<collectclient>

<day>3</day>

<time />

</collectclient>

<arriveorigterm>

<day>3</day>

<time>17:00</time>

</arriveorigterm>

<departorigterm>

<day>4</day>

<time>16:30</time>

</departorigterm>

<arrivedestterm>

<day>5</day>

<time>05:00</time>

<acc_days>2</acc_days>

</arrivedestterm>

<departdestterm>

<day>5</day>

<time>07:00</time>

</departdestterm>

<deliverclient>

<day>5</day>

<time />

<acc_days>2</acc_days>

</deliverclient>

</trip>

<trip>

<collectclient>

<day>4</day>

<time />

</collectclient>

<arriveorigterm>

<day>4</day>

<time>17:00</time>

</arriveorigterm>

Page 12: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 12 of 20

Document version 2.0 – 2019-02-26

<departorigterm>

<day>5</day>

<time>16:30</time>

</departorigterm>

<arrivedestterm>

<day>1</day>

<time>05:00</time>

<acc_days>4</acc_days>

</arrivedestterm>

<departdestterm>

<day>1</day>

<time>07:00</time>

</departdestterm>

<deliverclient>

<day>1</day>

<time />

<acc_days>4</acc_days>

</deliverclient>

</trip>

<origin>Göteborg</origin>

<dest>Farsta</dest>

<depdesc>Göteborg</depdesc>

<arrdesc>Stockholm</arrdesc>

<srvl>00</srvl>

</product>

</xml>

The returned XML is split into a summary for each Schenker product with the product code as the attribute

in the <product> tag. If the product is blank then it is the information for the unspecified service.

The <srvl> tag is used to indicate which options (codes) are available for the service.

Option code Description

09 Dangerous goods

15 not applicable

20 Time window pick-up (morning)

21 Time window pick-up (afternoon)

22 Time window delivery (morning)

23 Time window delivery (afternoon)

32 Express (top 10)

36 Fix day pick-up

37 Fix day delivery

55 Premium10

56 Premium13

57 Fix Day 10

Page 13: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 13 of 20

Document version 2.0 – 2019-02-26

58 Fix Day 13

Other option codes may appear but are not relevant for Sweden customers.

3.1.1 Usage example Each product node consists of several trip nodes which is a timetable based on collection day. Note that DBSchenker´s only responsibility is from pick up to delivery. Times in between may differ for the acctual transport. The example trip node below is from SE 40508 to SE 12342 Collection on Day 1= Monday Arrival at Export Gateway Day 1 = Monday Time =18:00 Depart Export Gateway Day 1 = Monday Time = 20.30 Arrival at Receiving Gateway Day 2 = Tuesday Time = 05.45 Depart Receiving Gateway Day 2 = Tuesday Time = 06.30 Delivery to Client Day 2 = Tuesday <trip>

<collectclient> <day>1</day>

<time />

</collectclient>

<arriveorigterm> <day>1</day>

<time>18:00</time>

</arriveorigterm>

<departorigterm> <day>1</day>

<time>20:30</time>

</departorigterm>

<arrivedestterm>

<day>2</day>

<time>05:45</time>

<acc_days>1</acc_days>

</arrivedestterm>

<departdestterm> <day>2</day>

<time>06:30</time>

</departdestterm>

<deliverclient> <day>2</day>

<time />

<acc_days>1</acc_days>

</deliverclient>

</trip>

The next example shows what happens for longer routes where the delivery takes place in the following week. This is signified by a (+1) in the time node. For 2 weeks after collection a (+2) would be used. The example trip node below is from FI 40508 to PT 1234 Collection on Day 1= Monday Arrival at Export Gateway Day 2 = Tuesday Time =08:00

Page 14: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 14 of 20

Document version 2.0 – 2019-02-26

Depart Export Gateway Day 5 = Friday Time = 17.00 Arrival at Receiving Gateway Day 4 = Thursday Time = 14.00

(+1 indicates the week after collection) (acc days 10 = no.of days after collection)

Depart Receiving Gateway Day 5 = Friday Time = 08.00 (+1 indicates the week after collection) (acc days 11 = no.of days after collection)

Delivery to Client Day 5 = Friday

<trip>

<collectclient>

<day>1</day>

<time />

</collectclient>

<arriveorigterm>

<day>2</day>

<time>08:00</time>

</arriveorigterm>

<departorigterm>

<day>5</day>

<time>17:00</time>

</departorigterm>

<arrivedestterm>

<day>4</day>

<time>14:00 +1</time>

<acc_days>10</acc_days>

</arrivedestterm>

<departdestterm>

<day>5</day>

<time>08:00 +1</time>

</departdestterm>

<deliverclient>

<day>5</day>

<time>+1</time>

<acc_days>11</acc_days>

</deliverclient>

</trip>

The next example shows a route where there are no collection entries in the scheduler data. In these cases, clients must contact the Schenker branch to request collection. The same can apply to the distribution. This is signified by the <collect> and <deliver> nodes containing a value of ‘0’. The example trip node below is from FI 56510 to FI 40950.

<xml>

<product code="">

<trip>

<collectclient>

<day />

<time />

</collectclient>

<arriveorigterm>

<day />

<time />

</arriveorigterm>

Page 15: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 15 of 20

Document version 2.0 – 2019-02-26

……..

<deliverclient>

<day>1</day>

<time />

<acc_days>3</acc_days>

</deliverclient>

</trip>

<collect>0</collect>

<deliver>1</deliver>

<origin>Puntala</origin>

<dest>Muurame</dest>

<depdesc>Lappeenranta</depdesc>

<arrdesc>Jyvaskylaa</arrdesc>

<srvl>00</srvl>

</product>

</xml>

3.2

Page 16: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 16 of 20

Document version 2.0 – 2019-02-26

3.3 Appendix 1 – Country codes and descriptions The descriptions for the import and export countries allowed in the HTTP request are in the table below.

Country Code Country Name Country Code Country Name

AT Austria LI Lichtenstein

AL Albania LT Lithuania

BA Bosnia and

Herzegovina

LU Luxembourg

BE Belgium LV Latvia

BG Bulgaria MA Morocco

BY Belarus MD Moldova

CH Switzerland ME Montenegro

CZ Czech Republic MK Macedonia

DE Germany NL Netherlands

DK Denmark NO Norway

EE Estonia PL Poland

ES Spain PT Portugal

FI Finland RO Romania

FR France RS Serbia

GB United Kingdom RU Russia

GR Greece SE Sweden

HR Croatia SI Slovenia

HU Hungary SK Slovakia

IE Ireland TR Turkey

IT Italy UA Ukraine

Page 17: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 17 of 20

Document version 2.0 – 2019-02-26

3.4 Appendix 2 – County codes and descriptions The descriptions for the Irish counties permitted in the HTTP request are in the following table.

County Code County Name

CAW Carlow

CAV Cavan

CLR Clare

ORK Cork

CFN Donegal

DUB Dublin

GWY Galway

KIR Kerry

KIL Kildare

KLK Kilkenny

LOI Laois

LEI Leitrim

LMK Limerick

LFD Longford

LTH Louth

MAO Mayo

MTH Meath

MON Monaghan

OFL Offaly

RSM Roscommon

SXL Sligo

TPY Tipperary

WAT Waterford

WMT Westmeath

WEX Wexford

WIC Wicklow

Page 18: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 18 of 20

Document version 2.0 – 2019-02-26

3.5 Appendix 3 – Home page country/languages This table shows which combinations of home page country and language are allowed.

Language code “en” (English) is also allowed for all homepage countries listed

Country Code Country Name Language Code Language Name

AT Austria de German

BA Bosnia and

Herzegovina

ba Bosnian

BE Belgium nl Dutch

BG Bulgaria bg Bulgarian

BY Belarus be Belarus

CH Switzerland de, fr, it German, French, Italian

CZ Czech Republic cz Czech

DE Germany de German

DK Denmark da Danish

EE Estonia et Estonian

ES Spain es Spanish

FI Finland fi Finnish

FR France fr French

GB United Kingdom en English

GR Greece el Greek

HR Croatia hr Croatian

HU Hungary hu Hungarian

IE Ireland ga Irish

IT Italy it Italian

LT Lithuania lt Lithuanian

LU Luxembourg de, fr, lb German, French,

Luxembourgish

LV Latvia lv Latvian

MA Morocco ar, fr Arabic, French

MK Macedonia mk Macedonian

NL Netherlands nl Dutch

NO Norway no Norwegian

Page 19: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 19 of 20

Document version 2.0 – 2019-02-26

PL Poland pl Polish

PT Portugal pt Portuguese

RO Romania ro Romanian

RS Serbia sr Serbian

RU Russia ru Russian

SE Sweden sv Swedish

SI Slovenia sl Slovene

SK Slovakia sk Slovak

TR Turkey tr Turkish

UA Ukraine uk Ukranian

Page 20: Scheduler API (TIMETABLE PLUGIN) · Page 2 of 20 Document version 1.9 – 2018-12-06 Table of Contents Document history 3 Foreword 4 Scheduler API (TIMETABLE_PLUGIN) introduction

Page 20 of 20

Document version 2.0 – 2019-02-26

XML schema definition