Philippine Ports Authority

API Endpoint Documentation

Updated: 24-March-2025 | Previous: 10-Feb-25

May change with prior notice.


#MethodEndpoint AddressUpdated | Previous
1POSThttp://10.10.0.159:4005/api/postFinancialData24-March-2025
2GEThttp://10.10.0.159:4005/api/postReceiptsToIports/:mposId24-March-2025
3PUThttp://10.10.0.159:4005/api/voidTransaction24-March-2025
4GEThttp://10.10.0.159:4005/api/removeReceiptsByMposId/:mposId24-March-2025
5GEThttp://10.10.0.159:4005/api/ping26-March-2025
MethodEndpoint Address / DescriptionUpdated
POST

Request Details

TypeDescriptionRequired
The key generated from the gatekeeper sso. Put this in the request's Authentication as Bearer Token.Yes

Request Payload:

NameDescriptionTypeRequired
The Device Id.number(10)Yes
The Id of the cashier.numbber(10)Yes
The defined Cashier/Debtor code. Defaults to 1 if no value is supplied.string(20)Yes
The registered invoice number.string(20)Yes
The registered invoice date.DateYes
Base cost issued in the receipt.number(38,2)Yes
The terminal code of the issuing party.string(10)Yes
The payment type used for the transaction. Payment method character list to be updated. Defaults to ‘C’ for CASH.string(1)Yes
Refers to the Ship Call Number.string(20)No
The vessel Identity through the arrival and depature at the port.string(40)No
Customer declared TIN. Defaults to 111111111 if no value is supplied.string(20)Yes
Customer declared Name. Defaults to "Cash" if no value is supplied.string(120)Yes
Customer declared personal address. Defaults to "NO ADDR" if no value is supplied.string(120)Yes
MPOS defined business style.string(255)No
MPOS defined discount code.string(20)No
MPOS defined discount rates. Should be mandatory if discount code is supplied.number(6,2)No
MPOS defined discount amount. Should be mandatory if discount code is supplied.number(8,2)No
Reference number given by transactions paid with Gcash or PayMaya.string(50)No
OPTIONAL: Referring to the comments noted for the transaction.string(255)No
Status for the transaction.
  • A - Active: Default status for all incoming transactions
  • P - Pending: Transaction is awaiting Bridge to iPorts data posting.
  • V - Voided: Transaction is voided.
  • R - Removed: Transaction is cleared/removed from the batch. Transactions with this status will not be posted to iPorts
string(2)Yes
Organization id.numberNo
Date when the transaction is created.DateNo
Date time when the transaction is created.DateNo
Terminal or vessel Id used.number(10)Yes
OPTIONAL: Inbound Port IdstringNo
OPTIONAL: Outbound Port IdstringNo
OPTIONAL: Generated Void SeriesnumberNo
OPTIONAL: Generated Refund SeriesnumberNo
Receipt Lines*
MPOS defined service code.string(12)Yes
Refers to the description given to the service.string(20)No
Refers to the quantity of the service.number(38,2)No
MPOS defined rate for the service.number(38,2)No
Initial payable amount of the service.number(38,2)No
MPOS Value Added Tax amount.number(38,2)No
MPOS Expanded Witholding Tax amount.number(10,2)No
MPOS Credidted Witholding Tax amount.number(10,2)No
MPOS defined discount code per line.string(20)No
MPOS defined discount amount per line. It should be mandatory if discount code is supplied.number(38,2)No
Accepts the values: "true" or "false".Defaults to "false" if nothing is supplied. True makes the mode of posting to iPorts to Realtime while false adds the transaction in the device batch for Batch Posting.string(4)No

JSON Sample Response:


Receipt Post Response
Where:
  • receiptIdsn - Generated UUID for the posted transaction.

  • transactionId - Indicates the transaction Id based off the MPOS Id.

  • receiveTime - The time and date when the transaction is posted.


Error Lists:

Error NameDescriptionFix
The supplied input for that key does not match the required type.Make sure that the value supplied to the object is properly typed. For example:
  • If the name requires a type of number, supply values without quotation marks such as 1024 instead of "1024"
  • If the name requires a type of string, supply with a quotation mark such as "2024".
  • If the name requires a type of date, supply a valid date like "2024-12-31" which follows the ISO 8601 international standard which is YYYY-MM-DD.
See Request Payload for references.
The supplied API key does not have the correct permissions to access the API being called. Contact the support team to determine the permissions and accessible content for your key.
The supplied API key is invalid or already expired, revoked or replaced, and cannot be used for any API request calls. Log in to the Account Center to generate another valid key. Seeguide on how to generate an API key using Gatekeeper UI.
A specific key which is only allowed to receive the following values strictly:
  • C (CASH)
Will return an error message:"your-value-here" is not included on the selections: "C".
Simply change the value you are providing to one of the choices listed in the Description column.
A specific key which when supplied, will require DiscountRate andDiscountAmount to be present on the payload. Will return an error message:"The payload is incomplete. Discount Rate or Discount Amount is missing."Supply the required / missing values. Specifically DiscountRateand DiscountAmount with their proper type.

Debugging Bad Payload:


JSON Sample Request:


Receipt Post Request

JSON Sample Response:


Receipt Post Response
Where:
  • error - Contains the key-value pairs of the payload that caused an error. It uses the key of the payload as the identifier which caused the Bad Payload response.

    • issues - Collection of issue from a specific value which does not follow the correct format or type.

      • type - Indicates the expected type from the payload.

      • message - Description regarding the type of error.

      • input - The value received that caused an error.

24-March-2025
GET

API endpoint that determines the end of a batch transaction based on the device Id. Call this whenever you reached the last transaction for a specific device.


!IMPORTANT! This endpoint initiates the batch insert into the financial system entities, do not forget to call this at the end of each batch per device.


Request Details:

TypeDescriptionRequired
The key generated from the gatekeeper sso. Put this in the request's Authentication as Bearer Token.Yes

JSON Sample Response:


Receipt Post Response
24-March-2025
PUT

API endpoint that voids a posted transaction in iPorts updating the status from "A" for Active to "V" for Voided. The supplied IDSN necessary for the payload is found in the successful transaction return payload.


!IMPORTANT! Be extra cautious when calling this endpoint since a voided transaction is considered as a deleted transaction and would not be included in the overall transaction total amount counting.


Request Details:

TypeDescriptionRequired
The key generated from the gatekeeper sso. Put this in the request's Authentication as Bearer Token.Yes

NameDescriptionTypeRequired
The unique identifier that is returned when a transaction is successfully posted to iPorts.string(36)Yes

JSON Sample Response:


Receipt Post Response
24-March-2025
GET

Endpoint that clears the current batch depending on the device ID. This will clear all transactions under the given device ID that are not yet posted to iPorts


!IMPORTANT! This endpoint will clear all of the transactions from the batch, you will have to redo the whole batch submission. Once executed, cleared transactions are not retrievable.


Request Details:

TypeDescriptionRequired
The key generated from the gatekeeper sso. Put this in the request's Authentication as Bearer Token.Yes

JSON Sample Response:


Receipt Post Response
24-March-2025
GET

This endpoint is for pinging and checking if the server is currently up and running.

24-March-2025

Copyright © 2024 - 2025 Philippine Ports Authority. All rights are reserved.
System Version: 0.0.1-alpha.05162025.1121