This API requires CoCart Plus v2 or higher to use.
How do I find my shipping rate ID/package ID?
How do I find my shipping rate ID/package ID?
If the cart response has not provided any shipping packages, your store must have requested the customer provides a shipping address before shipping rates can be calculated. This is the default behavior of WooCommerce.Once the shipping address has been provided, the cart response will include the
packages
object under shipping. This object contains an array of shipping packages each containing it’s own set of rates
.Each rate has a key
and instance_id
. The key
is the shipping rate ID, and the instance_id
is the package ID. You can use these values to set the shipping method for the cart.