REST API
ProductBay registers its own REST API endpoints under the productbay/v1 namespace. All endpoints require the manage_options capability (WordPress administrator).
Internal API
These REST API endpoints are used internally by the ProductBay admin panel. They are not intended as a public API and may change in future versions. Do not build external integrations against these endpoints.
Authentication
All endpoints require:
- The user to be logged in to WordPress
- The user to have the
manage_optionscapability - A valid WordPress REST API nonce (handled automatically by the admin panel)
Base URL
/wp-json/productbay/v1/Endpoints
Tables
List All Tables
GET /wp-json/productbay/v1/tablesReturns an array of all ProductBay tables with their metadata.
Response:
[
{
"id": 1,
"title": "All Products",
"status": "publish",
"source": { "type": "all" },
"shortcode": "[productbay id=\"1\"]",
"created": "2026-01-15T10:30:00",
"modified": "2026-01-20T14:22:00"
}
]Get Single Table
GET /wp-json/productbay/v1/tables/{id}Returns full table data including configuration.
| Parameter | Type | Description |
|---|---|---|
id | integer | Table post ID |
Create / Update Table
POST /wp-json/productbay/v1/tablesCreates a new table or updates an existing one. Send the full table configuration in the request body.
| Body Parameter | Type | Description |
|---|---|---|
data | object | Complete table configuration (title, source, columns, style, settings) |
Delete Table
DELETE /wp-json/productbay/v1/tables/{id}Permanently deletes a table.
| Parameter | Type | Description |
|---|---|---|
id | integer | Table post ID |
Products
Search Products
GET /wp-json/productbay/v1/productsSearch WooCommerce products by name, ID, or SKU.
| Parameter | Type | Description |
|---|---|---|
search | string | Product name search (fuzzy match) |
include | integer | Exact product ID |
sku | string | SKU exact or prefix match |
limit | integer | Results per page (default: 10) |
page | integer | Page number (default: 1) |
List Categories
GET /wp-json/productbay/v1/categoriesReturns all WooCommerce product categories.
Response:
[
{
"id": 15,
"name": "Clothing",
"count": 42,
"slug": "clothing"
}
]Source Statistics
GET /wp-json/productbay/v1/source-statsReturns product and category counts for a source type.
| Parameter | Type | Description |
|---|---|---|
type | string | Source type: all or sale |
Response:
{
"categories": 5,
"products": 120
}Settings
Get Settings
GET /wp-json/productbay/v1/settingsReturns current plugin settings merged with defaults.
Update Settings
POST /wp-json/productbay/v1/settingsUpdates plugin settings.
| Body Parameter | Type | Description |
|---|---|---|
settings | object | Settings key-value pairs to update |
Reset All Data
POST /wp-json/productbay/v1/settings/resetDestructive Action
This endpoint deletes all tables, clears all metadata, and resets settings to defaults. This cannot be undone.
Response:
{
"success": true,
"deleted_tables": 5,
"settings": { ... }
}System
System Status
GET /wp-json/productbay/v1/system/statusReturns system information (table counts, WooCommerce status, etc.).
Mark Onboarded
POST /wp-json/productbay/v1/system/onboardMarks the onboarding process as completed.
Preview
Generate Preview
POST /wp-json/productbay/v1/previewRenders a table preview from the provided configuration. Used by the Creation Wizard's live preview feature.