How to Get the "Standard" Shipping Rate Value in Shopify Apps

How does Shopify Apps get the “standard” shipping value, and is it available through the API? Which api should be used

Shopify apps get the “standard” shipping value by using the Shipping Rates API, which retrieves the default shipping rates set by the store or any third-party carriers integrated with Shopify.

To get this data through the API, you can use the Storefront API or Admin API with the Shipping Rate API endpoint to fetch shipping options based on the cart or checkout.

If you need to pull the rates programmatically, you’ll likely be using the Admin API’s checkout/create or checkout/update endpoints, as they handle shipping rate calculations during checkout.

kindly mark this comment as solved if this helps, also do well to leave a like button also. Thanks.

Can you tell me the specific Api? Thank you

To get the shipping rates programmatically, the specific Shopify API you’ll want to use is the Admin API, and the key endpoint is:

POST /admin/api/2024-04/checkouts/{checkout_token}/shipping_rates.json

This returns the available shipping rates for a given checkout. You’ll first need to create a checkout using:

POST /admin/api/2024-04/checkouts.json

Once the checkout is created and you have the checkout token, you can then fetch the shipping rates.

Kindly mark this comment in case it solve the question and dont forget to leave a like button