Creates a simple one-time digital FluentCart product with a single variant, so a paywall can be set up without leaving the community admin.
Takes title and price; the price is stored in minor units. The product is published immediately and tagged with a created_from meta of fluent_community. Neither field is validated, so an empty title or a negative price is accepted.
Endpoint
Method:
POSTPath:
/cart/products/createEdition: Core
Controller:
PaywallController@createProductRoute source:
fluent-community/Modules/Integrations/FluentCart/Http/cart_api.php:14Controller source:
fluent-community/Modules/Integrations/FluentCart/Http/Controllers/PaywallController.phpRequires community-admin access, or the admin role in the space named by
space_id.Also requires the FluentCart
products/createpermission, which is checked separately and returns a 422 when missing.The generated variant is created with a stock of 1, so the product sells exactly once until its stock is raised in FluentCart.
Reconstructed sample
This endpoint belongs to a module that is not active on the reference install (or needs a file upload), so the payload below was reconstructed by reading the controller rather than recorded. Field names and types follow the source; values are illustrative.
POST Create Cart Product
Creates a simple one-time digital FluentCart product with a single variant, so a paywall can be set up without leaving the community admin.
Controller: PaywallController@createProduct
Route source: fluent-community/Modules/Integrations/FluentCart/Http/cart_api.php:14
Authorizations
WordPress Application Passwords — use Basic auth with username:application_password.
Request Body
Responses
Successful response