Account Registration
*You may skip this step if you have already registered
To begin the journey of integrating with ParcelDaily API, start by creating a ParcelDaily account on our Partner Portal.
Follow through the instructions to verify and complete the registration. Then, proceed by signing in to your new account.
How to get API Token
On Partner Portal, go to Integration > External API.
On the left-hand side, the generated Merchant ID and Token Key for your account will be displayed. You may copy and securely store these credentials, as these are required to call our APIs.
Make Your First API Call
Make a call to Check Account Info API. You may use any HTTP tool, such as Postman as shown in our example. Note that you have to include merchantId and token as HTTP headers with the values from the previous step.
The response should contain information about your account such as your current credit. If you have just registered, your account credit should be “0”.
Top Up Credit
Before creating your first Order, sufficient credits are required in your account. On the upper right corner of Partner Portal, click on the “Top Up” button to check on our offered Top Up Packages.
* If you are using a Sandbox account, you can proceed to make a simulated payment without actually paying by choosing Online Banking > Successful Payment.
After making payment, your account will be topped up with selected credit. You may double check your account credit by calling the Check Account Info API again.
Order Creation
1. Single order creation
In ParcelDaily API, the general flow of placing an Order is similar to our Partner Portal, which is Quote > Create > Checkout (Pay) > Track.
i) Quote
First, call Quote API to check the shipment prices with the desired Order details. In the response, the quoted price for supported Courier will be listed in the format of “{COURIER_NAME}Price”.
ii) Create
Create a new Order by calling Create Order API, replacing the value of serviceProvider and price with the quoted price along with other details. If successfully created, you’ll receive a success response. Copy and keep the “objectId” as it is needed for Checkout.
iii) Checkout
Call Checkout API with the objectId in the request body to place the Order. After checkout, credit will be deducted from your account and Courier will start processing the shipment.
2. Bulk order creation
Up until this step, you have successfully placed your first Order using our API. However, if you often need to send many shipments, there are certain limitations. For example, you can only process one shipment at a time.
To place Orders in bulk, you are recommended to call the bulk version of our API, and also subscribe to events using webhook. To subscribe to webhooks with your configured endpoints, go to Integration> External API in Partner Portal and update the values. After subscribing, instead of calling our API, we’ll push the events to you whenever there’s updates.
WebhookURL:Updates on Order status.
CheckoutWebhook URL:Updates on Checkout status after Checkout(Bulk)API.
*Note: You will need to configure your server to receive these events.
The flow of placing Bulk Orders:
i)Quote
Use Quote API to check the shipment prices with the desired Order details. The quoted price for supported Courier will be listed in the format of“{COURIER_NAME}Price” in the response.
ii)Create (Bulk)
Create multiple new Orders by calling Create Order (Bulk) API, providing a list of Order details. For each Orders, replace the value of serviceProvider and price with the quoted price along with other details. The response will be grouped in lists of “success” and “fail”. Resolve the errors in “fail” Orders if any, then copy and keep all the “orderId”in the success list as they are needed for Checkout.
iii)Checkout (Bulk)
Call Checkout (Bulk) API with the list of orderId to make payments and place multiple Orders. Once accepted, a successful response will be returned immediately, and we will start processing the shipments in the background.
Webhook: Once processing is completed, the Checkout statuses with Order details will be sent to your registered Checkout Webhook URL endpoint in this format.
Status Tracking
1. Track API
While you have the option to call the Track API to monitor the status of your orders, this method is not recommended for frequent status updates. The Track API is suitable for occasional status checks.
2. Status Tracking Webhook API
We strongly advise using webhooks for real-time status updates. This approach is more efficient and reduces the need for repeated API calls.
– Upon any change in an order’s status, our system automatically sends a HTTP POST request to your pre-configured webhook URL.
– This notification includes the latest order status information in this format.
* In Sandbox, the Order status will always be “Waiting Pickup” as it won’t actually get processed by Courier.