MageSmith
PUTQuote · Magento 2.4.9 Self (customer or admin)

PUT /V1/carts/mine/collect-totals

PUT /V1/carts/mine/collect-totals is a Magento 2 REST endpoint in the Quote module. Set shipping/billing methods and additional data for cart and collect totals. Requires a customer or admin Bearer token (whichever owns the resource).

Last verified: against Magento 2.4.9.

Returns

Magento\Quote\Api\Data\TotalsInterface

Quote totals data.

Service contract

Magento\Quote\Api\CartTotalManagementInterface::collectTotals

Authorization

Self — a customer Bearer token (when the caller owns the resource) or an admin token both work.

Body parameters

cartId int Required

The cart ID.

shippingCarrierCode string default: null

The carrier code.

shippingMethodCode string default: null

The shipping method code.

additionalData Magento\Quote\Api\Data\TotalsAdditionalDataInterface default: null

Additional data to collect totals.

Example request

Auto-generated from the service contract — paste-ready against your store's /rest/default base. Replace the host, store code, ACL token, and any required values before running.

Headers

Accept
application/json
Content-Type
application/json
Authorization
Bearer <ACCESS_TOKEN> customer or admin token (whoever owns the resource)

Path

/V1/carts/mine/collect-totals

Body

{
  "additionalData": {
    "custom_attributes": [
      {
        "attribute_code": "",
        "value": ""
      }
    ],
    "extension_attributes": {}
  },
  "cartId": 0,
  "shippingCarrierCode": "",
  "shippingMethodCode": ""
}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.