Skip to main content
POST
/
calculate
Calculate cart totals
curl --request POST \
  --url {protocol}://{host}/wp-json/cocart/v1/calculate \
  --header 'Content-Type: application/json' \
  --data '
{
  "return": false
}
'
"Cart totals have been calculated."

Body

application/json
return
boolean
default:false

Returns the cart totals once calculated.

Response

Cart totals calculated successfully.

Success message when return parameter is false or not provided.

Example:

"Cart totals have been calculated."