# CoCart API ## Docs - [Authentication](https://docs.cocartapi.com/api-reference/authentication.md): Learn how to authenticate with the CoCart API for secure access. - [Frequently Asked Questions](https://docs.cocartapi.com/api-reference/faq.md): We ask the most frequently asked questions for the API - [Refresh Token](https://docs.cocartapi.com/api-reference/jwt/refresh-token.md): Generate a new JWT token using a refresh token - [Validate Token](https://docs.cocartapi.com/api-reference/jwt/validate-token.md): Validate an existing JWT token - [Introduction](https://docs.cocartapi.com/api-reference/legacy/introduction.md): Welcome to the API Reference for CoCart. - [CoCart Playground](https://docs.cocartapi.com/api-reference/playground.md): Setup a WooCommerce store demo with CoCart to play around. - [Mix and Match Products for WooCommerce](https://docs.cocartapi.com/api-reference/plugins/wc-mix-and-match-products.md): Allows customers to create their own product bundles. - [Name Your Price for WooCommerce](https://docs.cocartapi.com/api-reference/plugins/wc-name-your-price.md): Allow customers to define the product price. Also useful for accepting user-set donations. - [Add Item](https://docs.cocartapi.com/api-reference/v1/cart/add-item.md): Adds a product item to the customer's cart. - [Calculate](https://docs.cocartapi.com/api-reference/v1/cart/calculate.md): Calculates the cart totals including taxes, shipping, and discounts. - [Clear Cart](https://docs.cocartapi.com/api-reference/v1/cart/clear-cart.md): Removes all items from the customer's cart. - [Count Items](https://docs.cocartapi.com/api-reference/v1/cart/count-items.md): Returns the count of items in the customer's cart. - [Get Cart](https://docs.cocartapi.com/api-reference/v1/cart/get-cart.md): Gets the cart items added by the customer. - [Get Cart for Customer](https://docs.cocartapi.com/api-reference/v1/cart/get-cart-customer.md): Gets the persistent cart for the provided customer ID. - [Get Cart in Session](https://docs.cocartapi.com/api-reference/v1/cart/get-cart-in-session.md): Gets the cart in session for the provided cart key. - [Apply Fee](https://docs.cocartapi.com/api-reference/v1/cart/plus/add-fee.md): Adds a fee to the cart. - [Apply Coupon](https://docs.cocartapi.com/api-reference/v1/cart/plus/apply-coupon.md): Applies a coupon to the cart. - [Calculate Fees](https://docs.cocartapi.com/api-reference/v1/cart/plus/calculate-fees.md): Calculates the cart fees. - [Calculate Shipping](https://docs.cocartapi.com/api-reference/v1/cart/plus/calculate-shipping.md): Calculates shipping for the cart. - [Check Coupons](https://docs.cocartapi.com/api-reference/v1/cart/plus/check-coupons.md): Checks all applied coupons to see if they are still valid. - [Cross Sells](https://docs.cocartapi.com/api-reference/v1/cart/plus/cross-sells.md): Gets cross-sell products for the cart. - [Customer](https://docs.cocartapi.com/api-reference/v1/cart/plus/customer.md): Gets the details of the cart owner (customer). - [Get Applied Coupons](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-applied-coupons.md): Gets the coupons applied to the cart. - [Get Fees](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-fees.md): Gets all fees applied to the cart. - [Get Payment Methods](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-payment-methods.md): Gets available payment methods for the cart. - [Get Shipping Methods](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-shipping-methods.md): Gets available shipping methods for the cart. - [Get Coupon Discount Tax Totals](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-totals-discount-coupon-tax.md): Gets the discount tax totals per coupon. - [Get Fee Total](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-totals-fee.md): Gets the total fees applied to the cart. - [Get Fee Tax](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-totals-fee-tax.md): Gets the total fee tax applied to the cart. - [Get Shipping Total](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-totals-shipping.md): Gets the total shipping cost for the cart. - [Get Shipping Tax](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-totals-shipping-tax.md): Gets the total shipping tax for the cart. - [Get Subtotal Tax](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-totals-subtotal-tax.md): Gets the subtotal tax of the cart. - [Get Total Tax](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-totals-tax.md): Gets the total tax for the cart. - [Get Cart Total](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-totals-total.md): Gets the total amount for the cart. - [Item Quantities](https://docs.cocartapi.com/api-reference/v1/cart/plus/quantities.md): Gets the quantities of all items in the cart. - [Remove Coupon](https://docs.cocartapi.com/api-reference/v1/cart/plus/remove-coupon.md): Removes a coupon from the cart. - [Removed Items](https://docs.cocartapi.com/api-reference/v1/cart/plus/removed-items.md): Gets the removed items from the cart. - [Set Payment Method](https://docs.cocartapi.com/api-reference/v1/cart/plus/set-payment-method.md): Sets a payment method for the cart. - [Set Shipping Methods](https://docs.cocartapi.com/api-reference/v1/cart/plus/set-shipping-method.md): Sets a shipping method for the cart. - [Remove Item](https://docs.cocartapi.com/api-reference/v1/cart/remove-item.md): Removes a specific item from the customer's cart. - [Restore Item](https://docs.cocartapi.com/api-reference/v1/cart/restore-item.md): Retrieves a specific item from the customer's cart. - [Totals](https://docs.cocartapi.com/api-reference/v1/cart/totals.md): Retrieves the cart totals including subtotal, taxes, shipping, and discounts. - [Update Item](https://docs.cocartapi.com/api-reference/v1/cart/update-item.md): Updates the quantity of a specific item in the customer's cart. - [Error Codes](https://docs.cocartapi.com/api-reference/v1/error-codes.md): Error codes returned by the CoCart API v1. - [Product Attribute Terms](https://docs.cocartapi.com/api-reference/v1/products/attribute-terms.md): Returns a list of product attribute terms. - [Product Attributes](https://docs.cocartapi.com/api-reference/v1/products/attributes.md): Returns a list of product attributes. - [Product Categories](https://docs.cocartapi.com/api-reference/v1/products/categories.md): Returns a list of product categories. - [Get a Product Attribute](https://docs.cocartapi.com/api-reference/v1/products/get-attribute.md): Returns a single product attribute. - [Get a Product Attribute Term](https://docs.cocartapi.com/api-reference/v1/products/get-attribute-term.md): Returns a single product attribute term. - [Get a Product](https://docs.cocartapi.com/api-reference/v1/products/get-product.md): Returns a single product. - [Get a Product Review](https://docs.cocartapi.com/api-reference/v1/products/get-review.md): Returns a single product review. - [Get a Product Variation](https://docs.cocartapi.com/api-reference/v1/products/get-variation.md): Returns a single product variation. - [Get Product Variations](https://docs.cocartapi.com/api-reference/v1/products/get-variations.md): Returns a list of product variations. - [Products](https://docs.cocartapi.com/api-reference/v1/products/products.md): Returns a list of products. - [Product Reviews](https://docs.cocartapi.com/api-reference/v1/products/reviews.md): Returns a list of product reviews. - [Product Tags](https://docs.cocartapi.com/api-reference/v1/products/tags.md): Returns a list of product tags. - [Logout](https://docs.cocartapi.com/api-reference/v1/user/logout.md): Logs out the customer and clears their session. - [Remove all Coupons](https://docs.cocartapi.com/api-reference/v2/cart/delete-coupons.md) - [Remove Coupon by Code](https://docs.cocartapi.com/api-reference/v2/cart/delete-coupons-by-code.md) - [Remove all Items](https://docs.cocartapi.com/api-reference/v2/cart/delete-items.md) - [Mini Cart](https://docs.cocartapi.com/api-reference/v2/cart/get-cart-mini.md): Get just the minimum cart contents. - [Get Coupons](https://docs.cocartapi.com/api-reference/v2/cart/get-coupons.md) - [Validate applied coupons](https://docs.cocartapi.com/api-reference/v2/cart/get-coupons-validate.md) - [Remove Item from Cart](https://docs.cocartapi.com/api-reference/v2/cart/legacy/delete-item-by-key.md) - [Cart](https://docs.cocartapi.com/api-reference/v2/cart/legacy/get-cart.md): Get the full cart contents. - [Cart items count](https://docs.cocartapi.com/api-reference/v2/cart/legacy/get-items-count.md) - [Add Item to Cart](https://docs.cocartapi.com/api-reference/v2/cart/legacy/post-add-item.md) - [Add Items to Cart](https://docs.cocartapi.com/api-reference/v2/cart/legacy/post-add-items.md) - [Calculate cart totals](https://docs.cocartapi.com/api-reference/v2/cart/legacy/post-calculate.md) - [Clear the cart](https://docs.cocartapi.com/api-reference/v2/cart/legacy/post-clear.md) - [Update Item in Cart](https://docs.cocartapi.com/api-reference/v2/cart/legacy/post-item-by-key.md) - [Restore Item to Cart](https://docs.cocartapi.com/api-reference/v2/cart/legacy/put-item-by-key.md) - [Add a Fee](https://docs.cocartapi.com/api-reference/v2/cart/post-add-fee.md) - [Apply a Coupon](https://docs.cocartapi.com/api-reference/v2/cart/post-apply-coupon.md) - [Remove all Fees](https://docs.cocartapi.com/api-reference/v2/cart/post-remove-fees.md) - [Set Shipping Method](https://docs.cocartapi.com/api-reference/v2/cart/post-set-shipping-method.md) - [Products](https://docs.cocartapi.com/api-reference/v2/products/legacy/get-products.md) - [Store](https://docs.cocartapi.com/api-reference/v2/store/legacy/get-store.md): Returns general information about the store - [Login User](https://docs.cocartapi.com/api-reference/v2/user/post-login.md): Returns login information for the currently authenticated user - [Logout User](https://docs.cocartapi.com/api-reference/v2/user/post-logout.md): Logs out the user and clears their session. - [Register Customer](https://docs.cocartapi.com/api-reference/v2/user/post-register.md): Create a new customer account for the store - [Variation Examples](https://docs.cocartapi.com/api-reference/v2/variation-examples.md): Know all the combinations for variable products when adding to cart. - [CoCart Core v4](https://docs.cocartapi.com/breaking-changes/core-v4.md): These breaking changes affect how CoCart handles cart sessions. - [CoCart Core v5](https://docs.cocartapi.com/breaking-changes/core-v5.md): These breaking changes improve the core of CoCart and provides better support for these specific features. - [Cart](https://docs.cocartapi.com/cli-reference/cli-cart.md): Commands for managing the cart. - [JWT Authentication](https://docs.cocartapi.com/cli-reference/cli-jwt.md): These commands are strictly designed to help with your development. - [Introduction](https://docs.cocartapi.com/cli-reference/introduction.md): Welcome to the CLI Reference for CoCart. - [Contributing](https://docs.cocartapi.com/documentation/developers/contributing.md): See the many ways you can contribute to CoCart - [Guiding Principles](https://docs.cocartapi.com/documentation/developers/guides/guiding-principles.md): The following principles should be considered when extending, creating, or updating endpoints in CoCart - [Understanding JWT Token Invalidation](https://docs.cocartapi.com/documentation/developers/guides/jwt-token-checkup.md): Learn how to validate and refresh JWT tokens. - [Extending Cart: Creating a Callback](https://docs.cocartapi.com/documentation/developers/guides/legacy/extending-cart-creating-callbacks.md): Need to extend the cart to apply something unique? - [How to Update CoCart](https://docs.cocartapi.com/documentation/developers/guides/updating-cocart.md) - [Action hooks available in JWT Authentication](https://docs.cocartapi.com/documentation/developers/jwt/actions.md): Trigger an action when these hooks are called - [Filters available in JWT Authentication](https://docs.cocartapi.com/documentation/developers/jwt/filters.md): Control how JWT Authentication operates when tokens are created - [Action hooks available in the core of CoCart](https://docs.cocartapi.com/documentation/developers/legacy/actions.md): Trigger an action when these hooks are called - [Filters available in the core of CoCart](https://docs.cocartapi.com/documentation/developers/legacy/filters.md): These filters let you control how CoCart operates for your store - [Functions available in the core of CoCart](https://docs.cocartapi.com/documentation/developers/legacy/functions.md): Extend support for CoCart with these useful functions in your projects - [API Permissions](https://docs.cocartapi.com/documentation/learn/force-permissions.md): Learn how to restrict access to certain CoCart routes. - [Batch Requests for the Cart](https://docs.cocartapi.com/documentation/learn/legacy/batch-requests.md): Learn how to batch request the cart - [CORS for CoCart](https://docs.cocartapi.com/documentation/learn/legacy/cors.md): Depending on your setup, you may need to enable CORS to gain access - [Load Cart](https://docs.cocartapi.com/documentation/learn/legacy/load-cart.md): Learn to load a guest cart session securely - [Rate Limiting](https://docs.cocartapi.com/documentation/learn/legacy/rate-limiting.md): Control and prevent abuse from excessive calls. - [Resources](https://docs.cocartapi.com/documentation/resources.md): These resources may extend your capability of going headless with WordPress. - [Security](https://docs.cocartapi.com/documentation/security.md): Security is the most important part of creating a headless store. - [Tools](https://docs.cocartapi.com/documentation/tools.md): Tools to help you develop. - [WP-CLI for CoCart](https://docs.cocartapi.com/documentation/wp-cli.md): CoCart offers the ability to manage the plugin via the command-line, using WP CLI. - [Quick Start](https://docs.cocartapi.com/getting-started/core/quick-start.md): Learn how to create a cart - [Install CoCart](https://docs.cocartapi.com/getting-started/core/setup.md): Follow one of many the ways to install CoCart - [Advanced Configuration](https://docs.cocartapi.com/getting-started/jwt/advanced-configuration.md): Take security to the next level with JWT Authentication. - [Core Concepts](https://docs.cocartapi.com/getting-started/jwt/concepts.md): JSON Web Tokens are an open standard (RFC 7519) for securely transmitting information between parties as a JSON object. - [Quick Start](https://docs.cocartapi.com/getting-started/jwt/quick-start.md) - [Setup](https://docs.cocartapi.com/getting-started/jwt/setup.md): Learn how to setup JWT Authentication for CoCart. - [License Activation](https://docs.cocartapi.com/getting-started/license-activation.md): Enter your CoCart license key to activate your license. - [Install CoCart Plus](https://docs.cocartapi.com/getting-started/plus/setup.md): You can purchase CoCart Plus via cocartapi.com/pricing/ - [WordPress Setup](https://docs.cocartapi.com/getting-started/wordpress-setup.md): The best way to host your WordPress site for headless store. - [Code snippets added the right way](https://docs.cocartapi.com/knowledge-base/adding-code.md): How to apply any CoCart filter or action hook the safe way - [Support](https://docs.cocartapi.com/knowledge-base/contact-us.md): We love to support customers, quickly. Reach out anytime. - [Frequently Asked Questions](https://docs.cocartapi.com/knowledge-base/faq.md): A collection of answers to your possible questions. - [Cart Key](https://docs.cocartapi.com/knowledge-base/legacy/cart-key.md) - [Don't Use Nulled Versions!](https://docs.cocartapi.com/knowledge-base/nulled-plugins.md): Warning: Nulled plugins are bad for your website. - [Plugin Suggestions](https://docs.cocartapi.com/knowledge-base/plugin-suggestions.md): Discover other plugins we suggest - [Security Practices](https://docs.cocartapi.com/knowledge-base/security-practices.md): Learn about security practices for token storage and server-side configuration. - [Authentication / Login](https://docs.cocartapi.com/knowledge-base/troubleshoot/authentication.md): Trouble with authentication? - [JWT Authentication](https://docs.cocartapi.com/knowledge-base/troubleshoot/jwt-authentication.md): Trouble with JWT authentication? - [WordPress Configuration](https://docs.cocartapi.com/knowledge-base/wp-config.md): Also known as the wp-config.php file. - [Frequently Asked Questions](https://docs.cocartapi.com/overview/faq.md): We ask the most frequently asked questions for CoCart - [Welcome to CoCart](https://docs.cocartapi.com/overview/legacy/introduction.md): CoCart is the REST-API that unlocks powerful headless WooCommerce stores. - [Roadmap](https://docs.cocartapi.com/overview/roadmap.md): Understand what is currently being prioritized and what we are planning to build in the near future. - [Security Policy](https://docs.cocartapi.com/overview/security-policy.md): An overview of CoCart Security Policy - [Standards](https://docs.cocartapi.com/overview/standards.md): Learn about CoCart's core standards for the REST API - [Incompatible plugins](https://docs.cocartapi.com/plugins/incompatible.md): Plugins that are not compatible with CoCart - [Our Plugin Suggestions](https://docs.cocartapi.com/plugins/suggestions.md): The following plugins are our suggestions of plugins that may enhance your store. - [WooCommerce Extensions](https://docs.cocartapi.com/plugins/woocommerce-extensions.md): Tested and verified to work with CoCart. - [Backers](https://docs.cocartapi.com/resources/backers.md): Development of CoCart is made possible thanks to these awesome backers! - [Community](https://docs.cocartapi.com/resources/community.md): CoCart community initiatives - [Opening Issues](https://docs.cocartapi.com/resources/opening-issues.md) - [Support Policy](https://docs.cocartapi.com/resources/support-policy.md) - [Convert Cart to Order](https://docs.cocartapi.com/tutorials/covert-cart-to-order.md): Learn how to convert a cart session into an order - [Getting Started with Postman](https://docs.cocartapi.com/tutorials/postman.md): Learn how to use Postman to interact with CoCart API - [Core](https://docs.cocartapi.com/updates/core.md) - [Documentation](https://docs.cocartapi.com/updates/documentation.md): Keep up with new additions or changes to the documentation - [JWT Authentication](https://docs.cocartapi.com/updates/jwt.md) - [Overview](https://docs.cocartapi.com/updates/overview.md): Follow along with updates across CoCart. ## Optional - [Community](https://cocartapi.com/community/?ref=mintlify) - [Feature requests](https://cocartapi.com/suggest-a-feature/?ref=mintlify) - [Wall of Love](https://cocartapi.com/wall-of-love/?ref=mintlify)