POST
/
cart
/
add-fee
{
  "cart_hash": "<string>",
  "cart_key": "<string>",
  "currency": {
    "currency_code": "<string>",
    "currency_symbol": "<string>",
    "currency_symbol_pos": "<string>",
    "currency_minor_unit": 123,
    "currency_decimal_separator": "<string>",
    "currency_thousand_separator": "<string>",
    "currency_prefix": "<string>",
    "currency_suffix": "<string>"
  },
  "customer": {
    "billing_address": {
      "first_name": "<string>",
      "last_name": "<string>",
      "company": "<string>",
      "address_1": "<string>",
      "address_2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postcode": "<string>",
      "country": "<string>",
      "email": "<string>",
      "phone": "<string>"
    },
    "shipping_address": {
      "first_name": "<string>",
      "last_name": "<string>",
      "company": "<string>",
      "address_1": "<string>",
      "address_2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postcode": "<string>",
      "country": "<string>",
      "email": "<string>",
      "phone": "<string>"
    }
  },
  "items": [
    {
      "item_key": "<string>",
      "id": 123,
      "name": "<string>",
      "title": "<string>",
      "price": "<string>",
      "quantity": {
        "value": 123,
        "min_purchase": 123,
        "max_purchase": 123
      },
      "totals": {
        "subtotal": "<string>",
        "subtotal_tax": "<string>",
        "total": "<string>",
        "tax": "<string>"
      },
      "slug": "<string>",
      "meta": {
        "product_type": "<string>",
        "sku": "<string>",
        "dimensions": {},
        "weight": "<string>",
        "variation": {}
      },
      "backorders": "<string>",
      "cart_item_data": {},
      "featured_image": "<string>"
    }
  ],
  "item_count": 123,
  "items_weight": "<string>",
  "coupons": [
    {
      "coupon": "<string>",
      "label": "<string>",
      "value": "<string>",
      "discount_type": "<string>",
      "totals": {
        "discount": "<string>",
        "discount_tax": "<string>"
      }
    }
  ],
  "needs_payment": true,
  "needs_shipping": true,
  "shipping": {
    "total_packages": 123,
    "show_package_details": true,
    "has_calculated_shipping": true,
    "packages": {}
  },
  "fees": {},
  "taxes": {},
  "totals": {
    "subtotal": "<string>",
    "subtotal_tax": "<string>",
    "fee_total": "<string>",
    "fee_tax": "<string>",
    "discount_total": "<string>",
    "discount_tax": "<string>",
    "shipping_total": "<string>",
    "shipping_tax": "<string>",
    "total": "<string>",
    "total_tax": "<string>"
  },
  "removed_items": [
    {
      "item_key": "<string>",
      "id": 123,
      "name": "<string>",
      "quantity": 123,
      "price": "<string>",
      "totals": {},
      "cart_item_data": {},
      "featured_image": "<string>"
    }
  ],
  "cross_sells": [
    {
      "id": 123,
      "name": "<string>",
      "slug": "<string>",
      "price": "<string>",
      "regular_price": "<string>",
      "sale_price": "<string>",
      "image": "<string>",
      "average_rating": "<string>",
      "on_sale": true,
      "type": "<string>"
    }
  ],
  "notices": {
    "success": [
      "<string>"
    ],
    "info": [
      "<string>"
    ],
    "error": [
      "<string>"
    ]
  }
}
This API requires CoCart Plus v2 or higher to use.

Authorizations

Authorization
string
header
required

Basic authentication with username and password (optional)

Body

application/json

Response

200
application/json

Fee added successfully

Response containing cart data including items, totals, and other details