Welcome to Philippine Ports Authority
Web API RESTful Services

API Endpoint Documentation

Updated: Tue, 20-Aug-2019 | Previous: Mon, 07-May-2018
# Method Endpoint Address Updated | Previous
1 POST 01-Aug-2017
2 GET
https://api.ppa.com.ph/api/opce/GetPartyClientListAsync (Obsolete)
10-Dec-2017
3 GET
https://api.ppa.com.ph/api/opce/GetCommodityListAsync (Obsolete)
10-Dec-2017
4 POST 20-Aug-2019 | 01-Aug-2017
5 POST 20-Aug-2019 | 20-Jan-2016
6 GET 01-May-2018
Method Endpoint Address / Description Updated
POST
https://api.ppa.com.ph/api/signin/AuthorizeLogInAsync

Authorize OPCE registered user. This API must be accomplished or performed before any or other endpoints can be used by the subscriber.

The token/login validity is 7 days. You DO NOT NEED to authorize or login everytime you make a post exemption request. Once your request is denied or authorization has expired, kindly issue another authorize request in order to be granted for posting.


If you are authorizing from a web application, there is NO NEED to persist the token as we have dual-authentication methods.
First being a cookie-based token method for which you DO NOT need to send the token for every request to be authorized, because OPCE stores the token in the cookie header in the request cookie.
The second, if you are using other application types such as Windows, Android, iOS, etc. Then you must persist the token and send it using the header Authorization and the Bearer value plus the token for every request.


Request Parameters:
Name Description Type Required
Email The email of the registered user. This is also the user name. string Yes
Password The password to be used by the OPCE subscriber. string Yes
JSON Response:

Authentication Response
01-Aug-2017
GET
https://api.ppa.com.ph/api/opce/GetPartyClientListAsync/?ver=

• Gets all the list of the PEZA accredited list of parties.
• The list of parties must be saved or persisted on the subscriber side as a transaction lookup instead of acquiring the list on every request.
• The list should be updated based on version in a timely manner, e.g. every 12 midnight. Read request parameter below.
• NOTE: Must be authorized or logged-in to use.
Request Parameters:
Name Description Type Required
ver A string representation of the version list in the form of #.##, example: 1.00 or 1.02 string Yes
JSON Response:
The endpoint will emit the JSON record below depending on the version requested. If the version being requested is not equal to the version currently held in PPA server, it will emit JSON Figure A. Otherwise, it will emit a JSON record Figure B.

Figure A:
Example request:
https://api.ppa.com.ph/api/opce/GetPartyClientListAsync/?ver=1.00
Below, the JSON property ListOfParties contains all the current updated list of companies. The subscriber client (e.g. ICTSI) must persist the version number on their part for requesting the next available updated list.
PEZA Party List
Figure B:
Example request:
https://api.ppa.com.ph/api/opce/GetPartyClientListAsync/?ver=1.34
Below, the JSON property ListOfParties is null or empty because the version list being requested is the same with PPA records.
PEZA Party List

14-Dec-2017
GET
https://api.ppa.com.ph/api/opce/GetCommodityListAsync/?ver=

• Gets all the list of the commodities regardless of who is the party accredited with it.
• The list of commodities must be saved or persisted on the subscriber side as a transaction lookup instead of acquiring the list on every request.
• The list should be updated based on version in a timely manner, e.g. every 12 midnight. Read request parameter below.
• NOTE: Must be authorized or logged-in to use.
Request Parameters:
Name Description Type Required
ver A string representation of the version list in the form of #.##, example: 1.00 or 1.02 string Yes
Figure A:
Example request:
https://api.ppa.com.ph/api/opce/GetCommodityListAsync/?ver=1.00
Below, the JSON property OpceMasterDetailCommodities contains all the current updated list of commodities in master-id parent format. The subscriber client (e.g. ICTSI) must persist the version number on their part for requesting the next available updated list.
PEZA Party List

The fields:
  • ATTRIBUTE1 - may contain "A" or "E". Meaning Added or Edited respectively.
  • ATTRIBUTE2 - contains the Party or customer ID and useful when mapping commodity and party info in look-ups or other display information.
  • ATTRIBUTE3 - containS the proprietary or internal company item code, if specified.
  • ATTRIBUTE4 - system reserved.
  • COMMODITY_LST_LST_CODE - is the parent of each commodity code on a 2 to 3 level parent-child nesting.
  • POST_FLAG - internal use for PPA
  • STATUS - "A" means the commodity is currently being carried. "I" means a commodity is inactive or already retired.

Figure B:
Example request:
https://api.ppa.com.ph/api/opce/GetCommodityListAsync/?ver=1.10
Below, the JSON property OpceMasterDetailCommodities is null or empty because the version list being requested is the same with PPA records.
PEZA Party List

10-Dec-2017
POST
https://api.ppa.com.ph/api/opce/PostBatchExemptionRequestAsync

Post a batch of commodity items being requested from a particular party or company for exemption.
The order and casing of each field/member must be in order and exact respectively.
Request Parameters:
Name Description Type Required
BATCH_REQUEST_ID The ID of the batch request being sent. This is to identify all the items contained in the request. string Yes
REQ_ENTITY_ID The user name/email of the subscriber (e.g. ICTSI) string Yes
REQ_ENTITY_LOGIN The user name/email of the PEZA/company requesting for the exemption from the subscriber.
(e.g. the user/email of a company PV TECH PTE. LTD.)
string Yes
HASH_CODE The hashcode or serial number of the request string Yes
REQ_EX_PU_NAME The name of the Company requesting for the commodity exemption string Yes
REQ_EX_PU_ADDR The address of the Company requesting for the commodity exemption string Yes
REQ_EX_PU_TIN The TIN of the Company requesting for the commodity exemption string Yes
BatchCommodityList
A list of Commodities for exemption request in the form of :
List<OpceCommodityDto>
See Posting a Batch Request for Exemption for details.
Generic List Yes
Definition of OpceCommodityDto
Name Description Type Required
REQ_EX_COM_CODE Commodity Code string Yes
REQ_EX_COM_DSC Commodity description string Yes
REQ_EX_VOYAGE_NO Voyage Number string Yes
REQ_EX_REFERENCE_NO The unique reference number or code of the request string Yes
REQ_EX_REFERENCE_DATE Date of exemption request in form of: MM/DD/YYYY hh:mm:ss AM/PM string Yes
REQ_EX_BLNO Bill of Lading Number string Yes
REQ_EX_WEIGHT Weight of the commodity item Decimal number Yes
REQ_EX_VOLUME Volume of the commodity item Decimal number Yes
REQ_EX_CARGO_TYPE Cargo Type string Yes
REQ_EX_UOM Unit of Measurement (Ton, Kg, etc.) string Yes
REQ_EX_QTY Quantity of the commodity being requested Decimal Number Yes
REQ_EX_PPA_AMT Computed Amount Decimal number Yes
CONFIRMED_TRANSACTION Determines the request if confirmed (1) | Inquiry (0)
(* New) as of 20-Aug-2019
Integer Yes
Sample JSON Response:

Authentication Response

20-Aug-2019
POST
https://api.ppa.com.ph/api/opce/PostExemptionRequestAsync

Post a commodity item being requested from a particular party or company for exemption.
The order and casing of each field/member must be in order and exact respectively.
Request Parameters:
Name Description Type Required
REQ_ENTITY_ID The user name/email of the subscriber (e.g. ICTSI) string Yes
REQ_ENTITY_LOGIN The user name/email of the PEZA/company requesting for the exemption from the subscriber.
(e.g. the user/email of a company PV TECH PTE. LTD.)
string Yes
HASH_CODE The hashcode or serial number of the request string Yes
REQ_EX_COM_CODE Commodity Code string Yes
REQ_EX_COM_DSC Commodity description string Yes
REQ_EX_PU_NAME The name of the Company requesting for the commodity exemption string Yes
REQ_EX_PU_ADDR The address of the Company requesting for the commodity exemption string Yes
REQ_EX_PU_TIN The TIN of the Company requesting for the commodity exemption string Yes
REQ_EX_VOYAGE_NO Voyage Number string Yes
REQ_EX_REFERENCE_NO The unique reference number or code of the request string Yes
REQ_EX_REFERENCE_DATE Date of exemption request in form of: MM/DD/YYYY hh:mm:ss AM/PM string Yes
REQ_EX_BLNO Bill of Lading Number string Yes
REQ_EX_WEIGHT Weight of the commodity item Decimal number Yes
REQ_EX_VOLUME Volume of the commodity item Decimal number Yes
REQ_EX_CARGO_TYPE Cargo Type string Yes
REQ_EX_UOM Unit of Measurement (Ton, Kg, etc.) string Yes
REQ_EX_QTY Quantity of the commodity being requested Decimal Number Yes
REQ_EX_PPA_AMT Computed Amount Decimal number Yes
CONFIRMED_TRANSACTION Determines the request if confirmed (1) | Inquiry (0)
(* New) as of 20-Aug-2019
Integer Yes
JSON Response:

Authentication Response
20-Aug-2019
GET
https://api.ppa.com.ph/api/OpceReportingApi/GetVerChanges?t=

Gets the version changes history of either commodity or the party/customer such as name modifications, additions, deletions, others.
  • Emmits JSON List<> records.
  • Acquires the last 800 changes or modifications only.

Request Parameters:
Name Description Type Required
t The value of either c for commodity changes listings in JSON format or p for party/customer changes listings in JSON format. string Yes
JSON Schema when p is used. { "ID":xx,"VERSION_ID":xx,"VERSION_TEXT":"xx","REMARKS": xx }
JSON Schema when c is used. { "ID":xx,"VERSION_ID":xx,"VERSION_TEXT":"xx","REMARKS": xx }
JSON Schema when other character is used. {"Message":"Parameter accepted is only p for Party and c for commodity."}
01-May-2018