How to add Packages to a shipment using the WPCargo API route
To add package to a shipment using the API route is very simple, just follow this steps. By default WPCargo packages metakey is “wpc-multiple-package” this metakey accepts associative array values.
The following list are the default array keys for the “wpc-multiple-package” metakeys.
- wpc-pm-qty – Quantity of the parcel
- wpc-pm-piece-type – Type of the Parcel
- wpc-pm-description – Desciption of the Parcel
- wpc-pm-length – Length of the Parcel
- wpc-pm-width – Width of the Parcel
- wpc-pm-height – Height of the Parcel
- wpc-pm-weight – Weight of the Parcel
Use this route to update the shipment and add Packages “mysite.com/wp-json/wpcargo/v1/api/api_key/shipment/update”. To know about route click HERE.
Note: This route accepts POST request.
Check this video on how to use the API route