EDI specification
The page describes how to book shipments using EDI.
EDI shipments are described in XML and are uploaded to OneShell using either FTP or HTTP.
HTTP
An EDI shipment is booked by POSTing to the URL
https://portal.ff.geodis.com/api/uploadxmlbooking.php
Other Leaps systems use other URLs.
FTP
An EDI shipment is booked by uploading to portal.ff.geodis.com. Each portal has its own username/password and folder for storing the uploaded XML files. The reply will be stored in another folder on the FTP server and may be read later by the portal owner.
The uploaded files should be stored in the folder book/
. The replies will be stored in status/
.
The name of the XML file in the status/
folder will be the same as the name of the upload file in the book/
folder. It is up to the portal owner to ensure that the file names do not collide. File names should only include the characters A-Z a-z 0-9, hyphen (-) and period (.) and must end in .xml
. Thus Abc123.xml
is valid, but Abc 123.XML
isn't, as it includes an invalid character (SPACE) and doesn't end in .xml
.
XML format
The XML format is described here:
EDI XML format
PHP example
$xml = file_get_contents('mybooking.xml'); $ch = curl_init("https://portal.ff.geodis.com/api/uploadxmlbooking.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "xml=".$xml); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $d = curl_exec($ch);
Reply format
The reply is XML with the following format:
<reply> <status>1</status> <slino>123456789</status> <msg>OK</msg> <received-time>2015-12-25 23:50:10</received-time> <warning>This was a test booking</warning> <awbno>234234234</awbno> <labeldata>...</labeldata> <labeltype>LABEL</labeltype> </reply>
The <status>
element can be either 1 (OK) or 0 (error).
The <labeldata>
element contains a base64 encoded PDF. This is only included if <status>
is 1 and <label>
was set to yes
and <autobook>
was set to yes
in the request.
The <awbno>
element is only included if the booking was completed and a AWB number was assigned to the booking.
The <labeltype>
field should be ignored.