Download presentation
Published byJasper Kelley Modified over 9 years ago
1
PLD 0200 Upload a PLD0200 File and Receive and Parse the Response
June 2003
2
PLD Flow Diagram UPS | EUR Region EBSG
3
PLD0200 upload http request message Methode: POST
TCP/IP socket connection Host: PORT: 443 URI: /hapld/tos/kdwhapltos URL connection URL: PW+ UID: PLDDSTEST UPS | EUR Region EBSG
4
THE UPLOAD
5
PLD0200 upload POST /hapld/tos/kdwhapltos HTTP/1.1
Host: Content-type: multipart/mixed; boundary=BOUNDARY Content-length: 1038 --BOUNDARY Content-type: application/x-www-form-urlencoded Content-length: 140 AppVersion=1.0&AcceptUPSLicenseAgreement=Yes&ResponseType=application/x-ups-pld&VersionNumber=V4R1&UserId=xxx&Password=xxx Content-type: application/x-ups-binary Content-length: 719 *AA0A1754 US *BA1z LBS01PRE10 … --BOUNDARY— header message UPS | EUR Region EBSG
6
PLD0200 upload the PL0200 upload is a multipart message contains 2 part the two parts are delimited by --Boundary POST /hapld/tos/kdwhapltos HTTP/1.1 Host: Content-type: multipart/mixed; boundary=BOUNDARY Content-length: 1038 --BOUNDARY Content-type: application/x-www-form-urlencoded Content-length: 140 AppVersion=1.0&AcceptUPSLicenseAgreement=Yes&ResponseType=application/x-ups-pld&VersionNumber=V4R1&UserId=xxx&Password=xxx Content-type: application/x-ups-binary Content-length: 719 *AA0A1754 US *BA1z LBS01PRE10 … --BOUNDARY— Multipart message part 1 part 2 UPS | EUR Region EBSG
7
PLD0200 upload each part and the main message has a a Content-type and a content-length header POST /hapld/tos/kdwhapltos HTTP/1.1 Host: Content-type: multipart/mixed; boundary=BOUNDARY Content-length: 1038 --BOUNDARY Content-type: application/x-www-form-urlencoded Content-length: 140 AppVersion=1.0&AcceptUPSLicenseAgreement=Yes&ResponseType=application/x-ups-pld&VersionNumber=V4R1&UserId=xxx&Password=xxx Content-type: application/x-ups-binary Content-length: 719 *AA0A1754 US *BA1z LBS01PRE10 … --BOUNDARY— Multipart message part 1 part 2 UPS | EUR Region EBSG
8
PLD0200 upload the Content-length is one of the most important detail for a successful upload POST /hapld/tos/kdwhapltos HTTP/1.1 Host: Content-type: multipart/mixed; boundary=BOUNDARY Content-length: 1038 --BOUNDARY Content-type: application/x-www-form-urlencoded Content-length: 140 AppVersion=1.0&AcceptUPSLicenseAgreement=Yes&ResponseType=application/x-ups-pld&VersionNumber=V4R1&UserId=xxx&Password=xxx Content-type: application/x-ups-binary Content-length: 719 *AA0A1754 US *BA1z LBS01PRE10 … --BOUNDARY— Multipart message part 1 part 2 UPS | EUR Region EBSG
9
THE RESPONSE
10
PLD0200 RESPONSE the PLP0200 upload response is a multipart message contains 3 part all 3 parts are delimited by --Boundary Multipart message HTTP/ OK Server: IBM-HTTP-Server/1.0 Date: Mon, 25 Nov :21:15 GMT Connection: close Accept-Ranges: bytes Content-Type: multipart/mixed; boundary=BOUNDARY Content-Length: 1251 --BOUNDARY Content-type: text/html Content-length: 138 <HTML> <HEAD> <TITLE>UPS Internet Software</TITLE> </HEAD> <BODY> <P>UPS Internet Software, Copyright UPS 1998</P> </BODY> </HTML> Content-type: application/x-ups-psmpld Content-length: 103 UPSOnLine%1.0%0000%0000Successful completion - No errors found. Content-type: application/x-ups-pld Content-length: 758 KDGPLCR1 United Parcel Service11/25/02 Page:1 PLD Control Report 04:09 PM --BOUNDARY-- part text/html part application/x-ups-psmpld part application/x-ups-pld UPS | EUR Region EBSG
11
PLD0200 RESPONSE text/html Multipart message HTTP/1.1 200 OK
Server: IBM-HTTP-Server/1.0 Date: Mon, 25 Nov :21:15 GMT Connection: close Accept-Ranges: bytes Content-Type: multipart/mixed; boundary=BOUNDARY Content-Length: 1251 --BOUNDARY Content-type: text/html Content-length: 138 <HTML> <HEAD> <TITLE>UPS Internet Software</TITLE> </HEAD> <BODY> <P>UPS Internet Software, Copyright UPS 1998</P> </BODY> </HTML> Content-type: application/x-ups-psmpld Content-length: 103 UPSOnLine%1.0%0000%0000Successful completion - No errors found. Content-type: application/x-ups-pld Content-length: 758 KDGPLCR1 United Parcel Service11/25/02 Page:1 PLD Control Report 04:09 PM --BOUNDARY-- part text/html part application/x-ups-psmpld part application/x-ups-pld UPS | EUR Region EBSG
12
PLD0200 RESPONSE text/html contains HTML formatted response
sample text/html part Content-type: text/html Content-length: 138 <HTML> <HEAD> <TITLE>UPS Internet Software</TITLE> </HEAD> <BODY> <P>UPS Internet Software, Copyright UPS 1998</P> </BODY> </HTML> UPS | EUR Region EBSG
13
PLD0200 RESPONSE application/x-ups-psmpld Multipart message
HTTP/ OK Server: IBM-HTTP-Server/1.0 Date: Mon, 25 Nov :21:15 GMT Connection: close Accept-Ranges: bytes Content-Type: multipart/mixed; boundary=BOUNDARY Content-Length: 1251 --BOUNDARY Content-type: text/html Content-length: 138 <HTML> <HEAD> <TITLE>UPS Internet Software</TITLE> </HEAD> <BODY> <P>UPS Internet Software, Copyright UPS 1998</P> </BODY> </HTML> Content-type: application/x-ups-psmpld Content-length: 103 UPSOnLine%1.0%0000%0000Successful completion - No errors found. Content-type: application/x-ups-pld Content-length: 758 KDGPLCR1 United Parcel Service11/25/02 Page:1 PLD Control Report 04:09 PM --BOUNDARY-- part text/html part application/x-ups-psmpld part application/x-ups-pld UPS | EUR Region EBSG
14
PLD0200 RESPONSE application/x-ups-psmpld
contains the response type (successful, warning, error or severe error). 4 Fields - delimited by "%“ Field1: UPSOnline Field2: Version Field3: PLD Upload - Return Codes 0000 Success - Successful upload, no warning messages. Control and Status Reports are returned. 6930 PLD Warning - Successful upload with warning messages. Error, Control and Status Reports are returned. 6931 PLD Error - Failed upload due to errors in the PLD data. Error and Status Reports are returned. 6932 PLD Severe Error - Failed upload due to errors in the input parameters. Status Report is returned. Field4: PLD Upload - Message Text ReasonCode(4digits) + Description (see PLD Documentation for more Details) Sample successful upload Content-type: application/x-ups-psmpld Content-length: 103 UPSOnLine%1.0%0000%0000Successful completion - No errors found. Sample failed upload Content-type: application/x-ups-psmpld Content-length: 104 UPSOnLine%1.0%6931%5491PLD File contains Fatal Errors. Correct errors and resubmit. UPS | EUR Region EBSG
15
PLD0200 RESPONSE application/x-ups-pld Multipart message
HTTP/ OK Server: IBM-HTTP-Server/1.0 Date: Mon, 25 Nov :21:15 GMT Connection: close Accept-Ranges: bytes Content-Type: multipart/mixed; boundary=BOUNDARY Content-Length: 1251 --BOUNDARY Content-type: text/html Content-length: 138 <HTML> <HEAD> <TITLE>UPS Internet Software</TITLE> </HEAD> <BODY> <P>UPS Internet Software, Copyright UPS 1998</P> </BODY> </HTML> Content-type: application/x-ups-psmpld Content-length: 103 UPSOnLine%1.0%0000%0000Successful completion - No errors found. Content-type: application/x-ups-pld Content-length: 758 KDGPLCR1 United Parcel Service11/25/02 Page:1 PLD Control Report 04:09 PM --BOUNDARY-- part text/html part application/x-ups-psmpld part application/x-ups-pld UPS | EUR Region EBSG
16
PLD0200 RESPONSE application/x-ups-pld
contains the reports (Status, Error and Control Reports) start with fixed length: Pos. Length Description 1 4 Number of Reports 5 8 Length of all Reporst then start again with fixed length: 1 1 Type of Report 1=Status Report 2=Error Report 3=Control Report 2 8 Length of these Report (Xbyte) 9 Xbyte Report Sample application/x-ups-pld part Content-type: application/x-ups-pld Content-length: 758 KDGPLCR1 United Parcel Service11/25/02 Page:1 PLD Control Report UPS | EUR Region EBSG
17
PLD0200 RESPONSE application/x-ups-pld
Value Description 0002 Number of Reports Length of all Reports Sample1: application/x-ups-pld part Content-type: application/x-ups-pld Content-length: 759 KDGPLCR United Parcel Service 01/28/03 Page: PLD Control Report :12 AM Pickup Date: S equence#: #of Segments: Shipper#:4334A4 Book/Page#: Shipments:000 001 Packages: Successful completion - No errors found. Value Description 3 3=Control Report Length of Control Report Value Description 1 1=Status Report Length of Control Report UPS | EUR Region EBSG
18
PLD0200 RESPONSE application/x-ups-pld
Value Description 0002 Number of Reports Length of all Reports Sample2: application/x-ups-pld part Content-type: application/x-ups-pld Content-length: 1319 KDGPLRS United Parcel Service 01/28/ Host Access :28 AM PLD Error Report PAGE 1 Err Error Code/ Message/ Tracking Seg Field Fiel d Number ID Name Contents Weight cannot be zero for a non-letter Z4334A *BA ShipmentActualWeight 5491 PLD File contains Fatal Errors. Correct errors a nd resubmit PLD File contains Fatal Errors. Correct errors and resubmit. Value Description 1 2=Error Report Length of Control Report Value Description 1 1=Status Report Length of Control Report UPS | EUR Region EBSG
19
PLD0200 RESPONSE application/x-ups-pld Status Report
contains a Return Code, a Reason Code and a Reason Text fixed length: Pos. Length Description 1 4 Return Code Successful Return Code No errors were found in the file. Successful Warning Return Code Warning, non-fatal errors were found in the file Unsuccessful Return Code Fatal errors were found in the file Unsuccessful Return Code Severe errors were found 5 4 Reason Code (see SPF Documentation for more Details) 9 Xbyte Reason Text (see SPF Documentation for more Details) Status Report Sample 1 Successful completion - No errors found. Status Report Sample 2 PLD File contains Fatal Errors. Correct errors and resubmit. Status Report Sample 3 Password is invalid. UPS | EUR Region EBSG
20
PLD0200 RESPONSE application/x-ups-pld Control Report
the length of this report is always X * 80 Byte Insert a [CR] [LF] after each 80Bytes and you will get a well formed human readable report Sample Error Report / unparsed KDGPLCR United Parcel Service /28/03 Page: PLD Control Report :40 AM Pickup Date: Sequence#: #of Segments: Shipper#:4334A4 Book/Page#: Shipments: Packages: Sample Error Report / parsed KDGPLCR United Parcel Service /28/03 Page: PLD Control Report :40 AM Pickup Date: Sequence#: #of Segments: Shipper#:4334A4 Book/Page#: Shipments: Packages: 80 UPS | EUR Region EBSG
21
PLD0200 RESPONSE application/x-ups-pld Error Report
the length of this report is always X * 80 Byte Inset a [CR] [LF] after each 80Bytes and you will get a well formed human readable report Sample Error Report / unparsed KDGPLRS United Parcel Service /28/ Host Access :40 AM PLD Error Report PAGE Err Error Code/ Message/ Tracking Seg Field Field Number ID Name Contents Invalid 1z Service Level for the chosen UPS services Z4334A *PA PackageTrackingNumber Z4334A PLD File submitted with above errors. Correct for next upload. Sample Error Report / parsed KDGPLRS United Parcel Service /28/03 Host Access :40 AM PLD Error Report PAGE 1 Err Error Code/ Message/ Tracking Seg Field Field Number ID Name Contents Invalid 1z Service Level for the chosen UPS services 1Z4334A *PA PackageTrackingNumber Z4334A 5481 PLD File submitted with above errors. Correct for next upload. 80 UPS | EUR Region EBSG
22
PLD0200 RESPONSE --BOUNDARY Content-type: text/html
Content-length: 138 <HTML> <HEAD> <TITLE>UPS Internet Software</TITLE> </HEAD> <BODY> <P>UPS Internet Software, Copyright UPS 1998</P> </BODY> </HTML> Content-type: application/x-ups-psmpld Content-length: 104 UPSOnLine%1.0%0000%0000Successful completion - No errors found. Content-type: application/x-ups-pld Content-length: 759 KDGPLCR United Parcel Service /28/03 Page: PLD Control Report :12 AM Pickup Date: Sequence#: #of Segments: Shipper#:4334A4 Book/Page#: Shipments: Packages: Successful completion - No errors found. --BOUNDARY-- The Text The Response Type – 0000 Successful The Reports – 2 Reports ( Control + Status ) UPS | EUR Region EBSG
23
Thank you © Copyright 2003 United Parcel Service of America, Inc. All rights reserved.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.