Skip to content

Attaches a published FluentCart product to a space as a paywall.

cart_product_id must reference a published product, and attaching the same product twice is rejected. The product id list is stored on the space settings, and fluent_community/paywall_added fires afterwards.

Endpoint

  • Method: POST

  • Path: /cart/spaces/{spaceId}/paywalls

  • Edition: Core

  • Controller: PaywallController@addPaywall

  • Route source: fluent-community/Modules/Integrations/FluentCart/Http/cart_api.php:16

  • Controller source: fluent-community/Modules/Integrations/FluentCart/Http/Controllers/PaywallController.php

  • Requires community-admin access, or the admin role in this space.

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 Space Paywall

POST
/cart/spaces/{spaceId}/paywalls

Attaches a published FluentCart product to a space as a paywall.

Controller: PaywallController@addPaywall
Route source: fluent-community/Modules/Integrations/FluentCart/Http/cart_api.php:16

Authorizations

ApplicationPasswords

WordPress Application Passwords — use Basic auth with username:application_password.

Type
API Key (header: Authorization)

Parameters

Path Parameters

spaceId*

SpaceId extracted from the URL path.

Type
integer
Required

Request Body

application/json
JSON
{
  
"cart_product_id": "string"
}

Responses

Successful response

application/json
JSON
{
  
"message": "string",
  
"paywall": {
  
  
"ID": "string",
  
  
"post_date": "string",
  
  
"post_date_gmt": "string",
  
  
"post_content": "string",
  
  
"post_title": "string",
  
  
"post_excerpt": "string",
  
  
"post_status": "string",
  
  
"comment_status": "string",
  
  
"ping_status": "string",
  
  
"post_name": "string",
  
  
"post_modified": "string",
  
  
"post_modified_gmt": "string",
  
  
"guid": "string",
  
  
"post_type": "string",
  
  
"thumbnail": "string"
  
}
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation