Skip to content

Products API

Manage your product catalog including creating products, managing variations, downloadable files, bundles, upgrade paths, tax/shipping classes, stock management, and product integrations.

Base URL: https://your-site.com/wp-json/fluent-cart/v2/products

Policy: ProductPolicy

All monetary values are in cents (e.g., $10.00 = 1000).


Product CRUD & Listing

List Products

GET /fluent-cart/v2/products

Retrieve a paginated list of products with filtering, sorting, and search capabilities.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
searchstringqueryNoSearch by product title, ID, or variation title
per_pageintegerqueryNoNumber of results per page (default: 10)
pageintegerqueryNoPage number for pagination
sort_bystringqueryNoColumn to sort by (default: ID)
sort_typestringqueryNoSort direction: asc or desc (default: desc)
active_viewstringqueryNoFilter tab: publish, draft, physical, digital, subscribable, not_subscribable, bundle, non_bundle
filter_typestringqueryNosimple or advanced
witharrayqueryNoRelations to eager load
search_groupsarrayqueryNoAdvanced filter groups for complex queries

Response

json
{
  "products": {
    "total": 50,
    "per_page": 10,
    "current_page": 1,
    "last_page": 5,
    "data": [
      {
        "ID": 123,
        "post_title": "Example Product",
        "post_status": "publish",
        "post_date": "2025-01-15 12:00:00",
        "view_url": "https://example.com/product/example-product",
        "edit_url": "https://example.com/wp-admin/admin.php?page=fluent-cart#/products/123"
      }
    ]
  }
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products?search=widget&per_page=20&active_view=publish" \
  -u "username:app_password"

Get Product

GET /fluent-cart/v2/products/{product}

Retrieve a single product by ID.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
productintegerpathYesThe product ID
witharrayqueryNoRelations to eager load (e.g., ["detail", "variants", "product_menu"])

Response

json
{
  "product": {
    "ID": 123,
    "post_title": "Example Product",
    "post_status": "publish",
    "post_excerpt": "Short description",
    "post_content": "Full description"
  },
  "product_menu": []
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/123?with[]=detail&with[]=variants" \
  -u "username:app_password"

Create Product

POST /fluent-cart/v2/products

Create a new product. A default variation is automatically created with the product.

  • Permission: products/create
  • Request Class: ProductCreateRequest

Parameters

ParameterTypeLocationRequiredDescription
post_titlestringbodyYesProduct title (max 200 characters)
post_statusstringbodyNoPost status (e.g., draft, publish)
detail.fulfillment_typestringbodyNophysical or digital (default: digital)
detail.other_info.is_bundle_productstringbodyNoyes or no (default: no)

Response

json
{
  "data": {
    "ID": 124,
    "variant": {
      "id": 456,
      "post_id": 124,
      "variation_title": "Example Product",
      "stock_status": "in-stock",
      "payment_type": "onetime",
      "total_stock": 1,
      "available": 1,
      "fulfillment_type": "digital"
    },
    "product_details": { ... }
  },
  "message": "Product has been created successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "post_title": "New Digital Product",
    "post_status": "draft",
    "detail": {
      "fulfillment_type": "digital"
    }
  }'

Delete Product

DELETE /fluent-cart/v2/products/{product}

Delete a product and all associated data.

  • Permission: products/delete

Parameters

ParameterTypeLocationRequiredDescription
productintegerpathYesThe product ID to delete

Response

json
{
  "message": "Product deleted successfully"
}

Example

bash
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/products/123" \
  -u "username:app_password"

Get Product Pricing

GET /fluent-cart/v2/products/{productId}/pricing

Retrieve the full product details including pricing, variants, downloadable files, and taxonomy information.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
productIdintegerpathYesThe product ID
witharrayqueryNoAdditional relations (e.g., ["product_menu"])

Response

json
{
  "product": {
    "ID": 123,
    "post_title": "Example Product",
    "post_status": "publish",
    "post_excerpt": "Short description",
    "featured_image_id": 456,
    "view_url": "https://example.com/product/example",
    "edit_url": "https://example.com/wp-admin/admin.php?page=fluent-cart#/products/123",
    "detail": {
      "id": 1,
      "post_id": 123,
      "fulfillment_type": "digital",
      "variation_type": "simple",
      "manage_stock": 0,
      "manage_downloadable": 0,
      "other_info": { ... }
    },
    "variants": [
      {
        "id": 789,
        "post_id": 123,
        "variation_title": "Default Plan",
        "item_price": 1000,
        "compare_price": 0,
        "stock_status": "in-stock",
        "other_info": { ... },
        "media": []
      }
    ],
    "downloadable_files": []
  },
  "product_menu": "",
  "taxonomies": [
    {
      "name": "product-categories",
      "label": "Product Categories",
      "terms": [],
      "labels": { ... }
    }
  ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/123/pricing?with[]=product_menu" \
  -u "username:app_password"

Update Product Pricing

POST /fluent-cart/v2/products/{postId}/pricing

Update a product's pricing, details, variants, and other metadata.

  • Permission: products/edit
  • Request Class: ProductUpdateRequest

Parameters

ParameterTypeLocationRequiredDescription
postIdintegerpathYesThe product post ID
post_titlestringbodyYesProduct title (max 200 characters)
post_statusstringbodyYesStatus: draft, publish, future
post_datestringbodyConditionalRequired when post_status is future. Must be a future date (GMT)
post_excerptstringbodyNoProduct short description (limited by excerpt_length filter, default 55 words)
post_contentstringbodyNoProduct long description (HTML allowed)
post_namestringbodyNoProduct URL slug
comment_statusstringbodyNoComment status (max 100 chars)
detail.fulfillment_typestringbodyYesphysical or digital
detail.variation_typestringbodyYessimple or simple_variations
detail.manage_stockintegerbodyNo0 or 1
detail.manage_downloadableintegerbodyNo0 or 1
detail.default_variation_idintegerbodyNoDefault variation ID
detail.stock_availabilitystringbodyNoStock availability status
detail.other_info.group_pricing_bystringbodyNopayment_type, repeat_interval, or none
detail.other_info.sold_individuallystringbodyNoyes or no
detail.other_info.use_pricing_tablestringbodyNoEnable pricing table display
detail.other_info.shipping_classintegerbodyNoShipping class ID (validated)
detail.other_info.tax_classintegerbodyNoTax class ID (validated)
detail.other_info.active_editorstringbodyNoActive editor mode
variantsarraybodyConditionalArray of variant objects (required for simple type when publishing)
variants.*.variation_titlestringbodyYesVariation title (max 200 chars)
variants.*.post_idintegerbodyYesParent product post ID
variants.*.item_pricenumberbodyNoPrice in cents (min: 0)
variants.*.compare_pricenumberbodyNoCompare-at price in cents (must be >= item_price)
variants.*.manage_coststringbodyNoEnable cost tracking
variants.*.item_costnumberbodyConditionalRequired if manage_cost is true
variants.*.serial_indexintegerbodyNoDisplay order index
variants.*.skustringbodyNoSKU (max 30 chars, must be unique)
variants.*.fulfillment_typestringbodyNophysical or digital
variants.*.other_info.payment_typestringbodyYesonetime or subscription
variants.*.other_info.descriptionstringbodyNoVariant description (max 255 chars)
variants.*.other_info.repeat_intervalstringbodyConditionalRequired for subscriptions. e.g., monthly, yearly
variants.*.other_info.timesstringbodyNoNumber of billing cycles
variants.*.other_info.trial_daysstringbodyNoTrial period in days (max 365)
variants.*.other_info.billing_summarystringbodyNoBilling summary text (max 255 chars)
variants.*.other_info.manage_setup_feestringbodyConditionalRequired for subscriptions: yes or no
variants.*.other_info.signup_feenumberbodyConditionalSetup fee in cents. Required if manage_setup_fee is yes
variants.*.other_info.signup_fee_namestringbodyConditionalSetup fee label (max 100 chars). Required if manage_setup_fee is yes
variants.*.other_info.installmentstringbodyNoEnable installment: yes or no
product_termsobjectbodyNoTaxonomy term IDs (e.g., {"product-categories": [1, 2]})
galleryarraybodyNoGallery images array with id, url, title
metaValuemixedbodyNoAdditional metadata

Response

json
{
  "data": { ... },
  "message": "Product updated successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/123/pricing" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "post_title": "Updated Product",
    "post_status": "publish",
    "detail": {
      "fulfillment_type": "digital",
      "variation_type": "simple"
    },
    "variants": [
      {
        "id": 789,
        "post_id": 123,
        "variation_title": "Default Plan",
        "item_price": 1999,
        "other_info": {
          "payment_type": "onetime"
        }
      }
    ]
  }'

Product Search & Lookup

Search Products by Name

GET /fluent-cart/v2/products/searchProductByName

Search for published products by name. Returns products formatted for select dropdowns.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
namestringqueryNoProduct name to search for
url_modestringqueryNoURL mode flag
termIdintegerqueryNoFilter by taxonomy term ID (product-categories)

Response

json
{
  "products": [
    {
      "ID": 123,
      "post_title": "Example Product",
      "wpTerms": [...]
    }
  ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/searchProductByName?name=widget" \
  -u "username:app_password"

Search Variants by Name

GET /fluent-cart/v2/products/searchVariantByName

Search for published product variants by name. Returns a hierarchical product > variants structure.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
namestringqueryNoProduct/variant name to search
searchstringqueryNoAlternative search parameter (used if name is empty)
idsarrayqueryNoArray of product IDs to include

Response

json
[
  {
    "value": 123,
    "label": "Example Product",
    "children": [
      {
        "value": 456,
        "label": "Monthly Plan"
      },
      {
        "value": 457,
        "label": "Yearly Plan"
      }
    ]
  }
]

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/searchVariantByName?name=pro" \
  -u "username:app_password"

Search Product Variant Options

GET /fluent-cart/v2/products/search-product-variant-options

Search for product variants suitable for selection (e.g., in order creation). Filters out out-of-stock items.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
searchstringqueryNoSearch term for product/variant title
include_idsarrayqueryNoVariation IDs to always include in results
scopesarrayqueryNoModel scopes to apply
subscription_statusstringqueryNonot_subscribable to exclude subscription variants

Response

json
{
  "products": [
    {
      "value": "product_123",
      "label": "Example Product",
      "children": [
        {
          "value": 456,
          "label": "Monthly Plan"
        }
      ]
    }
  ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/search-product-variant-options?search=pro&subscription_status=not_subscribable" \
  -u "username:app_password"

Find Subscription Variants

GET /fluent-cart/v2/products/findSubscriptionVariants

Search for product variants that have a subscription payment type.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
namestringqueryNoVariant title to search

Response

json
[
  {
    "id": 456,
    "title": "Monthly Subscription"
  },
  {
    "id": 457,
    "title": "Yearly Subscription"
  }
]

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/findSubscriptionVariants?name=monthly" \
  -u "username:app_password"

Fetch Products by IDs

GET /fluent-cart/v2/products/fetchProductsByIds

Retrieve products by an array of IDs. Returns products with their detail relation.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
productIdsarrayqueryYesArray of product IDs to fetch

Response

json
{
  "products": [
    {
      "ID": 123,
      "post_title": "Example Product",
      "detail": { ... }
    }
  ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/fetchProductsByIds?productIds[]=123&productIds[]=456" \
  -u "username:app_password"

Fetch Variations by IDs

GET /fluent-cart/v2/products/fetchVariationsByIds

Retrieve variations by an array of IDs. Returns simplified label/value pairs.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
productIdsarrayqueryYesArray of variation IDs to fetch

Response

json
{
  "products": [
    {
      "value": 456,
      "label": "Monthly Plan"
    },
    {
      "value": 457,
      "label": "Yearly Plan"
    }
  ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/fetchVariationsByIds?productIds[]=456&productIds[]=457" \
  -u "username:app_password"

Suggest SKU

GET /fluent-cart/v2/products/suggest-sku

Generate a unique SKU suggestion based on product and variant titles.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
titlestringqueryYesProduct title to base SKU on
variant_titlestringqueryNoVariant title to include in SKU
exclude_idintegerqueryNoVariation ID to exclude from uniqueness check

Response

json
{
  "sku": "EXA-PRO-MON"
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/suggest-sku?title=Example%20Product&variant_title=Monthly" \
  -u "username:app_password"

Get Max Excerpt Word Count

GET /fluent-cart/v2/products/get-max-excerpt-word-count

Returns the maximum allowed word count for product excerpts (controlled by the WordPress excerpt_length filter).

  • Permission: products/view

Parameters

None.

Response

json
{
  "count": 55
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/get-max-excerpt-word-count" \
  -u "username:app_password"

Fetch Taxonomy Terms

GET /fluent-cart/v2/products/fetch-term

Retrieve all registered taxonomies and their terms for product categorization.

  • Permission: products/view

Parameters

None.

Response

json
{
  "taxonomies": [
    {
      "name": "product-categories",
      "label": "Product Categories",
      "terms": [
        {
          "value": 1,
          "label": "Software",
          "children": []
        }
      ]
    },
    {
      "name": "product-brands",
      "label": "Product Brands",
      "terms": []
    }
  ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/fetch-term" \
  -u "username:app_password"

Fetch Terms by Parent

POST /fluent-cart/v2/products/fetch-term-by-parent

Retrieve taxonomy terms filtered by parent term IDs.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
parentsarraybodyYesArray of parent term IDs
listenersarraybodyYesArray of taxonomy names to retrieve terms for

Response

json
{
  "data": {
    "product-categories": [
      {
        "value": 5,
        "label": "Sub Category"
      }
    ]
  }
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/fetch-term-by-parent" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "parents": [1, 2],
    "listeners": ["product-categories"]
  }'

Bulk Operations

Bulk Insert Products

POST /fluent-cart/v2/products/bulk-insert

Insert multiple products at once. Maximum 10 products per request.

  • Permission: products/create

Parameters

ParameterTypeLocationRequiredDescription
productsarraybodyYesArray of product data objects (max 10)

Response

json
{
  "message": "3 product(s) created successfully",
  "created": [ ... ],
  "errors": []
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/bulk-insert" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "products": [
      {
        "post_title": "Product A",
        "detail": { "fulfillment_type": "digital" }
      },
      {
        "post_title": "Product B",
        "detail": { "fulfillment_type": "physical" }
      }
    ]
  }'

Bulk Edit Fetch

GET /fluent-cart/v2/products/bulk-edit-data

Fetch products formatted for the bulk editing spreadsheet view.

  • Permission: products/edit

Parameters

Standard filter parameters (see List Products).

Response

json
{
  "products": [ ... ],
  "columns": [ ... ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/bulk-edit-data" \
  -u "username:app_password"

Bulk Update Products

POST /fluent-cart/v2/products/bulk-update

Update multiple products at once from the bulk edit view. Maximum 10 products per request.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
productsarraybodyYesArray of product data objects to update (max 10)

Response

json
{
  "message": "3 product(s) updated successfully",
  "updated": [ ... ],
  "errors": []
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/bulk-update" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "products": [
      {
        "ID": 123,
        "post_title": "Updated Title A"
      }
    ]
  }'

Do Bulk Action

POST /fluent-cart/v2/products/do-bulk-action

Perform bulk actions on selected products (e.g., publish, draft, delete).

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
actionstringbodyYesThe bulk action to perform
product_idsarraybodyYesArray of product IDs to act on

Response

json
{
  "message": "Bulk action completed successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/do-bulk-action" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "publish",
    "product_ids": [123, 456, 789]
  }'

Create Dummy Products

POST /fluent-cart/v2/products/create-dummy

Create sample/demo products for testing or onboarding purposes.

  • Permission: products/create

Parameters

ParameterTypeLocationRequiredDescription
categorystringbodyNoProduct category for dummy products
indexintegerbodyNoIndex for dummy product generation

Response

Returns the created dummy product data.

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/create-dummy" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "digital",
    "index": 1
  }'

Product Details & Configuration

Duplicate Product

POST /fluent-cart/v2/products/{productId}/duplicate

Duplicate a product with options to include or exclude certain settings. The new product is saved as a draft.

  • Permission: products/create

Parameters

ParameterTypeLocationRequiredDescription
productIdintegerpathYesThe product ID to duplicate
import_stock_managementstringbodyNoInclude stock management settings (true/false)
import_license_settingsstringbodyNoInclude license settings (true/false)
import_downloadable_filesstringbodyNoInclude downloadable files (true/false)

Response

json
{
  "product_id": 125,
  "message": "Product duplicated successfully. The new product has been saved as a draft."
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/123/duplicate" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "import_stock_management": "true",
    "import_license_settings": "true",
    "import_downloadable_files": "false"
  }'

GET /fluent-cart/v2/products/{productId}/related-products

Retrieve products related to a given product based on shared categories or brands.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
productIdintegerpathYesThe product ID
related_by_categoriesbooleanqueryNoInclude products from same categories
related_by_brandsbooleanqueryNoInclude products from same brands
order_bystringqueryNoSort order (default: title_asc)
posts_per_pageintegerqueryNoNumber of related products to return (default: 6)

Response

json
{
  "products": [
    {
      "ID": 456,
      "post_title": "Related Product",
      "post_status": "publish"
    }
  ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/123/related-products?related_by_categories=true&posts_per_page=4" \
  -u "username:app_password"

Update Long Description Editor Mode

POST /fluent-cart/v2/products/{postId}/update-long-desc-editor-mode

Switch the long description editor between modes (e.g., visual, code).

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
postIdintegerpathYesThe product post ID
active_editorstringbodyYesThe editor mode to set

Response

json
{
  "message": "Editor mode updated successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/123/update-long-desc-editor-mode" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{"active_editor": "visual"}'

Update Variant Option

POST /fluent-cart/v2/products/{postId}/update-variant-option

Sync variant options for a product (used when managing product attribute variations).

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
postIdintegerpathYesThe product post ID
variation_typestringbodyYesThe variation type
product_idintegerbodyYesThe product ID
optionsarraybodyYesArray of option objects with id and variants

Response

json
{
  "message": "Variant options synced successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/123/update-variant-option" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "variation_type": "simple_variations",
    "product_id": 123,
    "options": []
  }'

Update Product Detail

POST /fluent-cart/v2/products/detail/{detailId}

Update a product detail record (e.g., change variation type).

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
detailIdintegerpathYesThe product detail ID
variation_typestringbodyNoNew variation type (e.g., simple, simple_variations)
variation_idsarraybodyNoArray of variation IDs
actionstringbodyNoAction to perform (default: change_variation_type)

Response

json
{
  "message": "Product detail updated successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/detail/456" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "variation_type": "simple_variations",
    "action": "change_variation_type"
  }'

Add Product Terms

POST /fluent-cart/v2/products/add-product-terms

Create new taxonomy terms for products (categories, brands, etc.).

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
term.namestringbodyYesTerm name(s), comma-separated for multiple
term.taxonomystringbodyYesTaxonomy name (e.g., product-categories, product-brands)
term.parentintegerbodyNoParent term ID for hierarchical terms

Response

json
{
  "term_ids": [10, 11],
  "names": ["Category A", "Category B"]
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/add-product-terms" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "term": {
      "name": "New Category,Another Category",
      "taxonomy": "product-categories",
      "parent": 0
    }
  }'

Sync Taxonomy Terms

POST /fluent-cart/v2/products/sync-taxonomy-term/{postId}

Sync (replace) taxonomy terms for a product.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
postIdintegerpathYesThe product post ID
taxonomystringbodyYesTaxonomy name (e.g., product-categories)
termsarraybodyNoArray of term IDs to sync

Response

json
{
  "message": "Taxonomy terms synced successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/sync-taxonomy-term/123" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "taxonomy": "product-categories",
    "terms": [1, 5, 10]
  }'

Delete Taxonomy Term

POST /fluent-cart/v2/products/delete-taxonomy-term/{postId}

Remove a specific taxonomy term from a product.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
postIdintegerpathYesThe product post ID
taxonomystringbodyYesTaxonomy name (e.g., product-categories)
termintegerbodyYesTerm ID to remove

Response

json
{
  "message": "Taxonomy term removed successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/delete-taxonomy-term/123" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "taxonomy": "product-categories",
    "term": 5
  }'

Get Pricing Widgets

GET /fluent-cart/v2/products/{productId}/pricing-widgets

Retrieve sales overview widgets for a product (all-time, last 30 days, this month).

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
productIdintegerpathYesThe product ID

Response

json
{
  "widgets": [
    {
      "title": "Quick Sales Overview",
      "body": "<ul class=\"fct-lists\"><li><span>All time (5)</span><span>$50.00</span></li>...</ul>"
    }
  ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/123/pricing-widgets" \
  -u "username:app_password"

Bundle Products

Get Bundle Info

GET /fluent-cart/v2/products/get-bundle-info/{productId}

Retrieve bundle configuration information for a product, including child variant mappings.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
productIdintegerpathYesThe product ID

Response

json
[
  {
    "id": 789,
    "variation_title": "Bundle Plan",
    "other_info": {
      "bundle_child_ids": [101, 102, 103]
    }
  }
]

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/get-bundle-info/123" \
  -u "username:app_password"

Save Bundle Info

POST /fluent-cart/v2/products/save-bundle-info/{variationId}

Save bundle child variant IDs for a variation. Bundle products cannot be added as children of other bundles.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
variationIdintegerpathYesThe variation ID to configure as a bundle
bundle_child_idsarraybodyYesArray of child variation IDs

Response

json
[true]

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/save-bundle-info/789" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "bundle_child_ids": [101, 102, 103]
  }'

Upgrade Paths

Get Upgrade Settings

GET /fluent-cart/v2/products/{id}/upgrade-paths

Retrieve all upgrade path configurations for a product.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
idintegerpathYesThe product ID

Response

json
{
  "data": [ ... ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/123/upgrade-paths" \
  -u "username:app_password"

Save Upgrade Path

POST /fluent-cart/v2/products/{id}/upgrade-path

Create a new upgrade path for a product.

  • Permission: products/edit
  • Request Class: UpgradePathSettingRequest

Parameters

ParameterTypeLocationRequiredDescription
idintegerpathYesThe product ID
from_variantintegerbodyYesSource variation ID (must exist in fct_product_variations)
to_variantsarraybodyYesArray of target variation IDs (each must exist in fct_product_variations)
discount_amountnumberbodyNoDiscount amount for the upgrade
titlestringbodyNoUpgrade path title
descriptionstringbodyNoUpgrade path description
slugstringbodyNoUpgrade path slug

Response

json
{
  "message": "Settings saved successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/123/upgrade-path" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "from_variant": 456,
    "to_variants": [457, 458],
    "discount_amount": 500
  }'

Update Upgrade Path

POST /fluent-cart/v2/products/upgrade-path/{id}/update

Update an existing upgrade path.

  • Permission: products/edit
  • Request Class: UpgradePathSettingRequest

Parameters

ParameterTypeLocationRequiredDescription
idintegerpathYesThe upgrade path ID
from_variantintegerbodyYesSource variation ID
to_variantsarraybodyYesArray of target variation IDs
discount_amountnumberbodyNoDiscount amount
titlestringbodyNoUpgrade path title
descriptionstringbodyNoUpgrade path description
slugstringbodyNoUpgrade path slug

Response

json
{
  "message": "Settings updated successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/upgrade-path/10/update" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "from_variant": 456,
    "to_variants": [458, 459],
    "discount_amount": 1000
  }'

Delete Upgrade Path

DELETE /fluent-cart/v2/products/upgrade-path/{id}/delete

Delete an upgrade path.

  • Permission: products/delete

Parameters

ParameterTypeLocationRequiredDescription
idintegerpathYesThe upgrade path ID

Response

json
{
  "message": "Path deleted successfully"
}

Example

bash
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/products/upgrade-path/10/delete" \
  -u "username:app_password"

Get Variation Upgrade Paths

GET /fluent-cart/v2/products/variation/{variantId}/upgrade-paths

Retrieve available upgrade paths for a specific variation (used in customer-facing upgrade flows).

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
variantIdintegerpathYesThe variation ID
params.order_hashstringqueryYesThe order hash to determine applicable upgrades

Response

json
{
  "upgradePaths": [ ... ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/variation/456/upgrade-paths?params[order_hash]=abc123" \
  -u "username:app_password"

Tax & Shipping Classes

Update Tax Class

POST /fluent-cart/v2/products/{postId}/tax-class

Assign a tax class to a product.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
postIdintegerpathYesThe product post ID
tax_classintegerbodyYesTax class ID

Response

json
{
  "message": "Tax Class updated successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/123/tax-class" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{"tax_class": 5}'

Remove Tax Class

POST /fluent-cart/v2/products/{postId}/tax-class/remove

Remove the assigned tax class from a product.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
postIdintegerpathYesThe product post ID

Response

json
{
  "message": "Tax Class removed successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/123/tax-class/remove" \
  -u "username:app_password"

Update Shipping Class

POST /fluent-cart/v2/products/{postId}/shipping-class

Assign a shipping class to a product.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
postIdintegerpathYesThe product post ID
shipping_classintegerbodyYesShipping class ID

Response

json
{
  "message": "Shipping Class updated successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/123/shipping-class" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{"shipping_class": 3}'

Remove Shipping Class

POST /fluent-cart/v2/products/{postId}/shipping-class/remove

Remove the assigned shipping class from a product.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
postIdintegerpathYesThe product post ID

Response

json
{
  "message": "Shipping Class removed successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/123/shipping-class/remove" \
  -u "username:app_password"

Stock Management

Update Inventory

PUT /fluent-cart/v2/products/{postId}/update-inventory/{variantId}

Update stock levels for a specific variant. Automatically updates stock status and product-level availability.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
postIdintegerpathYesThe product post ID
variantIdintegerpathYesThe variant ID to update
total_stockintegerbodyYesTotal stock quantity
availableintegerbodyYesAvailable stock quantity

Response

json
{
  "message": "Inventory updated successfully"
}

Example

bash
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/products/123/update-inventory/456" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "total_stock": 100,
    "available": 80
  }'

Update Manage Stock Setting

PUT /fluent-cart/v2/products/{postId}/update-manage-stock

Enable or disable stock management for a product and all its variants.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
postIdintegerpathYesThe product post ID
manage_stockintegerbodyYes1 to enable, 0 to disable stock management

Response

json
{
  "message": "Manage stock updated successfully"
}

Example

bash
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/products/123/update-manage-stock" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{"manage_stock": 1}'

Downloadables

Sync Downloadable Files

POST /fluent-cart/v2/products/{postId}/sync-downloadable-files

Attach multiple downloadable files to a product. Automatically enables the manage_downloadable flag.

  • Permission: products/edit
  • Validation Class: ProductDownloadableBulkFileRequest

Parameters

ParameterTypeLocationRequiredDescription
postIdintegerpathYesThe product post ID
downloadable_filesarraybodyYesArray of downloadable file objects
downloadable_files.*.titlestringbodyYesFile title (max 160 chars)
downloadable_files.*.typestringbodyYesFile type (max 100 chars)
downloadable_files.*.driverstringbodyYesStorage driver (max 60 chars, e.g., local, s3)
downloadable_files.*.file_namestringbodyYesFile name (max 185 chars)
downloadable_files.*.file_pathstringbodyYesFile path (max 185 chars)
downloadable_files.*.file_urlstringbodyYesFile URL (max 200 chars)
downloadable_files.*.bucketstringbodyNoStorage bucket name
downloadable_files.*.file_sizestringbodyNoFile size
downloadable_files.*.serialintegerbodyNoDisplay order serial
downloadable_files.*.product_variation_idarraybodyNoArray of variation IDs this file is associated with
downloadable_files.*.settings.download_limitintegerbodyNoMaximum number of downloads allowed
downloadable_files.*.settings.download_expiryintegerbodyNoDownload expiry in days

Response

json
{
  "downloadable_files": [
    {
      "id": 1,
      "post_id": 123,
      "title": "Software v1.0",
      "type": "zip",
      "driver": "local",
      "file_name": "software-v1.zip",
      "download_identifier": "a1b2c3d4-..."
    }
  ]
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/123/sync-downloadable-files" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "postId": 123,
    "downloadable_files": [
      {
        "title": "Software v1.0",
        "type": "zip",
        "driver": "local",
        "file_name": "software-v1.zip",
        "file_path": "software-v1.zip",
        "file_url": "software-v1.zip",
        "product_variation_id": [456],
        "settings": {
          "download_limit": 5,
          "download_expiry": 365
        }
      }
    ]
  }'

Update Downloadable File

PUT /fluent-cart/v2/products/{downloadableId}/update

Update an existing downloadable file record.

  • Permission: products/edit
  • Validation Class: ProductDownloadableFileRequest

Parameters

ParameterTypeLocationRequiredDescription
downloadableIdintegerpathYesThe downloadable file ID
titlestringbodyYesFile title (max 100 chars)
typestringbodyYesFile type (max 100 chars)
driverstringbodyYesStorage driver (max 100 chars)
file_namestringbodyYesFile name (max 100 chars)
product_variation_idarraybodyNoArray of variation IDs
serialintegerbodyNoDisplay order serial
settingsobjectbodyNoFile settings
settings.download_limitintegerbodyNoMaximum downloads allowed
settings.download_expiryintegerbodyNoDownload expiry in days

Response

json
{
  "message": "Product downloadable files updated successfully"
}

Example

bash
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/products/789/update" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Software v2.0",
    "type": "zip",
    "driver": "local",
    "file_name": "software-v2.zip",
    "product_variation_id": [456, 457],
    "settings": {
      "download_limit": 10
    }
  }'

Delete Downloadable File

DELETE /fluent-cart/v2/products/{downloadableId}/delete

Delete a downloadable file record.

  • Permission: products/delete

Parameters

ParameterTypeLocationRequiredDescription
downloadableIdintegerpathYesThe downloadable file ID

Response

json
{
  "message": "File deleted successfully"
}

Example

bash
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/products/789/delete" \
  -u "username:app_password"

Get Downloadable URL

GET /fluent-cart/v2/products/getDownloadableUrl/{downloadableId}

Generate a temporary download URL for a downloadable file (valid for 7 days).

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
downloadableIdintegerpathYesThe downloadable file ID

Response

json
{
  "url": "https://example.com/fluent-cart/download?token=..."
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/getDownloadableUrl/789" \
  -u "username:app_password"

Variations

List Product Variations

GET /fluent-cart/v2/products/variants

Retrieve a list of product variations.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
paramsobjectqueryNoQuery parameters for filtering variations

Response

json
{
  "variants": [ ... ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/variants" \
  -u "username:app_password"

Create Variation

POST /fluent-cart/v2/products/variants

Create a new product variation.

  • Permission: products/create
  • Request Class: ProductVariationRequest

Parameters

ParameterTypeLocationRequiredDescription
variants.post_idintegerbodyYesParent product ID
variants.variation_titlestringbodyYesVariation title (max 200 chars)
variants.skustringbodyNoSKU (max 30 chars, must be unique)
variants.item_pricenumberbodyNoPrice in cents (min: 0)
variants.compare_pricenumberbodyNoCompare-at price in cents (must be >= item_price)
variants.manage_coststringbodyNoEnable cost tracking
variants.item_costnumberbodyConditionalRequired if manage_cost is true
variants.fulfillment_typestringbodyYesphysical or digital
variants.manage_stockintegerbodyNo0 or 1
variants.stock_statusstringbodyConditionalRequired if manage_stock is 1. Values: in-stock, out-of-stock
variants.total_stockintegerbodyYesTotal stock quantity
variants.availableintegerbodyYesAvailable stock
variants.committedintegerbodyYesCommitted stock
variants.on_holdintegerbodyYesStock on hold
variants.serial_indexintegerbodyNoDisplay order index
variants.downloadablestringbodyNoDownloadable flag
variants.other_info.payment_typestringbodyYesonetime or subscription
variants.other_info.descriptionstringbodyNoDescription (max 255 chars)
variants.other_info.repeat_intervalstringbodyConditionalRequired for subscriptions (e.g., monthly, yearly)
variants.other_info.timesnumberbodyNoNumber of billing cycles
variants.other_info.trial_daysnumberbodyNoTrial days (max 365)
variants.other_info.billing_summarystringbodyNoBilling summary (max 255 chars)
variants.other_info.manage_setup_feestringbodyConditionalRequired for subscriptions: yes or no
variants.other_info.signup_feenumberbodyConditionalSetup fee in cents. Required if manage_setup_fee is yes
variants.other_info.signup_fee_namestringbodyConditionalSetup fee label (max 100 chars). Required if manage_setup_fee is yes
variants.mediaarraybodyNoMedia images array with id, url, title

Response

json
{
  "variant": {
    "id": 460,
    "post_id": 123,
    "variation_title": "Pro Plan",
    "item_price": 2999,
    "sku": "PRO-PLN",
    "stock_status": "in-stock"
  },
  "message": "Variation created successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/variants" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "variants": {
      "post_id": 123,
      "variation_title": "Pro Plan",
      "item_price": 2999,
      "sku": "PRO-PLN",
      "fulfillment_type": "digital",
      "total_stock": 1,
      "available": 1,
      "committed": 0,
      "on_hold": 0,
      "other_info": {
        "payment_type": "onetime"
      }
    }
  }'

Update Variation

POST /fluent-cart/v2/products/variants/{variantId}

Update an existing product variation.

  • Permission: products/edit
  • Request Class: ProductVariationRequest

Parameters

ParameterTypeLocationRequiredDescription
variantIdintegerpathYesThe variation ID to update

All body parameters are the same as Create Variation.

Response

json
{
  "variant": { ... },
  "message": "Variation updated successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/variants/460" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "variants": {
      "id": 460,
      "post_id": 123,
      "variation_title": "Pro Plan - Updated",
      "item_price": 3999,
      "fulfillment_type": "digital",
      "total_stock": 1,
      "available": 1,
      "committed": 0,
      "on_hold": 0,
      "other_info": {
        "payment_type": "onetime"
      }
    }
  }'

Delete Variation

DELETE /fluent-cart/v2/products/variants/{variantId}

Delete a product variation.

  • Permission: products/delete

Parameters

ParameterTypeLocationRequiredDescription
variantIdintegerpathYesThe variation ID to delete

Response

json
{
  "message": "Variation deleted successfully"
}

Example

bash
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/products/variants/460" \
  -u "username:app_password"

Set Variation Media

POST /fluent-cart/v2/products/variants/{variantId}/setMedia

Set media/images for a variation.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
variantIdintegerpathYesThe variation ID
mediaarraybodyYesArray of media objects
media.*.idintegerbodyYesWordPress attachment ID
media.*.titlestringbodyNoImage title
media.*.urlstringbodyNoImage URL

Response

json
{
  "message": "Media set successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/variants/460/setMedia" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "media": [
      {
        "id": 101,
        "title": "Product Image",
        "url": "https://example.com/wp-content/uploads/product.jpg"
      }
    ]
  }'

Update Variation Pricing Table

PUT /fluent-cart/v2/products/variants/{variantId}/pricing-table

Update the pricing table description for a variation.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
variantIdintegerpathYesThe variation ID
descriptionstringbodyYesPricing table description text (newlines preserved)

Response

json
{
  "message": "Pricing table updated successfully"
}

Example

bash
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/products/variants/460/pricing-table" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Includes:\n- Feature A\n- Feature B\n- Priority Support"
  }'

Variants (VariantController)

List All Variants

GET /fluent-cart/v2/variants

Retrieve all product variations across all products (separate route group using VariantController).

  • Permission: products/view
  • Policy: ProductPolicy

Parameters

ParameterTypeLocationRequiredDescription
paramsobjectqueryNoQuery parameters for filtering

Response

Returns an array of all product variation objects.

json
[
  {
    "id": 456,
    "post_id": 123,
    "variation_title": "Default Plan",
    "item_price": 1000,
    "sku": null,
    "stock_status": "in-stock",
    "payment_type": "onetime",
    "other_info": { ... }
  }
]

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/variants" \
  -u "username:app_password"

Product Integrations

Get Product Integration Feeds

GET /fluent-cart/v2/products/{productId}/integrations

Retrieve all integration feeds configured for a product, along with available integrations.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
productIdintegerpathYesThe product ID

Response

json
{
  "feeds": [
    {
      "id": 10,
      "name": "Add to FluentCRM List",
      "enabled": "yes",
      "provider": "fluentcrm",
      "feed": { ... },
      "scope": "product"
    }
  ],
  "available_integrations": {
    "fluentcrm": {
      "title": "FluentCRM",
      "logo": "...",
      "enabled": true,
      "scopes": ["product", "order"]
    }
  },
  "all_module_config_url": "https://example.com/wp-admin/admin.php?page=fluent-cart#/integrations"
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/123/integrations" \
  -u "username:app_password"

Get Product Integration Settings

GET /fluent-cart/v2/products/{product_id}/integrations/{integration_name}/settings

Retrieve settings for a specific integration type on a product. Returns the integration form configuration, existing settings, and product variations.

  • Permission: products/view

Parameters

ParameterTypeLocationRequiredDescription
product_idintegerpathYesThe product ID
integration_namestringpathYesIntegration provider name (e.g., fluentcrm)
integration_idintegerqueryNoExisting integration feed ID to load for editing

Response

json
{
  "settings": {
    "conditional_variation_ids": [],
    ...
  },
  "fields": [ ... ],
  "product_variations": [
    {
      "id": 456,
      "title": "Monthly Plan"
    }
  ],
  "scope": "product"
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/products/123/integrations/fluentcrm/settings" \
  -u "username:app_password"

Save Product Integration

POST /fluent-cart/v2/products/{product_id}/integrations

Create or update an integration feed for a product.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
product_idintegerpathYesThe product ID
integration_namestringbodyYesIntegration provider name
integration_idintegerbodyNoExisting feed ID (for updates)
integrationstring (JSON)bodyYesJSON-encoded integration settings object

Response

json
{
  "message": "Integration has been successfully saved",
  "integration_id": 10,
  "integration_name": "fluentcrm",
  "created": true,
  "feedData": { ... }
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/123/integrations" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "integration_name": "fluentcrm",
    "integration": "{\"name\":\"Add to List\",\"list_id\":1,\"enabled\":\"yes\"}"
  }'

Delete Product Integration

DELETE /fluent-cart/v2/products/{product_id}/integrations/{integration_id}

Delete a product integration feed.

  • Permission: products/delete

Parameters

ParameterTypeLocationRequiredDescription
product_idintegerpathYesThe product ID
integration_idintegerpathYesThe integration feed ID to delete

Response

json
{
  "message": "Integration deleted successfully"
}

Example

bash
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/products/123/integrations/10" \
  -u "username:app_password"

Change Integration Status

POST /fluent-cart/v2/products/{product_id}/integrations/feed/change-status

Enable or disable a product integration feed.

  • Permission: products/edit

Parameters

ParameterTypeLocationRequiredDescription
product_idintegerpathYesThe product ID
notification_idintegerbodyYesThe integration feed ID
statusstringbodyYesyes to enable, no to disable

Response

json
{
  "message": "Integration status has been updated"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/products/123/integrations/feed/change-status" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": 123,
    "notification_id": 10,
    "status": "yes"
  }'

FluentCart developer documentation