WPCargo API Addon v5.1.1

WPCargo API add on enables your WordPress site to share wpcargo shipment data to remote sites. WPCargo API add on perform task such as add, update, view all, and track shipment through API.

WPCargo API add on allows you to assign role “WPCargo API Manager” to user to be able to provide the API key to access API url and user have an ability to change or reset their API key through front end using the plugin shortcode provided “[wpcargo_api_account]”.

The following list are the API routes. Detailed documentation here.

Click to expand…

1. mysite.com/wp-json/wpcargo/v1/api/api_key​This route will display user all created shipments or assigned shipments, the default number of shipment display is 12, to display succeeding shipment use this route mysite.com/wp-json/wpcargo/v1/api/api_key/page/page_number.

2. mysite.com/wp-json/wpcargo/v1/api/api_key/driver​This route is exclusive only for the WPCargo Driver role, it will display all the shipments assigned to driver. the default number of shipment display is 12, to display succeeding shipment use this route mysite.com/wp-json/wpcargo/v1/api/api_key/driver/page/page_number.

3. mysite.com/wp-json/wpcargo/v1/api/api_key/shipment/add​This route is use in adding shipments using the WPCargo API, please refer to this How to add shipment using API through AJAX documentation on how to use it.

4. mysite.com/wp-json/wpcargo/v1/api/api_key/shipment/update​This route is use in updating shipments using the WPCargo API, please refer to this How to update shipment using API through AJAX documentation on how to use it.

5. mysite.com/wp-json/wpcargo/v1/api/api_key/shipment/track/{shipment_number}​This route is use in tracking shipments using the WPCargo API.

6. mysite.com/wp-json/wpcargo/v1/api/api_key/page-total​This route is use to get total number of shipment page. This route will response the number of pages available

7. mysite.com/wp-json/wpcargo/v1/api/api_key/page/number​This route is use to get shipment data per page. “number” accepts numeric value. This will display the shipment list under the selected page.

8. mysite.com/wp-json/wpcargo/v1/api/api_key/shipment/fields​This route is use view available shipment form fields

9. mysite.com/wp-json/wpcargo/v1/api/authorize​This route is use to authenticate. this will accept two parameter “username” and “password” using post method.

10. mysite.com/wp-json/wpcargo/v1/api/api_key/address/type​This route is use to get the user address list. “type” parameter can either “shipper” or “receiver”.

11. mysite.com/wp-json/wpcargo/v1/api/api_key/address/type/page/number​This route is use to get user address list by page number (pagination). “number” parameter is the address page number to display and “type” parameter can either “shipper” or “receiver”.

12. mysite.com/wp-json/wpcargo/v1/api/api_key/address/type/page-total​This route is use to get the total number of pages of address.

13. mysite.com/wp-json/wpcargo/v1/api/api_key/address/fields/type​This route is use to get what field name to user to add or update address. “type” can either “shipper’ or “receiver”.

14. mysite.com/wp-json/wpcargo/v1/api/api_key/address/type/add​This route is use to add address. Try this sample code on how to add address using API

15. mysite.com/wp-json/wpcargo/v1/api/api_key/address/type/update​This route is use to update address. Try this sample code on how to update address using API

Scroll to Top