docs: add section on retrieve totals for cart items and shipping methods in storefront (#13513)

* docs: add section on retrieve totals for cart items and shipping methods in storefront

* change return type

* update OAS
This commit is contained in:
Shahed Nasser
2025-09-15 19:11:17 +03:00
committed by GitHub
parent 88748ba09d
commit 8c21243f42
12 changed files with 387 additions and 200 deletions
@@ -7,17 +7,6 @@
* - cart
* - title
* - id
* - item_total
* - item_subtotal
* - item_tax_total
* - original_total
* - original_subtotal
* - original_tax_total
* - total
* - subtotal
* - tax_total
* - discount_total
* - discount_tax_total
* - requires_shipping
* - is_discountable
* - is_tax_inclusive
@@ -300,47 +289,47 @@
* original_total:
* type: number
* title: original_total
* description: The item's total including taxes, excluding promotions.
* description: The item's total including taxes, excluding promotions. This field is only available if you expand the `items.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-cart-item-totals) guide.
* original_subtotal:
* type: number
* title: original_subtotal
* description: The item's total excluding taxes, including promotions.
* description: The item's total excluding taxes, including promotions. This field is only available if you expand the `items.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-cart-item-totals) guide.
* original_tax_total:
* type: number
* title: original_tax_total
* description: The total taxes of the item excluding promotions.
* description: The total taxes of the item excluding promotions. This field is only available if you expand the `items.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-cart-item-totals) guide.
* item_total:
* type: number
* title: original_tax_total
* description: The item's total including taxes and promotions.
* description: The item's total including taxes and promotions. This field is only available if you expand the `items.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-cart-item-totals) guide.
* item_subtotal:
* type: number
* title: item_subtotal
* description: The item's total excluding taxes, including promotions.
* description: The item's total excluding taxes, including promotions. This field is only available if you expand the `items.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-cart-item-totals) guide.
* item_tax_total:
* type: number
* title: item_tax_total
* description: The total taxes of the item including promotions.
* description: The total taxes of the item including promotions. This field is only available if you expand the `items.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-cart-item-totals) guide.
* total:
* type: number
* title: total
* description: The item's total including taxes and promotions.
* description: The item's total including taxes and promotions. This field is only available if you expand the `items.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-cart-item-totals) guide.
* subtotal:
* type: number
* title: subtotal
* description: The item's total excluding taxes, including promotions.
* description: The item's total excluding taxes, including promotions. This field is only available if you expand the `items.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-cart-item-totals) guide.
* tax_total:
* type: number
* title: tax_total
* description: The total taxes of the item including promotions.
* description: The total taxes of the item including promotions. This field is only available if you expand the `items.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-cart-item-totals) guide.
* discount_total:
* type: number
* title: discount_total
* description: The total discount of the item.
* description: The total discount of the item. This field is only available if you expand the `items.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-cart-item-totals) guide.
* discount_tax_total:
* type: number
* title: discount_tax_total
* description: The total taxes applied on the discounted amount.
* description: The total taxes applied on the discounted amount. This field is only available if you expand the `items.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-cart-item-totals) guide.
*
*/
@@ -11,14 +11,6 @@
* - is_tax_inclusive
* - created_at
* - updated_at
* - original_total
* - original_subtotal
* - original_tax_total
* - total
* - subtotal
* - tax_total
* - discount_total
* - discount_tax_total
* properties:
* id:
* type: string
@@ -220,35 +212,35 @@
* original_total:
* type: number
* title: original_total
* description: The shipping method's total including taxes, excluding promotions.
* description: The shipping method's total including taxes, excluding promotions. This field is only available if you expand the `shipping_methods.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-shipping-method-totals) guide.
* original_subtotal:
* type: number
* title: original_subtotal
* description: The shipping method's total excluding taxes, including promotions.
* description: The shipping method's total excluding taxes, including promotions. This field is only available if you expand the `shipping_methods.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-shipping-method-totals) guide.
* original_tax_total:
* type: number
* title: original_tax_total
* description: The total taxes applied on the shipping method's amount including promotions.
* description: The total taxes applied on the shipping method's amount including promotions. This field is only available if you expand the `shipping_methods.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-shipping-method-totals) guide.
* total:
* type: number
* title: total
* description: The shipping method's total amount including taxes and promotions.
* description: The shipping method's total amount including taxes and promotions. This field is only available if you expand the `shipping_methods.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-shipping-method-totals) guide.
* subtotal:
* type: number
* title: subtotal
* description: The shipping method's total amount excluding taxes, including promotions.
* description: The shipping method's total amount excluding taxes, including promotions. This field is only available if you expand the `shipping_methods.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-shipping-method-totals) guide.
* tax_total:
* type: number
* title: tax_total
* description: The total taxes applied on the shipping method's amount including promotions.
* description: The total taxes applied on the shipping method's amount including promotions. This field is only available if you expand the `shipping_methods.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-shipping-method-totals) guide.
* discount_total:
* type: number
* title: discount_total
* description: The total amount discounted.
* description: The total amount discounted. This field is only available if you expand the `shipping_methods.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-shipping-method-totals) guide.
* discount_tax_total:
* type: number
* title: discount_tax_total
* description: The taxes applied on the discounted amount.
* description: The taxes applied on the discounted amount. This field is only available if you expand the `shipping_methods.*` relation. Learn more in the [Cart Totals](https://docs.medusajs.com/resources/storefront-development/cart/totals#retrieve-and-show-shipping-method-totals) guide.
*
*/