Click here to Skip to main content
15,912,977 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have developed an E-commerce site using Opencart and want to integrate shipping API to fetch their unique ID(waybill) but I am not to integrate it.
Below is the URL given to me for fetching the waybill number:

https://test.delhivery.com/waybill/api/fetch/json/?token=LICENSEKEY&count=1

the URL fetches the waybill number but how can I call the URL and get the response and store it in a variable.
Posted

1 solution

You can try using below code:

$details = json_decode(file_get_contents("https://test.delhivery.com/waybill/api/fetch/json/?token=LICENSEKEY&count=1"));

dd( $details); // you will see response here
 
Share this answer
 
Comments
bhavikadb 8-Oct-15 7:40am    
what is dd?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900