# 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 - [Introduction](https://docs.cocartapi.com/api-reference/introduction.md): Welcome to the API Reference for CoCart. - [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 - [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. - [Remove Item from Cart](https://docs.cocartapi.com/api-reference/v1/cart/delete-remove-item.md): Removes a specific item from 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. - [Get Cart Items Count](https://docs.cocartapi.com/api-reference/v1/cart/get-count-items.md): Returns the count of items in the customer's cart. - [Get Cart Totals](https://docs.cocartapi.com/api-reference/v1/cart/get-totals.md): Retrieves the cart totals including subtotal, taxes, shipping, and discounts. - [Remove a Coupon from Cart](https://docs.cocartapi.com/api-reference/v1/cart/plus/delete-remove-coupon.md): Remove a coupon from the cart using the coupon code. - [Get Applied Coupons in Cart](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-applied-coupons.md): Retrieve a list of all coupons currently applied to the cart. - [Check Coupons in Cart](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-check-coupons.md): Check if coupons applied to the cart are valid. - [Cart Cross Sells](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-cross-sells.md): Gets cross-sell products for the cart. - [Get Customer Details](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-customer.md): Retrieve customer details associated with the cart. - [Get Fees from Cart](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-fees.md): Retrieve a list of all fees applied to the cart. - [Get Payment Methods](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-payment-methods.md): Retrieve available payment methods for the cart. - [Get Item Quantities in Cart](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-quantities.md): Retrieve the quantities of items currently in the cart. - [Removed Items from Cart](https://docs.cocartapi.com/api-reference/v1/cart/plus/get-removed-items.md): Retrieve a list of items that have been removed from 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. - [Apply a Fee](https://docs.cocartapi.com/api-reference/v1/cart/plus/post-add-fee.md): Adds a fee to the cart. - [Apply a Coupon](https://docs.cocartapi.com/api-reference/v1/cart/plus/post-apply-coupon.md): Applies a coupon to the cart. - [Calculate Fees](https://docs.cocartapi.com/api-reference/v1/cart/plus/post-calculate-fees.md): Calculates the cart fees. - [Calculate Shipping](https://docs.cocartapi.com/api-reference/v1/cart/plus/post-calculate-shipping.md): Calculates shipping for the cart. - [Set Payment Method](https://docs.cocartapi.com/api-reference/v1/cart/plus/post-set-payment-method.md): Sets a payment method for the cart. - [Set Shipping Methods](https://docs.cocartapi.com/api-reference/v1/cart/plus/post-set-shipping-method.md): Sets a shipping method for the cart. - [Add Item to Cart](https://docs.cocartapi.com/api-reference/v1/cart/post-add-item.md): Adds a product item to the customer's cart. - [Calculate cart totals](https://docs.cocartapi.com/api-reference/v1/cart/post-calculate.md): Calculates the cart totals including taxes, shipping, and discounts. - [Clear the cart](https://docs.cocartapi.com/api-reference/v1/cart/post-clear-cart.md): Removes all items from the customer's cart. - [Update Item in Cart](https://docs.cocartapi.com/api-reference/v1/cart/post-update-item.md): Updates the quantity of a specific item in the customer's cart. - [Restore Item to Cart](https://docs.cocartapi.com/api-reference/v1/cart/put-restore-item.md) - [Error Codes](https://docs.cocartapi.com/api-reference/v1/error-codes.md): Error codes returned by the CoCart API v1. - [Get a Product](https://docs.cocartapi.com/api-reference/v1/products/get-product.md): Returns a single product. - [Get a Product Attribute](https://docs.cocartapi.com/api-reference/v1/products/get-product-attribute.md): Returns a single product attribute. - [Get a Product Attribute Term](https://docs.cocartapi.com/api-reference/v1/products/get-product-attribute-term.md): Returns a single product attribute term. - [Get Product Attribute Terms](https://docs.cocartapi.com/api-reference/v1/products/get-product-attribute-terms.md): Returns a list of product attribute terms. - [Get Product Attributes](https://docs.cocartapi.com/api-reference/v1/products/get-product-attributes.md): Returns a list of product attributes. - [Get Product Categories](https://docs.cocartapi.com/api-reference/v1/products/get-product-categories.md): Returns a list of product categories. - [Get a Product Review](https://docs.cocartapi.com/api-reference/v1/products/get-product-review.md): Returns a single product review. - [Get Product Reviews](https://docs.cocartapi.com/api-reference/v1/products/get-product-reviews.md): Returns a list of product reviews. - [Get Product Tags](https://docs.cocartapi.com/api-reference/v1/products/get-product-tags.md): Returns a list of product tags. - [Get a Product Variation](https://docs.cocartapi.com/api-reference/v1/products/get-product-variation.md): Returns a single product variation. - [Get Product Variations](https://docs.cocartapi.com/api-reference/v1/products/get-product-variations.md): Returns a list of product variations. - [Get Products](https://docs.cocartapi.com/api-reference/v1/products/get-products.md): Returns a list of products. - [Logout](https://docs.cocartapi.com/api-reference/v1/user/logout.md): Logs out the customer and clears their session. - [Remove item from cart](https://docs.cocartapi.com/api-reference/v2/cart/delete-item-by-key.md): Removes a specific item from the customer's cart. By default returns the updated cart contents. Set return_status=true to get just a removal message. - [Get cart](https://docs.cocartapi.com/api-reference/v2/cart/get-cart.md): Get the full cart including all items, totals, and customer information. - [Get Cart Items Count](https://docs.cocartapi.com/api-reference/v2/cart/get-items-count.md): Returns the count of items in the customer's cart. - [Get Cart Totals](https://docs.cocartapi.com/api-reference/v2/cart/get-totals.md): Get the carts totals. - [Add Item to Cart](https://docs.cocartapi.com/api-reference/v2/cart/post-add-item.md): Adds a single product item to the customer's cart. - [Add Items to Cart](https://docs.cocartapi.com/api-reference/v2/cart/post-add-items.md): Adds multiple product items to the customer's cart in a single request. - [Calculate cart totals](https://docs.cocartapi.com/api-reference/v2/cart/post-calculate.md): Calculates the cart totals including taxes, shipping, and discounts. - [Update cart](https://docs.cocartapi.com/api-reference/v2/cart/post-cart-update.md): Updates multiple cart items or properties at once. - [Clear the cart](https://docs.cocartapi.com/api-reference/v2/cart/post-clear.md): Removes all items from the customer's cart. - [Update Item in Cart](https://docs.cocartapi.com/api-reference/v2/cart/post-item-by-key.md): Updates the quantity or other properties of a specific item in the customer's cart. By default returns the updated cart contents. Set return_status=true to get a status message with quantity info. - [Restore Item to Cart](https://docs.cocartapi.com/api-reference/v2/cart/put-item-by-key.md): Restores a previously removed item back to the customer's cart. By default returns the updated cart contents. Set return_item=true to get just the restored item details. - [Get a Single Product](https://docs.cocartapi.com/api-reference/v2/products/get-product.md): Gets a single product by ID or SKU. - [Get a Product Attribute by ID](https://docs.cocartapi.com/api-reference/v2/products/get-product-attribute-by-id.md): Gets a single product attribute by ID. - [Get a Product Attribute Term by ID](https://docs.cocartapi.com/api-reference/v2/products/get-product-attribute-term.md): Gets a single term for a specific product attribute. - [Get a Product Attributes Terms](https://docs.cocartapi.com/api-reference/v2/products/get-product-attribute-terms.md): Gets terms for a specific product attribute. - [Get Product Attributes](https://docs.cocartapi.com/api-reference/v2/products/get-product-attributes.md): Gets a list of product attributes. - [Get Product Categories](https://docs.cocartapi.com/api-reference/v2/products/get-product-categories.md): Gets a list of product categories. - [Get Product Category by ID](https://docs.cocartapi.com/api-reference/v2/products/get-product-category-by-id.md): Gets a single product category by ID. - [Get a Product Review](https://docs.cocartapi.com/api-reference/v2/products/get-product-review.md) - [Get Product Reviews](https://docs.cocartapi.com/api-reference/v2/products/get-product-reviews.md): Gets a list of product reviews. - [Get Product Category by ID](https://docs.cocartapi.com/api-reference/v2/products/get-product-tag-by-id.md): Gets a single product category by ID. - [Get Product Tags](https://docs.cocartapi.com/api-reference/v2/products/get-product-tags.md): Gets a list of product tags. - [Get a Product Variation](https://docs.cocartapi.com/api-reference/v2/products/get-product-variation.md): Gets a single variation for a variable product. - [Get a Products Variations](https://docs.cocartapi.com/api-reference/v2/products/get-product-variations.md): Gets variations for a variable product. - [Get Products](https://docs.cocartapi.com/api-reference/v2/products/get-products.md): Gets a list of products with optional filtering and pagination. - [Delete a Session](https://docs.cocartapi.com/api-reference/v2/sessions/delete-session.md): Deletes a specific cart session by session key. - [Get a Session](https://docs.cocartapi.com/api-reference/v2/sessions/get-session.md): Gets a specific cart session by session key. - [Retrieve Sessions](https://docs.cocartapi.com/api-reference/v2/sessions/get-sessions.md): Gets a list of cart sessions for administrative purposes. - [Store](https://docs.cocartapi.com/api-reference/v2/store/get-store.md): Gets general store information including routes and configuration. - [Login User](https://docs.cocartapi.com/api-reference/v2/user/post-login.md): Logs in a user and creates a session. - [Logout User](https://docs.cocartapi.com/api-reference/v2/user/post-logout.md): Logs out the current user and destroys the session. - [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. - [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. - [Batch Requests for the Cart](https://docs.cocartapi.com/documentation/batch-requests.md): Learn how to batch request the cart - [Contributing to Documentation](https://docs.cocartapi.com/documentation/contributing-to-docs.md): Learn how to contribute to CoCart API documentation - [CORS for CoCart](https://docs.cocartapi.com/documentation/cors.md): Depending on your setup, you may need to enable CORS to gain access - [Action hooks available in the core of CoCart](https://docs.cocartapi.com/documentation/developers/actions.md): Trigger an action when these hooks are called - [Contributing to CoCart](https://docs.cocartapi.com/documentation/developers/contributing.md): See the many ways you can contribute to CoCart - [Filters available in the core of CoCart](https://docs.cocartapi.com/documentation/developers/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/functions.md): Extend support for CoCart with these useful functions in your projects - [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 - [API Permissions](https://docs.cocartapi.com/documentation/force-permissions.md): Learn how to restrict access to certain CoCart routes. - [Guiding Principles](https://docs.cocartapi.com/documentation/guides/guiding-principles.md): The following principles should be considered when extending, creating, or updating endpoints in CoCart - [How to Update CoCart](https://docs.cocartapi.com/documentation/guides/updating-cocart.md) - [Load Cart](https://docs.cocartapi.com/documentation/load-cart.md): Learn to load a guest cart session securely - [Rate Limiting](https://docs.cocartapi.com/documentation/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 - [Cart Key](https://docs.cocartapi.com/knowledge-base/cart-key.md) - [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. - [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 - [CoCart: Decoupling WooCommerce for the modern storefront](https://docs.cocartapi.com/overview/introduction.md): CoCart is a developer-first REST API to decouple WooCommerce on the frontend. - [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) - [Building product pages with OxbowUI](https://docs.cocartapi.com/tutorials/astro/oxbowui-product-list.md): Learn how to integrate OxbowUI ecommerce components in Astro to display products - [Setting Up Astro](https://docs.cocartapi.com/tutorials/astro/setup.md): Learn how to set up an Astro project for your headless WooCommerce store - [Authentication Injection with CoCart](https://docs.cocartapi.com/tutorials/authentication-injection.md): Learn how to intervene CoCart's authentication - [Convert Cart to Order](https://docs.cocartapi.com/tutorials/covert-cart-to-order.md): Learn how to convert a cart session into an order - [Extending Cart: Creating a Callback](https://docs.cocartapi.com/tutorials/extending-cart-creating-callbacks.md): Need to extend the cart to apply something unique? - [Generate Image Data URL](https://docs.cocartapi.com/tutorials/generate-image-dataurl.md) - [Tutorials Overview](https://docs.cocartapi.com/tutorials/introduction.md): Practical guides to help you get started with CoCart API - [Understanding JWT Token Invalidation](https://docs.cocartapi.com/tutorials/jwt-token-checkup.md): Learn how to validate and refresh JWT tokens. - [Setting Up Next.js](https://docs.cocartapi.com/tutorials/nextjs/setup.md): Learn how to set up a Next.js project for your headless WooCommerce store - [Setting Up Nuxt](https://docs.cocartapi.com/tutorials/nuxt/setup.md): Learn how to set up a Nuxt project for your headless WooCommerce store - [Getting Started with Postman](https://docs.cocartapi.com/tutorials/postman.md): Learn how to use Postman to interact with CoCart API - [Setting Up React Native](https://docs.cocartapi.com/tutorials/react-native/setup.md): Learn how to set up a React Native project for your headless WooCommerce mobile store - [Setting Up SvelteKit](https://docs.cocartapi.com/tutorials/sveltekit/setup.md): Learn how to set up a SvelteKit project for your headless WooCommerce store - [Generate TypeScript Types](https://docs.cocartapi.com/tutorials/typescript-types-generation.md): Learn how to automatically generate TypeScript types from CoCart OpenAPI specifications for type-safe development - [CoCart Core Updates](https://docs.cocartapi.com/updates/core.md): Keep up with all the latest improvements, features, and fixes in CoCart Core. - [Documentation](https://docs.cocartapi.com/updates/documentation.md): Keep up with new additions or changes to the documentation - [CoCart JWT Authentication Updates](https://docs.cocartapi.com/updates/jwt.md): Keep up with all the latest improvements, features, and fixes in CoCart JWT Authentication. - [Overview](https://docs.cocartapi.com/updates/overview.md): Follow along with updates across CoCart. - [CoCart Plus Updates](https://docs.cocartapi.com/updates/plus.md): Keep up with all the latest improvements, features, and fixes in CoCart Plus. ## Optional - [Feature requests](https://cocartapi.com/suggest-a-feature/?ref=mintlify) - [Wall of Love](https://cocartapi.com/wall-of-love/?ref=mintlify)