Sei sulla pagina 1di 46

COPYRIGHT © XEND BUSINESS SOLUTIONS INC.

Xend Web Service


Functional Specification
Version 1.8
11/7/2014
Xend Web Service
November 7, 2014

Table of Contents
I. Xend Web Service ........................................................................................................................................................... 1
A. Services ................................................................................................................................................................... 1
B. Complex Types ........................................................................................................................................................ 1
1. AuthHeader (see Authentication) .................................................................................................................. 1
2. Shipment ........................................................................................................................................................ 1
3. Tracking .......................................................................................................................................................... 2
4. Address ........................................................................................................................................................... 2
C. Simple Types ........................................................................................................................................................... 3
1. ServiceType..................................................................................................................................................... 3
2. ShipmentType................................................................................................................................................. 3
3. PackagingType ................................................................................................................................................ 3
4. PurposeOfExportType .................................................................................................................................... 3
D. Authentication ........................................................................................................................................................ 3
1. AuthHeader .................................................................................................................................................... 3
2. Using myXend User Token.............................................................................................................................. 4
3. Using myXend Developer ID ........................................................................................................................... 4
II. ShipmentService ............................................................................................................................................................. 4
A. Web Reference ....................................................................................................................................................... 4
B. Methods.................................................................................................................................................................. 4
C. Create Method........................................................................................................................................................ 4
1. Parameters ..................................................................................................................................................... 4
2. Return Value ................................................................................................................................................... 5
3. Remarks .......................................................................................................................................................... 5
D. CreateDev Method ................................................................................................................................................. 5
1. Parameters ..................................................................................................................................................... 5
2. Return Value ................................................................................................................................................... 5
3. Remarks .......................................................................................................................................................... 5
E. Get Method ............................................................................................................................................................ 5
1. Parameters ..................................................................................................................................................... 5
Xend Web Service
November 7, 2014

2. Return Value ................................................................................................................................................... 5


3. Remarks .......................................................................................................................................................... 6
III. TrackingService ............................................................................................................................................................... 6
A. Web Reference ....................................................................................................................................................... 6
B. Methods.................................................................................................................................................................. 6
C. GetList Method ....................................................................................................................................................... 6
1. Parameters ..................................................................................................................................................... 6
2. Return Value ................................................................................................................................................... 6
3. Remarks .......................................................................................................................................................... 6
IV. RateService ..................................................................................................................................................................... 7
A. Web Reference ....................................................................................................................................................... 7
B. Methods.................................................................................................................................................................. 7
C. Calculate Method ................................................................................................................................................... 7
1. Parameters ..................................................................................................................................................... 7
2. Return Value ................................................................................................................................................... 7
3. Remarks .......................................................................................................................................................... 7
D. CalculateByPackaging Method ............................................................................................................................... 8
1. Parameters ..................................................................................................................................................... 8
2. Return Value ................................................................................................................................................... 8
3. Remarks .......................................................................................................................................................... 8
V. BookingService................................................................................................................................................................ 8
A. Web Reference ....................................................................................................................................................... 8
B. Methods.................................................................................................................................................................. 9
C. Schedule Method.................................................................................................................................................... 9
1. Parameters ..................................................................................................................................................... 9
2. Return Value ................................................................................................................................................... 9
3. Remarks .......................................................................................................................................................... 9
D. ScheduleDev Method ............................................................................................................................................. 9
1. Parameters ..................................................................................................................................................... 9
2. Return Value ................................................................................................................................................. 10
3. Remarks ........................................................................................................................................................ 10
Xend Web Service
November 7, 2014

E. GetAddress Method ............................................................................................................................................. 10


1. Parameters ................................................................................................................................................... 10
2. Return Value ................................................................................................................................................. 10
3. Remarks ........................................................................................................................................................ 10
VI. AccountService ............................................................................................................................................................. 10
A. Web Reference ..................................................................................................................................................... 10
B. Methods................................................................................................................................................................ 10
C. GetAccountNo Method ........................................................................................................................................ 10
1. Parameters ................................................................................................................................................... 10
2. Return Value ................................................................................................................................................. 11
3. Remarks ........................................................................................................................................................ 11
VII. Sandbox ........................................................................................................................................................................ 11
A. User Token ............................................................................................................................................................ 11
B. ShipmentService ................................................................................................................................................... 11
1. Web Reference ............................................................................................................................................. 11
2. Create Method (see production version of Create Method) ....................................................................... 11
3. Get Method (see production version of Get Method) ................................................................................. 11
C. BookingService...................................................................................................................................................... 12
1. Web Reference ............................................................................................................................................. 12
2. Schedule Method (see production version of Schedule Method) ............................................................... 12
3. GetAddress Method (see production version of GetAddress Method) ....................................................... 13
Appendix A – Zone Destination Values ................................................................................................................................. 14
A. ProvincialExpress .................................................................................................................................................. 14
B. InternationalPostal ............................................................................................................................................... 16
C. InternationalEMS .................................................................................................................................................. 20
D. InternationalExpress ............................................................................................................................................. 26
Appendix B – Apply in Xend Developer Program.................................................................................................................. 33
Appendix C – Retrieving myXend User Token....................................................................................................................... 33
A. Click the “Connect to your myXend” .................................................................................................................... 33
B. Provide Username and Password ......................................................................................................................... 33
C. Redirect back to third-party website .................................................................................................................... 34
Xend Web Service
November 7, 2014

Appendix D – Retrieving Waybill File .................................................................................................................................... 34


Appendix E – PHP Sample Codes .......................................................................................................................................... 35
A. ShipmentService ................................................................................................................................................... 35
1. Create Method ............................................................................................................................................. 35
2. Get Method .................................................................................................................................................. 36
B. TrackingService ..................................................................................................................................................... 37
1. GetList Method ............................................................................................................................................. 37
C. RateService ........................................................................................................................................................... 38
1. Calculate Method ......................................................................................................................................... 38
D. BookingService...................................................................................................................................................... 39
1. Schedule Method ......................................................................................................................................... 39
2. GetAddress Method ..................................................................................................................................... 40
Xend Web Service
November 7, 2014

Revision History
Version
Date Revision Changed By
Updated
September 10, 2012  Updated list of provinces in Appendix A.A. ProvincialExpress 1.6 Rom Gapuz Jr.
and added provinces: Batanes, Camarines Norte, Mountain
Province, Quirino, Eastern Samar, Guimaras, Siquijor,
Camiguin, Davao Oriental, North Cotabato, Maguindanao,
Sultan Kudarat, Sulu, Tawi-tawi
January 29, 2012  Added CalculateByPackaging in RateService 1.7 Rom Gapuz Jr.
July 10, 2014  Updated list of provinces in Appendix A.A. ProvincialExpress 1.7.1 Rom Gapuz Jr.
and added provinces: Zamboanga Sibugay
September 5, 2014  Updated list of provinces based on NSCB list in Appendix 1.7.2 Rom Gapuz Jr.
A.A. Provincial Express and added provinces: Davao
Occidental, Dinagat Islands, Kalinga, Davao del Norte,
Occidental Mindoro, Oriental Mindoro, Cotabato and
Western Samar
 Added AccountService
November 7, 2014  Updated Web Reference URLs 1.8 Rom Gapuz Jr.
 Changed “Apply in Xend Developer Program” instruction
Xend Web Service
November 7, 2014

I. Xend Web Service


The Xend Web Service provides methods that can be used to remotely manage an account in myXend (Online
Shipping Management System) using Simple Object Access Protocol (SOAP). Below is the list of service which can
be used.

A. Services
Service Description
ShipmentService Provides methods for managing shipments
TrackingService Provides methods for retrieving tracking information of shipments
RateService Provides methods for calculating shipping charges
BookingService Provides methods for scheduling for pickup
AccountService Provides methods for account information

B. Complex Types
These complex types are used to store information that defines a particular entity in the system.

Object Description
Shipment Defines the shipment entity
Tracking Defines the tracking entity
Address Defines an address of the account

Below are the definitions of the complex types in the system:

1. AuthHeader (see Authentication)


Element Type Direction Required
UserToken String Input Yes/No

2. Shipment
Element Type Direction Required
WaybillNo String Output No
ServiceTypeValue ServiceType Input/Output Yes
ShipmentTypeValue ShipmentType Input/Output Yes
PurposeOfExportValue PurposeOfExportType Input/Output Yes
Description String Input/Output No
ClientReference String Input/Output No
SpecialInstructions String Input/Output No
CountryManufactured String Input/Output Subjective
Weight Decimal Input/Output Yes
DimensionL Decimal Input/Output Yes
DimensionW Decimal Input/Output Yes

Confidential. Copyright © Xend Business Solutions Inc. Page 1


Xend Web Service
November 7, 2014

DimensionH Decimal Input/Output Yes


DeclaredValue Decimal Input/Output Yes
Status String Output No
DateCreated DateTime Output No
DatePrinted DateTime Output No
RecipientName String Input/Output Yes
RecipientCompanyName String Input/Output Yes
RecipientAddress1 String Input/Output Yes
RecipientAddress2 String Input/Output No
RecipientCity String Input/Output Yes
RecipientProvince String Input/Output Yes
RecipientPostalCode String Input/Output Subjective
RecipientCountry String Input/Output Yes
RecipientPhoneNo String Input/Output No
RecipientEmailAddress String Input/Output No
ShippingFee Decimal Output No
InsuranceFee Decimal Output No
IsInsured Boolean Input Yes

3. Tracking
Element Type Direction Required
Activity String Output No
DateLogged String Output No
TimeLogged String Output No
Location String Output No
Comment String Output No

4. Address
Element Type Direction Required
AddressRefNo Int Output No
Address1 String Output No
Address2 String Output No
City String Output No
Province String Output No
PostalCode String Output No
Country String Output No

Confidential. Copyright © Xend Business Solutions Inc. Page 2


Xend Web Service
November 7, 2014

C. Simple Types
The simple types define list of values that is used with complex types.

Object Description
ServiceType Defines the service type of a shipment
ShipmentType Defines the shipment type of a shipment
PackagingType Defines the packaging type of a shipment
PurposeOfExportType Defines the purpose of export of a shipment

Below are the definitions of the simple types in the system:

1. ServiceType
Element Type Values
ServiceType String MetroManilaExpress, ProvincialExpress,
InternationalPostal, InternationalEMS,
InternationalExpress, RizalMetroManilaExpress

2. ShipmentType
Element Type Values
ShipmentType String Document, Parcel

3. PackagingType
Element Type Values
PackagingType String OwnPackaging, LargePouch, XLPouch

4. PurposeOfExportType
Element Type Values
PurposeOfExportType String Gift, Personal, Documents, CommercialSample,
Other, None

D. Authentication
Some of the Services requires authentication of the identity of the caller of the request. This is also to get
the account holder information that the requests will be attributed.

1. AuthHeader
AuthHeader is a SOAP header element that provides authentication to the web service call. The
UserToken value in the AuthHeader can be either myXend User Token or Developer ID, depending on
the type of web service calls. See Appendix B – Apply in Xend Developer Program to get a myXend User
Token and Developer ID.

Confidential. Copyright © Xend Business Solutions Inc. Page 3


Xend Web Service
November 7, 2014

myXend User Token is used for to retrieve private information regarding a particular myXend account.
While the myXend Developer ID is used to retrieve other information that is not targeting a particular
myXend Account.

2. Using myXend User Token


The ShipmentService, BookingService and AccountService requires this by supplying the myXend User
Token value. Each myXend user is identified by a unique user token value; this value can be acquired by
the myXend User by following the procedure found on Appendix C - Retrieving myXend User Token.

3. Using myXend Developer ID


The RateService and TrackingService provide public information that can be retrieved using a myXend
Developer account. The UserToken value in the AuthHeader should be supplied with Developer ID.
Please see Appendix B – Apply in Xend Developer Program to get a Developer ID.

Note: The ScheduleDev method in BookingService requires Developer ID for authentication.

II. ShipmentService
The ShipmentService provides methods for managing shipments.

A. Web Reference
https://api.xend.com.ph/api/ShipmentService.asmx

B. Methods
Method Description
Create Create a shipment and returns the waybill number
Get Retrieve the shipment by waybill number

C. Create Method
The Create method of the ShipmentService creates a new shipment and returns the waybill number.

1. Parameters
Parameter Description
Shipment Shipment object (see Shipment)

Confidential. Copyright © Xend Business Solutions Inc. Page 4


Xend Web Service
November 7, 2014

2. Return Value
A string containing the Waybill Number of the newly created shipment.

3. Remarks
The new shipment will be created in the account that executes a request implementing this method.

Rate will be automatically calculated when the shipment is created, although error from calculation of
rate will be ignored and shipping and insurance fee will be zero (use the RateService validate the rate
calculation).

D. CreateDev Method
The CreateDev method of the ShipmentService creates a new shipment and returns the waybill number.

1. Parameters
Parameter Description
Shipment Shipment object (see Shipment)
fromField The text to be placed in the “From” field of the waybill

2. Return Value
A string containing the Waybill Number of the newly created shipment.

3. Remarks
The new shipment will be created in the account that executes a request implementing this method.

Rate will be automatically calculated when the shipment is created, although error from calculation of
rate will be ignored and shipping and insurance fee will be zero (use the RateService validate the rate
calculation).

E. Get Method
The Get method of the ShipmentService retrieves the information of a shipment given a waybill number.

1. Parameters
Parameter Description
WaybillNo The waybill number of the shipment

2. Return Value
A Shipment object containing the information of the shipment.

Confidential. Copyright © Xend Business Solutions Inc. Page 5


Xend Web Service
November 7, 2014

3. Remarks
A shipment will only be returned if the account that executes the request is the owner.

III. TrackingService
The TrackingService provides methods for retrieving tracking information given the waybill number of the
shipment.

A. Web Reference
https://api.xend.com.ph/api/TrackingService.asmx

B. Methods
Method Description
GetList Retrieve the shipment tracking history by waybill number

C. GetList Method
The GetList method of the TrackingService retrieves the tracking history of a shipment given the waybill
number. The tracking history is a list of Tracking objects.

1. Parameters
Parameter Description
WaybillNo The waybill number of the shipment

2. Return Value
A list of Tracking objects that contains the tracking history of a shipment.

3. Remarks
A list of Tracking objects will only be returned if the account that executes the request is the owner.

Confidential. Copyright © Xend Business Solutions Inc. Page 6


Xend Web Service
November 7, 2014

IV. RateService
The RateService provides methods for retrieving rate calculation based of certain parameters.

A. Web Reference
https://api.xend.com.ph/api/RateService.asmx

B. Methods
Method Description
Calculate Retrieve the calculated rate based on the shipment information.
CalculateByPackaging Retrieve the calculated rate based on the shipment information. Similar to
Calculate method but with additional parameter: PackagingType.

C. Calculate Method
The Calculate method of the RateService retrieves the calculated rate based on the shipment information.

1. Parameters
Parameter Type Description
ServiceTypeValue ServiceType The service to use with the shipment (see ServiceType)
ShipmentTypeValue ShipmentType The type of shipment (see ShipmentType)
DestinationValue String The destination (either a province or region/country)
depending on the ServiceType (see remarks below and
Appendix A)
Weight Decimal The actual weight of the shipment in kilograms (kg)
DimensionL Decimal The length dimension of the shipment (cm)
DimensionW Decimal The width dimension of the shipment (cm)
DimensionH Decimal The height dimension of the shipment (cm)
DeclaredValue Decimal The declared value of the shipment in peso for domestic
shipments and US dollar for international shipments
AddInsurance Boolean The flag that defines if the shipment is insured

2. Return Value
A decimal value of the calculated rate.

3. Remarks
Shipment insurance will only be computed if AddInsured is marked as true and DeclaredValue has a
value greater than zero.

Confidential. Copyright © Xend Business Solutions Inc. Page 7


Xend Web Service
November 7, 2014

DestinationValue is a provincial destination for ProvincialExpress ServiceType; and a country/region for


InternationalPostal, InternationalEMS and InternationExpress services. MetroManila service does not
require nor regard DestinationValue parameter.

D. CalculateByPackaging Method
The CalculateByPackaging method of the RateService retrieves the calculated rate based on the shipment
information. Similar to Calculate method but with additional parameter: PackagingType.

1. Parameters
Parameter Type Description
ServiceTypeValue ServiceType The service to use with the shipment (see ServiceType)
ShipmentTypeValue ShipmentType The type of shipment (see ShipmentType)
PackagingTypeValue PackagingType The type of packaging (see PackagingType)
DestinationValue String The destination (either a province or region/country)
depending on the ServiceType (see remarks below and
Appendix A)
Weight Decimal The actual weight of the shipment in kilograms (kg)
DimensionL Decimal The length dimension of the shipment (cm)
DimensionW Decimal The width dimension of the shipment (cm)
DimensionH Decimal The height dimension of the shipment (cm)
DeclaredValue Decimal The declared value of the shipment in peso for domestic
shipments and US dollar for international shipments
AddInsurance Boolean The flag that defines if the shipment is insured

2. Return Value
A decimal value of the calculated rate.

3. Remarks
See remarks of Calculate Method.

If PackagingType is “OwnPackaging”, the calculation is the same as the Calculate Method. Computation
for pouch-based packaging is only allowed for domestic (Metro Manila and Province) destinations.

V. BookingService
The BookingService provides methods to managing bookings.

A. Web Reference
https://api.xend.com.ph/api/BookingService.asmx

Confidential. Copyright © Xend Business Solutions Inc. Page 8


Xend Web Service
November 7, 2014

B. Methods
Method Description
Schedule Create a booking for pickup given the address and booking date
ScheduleDev Create a booking for pickup given the address and booking date (Developer Used)
GetAddress Retrieves the list of addresses of the account

C. Schedule Method
The Schedule method of the BookingService creates a booking for pickup.

1. Parameters
Parameter Type Description
BookingDate DateTime The date to schedule a pickup
AddressRefNo Integer The reference number of the address (see Address type)
Remarks String The user comments to provide additional information

2. Return Value
A string value of the reference number of the booking.

3. Remarks
The AddressRefNo is the identifier of the address which can be retrieve by calling the GetAddress
method of the BookingService.

D. ScheduleDev Method
The ScheduleDev method of the BookingService creates a booking for pickup. The difference of this method
with Schedule method is that the shipper name and address should be passed in the parameters.

1. Parameters
Parameter Type Description
BookingDate DateTime The date to schedule a pickup
Remarks String The user comments to provide additional information
FirstName String The shipper’s first name
LastName String The shipper’s last name
Street1 String The shipper’s street address
Street2 String The shipper’s additional street address
City String The shipper’s city
Province String The shipper’s province
PostalCode String The shipper’s postal code
Landmark String The shipper’s landmark

Confidential. Copyright © Xend Business Solutions Inc. Page 9


Xend Web Service
November 7, 2014

2. Return Value
A string value of the reference number of the booking.

3. Remarks
This method requires the Developer ID assigned to the UserToken in the AuthHeader.

E. GetAddress Method
The GetAddress method of the BookingService retrieves the list of addresses in the account.

1. Parameters
None

2. Return Value
A list of Address objects that contains the address information of the account.

3. Remarks
Addresses can be defined by accessing the account in myXend.

VI. AccountService
The AccountService provides methods for account information.

A. Web Reference
https://api.xend.com.ph/api/AccountService.asmx

B. Methods
Method Description
GetAccountNo Get account number

C. GetAccountNo Method
The GetAccountNo method of the AccountService retrieves the account number.

1. Parameters
None

Confidential. Copyright © Xend Business Solutions Inc. Page 10


Xend Web Service
November 7, 2014

2. Return Value
A string value of the account number of the account.

3. Remarks
None

VII. Sandbox
The sandbox provides a test web service provider with a defined output/result for each corresponding input
parameters. SOAP Fault will result from incorrect input or database error.

This web services is intended solely for testing purposes.

A. User Token
When using the sandbox web service calls, you must use one of the following users token.

Input Result
081C1A4C-39DE-4A5C-B9AB-610E8EC5E078 Allows web service calls to execute
E183A419-AECD-4824-A38B-06F04A965BA6 SOAP Fault ("Caller does not have proper privilege to use
this service.")
DF350E52-9BB2-4D22-A991-AF9E8CFEF0BF SOAP Fault ("Caller account data contains error: Access
does not have proper role.")
Any Globally Unique Identifier (GUID) SOAP Fault (“Caller is unauthorized to use this service.”)

B. ShipmentService

1. Web Reference
https://api.xend.com.ph/apitest/ShipmentService.asmx

2. Create Method (see production version of Create Method)


Parameter Result
Any Random waybill number (9 digits numerical characters)

3. Get Method (see production version of Get Method)


Parameter Result
WaybillNo = Any value WayBillNo = Value of the input parameter
ServiceTypeValue = MetroManilaExpress
ShipmentTypeValue = Parcel
PurposeOfExportValue = None

Confidential. Copyright © Xend Business Solutions Inc. Page 11


Xend Web Service
November 7, 2014

Description = "Bag"
ClientReference = ""
SpecialInstructions = ""
CountryManufactured = ""
Weight = 0.5
DimensionL = 5m
DimensionW = 4m
DimensionH = 3m;
DeclaredValue = 200;
Status = "New"
DateCreated = Current date
DatePrinted = Current date
RecipientName = "Juan Dela Cruz"
RecipientCompanyName = "Xend Business Solutions Inc."
RecipientAddress1 = "17F Summit One Tower"
RecipientAddress2 = "530 Shaw Blvd"
RecipientCity = "Mandaluyong"
RecipientProvince = "Metro Manila"
RecipientPostalCode = "1552"
RecipientCountry = "Philippines"
RecipientPhoneNo = "025019345"
RecipientEmailAddress = "support@xendexpress.com"
ShippingFee = 50
InsuranceFee = 1
IsInsured = true

C. BookingService

1. Web Reference
https://api.xend.com.ph/apitest/BookingService.asmx

2. Schedule Method (see production version of Schedule Method)


Parameter Result
BookingDate = “1/1/2010” “0001”
AddressRefNo = 1
Remarks = Any string value
BookingDate = “1/2/2010” “0002”
AddressRefNo = 1
Remarks = Any string value
BookingDate = “1/3/2010” SOAP Fault ("Already have booking on this date and address.")
AddressRefNo = 1
Remarks = Any string value
BookingDate = “1/4/2010” SOAP Fault ("Booking date must not be more than 7 days old.")
AddressRefNo = 1
Remarks = Any string value

Confidential. Copyright © Xend Business Solutions Inc. Page 12


Xend Web Service
November 7, 2014

BookingDate = “1/5/2010” SOAP Fault (“Booking should be made a day before the booking
AddressRefNo = 1 date. And has a cut-off time of 11:59am")
Remarks = Any string value
BookingDate = “1/6/2010” SOAP Fault (“Booking should be made 1 day/s before the booking
AddressRefNo = 1 date.”)
Remarks = Any string value
BookingDate = “1/7/2010” SOAP Fault (“The cut-off time for same day booking is 11:59am”)
AddressRefNo = 1
Remarks = Any string value
BookingDate = “1/8/2010” SOAP Fault (“Booking on Sunday is not allowed.”)
AddressRefNo = 1
Remarks = Any string value
BookingDate = “1/9/2010” SOAP Fault ("Booking date specified is a holiday.")
AddressRefNo = 1
Remarks = Any string value
BookingDate = “1/10/2010” SOAP Fault ("Booking date specified has already passed.")
AddressRefNo = 1
Remarks = Any string value
BookingDate = “1/11/2010” SOAP Fault ("Primary contact is not set for this account.")
AddressRefNo = 1
Remarks = Any string value
BookingDate = Any date value SOAP Fault ("Address with reference number (2) could not be
AddressRefNo = 2 found.")
Remarks = Any string value
Any other values other than SOAP Fault ("There was an error processing the database query.")
above

3. GetAddress Method (see production version of GetAddress Method)


Parameter Result
None AddressRefNo = 1
Street1 = "17F Summit One Tower"
Street2 = "530 Shaw Blvd"
City = "Mandaluyong"
Province = "Metro Manila"
PostalCode = "1552"
Country = "Philippines"

Confidential. Copyright © Xend Business Solutions Inc. Page 13


Xend Web Service
November 7, 2014

Appendix A – Zone Destination Values

A. ProvincialExpress
Zone Province Alternate Name
Luzon Abra
Luzon Albay
Luzon Apayao
Luzon Aurora
Luzon Bataan
Luzon Batanes
Luzon Batangas
Luzon Benguet
Luzon Bulacan
Luzon Cagayan
Luzon Camarines Norte
Luzon Camarines Sur
Luzon Catanduanes
Luzon Cavite
Luzon Ifugao
Luzon Ilocos Norte
Luzon Ilocos Sur
Luzon Isabela
Luzon Kalinga
Luzon La Union
Luzon Laguna
Luzon Marinduque
Luzon Masbate
Luzon Mindoro Occidental Occidental Mindoro
Luzon Mindoro Oriental Oriental Mindoro
Luzon Mountain Province
Luzon Nueva Ecija
Luzon Nueva Vizcaya
Luzon Palawan
Luzon Pampanga
Luzon Pangasinan
Luzon Quezon
Luzon Quirino
Luzon Rizal
Luzon Romblon

Confidential. Copyright © Xend Business Solutions Inc. Page 14


Xend Web Service
November 7, 2014

Luzon Sorsogon
Luzon Tarlac
Luzon Zambales
Visayas Aklan
Visayas Antique
Visayas Biliran
Visayas Bohol
Visayas Capiz
Visayas Cebu
Visayas Eastern Samar
Visayas Guimaras
Visayas Iloilo
Visayas Leyte
Visayas Negros Occidental
Visayas Negros Oriental
Visayas Northern Samar
Visayas Samar Western Samar
Visayas Siquijor
Visayas Southern Leyte
Mindanao Agusan del Norte
Mindanao Agusan del Sur
Mindanao Basilan
Mindanao Bukidnon
Mindanao Camiguin
Mindanao Compostela Valley
Mindanao Davao Davao del Norte
Mindanao Davao Occidental
Mindanao Davao del Sur
Mindanao Davao Oriental
Mindanao Dinagat Islands
Mindanao Lanao del Norte
Mindanao Lanao del Sur
Mindanao Maguindanao
Mindanao Misamis Occidental
Mindanao Misamis Oriental
Mindanao North Cotabato Cotabato
Mindanao Sarangani
Mindanao South Cotabato
Mindanao Sultan Kudarat
Mindanao Sulu

Confidential. Copyright © Xend Business Solutions Inc. Page 15


Xend Web Service
November 7, 2014

Mindanao Surigao del Norte


Mindanao Surigao del Sur
Mindanao Tawi-tawi
Mindanao Zamboanga del Norte
Mindanao Zamboanga del Sur
Mindanao Zamboanga Sibugay

B. InternationalPostal
Zone Destination
Zone 1 Bangladesh
Zone 1 Brunei
Zone 1 Cambodia
Zone 1 China, People's Republic of
Zone 1 Hong Kong
Zone 1 India
Zone 1 Indonesia
Zone 1 Korea, South
Zone 1 Laos
Zone 1 Malaysia
Zone 1 Nepal
Zone 1 Singapore
Zone 1 Sri Lanka
Zone 1 Taiwan
Zone 1 Thailand
Zone 1 Vietnam
Zone 2 American Samoa
Zone 2 Australia
Zone 2 Bahrain
Zone 2 Cook Islands
Zone 2 Fiji
Zone 2 French Polynesia
Zone 2 Guam
Zone 2 Iraq
Zone 2 Israel
Zone 2 Jordan
Zone 2 Kiribati
Zone 2 Kuwait
Zone 2 Lebanon
Zone 2 Marshall Islands
Zone 2 Micronesia, Federated States of

Confidential. Copyright © Xend Business Solutions Inc. Page 16


Xend Web Service
November 7, 2014

Zone 2 Mongolia
Zone 2 New Caledonia
Zone 2 New Zealand
Zone 2 Oman
Zone 2 Pakistan
Zone 2 Papua New Guinea
Zone 2 Qatar
Zone 2 Saudi Arabia
Zone 2 Solomon Islands
Zone 2 Syrian Arab Republic
Zone 2 United Arab Emirates
Zone 2 Yemen, Republic of
Zone 3 Afghanistan
Zone 3 Albania
Zone 3 Andorra
Zone 3 Austria
Zone 3 Belgium
Zone 3 Bosnia and Herzegovina
Zone 3 Bulgaria
Zone 3 Canada
Zone 3 Croatia
Zone 3 Cyprus
Zone 3 Czech Republic
Zone 3 Denmark
Zone 3 Finland
Zone 3 France
Zone 3 Georgia
Zone 3 Germany
Zone 3 Gibraltar
Zone 3 Greece
Zone 3 Ireland, Republic of
Zone 3 Italy
Zone 3 Liechtenstein
Zone 3 Luxembourg
Zone 3 Malta
Zone 3 Monaco (France)
Zone 3 Netherlands (Holland)
Zone 3 Norway
Zone 3 Poland
Zone 3 Portugal

Confidential. Copyright © Xend Business Solutions Inc. Page 17


Xend Web Service
November 7, 2014

Zone 3 Russia
Zone 3 Slovakia
Zone 3 Slovenia
Zone 3 Spain
Zone 3 Switzerland
Zone 3 Turkey
Zone 3 Ukraine
Zone 3 United Kingdom
Zone 3 United States
Zone 4 Algeria
Zone 4 Angola
Zone 4 Anguilla
Zone 4 Antigua and Barbuda
Zone 4 Argentina
Zone 4 Aruba
Zone 4 Bahamas
Zone 4 Belarus/Byelorussia
Zone 4 Belize
Zone 4 Benin
Zone 4 Bermuda
Zone 4 Bolivia
Zone 4 Botswana
Zone 4 Brazil
Zone 4 Burundi
Zone 4 Canary Islands (Spain)
Zone 4 Cayman Islands
Zone 4 Central African Republic
Zone 4 Chad
Zone 4 Chile
Zone 4 Colombia
Zone 4 Costa Rica
Zone 4 Cote d'lvoire (Ivory Coast)
Zone 4 Djibouti
Zone 4 Dominica
Zone 4 Dominican Republic
Zone 4 Ecuador
Zone 4 Egypt
Zone 4 El Salvador
Zone 4 Equatorial Guinea
Zone 4 Eritrea

Confidential. Copyright © Xend Business Solutions Inc. Page 18


Xend Web Service
November 7, 2014

Zone 4 Estonia
Zone 4 Ethiopia
Zone 4 French Guiana
Zone 4 Gambia
Zone 4 Ghana
Zone 4 Grenada
Zone 4 Guadeloupe
Zone 4 Guatemala
Zone 4 Guinea
Zone 4 Guinea-Bissau
Zone 4 Guyana
Zone 4 Haiti
Zone 4 Honduras
Zone 4 Hungary
Zone 4 Iceland
Zone 4 Jamaica
Zone 4 Japan
Zone 4 Kazakhstan
Zone 4 Kenya
Zone 4 Latvia
Zone 4 Lesotho
Zone 4 Martinique
Zone 4 Mauritania
Zone 4 Mauritius
Zone 4 Mexico
Zone 4 Montserrat
Zone 4 Morocco
Zone 4 Mozambique
Zone 4 Namibia
Zone 4 Netherlands Antilles
Zone 4 Nicaragua
Zone 4 Niger
Zone 4 Nigeria
Zone 4 Panama
Zone 4 Paraguay
Zone 4 Peru
Zone 4 Puerto Rico
Zone 4 Reunion Island
Zone 4 Romania
Zone 4 Rwanda

Confidential. Copyright © Xend Business Solutions Inc. Page 19


Xend Web Service
November 7, 2014

Zone 4 Seychelles
Zone 4 South Africa
Zone 4 St. Kitts and Nevis
Zone 4 St. Lucia
Zone 4 St. Vincent & the Grenadines
Zone 4 Suriname
Zone 4 Sweden
Zone 4 Togo
Zone 4 Tonga
Zone 4 Trinidad & Tobago
Zone 4 Tunisia
Zone 4 Turkmenistan
Zone 4 Turks & Caicos Islands
Zone 4 Uganda
Zone 4 Uruguay
Zone 4 Vanuatu
Zone 4 Venezuela
Zone 4 Wallis & Futuna Islands
Zone 4 Zambia
Zone 4 Zimbabwe

C. InternationalEMS
Zone Destination
Australia Australia
Austria Austria
Bahrain Bahrain
Bangladesh Bangladesh
Belarus/Byelorussia Belarus/Byelorussia
Belgium Belgium
Bhutan Bhutan
Brazil Brazil
Brunei Brunei
Bulgaria Bulgaria
Cambodia Cambodia
Canada Canada
China, People's Republic of China, People's Republic of
Cyprus Cyprus
Denmark Denmark
Egypt Egypt
Fiji Fiji

Confidential. Copyright © Xend Business Solutions Inc. Page 20


Xend Web Service
November 7, 2014

Finland Finland
France France
Germany Germany
Greece Greece
Hong Kong Hong Kong
Hungary Hungary
Iceland Iceland
India India
Indonesia Indonesia
Iran Iran
Ireland, Republic of Ireland, Republic of
Israel Israel
Italy Italy
Japan Japan
Jordan Jordan
Korea, South Korea, South
Kuwait Kuwait
Laos Laos
Luxembourg Luxembourg
Macau Macau
Malaysia Malaysia
Maldives Maldives
Mongolia Mongolia
Myanmar Myanmar
Nepal Nepal
Netherlands (Holland) Netherlands (Holland)
New Zealand New Zealand
Norway Norway
Oman Oman
Pakistan Pakistan
Papua New Guinea Papua New Guinea
Poland Poland
Portugal Portugal
Qatar Qatar
Romania Romania
Russia Russia
Saudi Arabia Saudi Arabia
Singapore Singapore
Slovenia Slovenia
Solomon Islands Solomon Islands

Confidential. Copyright © Xend Business Solutions Inc. Page 21


Xend Web Service
November 7, 2014

South Africa South Africa


Spain Spain
Sri Lanka Sri Lanka
Sweden Sweden
Switzerland Switzerland
Taiwan Taiwan
Thailand Thailand
Turkey Turkey
Ukraine Ukraine
United Arab Emirates United Arab Emirates
United Kingdom United Kingdom
United States United States
Vietnam Vietnam
Yemen Yemen, Republic of
Rest of the World Afghanistan
Rest of the World Albania
Rest of the World Algeria
Rest of the World American Samoa
Rest of the World Andorra
Rest of the World Angola
Rest of the World Anguilla
Rest of the World Antigua and Barbuda
Rest of the World Argentina
Rest of the World Armenia
Rest of the World Aruba
Rest of the World Azerbaijan
Rest of the World Bahamas
Rest of the World Barbados
Rest of the World Belize
Rest of the World Benin
Rest of the World Bermuda
Rest of the World Bolivia
Rest of the World Bonaire (Netherlands Antilles)
Rest of the World Bosnia and Herzegovina
Rest of the World Botswana
Rest of the World Burkina Faso
Rest of the World Burundi
Rest of the World Cameroon
Rest of the World Cape Verde
Rest of the World Cayman Islands

Confidential. Copyright © Xend Business Solutions Inc. Page 22


Xend Web Service
November 7, 2014

Rest of the World Central African Republic


Rest of the World Chad
Rest of the World Chile
Rest of the World Colombia
Rest of the World Comoros
Rest of the World Congo, Democratic Republic of
Rest of the World Congo, Democratic Republic of
Rest of the World Cook Islands
Rest of the World Costa Rica
Rest of the World Cote d'lvoire (Ivory Coast)
Rest of the World Croatia
Rest of the World Cuba
Rest of the World Curacao (Netherlands Antilles)
Rest of the World Czech Republic
Rest of the World Djibouti
Rest of the World Dominica
Rest of the World Dominican Republic
Rest of the World Ecuador
Rest of the World El Salvador
Rest of the World Equatorial Guinea
Rest of the World Eritrea
Rest of the World Estonia
Rest of the World Ethiopia
Rest of the World Faroe Islands
Rest of the World French Guiana
Rest of the World Gabon
Rest of the World Gambia
Rest of the World Georgia
Rest of the World Ghana
Rest of the World Gibraltar
Rest of the World Greenland
Rest of the World Grenada
Rest of the World Guadeloupe
Rest of the World Guam
Rest of the World Guatemala
Rest of the World Guinea
Rest of the World Guinea-Bissau
Rest of the World Guyana
Rest of the World Haiti
Rest of the World Honduras

Confidential. Copyright © Xend Business Solutions Inc. Page 23


Xend Web Service
November 7, 2014

Rest of the World Jamaica


Rest of the World Kazakhstan
Rest of the World Kenya
Rest of the World Kirghizia (Kyrgyzstan)
Rest of the World Kiribati
Rest of the World Korea, North
Rest of the World Latvia
Rest of the World Lebanon
Rest of the World Lesotho
Rest of the World Liberia
Rest of the World Libyan Arab Jamahiriya
Rest of the World Liechtenstein
Rest of the World Lithuania
Rest of the World Macedonia (FYROM)
Rest of the World Madagascar
Rest of the World Malawi
Rest of the World Mali
Rest of the World Malta
Rest of the World Marshall Islands
Rest of the World Martinique
Rest of the World Mauritania
Rest of the World Mauritius
Rest of the World Mexico
Rest of the World Micronesia, Federated States of
Rest of the World Moldova
Rest of the World Monaco (France)
Rest of the World Montenegro
Rest of the World Montserrat
Rest of the World Morocco
Rest of the World Mozambique
Rest of the World Namibia
Rest of the World Nauru
Rest of the World New Caledonia
Rest of the World Nicaragua
Rest of the World Niger
Rest of the World Nigeria
Rest of the World Niue
Rest of the World Norfolk Island (Australia)
Rest of the World Panama
Rest of the World Paraguay

Confidential. Copyright © Xend Business Solutions Inc. Page 24


Xend Web Service
November 7, 2014

Rest of the World Peru


Rest of the World Puerto Rico
Rest of the World Reunion Island
Rest of the World Rwanda
Rest of the World Saipan (Northern Mariana Islands)
Rest of the World Samoa
Rest of the World Sao Tome and Principe
Rest of the World Senegal
Rest of the World Serbia
Rest of the World Seychelles
Rest of the World Sierra Leone
Rest of the World Slovakia
Rest of the World Somalia
Rest of the World St. Barthelemy (Guadeloupe)
Rest of the World St. Croix (U.S. Virgin Islands)
Rest of the World St. Eustatius (Netherlands Antilles)
Rest of the World St. Kitts and Nevis
Rest of the World St. Lucia
Rest of the World St. Maarten (Netherlands Antilles)
Rest of the World St. Thomas (U.S. Virgin Islands)
Rest of the World St. Vincent & the Grenadines
Rest of the World Sudan
Rest of the World Suriname
Rest of the World Swaziland
Rest of the World Syrian Arab Republic
Rest of the World Tahiti (French Polynesia)
Rest of the World Tajikistan
Rest of the World Tanzania, United Republic of
Rest of the World Togo
Rest of the World Tonga
Rest of the World Tortola (British Virgin Islands)
Rest of the World Trinidad & Tobago
Rest of the World Tunisia
Rest of the World Turkmenistan
Rest of the World Turks & Caicos Islands
Rest of the World Tuvalu
Rest of the World U.S. Virgin Islands
Rest of the World Uganda
Rest of the World Uruguay
Rest of the World Uzbekistan

Confidential. Copyright © Xend Business Solutions Inc. Page 25


Xend Web Service
November 7, 2014

Rest of the World Vanuatu


Rest of the World Venezuela
Rest of the World Zambia
Rest of the World Zimbabwe

D. InternationalExpress
Zone Destination
Zone 1 Hong Kong
Zone 1 Macau
Zone 1 Singapore
Zone 1 Taiwan
Zone 2 Brunei
Zone 2 China, People's Republic of
Zone 2 Indonesia
Zone 2 Korea, South
Zone 2 Malaysia
Zone 2 Thailand
Zone 3 Japan
Zone 3 Mongolia
Zone 4 Australia
Zone 4 Bangladesh
Zone 4 Bhutan
Zone 4 Cambodia
Zone 4 India
Zone 4 Laos
Zone 4 Maldives
Zone 4 Nepal
Zone 4 New Zealand
Zone 4 Norfolk Island (Australia)
Zone 4 Pakistan
Zone 4 Sri Lanka
Zone 4 Vietnam
Zone 5 Canada
Zone 5 Mexico
Zone 5 Puerto Rico
Zone 5 United States
Zone 6 Belgium
Zone 6 Buesingen (Germany)
Zone 6 Campione/Lake Lugano (Italy)
Zone 6 Canary Islands (Spain)

Confidential. Copyright © Xend Business Solutions Inc. Page 26


Xend Web Service
November 7, 2014

Zone 6 Ceuta (Spain)


Zone 6 England (United Kingdom)
Zone 6 France
Zone 6 Germany
Zone 6 Heligoland (Germany)
Zone 6 Italy
Zone 6 Livigno (Italy)
Zone 6 Luxembourg
Zone 6 Melilla (Spain)
Zone 6 Monaco (France)
Zone 6 Netherlands (Holland)
Zone 6 Northern Ireland (United Kingdom)
Zone 6 Scotland (United Kingdom)
Zone 6 Spain
Zone 6 United Kingdom
Zone 6 Vatican City (Italy)
Zone 6 Wales (United Kingdom)
Zone 7 Aland Island (Finland)
Zone 7 Andorra
Zone 7 Austria
Zone 7 Azores (Portugal)
Zone 7 Channel Islands
Zone 7 Denmark
Zone 7 Faroe Islands
Zone 7 Finland
Zone 7 Greenland
Zone 7 Guernsey (Channel Islands)
Zone 7 Ireland, Republic of
Zone 7 Jersey (Channel Islands)
Zone 7 Liechtenstein
Zone 7 Madeira (Protugal)
Zone 7 Norway
Zone 7 Portugal
Zone 7 San Marino
Zone 7 Sweden
Zone 7 Switzerland
Zone 8 American Samoa
Zone 8 Anguilla
Zone 8 Antigua and Barbuda
Zone 8 Argentina

Confidential. Copyright © Xend Business Solutions Inc. Page 27


Xend Web Service
November 7, 2014

Zone 8 Armenia
Zone 8 Aruba
Zone 8 Azerbaijan
Zone 8 Bahamas
Zone 8 Bahrain
Zone 8 Barbados
Zone 8 Belarus/Byelorussia
Zone 8 Belize
Zone 8 Bermuda
Zone 8 Bolivia
Zone 8 Bonaire (Netherlands Antilles)
Zone 8 Bosnia and Herzegovina
Zone 8 Brazil
Zone 8 British Virgin Islands
Zone 8 Bulgaria
Zone 8 Cayman Islands
Zone 8 Chile
Zone 8 Colombia
Zone 8 Cook Islands
Zone 8 Costa Rica
Zone 8 Croatia
Zone 8 Curacao (Netherlands Antilles)
Zone 8 Cyprus
Zone 8 Czech Republic
Zone 8 Dominica
Zone 8 Dominican Republic
Zone 8 East Timor (Timor Leste)
Zone 8 Ecuador
Zone 8 Egypt
Zone 8 El Salvador
Zone 8 Estonia
Zone 8 Fiji
Zone 8 French Guiana
Zone 8 French Polynesia
Zone 8 Gibraltar
Zone 8 Greece
Zone 8 Grenada
Zone 8 Guadeloupe
Zone 8 Guam
Zone 8 Guatemala

Confidential. Copyright © Xend Business Solutions Inc. Page 28


Xend Web Service
November 7, 2014

Zone 8 Haiti
Zone 8 Honduras
Zone 8 Hungary
Zone 8 Iceland
Zone 8 Iraq
Zone 8 Jamaica
Zone 8 Kazakhstan
Zone 8 Kiribati
Zone 8 Kosrae (Micronesia, Federated States of)
Zone 8 Kuwait
Zone 8 Latvia
Zone 8 Lithuania
Zone 8 Malta
Zone 8 Marshall Islands
Zone 8 Martinique
Zone 8 Micronesia, Federated States of
Zone 8 Montenegro
Zone 8 Montserrat
Zone 8 Mount Athos (Greece)
Zone 8 Netherlands Antilles
Zone 8 New Caledonia
Zone 8 Nicaragua
Zone 8 Northern Mariana Islands
Zone 8 Oman
Zone 8 Palau
Zone 8 Panama
Zone 8 Papua New Guinea
Zone 8 Paraguay
Zone 8 Peru
Zone 8 Poland
Zone 8 Ponape (Micronesia, Federated States of)
Zone 8 Qatar
Zone 8 Reunion Island
Zone 8 Romania
Zone 8 Rota (Northern Mariana Islands)
Zone 8 Russia
Zone 8 Saba (Netherlands Antilles)
Zone 8 Saipan (Northern Mariana Islands)
Zone 8 Samoa
Zone 8 Saudi Arabia

Confidential. Copyright © Xend Business Solutions Inc. Page 29


Xend Web Service
November 7, 2014

Zone 8 Serbia
Zone 8 Slovakia
Zone 8 Slovenia
Zone 8 Solomon Islands
Zone 8 St. Barthelemy (Guadeloupe)
Zone 8 St. Christopher (St. Kitts)
Zone 8 St. Croix (U.S. Virgin Islands)
Zone 8 St. Eustatius (Netherlands Antilles)
Zone 8 St. John (U.S. Virgin Islands)
Zone 8 St. Kitts and Nevis
Zone 8 St. Lucia
Zone 8 St. Maarten (Netherlands Antilles)
Zone 8 St. Martin (Guadeloupe)
Zone 8 St. Thomas (U.S. Virgin Islands)
Zone 8 St. Vincent & the Grenadines
Zone 8 Suriname
Zone 8 Tahiti (French Polynesia)
Zone 8 Tajikistan
Zone 8 Tinian (Northern Mariana Islands)
Zone 8 Tonga
Zone 8 Tortola (British Virgin Islands)
Zone 8 Trinidad & Tobago
Zone 8 Truk (Micronesia, Federated Islands)
Zone 8 Turkey
Zone 8 Turkmenistan
Zone 8 Turks & Caicos Islands
Zone 8 Tuvalu
Zone 8 U.S. Virgin Islands
Zone 8 Ukraine
Zone 8 Union Islands (St. Vincent & the Grenadines)
Zone 8 United Arab Emirates
Zone 8 Uruguay
Zone 8 Uzbekistan
Zone 8 Vanuatu
Zone 8 Venezuela
Zone 8 Virgin Gorda (British Virgin Islands)
Zone 8 Wallis & Futuna Islands
Zone 8 Yap (Micronesia, Federated Islands)
Zone 9 Afghanistan
Zone 9 Albania

Confidential. Copyright © Xend Business Solutions Inc. Page 30


Xend Web Service
November 7, 2014

Zone 9 Algeria
Zone 9 Angola
Zone 9 Benin
Zone 9 Botswana
Zone 9 Burkina Faso
Zone 9 Burundi
Zone 9 Cameroon
Zone 9 Cape Verde
Zone 9 Central African Republic
Zone 9 Chad
Zone 9 Comoros
Zone 9 Congo (Brazzaville)
Zone 9 Congo, Democratic Republic of
Zone 9 Cote d'lvoire (Ivory Coast)
Zone 9 Djibouti
Zone 9 Equatorial Guinea
Zone 9 Eritrea
Zone 9 Ethiopia
Zone 9 Gabon
Zone 9 Gambia
Zone 9 Georgia
Zone 9 Ghana
Zone 9 Guinea
Zone 9 Guinea-Bissau
Zone 9 Guyana
Zone 9 Israel
Zone 9 Jordan
Zone 9 Kenya
Zone 9 Kirghizia (Kyrgyzstan)
Zone 9 Lebanon
Zone 9 Lesotho
Zone 9 Liberia
Zone 9 Libyan Arab Jamahiriya
Zone 9 Macedonia (FYROM)
Zone 9 Madagascar
Zone 9 Malawi
Zone 9 Mali
Zone 9 Mauritania
Zone 9 Mauritius
Zone 9 Mayotte

Confidential. Copyright © Xend Business Solutions Inc. Page 31


Xend Web Service
November 7, 2014

Zone 9 Moldova
Zone 9 Morocco
Zone 9 Mozambique
Zone 9 Namibia
Zone 9 Niger
Zone 9 Nigeria
Zone 9 Rwanda
Zone 9 Senegal
Zone 9 Seychelles
Zone 9 Sierra Leone
Zone 9 South Africa
Zone 9 Swaziland
Zone 9 Syrian Arab Republic
Zone 9 Tanzania, United Republic of
Zone 9 Togo
Zone 9 Tunisia
Zone 9 Uganda
Zone 9 Yemen, Republic of
Zone 9 Zambia
Zone 9 Zimbabwe

Confidential. Copyright © Xend Business Solutions Inc. Page 32


Xend Web Service
November 7, 2014

Appendix B – Apply in Xend Developer Program


Third-party website must first apply as a “Developer” account in myXend by registering an account in www.xend.com.ph
and emailing api@xend.com.ph the following information:

1. Account Number
2. Business Name
3. Contact Person
4. Address and Contact Number
5. Website
6. Redirect URL (used when retrieving token)

Once registered as a third-party developer, a “Developer ID” will be issued for use in web service calls and retrieving of
user token. Developer ID is a globally unique identifier (GUID). “User Token” will also be issued for use in account-
related web service calls.

Appendix C – Retrieving myXend User Token


The myXend User Token is used to authenticate the user calling the services in Xend Web Service from third-party
websites. By retrieving the user token the myXend user allows third-party website to issue service calls to the Xend Web
Service in behalf of the myXend user.

Note: These information only applies for those third-party websites that have integrated their system into myXend.

Below are the steps on retrieving myXend User Token:

A. Click the “Connect to your myXend”


The button below appears on the third-party websites that have integrated into myXend. When you click
this button you are redirected to myXend to provide login credentials.

When this button is click, the third-party website should redirect to


“http://api.xend.com.ph/GetToken.aspx” page and provide “devId” as query string with the value of the
Developer ID of the third-party website.

B. Provide Username and Password


When valid myXend login credentials are provides, a user token is generated for the third-party website to
use when issuing service call in behalf of the user.

Confidential. Copyright © Xend Business Solutions Inc. Page 33


Xend Web Service
November 7, 2014

C. Redirect back to third-party website


The user is then redirected back to the third-party website with the user token in the query string parameter
named “t”. The value of this parameter should be saved for current user account of the third-party website.
The user token is a globally unique identifier (GUID).

The redirect URL is provided in the registration of a developer account in myXend.

Appendix D – Retrieving Waybill File


To retrieving the waybill file append the link, http://api.xend.com.ph/GetWaybill.aspx?no=, with the waybill number of
the shipment.

For example, http://api.xend.com.ph/GetWaybill.aspx?no=732011222

Confidential. Copyright © Xend Business Solutions Inc. Page 34


Xend Web Service
November 7, 2014

Appendix E – PHP Sample Codes

A. ShipmentService

1. Create Method
require('nusoap.php');

// declare variables
$exceptionFlag = false;

// initialize SOAP client


$wsdl = 'https://api.xend.com.ph/api/ShipmentService.asmx?wsdl';
$client = new soapclient($wsdl, array());
$funcs = $client->__getFunctions();

// initialize SOAP header


$headerbody = array('UserToken' => '081C1A4C-39DE-4A5C-B9AB-610E8EC5E078');
$header = new SOAPHeader('https://api.xend.com.ph/api/', 'AuthHeader', $headerbody);
$client->__setSoapHeaders($header);

// prepare parameters
$param = array('ServiceTypeValue' => 'MetroManilaExpress',
'ShipmentTypeValue' => 'Parcel',
'Weight' => 0.50,
'DimensionL' => 0.00,
'DimensionW' => 0.00,
'DimensionH' => 0.00,
'DeclaredValue' => 0.00,
'RecipientName' => 'Juan Dela Cruz',
'RecipientCompanyName' => '',
'RecipientAddress1' => '123 Mabuhay St.',
'RecipientAddress2' => 'Brgy. Pag-asa',
'RecipientCity' => 'Manila',
'RecipientProvince' => 'Metro Manila',
'RecipientCountry' => 'Philippines',
'IsInsured' => 0,
'SpecialInstructions' => 'Fragile',
'Description' => 'Toy',
'ClientReference' => '');

// execute SOAP method


try
{
$result = $client->Create(array('shipment' => $param));
}
catch (SoapFault $soapfault)
{
$exceptionFlag = true;
$exception = $soapfault->getMessage();
preg_match_all('/: (.*?). at/s', $exception, $error, PREG_SET_ORDER);
echo $error[0][1];
}

if (!$exceptionFlag)
{
echo $result->CreateResult;
}

Confidential. Copyright © Xend Business Solutions Inc. Page 35


Xend Web Service
November 7, 2014

2. Get Method
require("nusoap.php");

// declare variables
$exceptionFlag = false;

// initialize SOAP client


$wsdl = 'https://api.xend.com.ph/api/ShipmentService.asmx?wsdl';
$client = new soapclient($wsdl, array());
$funcs = $client->__getFunctions();

// initialize SOAP header


$headerbody = array('UserToken' => '081C1A4C-39DE-4A5C-B9AB-610E8EC5E078');
$header = new SOAPHeader('https://api.xend.com.ph/api/', 'AuthHeader', $headerbody);
$client->__setSoapHeaders($header);

// execute SOAP method


try
{
$result = $client->Get('WaybillNo' => '732000158');
}
catch (SoapFault $soapfault)
{
$exceptionFlag = true;
$exception = $soapfault->getMessage();
preg_match_all('/: (.*?). at/s', $exception, $error, PREG_SET_ORDER);
echo $error[0][1];
}

if (!$exceptionFlag)
{
echo $result->GetResult->WaybillNo;
}

Confidential. Copyright © Xend Business Solutions Inc. Page 36


Xend Web Service
November 7, 2014

B. TrackingService

1. GetList Method
require("nusoap.php");

// declare variables
$exceptionFlag = false;

// initialize SOAP client


$wsdl = 'https://api.xend.com.ph/api/TrackingService.asmx?wsdl';
$client= new soapclient($wsdl, array());
$funcs = $client->__getFunctions();

// initialize SOAP header


$headerbody = array('UserToken' => '081C1A4C-39DE-4A5C-B9AB-610E8EC5E078');
$header = new SOAPHeader('https://api.xend.com.ph/api/', 'AuthHeader', $headerbody);
$client->__setSoapHeaders($header);

// prepare parameters
$param = array('WaybillNo' => '732000158');

// execute SOAP method


try
{
$result = $client->GetList($param);
}
catch (SoapFault $soapfault)
{
$exceptionFlag = true;
$exception = $soapfault->getMessage();
preg_match_all('/: (.*?). at/s', $exception, $error, PREG_SET_ORDER);
echo $error[0][1];
}

if (!$exceptionFlag)
{
$objTrackingList = $result->GetListResult->Tracking;
for ($i= 0; $i < count($objTrackingList); $i++)
{
echo $objTrackingList[$i]->Activity . '<br/>';
echo $objTrackingList[$i]->DateLogged . '<br/>';
echo $objTrackingList[$i]->Location . '<br/>';
}
}

Confidential. Copyright © Xend Business Solutions Inc. Page 37


Xend Web Service
November 7, 2014

C. RateService

1. Calculate Method
require('nusoap.php');

// declare variables
$exceptionFlag = false;

// initialize SOAP client


$wsdl = 'https://api.xend.com.ph/api/RateService.asmx?wsdl';
$client = new soapclient($wsdl, array());
$funcs = $client->__getFunctions();

// initialize SOAP header


$headerbody = array('UserToken' => '081C1A4C-39DE-4A5C-B9AB-610E8EC5E078');
$header = new SOAPHeader('https://api.xend.com.ph/api/', 'AuthHeader', $headerbody);
$client->__setSoapHeaders($header);

// prepare parameters
$param = array('ServiceTypeValue' => 'MetroManilaExpress',
'ShipmentTypeValue' => 'Parcel',
'DestinationValue' => 'Manila',
'Weight' => 0.50,
'DimensionL' => 0.00,
'DimensionW' => 0.00,
'DimensionH' => 0.00,
'DeclaredValue' => 1000.00,
'AddInsurance' => true);

// execute SOAP method


try
{
$result = $client->Calculate($param);
}
catch (SoapFault $soapfault)
{
$exceptionFlag = true;
$exception = $soapfault->getMessage();
preg_match_all('/: (.*?). at/s', $exception, $error, PREG_SET_ORDER);
echo $error[0][1];
}

if (!$exceptionFlag)
{
echo $result->CalculateResult;
}

Confidential. Copyright © Xend Business Solutions Inc. Page 38


Xend Web Service
November 7, 2014

D. BookingService

1. Schedule Method
require('nusoap.php');

// declare variables
$referenceNo = "";
$exceptionFlag = false;

// initialize SOAP client


$wsdl = 'https://xend.com.ph/api/BookingService.asmx?wsdl';
$client= new SoapClient($wsdl, array());
$funcs = $client->__getFunctions();

// initialize SOAP header


$headerbody = array('UserToken' => '081C1A4C-39DE-4A5C-B9AB-610E8EC5E078');
$header = new SoapHeader('https://api.xend.com.ph/api/', 'AuthHeader', $headerbody);
$client->__setSoapHeaders($header);

// prepare parameters
$param = array('BookingDate' => date('Y-m-d\TH\:i\:s\.u', strtotime('1/1/2011')),
'AddressRefNo' => 1,
'Remarks' => 'testing only');

// execute SOAP method


try
{
$result = $client->Schedule($param);
}
catch (SoapFault $soapfault)
{
$exceptionFlag = true;
$exception = $soapfault->getMessage();
preg_match_all('/: (.*?). at/s', $exception, $error, PREG_SET_ORDER);
echo $error[0][1];
}

if (!$exceptionFlag)
{
$result->ScheduleResult;
$referenceNo = $result->ScheduleResult;
}

echo $referenceNo;

Confidential. Copyright © Xend Business Solutions Inc. Page 39


Xend Web Service
November 7, 2014

2. GetAddress Method
require_once('nusoap.php');

// declare variables
$exceptionFlag = false;

// initialize SOAP client


$wsdl = 'https://xend.com.ph/api/BookingService.asmx?wsdl';
$client= new SoapClient($wsdl, array());
$funcs = $client->__getFunctions();

// initialize SOAP header


$headerbody = array('UserToken' => '081C1A4C-39DE-4A5C-B9AB-610E8EC5E078');
$header = new SoapHeader('https://api.xend.com.ph/api/', 'AuthHeader', $headerbody);
$client->__setSoapHeaders($header);

// execute SOAP method


try
{
$result = $client->GetAddress();
}
catch (SoapFault $soapfault)
{
$exceptionFlag = true;
$exception = $soapfault->getMessage();
preg_match_all('/: (.*?). at/s', $exception, $error, PREG_SET_ORDER);
echo $error[0][1];
}

if (!$exceptionFlag)
{
$objAddressList = $result->GetAddressResult->Address;
for ($i= 0; $i < count($objAddressList); $i++)
{
echo $objAddressList[$i]->AddressRefNo . '<br/>';
echo $objAddressList[$i]->Street1 . '<br/>';
echo $objAddressList[$i]->Street2 . '<br/>';
echo $objAddressList[$i]->City . '<br/>';
echo $objAddressList[$i]->Province . '<br/>';
echo $objAddressList[$i]->PostalCode . '<br/>';
}
}

Confidential. Copyright © Xend Business Solutions Inc. Page 40

Potrebbero piacerti anche