GT Extensions for FluentCart REST API Reference
GT Extensions exposes a small REST surface for currency, product settings and public storefront data. Routes are available when their owning module is enabled.
Use authenticated server-side requests for administrative changes. Never put an application password or administrator credential in browser JavaScript or a public code example.
Base URL and Authentication
Append the route to your site’s WordPress REST base:
https://example.com/wp-json/gt-extensions-fluentcart/v1
Public storefront routes do not require an administrator account. Administrative routes require the documented permission. A signed-in WordPress admin request uses its REST nonce; an external administrative integration can use an application password over HTTPS.
Public Storefront Routes
These routes power customer-facing behavior, with their own input and purchase validation.
- GET /sold-count/{id}: returns product_id, sold_count and badge_html for the product ID.
- GET /currency: returns currency context; accepts an optional cart_hash and uses no-store response headers.
- POST /currency: accepts currency and optional cart_hash, reprices the cart and returns the new currency/reload result. A locked invoice checkout cannot freely change currency.
- GET /external-products/resolve: resolves enabled published external products. It accepts bounded product and variation ID lists, up to 50 of each.
Administrative Product Routes
Price-book, quantity and button-text writes require manage_options.
- GET /variation/{id}/prices reads manual and resolved currency prices.
- POST /variation/{id}/prices saves currency, item_price, compare_price and signup_fee using decimal amounts.
- DELETE /variation/{id}/prices?currency=INR removes that currency’s fixed override.
- POST /rates/refresh refreshes rates through the configured provider.
- POST /variation/{id}/quantity-limits sets min_quantity, max_quantity and quantity_step.
- POST /variation/{id}/button-text sets add_to_cart_text and buy_now_text.
The id in these routes is a variation ID. It is different from the parent product ID used in the quote-form shortcode.
Example Price Payload
For an enabled non-base currency, the price-book request body can look like this:
{"currency":"INR","item_price":"799.00","compare_price":"999.00","signup_fee":"0.00"}
Amounts are entered as decimal currency values; internal pricing records use minor units. Read the returned manual and resolved prices to confirm the intended result.
Service Product Routes
Service products use separate FluentCart product permissions.
- GET /service-products?ids=123,456 requires products/view or administrator access and returns which supplied product IDs are services.
- POST /service-products requires products/create or administrator access and creates a supported service product from its product title and detail data.
- Advanced variations still require the corresponding FluentCart capability. The service creation route rejects unsupported bundle creation.
Forms and Admin Actions
Not every plugin action is a REST endpoint. Customer forms use WordPress admin-ajax.php with their supplied nonce and ownership checks.
- gtfc_wishlist and gtfc_wishlist_move manage wishlist actions.
- gtfc_saved_cart requires sign-in and handles save, restore, delete and eligible order-again actions.
- gtfc_request_quote submits a quote inquiry.
- gtfc_stock_alert submits an availability request.
- gtfc_checkout_fields saves applicable checkout options.
- gtfc_delivery_slot updates the checkout’s slot selection.
Invoice editing and issue/send/cancel operations use authorized admin actions with their own state and nonce checks. They are not a general-purpose public invoice API. Use the supported admin workflow unless you are implementing and validating an explicit integration.
Handle Errors
Check the HTTP status and error message before using a response. Validate product and variation IDs, permissions, enabled currencies and current cart state. Do not retry a payment or invoice-issuing operation blindly after an uncertain response; first establish whether the original operation succeeded.