0% found this document useful (0 votes)
13 views46 pages

WCFM Marketplace REST API Guide

The WCFM Marketplace REST API integrates with WordPress, allowing manipulation of vendor data through JSON requests and standard HTTP methods. It includes features for authentication, product management, order handling, and settings configuration. The document outlines the API's capabilities, including detailed product properties and examples for creating products.

Uploaded by

ialexwellim
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views46 pages

WCFM Marketplace REST API Guide

The WCFM Marketplace REST API integrates with WordPress, allowing manipulation of vendor data through JSON requests and standard HTTP methods. It includes features for authentication, product management, order handling, and settings configuration. The document outlines the API's capabilities, including detailed product properties and examples for creating products.

Uploaded by

ialexwellim
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

Introduction
Authentication
Products
Orders
Restricted Capabilities
Settings
Notifications
Errors

Introduction
WCFM Marketplace – REST API plugin fully integrates WordPress REST API with WCFM Marketplace. This allows to
manipulate vendor data using requests in JSON format and using WordPress REST API Authentication methods and
standard HTTP verbs which are understood by most HTTP clients.

Authentication

HTTP Basic Auth


You may use HTTP Basic Auth by providing the username and password.

For Basic auth you can use Basic Auth Plugin.

Occasionally some servers may not parse the Authorization header correctly (if you see a “Username is missing” error
when authenticating over SSL, you have a server issue). In this case, you may provide the username/password as query
string parameters instead.

Products
The products API allows you to create, view, update, and delete products.

[Link] Page 1 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

Product Properties

Parameter Type Description

id integer Unique identifier for the resource. READ-ONLY

name string Product name Required - Only Create.

slug string Product slug.

permalink string Product URL. READ-ONLY

date_created date -time The date the product was created, in the site’s timezone. READ-ONLY

date_created_gmt date -time The date the product was created, as GMT. READ-ONLY

date_modified date -time The date the product was last modified, in the site’s timezone. READ-ONLY

date_modified_gmt date -time The date the product was last modified, as GMT. READ-ONLY

type string Product type. Options: simple, grouped, external and variable. Default is simple.

Product status (post status). Options: draft, pending, publish. It depends on vendor
status string
publishing admin settings

featured boolean Featured product. Default is false.

catalog_visibilit
string Catalog visibility. Options: visible, catalog, search and hidden. Default is visible.
y

description string Product description.

short_description string Product short description.

sku string Unique identifier.

price string Current product price. READ-ONLY

regular_price string Product regular price.

sale_price string Product sale price.

date_on_sale_from date -time Start date of sale price, in the site’s timezone.

date_on_sale_from
date -time Start date of sale price, as GMT.
_gmt

date_on_sale_to date -time End date of sale price, in the site’s timezone.

date_on_sale_to_g
date -time End date of sale price, as GMT.
mt

[Link] Page 2 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

price_html string Price formatted in HTML. READ-ONLY

on_sale boolean Shows if the product is on sale. READ-ONLY

purchasable boolean Shows if the product can be bought. READ-ONLY

total_sales integer Amount of sales. READ-ONLY

virtual boolean If the product is virtual. Default is false.

downloadable boolean If the product is downloadable. Default is false.

downloads array List of downloadable files. See Product - Downloads properties

download_limit integer Number of times downloadable files can be downloaded after purchase. Default is -1.

download_expiry integer Number of days until access to downloadable files expires. Default is -1.

external_url string Product external URL. Only for external products.

button_text string Product external button text. Only for external products.

tax_status string Tax status. Options: taxable, shipping and none. Default is taxable.

tax_class string Tax class.

manage_stock boolean Stock management at product level. Default is false.

stock_quantity integer Stock quantity.

Controls whether or not the product is listed as “in stock” or “out of stock” on the
in_stock boolean
frontend. Default is true.

If managing stock, this controls if backorders are allowed. Options: no, notify and yes.
backorders string
Default is no.

backorders_allowe
boolean Shows if backorders are allowed. READ-ONLY
d

backordered boolean Shows if the product is on backordered. READ-ONLY

sold_individually boolean Allow one item to be bought in a single order. Default is false.

weight string Product weight.

dimensions object Product dimensions. See Product - Dimensions properties

shipping_required boolean Shows if the product need to be shipped. READ-ONLY

shipping_taxable boolean Shows whether or not the product shipping is taxable. READ-ONLY

shipping_class string Shipping class slug.

shipping_class_id string Shipping class ID. READ-ONLY

[Link] Page 3 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

reviews_allowed boolean Allow reviews. Default is true.

average_rating string Reviews average rating. READ-ONLY

rating_count integer Amount of reviews that the product have. READ-ONLY

related_ids array List of related products IDs. READ-ONLY

upsell_ids array List of up-sell products IDs.

cross_sell_ids array List of cross-sell products IDs.

parent_id integer Product parent ID.

purchase_note string Optional note to send the customer after purchase.

categories array List of categories. See Product - Categories properties Required - Only create

tags array List of tags. See Product - Tags properties

attributes array List of attributes. See Product - Attributes properties

default_attribute
array Defaults variation attributes. See Product - Default attributes properties
s

variations array List of variations IDs. READ-ONLY

grouped_products array List of grouped products ID.

menu_order integer Menu order, used to custom sort products.

meta_data array Meta data. See Product - Meta data properties

PRODUCT - DOWNLOADS PROPERTIES

Attribute Type Description

id string File MD5 hash. READ-ONLY

name string File name.

file string File URL.

PRODUCT - DIMENSIONS PROPERTIES

Attribute Type Description

length string Product length.

width string Product width.

height string Product height.

[Link] Page 4 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

PRODUCT - CATEGORIES PROPERTIES

Attribute Type Description

id integer Category ID.

name string Category name. READ-ONLY

slug string Category slug. READ-ONLY

PRODUCT - TAGS PROPERTIES

Attribute Type Description

id integer Tag ID.

name string Tag name. READ-ONLY

slug string Tag slug. READ-ONLY

PRODUCT - IMAGES PROPERTIES

Attribute Type Description

id integer Image ID.

date_created date-time The date the image was created, in the site’s timezone. READ-ONLY

date_created_gmt date-time The date the image was created, as GMT. READ-ONLY

date_modified date-time The date the image was last modified, in the site’s timezone. READ-ONLY

date_modified_gmt date-time The date the image was last modified, as GMT. READ-ONLY

src string Image URL.

name string Image name.

alt string Image alternative text.

position integer Image position. 0 means that the image is featured.

PRODUCT - ATTRIBUTES PROPERTIES

Attribute Type Description

id integer Attribute ID.

name string Attribute name.

position integer Attribute position.

Define if the attribute is visible on the “Additional information” tab in the product’s page. Default
visible boolean
is false.

[Link] Page 5 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

variatio
boolean Define if the attribute can be used as variation. Default is false.
n

options array List of available term names of the attribute.

PRODUCT - DEFAULT ATTRIBUTES PROPERTIES

Attribute Type Description

id integer Attribute ID.

name string Attribute name.

option string Selected attribute term name.

PRODUCT - META DATA PROPERTIES

Attribute Type Description

id integer Meta ID. READ-ONLY

key string Meta key.

value string Meta value.

Create a Product

<?php
$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "<site_base_url>/wp-json/wcfmmp/v1/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{
\"name\": \"TEST PRODUCT\",
\"type\": \"simple\",
\"regular_price\": \"20\",
\"description\": \"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vita
\"short_description\": \"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.\",
\"featured_image\": {
\"src\": \"[Link]
},
\"gallery_images\": [
{
\"src\": \"[Link]
},
{
\"src\": \"[Link]

[Link] Page 6 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

}
],
\"categories\": [\"37\", \"38\"]

}",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic authorization_key",
"Cache-Control: no-cache",
"Content-Type: application/json",
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}```

>JSON response example:

```json
{
"id": 311,
"name": "Test Product",
"slug": "test-product",
"post_author": "2",
"permalink": "<site_base_url>/product/test-product/",
"date_created": "2018-12-13T11:38:00",
"date_created_gmt": "2018-12-13T11:38:00",
"date_modified": "2018-12-13T11:38:03",
"date_modified_gmt": "2018-12-13T11:38:03",
"type": "simple",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vita
"short_description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>\n",
"sku": "",
"price": "20",
"regular_price": "20",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"price_html": "<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">&#8377;</span>20.00</span>",
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,

[Link] Page 7 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"stock_quantity": null,
"low_stock_amount": "",
"in_stock": true,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height": ""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0.00",
"rating_count": 0,
"related_ids": [
37,
33,
35,
32,
34
],
"upsell_ids": [],
"cross_sell_ids": [],
"parent_id": 0,
"purchase_note": "",
"categories": [
{
"id": 37,
"name": "Accessories",
"slug": "accessories"
},
{
"id": 38,
"name": "Hoodies",
"slug": "hoodies"
}
],
"tags": [],
"images": [
{
"id": 312,
"date_created": "2018-12-13T11:38:01",
"date_created_gmt": "2018-12-13T11:38:01",
"date_modified": "2018-12-13T11:38:01",
"date_modified_gmt": "2018-12-13T11:38:01",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_front-[Link]",
"name": "T_2_front-[Link]",
"alt": "",
"position": 0
},
{
"id": 313,
"date_created": "2018-12-13T11:38:02",
"date_created_gmt": "2018-12-13T11:38:02",
"date_modified": "2018-12-13T11:38:02",
"date_modified_gmt": "2018-12-13T11:38:02",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_front-[Link]",
"name": "T_2_front-[Link]",
"alt": "",

[Link] Page 8 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"position": 1
},
{
"id": 314,
"date_created": "2018-12-13T11:38:03",
"date_created_gmt": "2018-12-13T11:38:03",
"date_modified": "2018-12-13T11:38:03",
"date_modified_gmt": "2018-12-13T11:38:03",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_back-[Link]",
"name": "T_2_back-[Link]",
"alt": "",
"position": 2
}
],
"attributes": [],
"default_attributes": [],
"variations": [],
"grouped_products": [],
"menu_order": 0,
"meta_data": [
{
"id": 5990,
"key": "_catalog",
"value": "no"
},
{
"id": 5991,
"key": "disable_add_to_cart",
"value": "no"
},
{
"id": 5992,
"key": "disable_price",
"value": "no"
},
{
"id": 5993,
"key": "wcfm_policy_product_options",
"value": [
""
]
}
],
"_links": {
"self": [
{
"href": "<site_base_url>/wp-json/wcfmmp/v1/products/311"
}
],
"collection": [
{
"href": "<site_base_url>/wp-json/wcfmmp/v1/products"
}
]
}
}

This endpoint helps you to create a new product.

HTTP REQUEST

POST <site_base_url>/wp-json/wcfmmp/v1/products/

QUERY PARAMETERS

[Link] Page 9 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

Accept all parameters for a product propertiest

Get single product

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "<site_base_url>/wp-json/wcfmmp/v1/products/311",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic authorization_token",
"Cache-Control: no-cache",
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

JSON response example:

{
"id": 311,
"name": "Test Product",
"slug": "test-product",
"post_author": "2",
"permalink": "<site_base_url>/product/test-product/",
"date_created": "2018-12-13T11:38:00",
"date_created_gmt": "2018-12-13T11:38:00",
"date_modified": "2018-12-13T11:38:03",
"date_modified_gmt": "2018-12-13T11:38:03",
"type": "simple",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vita
"short_description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>\n",
"sku": "",
"price": "20",
"regular_price": "20",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,

[Link] Page 10 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"price_html": "<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">&#8377;</span>20.00</span>",
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"low_stock_amount": "",
"in_stock": true,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height": ""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0.00",
"rating_count": 0,
"related_ids": [
31,
32,
33,
38,
37
],
"upsell_ids": [],
"cross_sell_ids": [],
"parent_id": 0,
"purchase_note": "",
"categories": [
{
"id": 37,
"name": "Accessories",
"slug": "accessories"
},
{
"id": 38,
"name": "Hoodies",
"slug": "hoodies"
}
],
"tags": [],
"images": [
{
"id": 312,
"date_created": "2018-12-13T11:38:01",
"date_created_gmt": "2018-12-13T11:38:01",

[Link] Page 11 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"date_modified": "2018-12-13T11:38:01",
"date_modified_gmt": "2018-12-13T11:38:01",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_front-[Link]",
"name": "T_2_front-[Link]",
"alt": "",
"position": 0
},
{
"id": 313,
"date_created": "2018-12-13T11:38:02",
"date_created_gmt": "2018-12-13T11:38:02",
"date_modified": "2018-12-13T11:38:02",
"date_modified_gmt": "2018-12-13T11:38:02",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_front-[Link]",
"name": "T_2_front-[Link]",
"alt": "",
"position": 1
},
{
"id": 314,
"date_created": "2018-12-13T11:38:03",
"date_created_gmt": "2018-12-13T11:38:03",
"date_modified": "2018-12-13T11:38:03",
"date_modified_gmt": "2018-12-13T11:38:03",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_back-[Link]",
"name": "T_2_back-[Link]",
"alt": "",
"position": 2
}
],
"attributes": [],
"default_attributes": [],
"variations": [],
"grouped_products": [],
"menu_order": 0,
"meta_data": [
{
"id": 5990,
"key": "_catalog",
"value": "no"
},
{
"id": 5991,
"key": "disable_add_to_cart",
"value": "no"
},
{
"id": 5992,
"key": "disable_price",
"value": "no"
},
{
"id": 5993,
"key": "wcfm_policy_product_options",
"value": [
""
]
}
],
"_links": {
"self": [
{
"href": "<site_base_url>/wp-json/wcfmmp/v1/products/311"
}
],

[Link] Page 12 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"collection": [
{
"href": "<site_base_url>/wp-json/wcfmmp/v1/products"
}
]
}
}

This API lets you retrieve and view a specific product by ID.

HTTP REQUEST

GET <site_base_url>/wp-json/wcfmmp/v1/products/<id>

Get All Products

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "<site_base_url>/wp-json/wcfmmp/v1/products/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic authorization_key",
"Cache-Control: no-cache",
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

JSON response example:

[
{
"id": 311,
"name": "Test Product",
"slug": "test-product",
"post_author": "2",
"permalink": "<site_base_url>/product/test-product/",
"date_created": "2018-12-13T11:38:00",
"date_created_gmt": "2018-12-13T11:38:00",

[Link] Page 13 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"date_modified": "2018-12-13T11:38:03",
"date_modified_gmt": "2018-12-13T11:38:03",
"type": "simple",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vi
"short_description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>\n",
"sku": "",
"price": "20",
"regular_price": "20",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"price_html": "<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">&#8377;</span>20.00</span>",
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"low_stock_amount": "",
"in_stock": true,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height": ""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0.00",
"rating_count": 0,
"related_ids": [
36,
31,
33,
35,
34
],
"upsell_ids": [],
"cross_sell_ids": [],
"parent_id": 0,
"purchase_note": "",
"categories": [
{
"id": 37,
"name": "Accessories",

[Link] Page 14 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"slug": "accessories"
},
{
"id": 38,
"name": "Hoodies",
"slug": "hoodies"
}
],
"tags": [],
"images": [
{
"id": 312,
"date_created": "2018-12-13T11:38:01",
"date_created_gmt": "2018-12-13T11:38:01",
"date_modified": "2018-12-13T11:38:01",
"date_modified_gmt": "2018-12-13T11:38:01",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_front-[Link]",
"name": "T_2_front-[Link]",
"alt": "",
"position": 0
},
{
"id": 313,
"date_created": "2018-12-13T11:38:02",
"date_created_gmt": "2018-12-13T11:38:02",
"date_modified": "2018-12-13T11:38:02",
"date_modified_gmt": "2018-12-13T11:38:02",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_front-[Link]",
"name": "T_2_front-[Link]",
"alt": "",
"position": 1
},
{
"id": 314,
"date_created": "2018-12-13T11:38:03",
"date_created_gmt": "2018-12-13T11:38:03",
"date_modified": "2018-12-13T11:38:03",
"date_modified_gmt": "2018-12-13T11:38:03",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_back-[Link]",
"name": "T_2_back-[Link]",
"alt": "",
"position": 2
}
],
"attributes": [],
"default_attributes": [],
"variations": [],
"grouped_products": [],
"menu_order": 0,
"meta_data": [
{
"id": 5990,
"key": "_catalog",
"value": "no"
},
{
"id": 5991,
"key": "disable_add_to_cart",
"value": "no"
},
{
"id": 5992,
"key": "disable_price",
"value": "no"
},

[Link] Page 15 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

{
"id": 5993,
"key": "wcfm_policy_product_options",
"value": [
""
]
}
],
"_links": {
"self": [
{
"href": "<site_base_url>/wp-json/wcfmmp/v1/products/311"
}
],
"collection": [
{
"href": "<site_base_url>/wp-json/wcfmmp/v1/products"
}
]
}
},
{
"id": 31,
"name": "Beanie",
"slug": "beanie",
"post_author": "2",
"permalink": "<site_base_url>/product/beanie/",
"date_created": "2018-08-20T07:57:55",
"date_created_gmt": "2018-08-20T07:57:55",
"date_modified": "2018-08-20T07:57:55",
"date_modified_gmt": "2018-08-20T07:57:55",
"type": "simple",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vi
"short_description": "",
"sku": "",
"price": "18",
"regular_price": "20",
"sale_price": "18",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"price_html": "<del><span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">&#8377;</span>20.00</span></de
"on_sale": true,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"low_stock_amount": "",
"in_stock": true,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,

[Link] Page 16 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height": ""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0.00",
"rating_count": 0,
"related_ids": [
34,
32,
33,
311
],
"upsell_ids": [],
"cross_sell_ids": [],
"parent_id": 0,
"purchase_note": "",
"categories": [
{
"id": 37,
"name": "Accessories",
"slug": "accessories"
}
],
"tags": [],
"images": [
{
"id": 13,
"date_created": "2018-08-20T07:57:54",
"date_created_gmt": "2018-08-20T07:57:54",
"date_modified": "2018-08-20T07:57:54",
"date_modified_gmt": "2018-08-20T07:57:54",
"src": "<site_base_url>/wp-content/uploads/2018/08/[Link]",
"name": "Beanie",
"alt": "",
"position": 0
}
],
"attributes": [],
"default_attributes": [],
"variations": [],
"grouped_products": [],
"menu_order": 0,
"meta_data": [
{
"id": 75,
"key": "_customize_changeset_uuid",
"value": "c70ab6e1-48e3-43dd-875f-18b42284005f"
},
{
"id": 494,
"key": "_wcfm_product_views",
"value": "1"
}
],
"_links": {
"self": [
{

[Link] Page 17 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"href": "<site_base_url>/wp-json/wcfmmp/v1/products/31"
}
],
"collection": [
{
"href": "<site_base_url>/wp-json/wcfmmp/v1/products"
}
]
}
}
]

This endpoint retrieves all Product for authorized vendor.

HTTP REQUEST

GET <site_base_url>/wp-json/wcfmmp/v1/products/

Update a product

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "<site_base_url>/wp-json/wcfmmp/v1/products/311",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "{\n \"name\": \"Test Product Name Change\"\n}",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic authorization_token",
"Cache-Control: no-cache",
"Content-Type: application/json",
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

JSON response example:

{
"id": 311,
"name": "Test Product Name Change",

[Link] Page 18 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"slug": "test-product",
"post_author": "2",
"permalink": "<site_base_url>/product/test-product/",
"date_created": "2018-12-13T11:38:00",
"date_created_gmt": "2018-12-13T11:38:00",
"date_modified": "2018-12-13T11:38:03",
"date_modified_gmt": "2018-12-13T11:38:03",
"type": "simple",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vita
"short_description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>\n",
"sku": "",
"price": "20",
"regular_price": "20",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"price_html": "<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">&#8377;</span>20.00</span>",
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"low_stock_amount": "",
"in_stock": true,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height": ""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,
"reviews_allowed": true,
"average_rating": "0.00",
"rating_count": 0,
"related_ids": [
36,
31,
33,
35,
34
],
"upsell_ids": [],
"cross_sell_ids": [],
"parent_id": 0,

[Link] Page 19 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"purchase_note": "",
"categories": [
{
"id": 37,
"name": "Accessories",
"slug": "accessories"
},
{
"id": 38,
"name": "Hoodies",
"slug": "hoodies"
}
],
"tags": [],
"images": [
{
"id": 312,
"date_created": "2018-12-13T11:38:01",
"date_created_gmt": "2018-12-13T11:38:01",
"date_modified": "2018-12-13T11:38:01",
"date_modified_gmt": "2018-12-13T11:38:01",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_front-[Link]",
"name": "T_2_front-[Link]",
"alt": "",
"position": 0
},
{
"id": 313,
"date_created": "2018-12-13T11:38:02",
"date_created_gmt": "2018-12-13T11:38:02",
"date_modified": "2018-12-13T11:38:02",
"date_modified_gmt": "2018-12-13T11:38:02",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_front-[Link]",
"name": "T_2_front-[Link]",
"alt": "",
"position": 1
},
{
"id": 314,
"date_created": "2018-12-13T11:38:03",
"date_created_gmt": "2018-12-13T11:38:03",
"date_modified": "2018-12-13T11:38:03",
"date_modified_gmt": "2018-12-13T11:38:03",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_back-[Link]",
"name": "T_2_back-[Link]",
"alt": "",
"position": 2
}
],
"attributes": [],
"default_attributes": [],
"variations": [],
"grouped_products": [],
"menu_order": 0,
"meta_data": [
{
"id": 5990,
"key": "_catalog",
"value": "no"
},
{
"id": 5991,
"key": "disable_add_to_cart",
"value": "no"
},

[Link] Page 20 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

{
"id": 5992,
"key": "disable_price",
"value": "no"
},
{
"id": 5993,
"key": "wcfm_policy_product_options",
"value": [
""
]
}
],
"_links": {
"self": [
{
"href": "<site_base_url>/wp-json/wcfmmp/v1/products/311"
}
],
"collection": [
{
"href": "<site_base_url>/wp-json/wcfmmp/v1/products"
}
]
}
}

This API lets you make changes to a product.

HTTP REQUEST

PUT <site_base_url>/wp-json/wcfmmp/v1/products/<id>

Delete a product

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "<site_base_url>/wp-json/wcfmmp/v1/products/311",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic authorization_token",
"Cache-Control: no-cache",
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

[Link] Page 21 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

JSON response example:

{
"id": 311,
"name": "Test Product Name Change",
"slug": "test-product",
"post_author": "2",
"permalink": "<site_base_url>/product/test-product/",
"date_created": "2018-12-13T11:38:00",
"date_created_gmt": "2018-12-13T11:38:00",
"date_modified": "2018-12-13T11:38:03",
"date_modified_gmt": "2018-12-13T11:38:03",
"type": "simple",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae,
"short_description": "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>\n",
"sku": "",
"price": "20",
"regular_price": "20",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_from_gmt": null,
"date_on_sale_to": null,
"date_on_sale_to_gmt": null,
"price_html": "<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">&#8377;</span>20.00</span>",
"on_sale": false,
"purchasable": true,
"total_sales": 0,
"virtual": false,
"downloadable": false,
"downloads": [],
"download_limit": -1,
"download_expiry": -1,
"external_url": "",
"button_text": "",
"tax_status": "taxable",
"tax_class": "",
"manage_stock": false,
"stock_quantity": null,
"low_stock_amount": "",
"in_stock": true,
"backorders": "no",
"backorders_allowed": false,
"backordered": false,
"sold_individually": false,
"weight": "",
"dimensions": {
"length": "",
"width": "",
"height": ""
},
"shipping_required": true,
"shipping_taxable": true,
"shipping_class": "",
"shipping_class_id": 0,

[Link] Page 22 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"reviews_allowed": true,
"average_rating": "0.00",
"rating_count": 0,
"related_ids": [
36,
31,
33,
35,
34
],
"upsell_ids": [],
"cross_sell_ids": [],
"parent_id": 0,
"purchase_note": "",
"categories": [
{
"id": 37,
"name": "Accessories",
"slug": "accessories"
},
{
"id": 38,
"name": "Hoodies",
"slug": "hoodies"
}
],
"tags": [],
"images": [
{
"id": 312,
"date_created": "2018-12-13T11:38:01",
"date_created_gmt": "2018-12-13T11:38:01",
"date_modified": "2018-12-13T11:38:01",
"date_modified_gmt": "2018-12-13T11:38:01",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_front-[Link]",
"name": "T_2_front-[Link]",
"alt": "",
"position": 0
},
{
"id": 313,
"date_created": "2018-12-13T11:38:02",
"date_created_gmt": "2018-12-13T11:38:02",
"date_modified": "2018-12-13T11:38:02",
"date_modified_gmt": "2018-12-13T11:38:02",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_front-[Link]",
"name": "T_2_front-[Link]",
"alt": "",
"position": 1
},
{
"id": 314,
"date_created": "2018-12-13T11:38:03",
"date_created_gmt": "2018-12-13T11:38:03",
"date_modified": "2018-12-13T11:38:03",
"date_modified_gmt": "2018-12-13T11:38:03",
"src": "<site_base_url>/wp-content/uploads/2018/12/T_2_back-[Link]",
"name": "T_2_back-[Link]",
"alt": "",
"position": 2
}
],
"attributes": [],
"default_attributes": [],
"variations": [],

[Link] Page 23 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"grouped_products": [],
"menu_order": 0,
"meta_data": [
{
"id": 5990,
"key": "_catalog",
"value": "no"
},
{
"id": 5991,
"key": "disable_add_to_cart",
"value": "no"
},
{
"id": 5992,
"key": "disable_price",
"value": "no"
},
{
"id": 5993,
"key": "wcfm_policy_product_options",
"value": [
""
]
}
],
"_links": {
"self": [
{
"href": "<site_base_url>/wp-json/wcfmmp/v1/products/311"
}
],
"collection": [
{
"href": "<site_base_url>/wp-json/wcfmmp/v1/products"
}
]
}
}

This endpoint helps you to delete a product.

HTTP REQUEST

DELETE <site_base_url>/wp-json/wcfmmp/v1/products/<id>

Orders
The orders API allows you to view orders or a single order.

Order properties

Attribute Type Description

[Link] Page 24 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

id integer Unique identifier for the resource. read-only

parent_i
d integer Parent order ID.

number string Order number. read-only

order_ke
string Order key. read-only
y

created_
string Shows where the order was created. read-only
via

version integer Version of WooCommerce which last updated the order. read-only

Order status. Options: pending , processing , on-hold , completed , cancelled , refunded and fail
status string
ed . Default is pending .

Currency the order was created with, in ISO format. Options: AED , AFN , ALL , AMD , ANG , AOA , AR
S , AUD , AWG , AZN , BAM , BBD , BDT , BGN , BHD , BIF , BMD , BND , BOB , BRL , BSD , BTC , BTN , BWP , BY
R , BZD , CAD , CDF , CHF , CLP , CNY , COP , CRC , CUC , CUP , CVE , CZK , DJF , DKK , DOP , DZD , EGP , ER
N , ETB , EUR , FJD , FKP , GBP , GEL , GGP , GHS , GIP , GMD , GNF , GTQ , GYD , HKD , HNL , HRK , HTG , HU
F , IDR , ILS , IMP , INR , IQD , IRR , IRT , ISK , JEP , JMD , JOD , JPY , KES , KGS , KHR , KMF , KPW , KR
currency string
W , KWD , KYD , KZT , LAK , LBP , LKR , LRD , LSL , LYD , MAD , MDL , MGA , MKD , MMK , MNT , MOP , MRO , MU
R , MVR , MWK , MXN , MYR , MZN , NAD , NGN , NIO , NOK , NPR , NZD , OMR , PAB , PEN , PGK , PHP , PKR , PL
N , PRB , PYG , QAR , RON , RSD , RUB , RWF , SAR , SBD , SCR , SDG , SEK , SGD , SHP , SLL , SOS , SRD , SS
P , STD , SYP , SZL , THB , TJS , TMT , TND , TOP , TRY , TTD , TWD , TZS , UAH , UGX , USD , UYU , UZS , VE
F , VND , VUV , WST , XAF , XCD , XOF , XPF , YER , ZAR and ZMW . Default is USD .

date_cre date-
The date the order was created, in the site’s timezone. read-only
ated time

date_cre date-
The date the order was created, as GMT. read-only
ated_gmt time

date_mod date-
The date the order was last modified, in the site’s timezone. read-only
ified time

date_mod date-
The date the order was last modified, as GMT. read-only
ified_gmt time

discount
string Total discount amount for the order. read-only
_total

discount
string Total discount tax amount for the order. read-only
_tax

shipping
string Total shipping amount for the order. read-only
_total

shipping
string Total shipping tax amount for the order. read-only
_tax

[Link] Page 25 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

cart_tax string Sum of line item taxes only. read-only

total string Grand total. read-only

total_ta
x string Sum of all taxes. read-only

prices_i
nclude_ta boolean True the prices included tax during checkout. read-only
x

customer
integer User ID who owns the order. 0 for guests. Default is 0 .
_id

customer
_ip_addre string Customer’s IP address. read-only
ss

customer
_user_age string User agent of the customer. read-only
nt

customer
string Note left by customer during checkout.
_note

billing object Billing address.

shipping object Shipping address.

payment_
string Payment method ID.
method

payment_
method_ti string Payment method title.
tle

transact
string Unique transaction ID.
ion_id

date_pai date-
The date the order was paid, in the site’s timezone. read-only
d time

date_pai date-
The date the order was paid, as GMT. read-only
d_gmt time

date_com date-
The date the order was completed, in the site’s timezone. read-only
pleted time

date_com
date-
pleted_gm The date the order was completed, as GMT. read-only
time
t

cart_has
string MD5 hash of cart items to ensure orders are not modified. read-only

[Link] Page 26 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

meta_dat
array Meta data.
a

line_ite
array Line items data.
ms

tax_line
array Tax lines data. read-only
s

shipping
array Shipping lines data.
_lines

fee_line
array Fee lines data.
s

coupon_l
array Coupons line data.
ines

refunds array List of refunds. read-only

Define if the order is paid. It will set the status to processing and reduce stock items. Default is
set_paid boolean
false . write-only

ORDER - BILLING PROPERTIES

Attribute Type Description

first_name string First name.

last_name string Last name.

company string Company name.

address_1 string Address line 1

address_2 string Address line 2

city string City name.

state string ISO code or name of the state, province or district.

postcode string Postal code.

country string Country code in ISO 3166-1 alpha-2 format.

email string Email address.

phone string Phone number.

ORDER - SHIPPING PROPERTIES

Attribute Type Description

[Link] Page 27 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

first_name string First name.

last_name string Last name.

company string Company name.

address_1 string Address line 1

address_2 string Address line 2

city string City name.

state string ISO code or name of the state, province or district.

postcode string Postal code.

country string Country code in ISO 3166-1 alpha-2 format.

ORDER - META DATA PROPERTIES

Attribute Type Description

id integer Meta ID. read-only

key string Meta key.

value string Meta value.

ORDER - LINE ITEMS PROPERTIES

Attribute Type Description

id integer Item ID. read-only

name string Product name.

product_id integer Product ID.

variation_id integer Variation ID, if applicable.

quantity integer Quantity ordered.

tax_class integer Tax class of product.

subtotal string Line subtotal (before discounts).

subtotal_tax string Line subtotal tax (before discounts). read-only

total string Line total (after discounts).

total_tax string Line total tax (after discounts). read-only

taxes array Line taxes. read-only

[Link] Page 28 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

meta_data array Meta data.

sku string Product SKU. read-only

price string Product price. read-only

ORDER - TAX LINES PROPERTIES

Attribute Type Description

id integer Item ID. read-only

rate_code string Tax rate code. read-only

rate_id string Tax rate ID. read-only

label string Tax rate label. read-only

compound boolean Show if is a compound tax rate. read-only

tax_total string Tax total (not including shipping taxes). read-only

shipping_tax_total string Shipping tax total. read-only

meta_data array Meta data.

ORDER - SHIPPING LINES PROPERTIES

Attribute Type Description

id integer Item ID. read-only

method_title string Shipping method name.

method_id string Shipping method ID.

total string Line total (after discounts).

total_tax string Line total tax (after discounts). read-only

taxes array Line taxes. read-only

meta_data array Meta data.

ORDER - FEE LINES PROPERTIES

Attribute Type Description

id integer Item ID. read-only

name string Fee name.

tax_class string Tax class of fee.

[Link] Page 29 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

tax_status string Tax status of fee. Options: taxable and none .

total string Line total (after discounts).

total_tax string Line total tax (after discounts). read-only

taxes array Line taxes. read-only

meta_data array Meta data.

ORDER - COUPON LINES PROPERTIES

Attribute Type Description

id integer Item ID. read-only

code string Coupon code.

discount string Discount total.

discount_tax string Discount total tax. read-only

meta_data array Meta data.

ORDER - REFUNDS PROPERTIES

Attribute Type Description

id integer Refund ID. read-only

reason string Refund reason. read-only

total string Refund total. read-only

Get an Order

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "<site_base_url>/wp-json/wcfmmp/v1/orders/274",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic authorization_token",
"Cache-Control: no-cache",

[Link] Page 30 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

JSON response example:

[
{
"id": 274,
"parent_id": 0,
"status": "on-hold",
"currency": "INR",
"version": "3.5.1",
"prices_include_tax": false,
"date_created": "2018-12-07T09:08:53",
"date_modified": "2018-12-07T09:08:58",
"discount_total": "0",
"discount_tax": "0",
"shipping_total": "20.00",
"shipping_tax": "0",
"cart_tax": "0",
"total": "654.00",
"total_tax": "0",
"customer_id": 1,
"order_key": "wc_order_5c0a38a5cc476",
"billing": {
"first_name": "test",
"last_name": "name",
"company": "",
"address_1": "TEST",
"address_2": "111",
"city": "Kolkata",
"state": "WB",
"postcode": "700001",
"country": "IN",
"email": "test@[Link]",
"phone": "21111111111"
},
"shipping": {
"first_name": "test",
"last_name": "name",
"company": "",
"address_1": "PAS Road",
"address_2": "111",
"city": "Kolkata",
"state": "WB",
"postcode": "700001",
"country": "IN"
},
"payment_method": "cheque",
"payment_method_title": "Check payments",
"transaction_id": "",
"customer_ip_address": "::1",

[Link] Page 31 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"customer_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"created_via": "checkout",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash": "e053bc38a043cfc980292231c5b33318",
"number": "274",
"meta_data": [
{
"id": 5206,
"key": "_wcfmmp_order_processed",
"value": "yes"
},
{
"id": 5210,
"key": "_wcfm_new_order_notified",
"value": "yes"
}
],
"line_items": [
{
"id": 5,
"name": "Test Product",
"product_id": 257,
"variation_id": 0,
"quantity": 1,
"tax_class": "",
"subtotal": "299",
"subtotal_tax": "0",
"total": "299",
"total_tax": "0",
"taxes": [],
"meta_data": [
{
"id": 91,
"key": "_vendor_id",
"value": "2"
}
],
"sku": "",
"price": 299
},
{
"id": 6,
"name": "test prod",
"product_id": 272,
"variation_id": 0,
"quantity": 1,
"tax_class": "",
"subtotal": "299",
"subtotal_tax": "0",
"total": "299",
"total_tax": "0",
"taxes": [],
"meta_data": [
{
"id": 92,
"key": "_vendor_id",
"value": "2"
}
],
"sku": "",
"price": 299
}
],

[Link] Page 32 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"tax_lines": [],
"shipping_lines": [],
"fee_lines": [],
"coupon_lines": [],
"date_created_gmt": "2018-12-07T09:08:53",
"date_modified_gmt": "2018-12-07T09:08:58",
"date_completed_gmt": null,
"date_paid_gmt": null
}
]

This API lets you retrieve and view a specific order.

HTTP REQUEST

GET <site_base_url>/wp-json/wcfmmp/v1/orders/<id>

Get all Orders

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "<site_base_url>/wp-json/wcfmmp/v1/orders/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic authorization_token",
"Cache-Control: no-cache",
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

JSON response example:

[
{
"id": 274,
"parent_id": 0,
"status": "on-hold",
"currency": "INR",

[Link] Page 33 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"version": "3.5.1",
"prices_include_tax": false,
"date_created": "2018-12-07T09:08:53",
"date_modified": "2018-12-07T09:08:58",
"discount_total": "0",
"discount_tax": "0",
"shipping_total": "20.00",
"shipping_tax": "0",
"cart_tax": "0",
"total": "654.00",
"total_tax": "0",
"customer_id": 1,
"order_key": "wc_order_5c0a38a5cc476",
"billing": {
"first_name": "Test",
"last_name": "Name",
"company": "",
"address_1": "PAS Road",
"address_2": "69T/17",
"city": "Kolkata",
"state": "WB",
"postcode": "700033",
"country": "IN",
"email": "testname@[Link]",
"phone": "1111111111"
},
"shipping": {
"first_name": "Test",
"last_name": "Name",
"company": "",
"address_1": "PAS Road",
"address_2": "69T/17",
"city": "Kolkata",
"state": "WB",
"postcode": "700033",
"country": "IN"
},
"payment_method": "cheque",
"payment_method_title": "Check payments",
"transaction_id": "",
"customer_ip_address": "::1",
"customer_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"created_via": "checkout",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash": "e053bc38a043cfc980292231c5b33318",
"number": "274",
"meta_data": [
{
"id": 5206,
"key": "_wcfmmp_order_processed",
"value": "yes"
},
{
"id": 5210,
"key": "_wcfm_new_order_notified",
"value": "yes"
}
],
"line_items": [
{
"id": 5,
"name": "Test Product",
"product_id": 0,

[Link] Page 34 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"variation_id": 0,
"quantity": 1,
"tax_class": "",
"subtotal": "299",
"subtotal_tax": "0",
"total": "299",
"total_tax": "0",
"taxes": [],
"meta_data": [
{
"id": 91,
"key": "_vendor_id",
"value": "2"
}
],
"sku": null,
"price": 299
},
{
"id": 6,
"name": "new sadada",
"product_id": 0,
"variation_id": 0,
"quantity": 1,
"tax_class": "",
"subtotal": "299",
"subtotal_tax": "0",
"total": "299",
"total_tax": "0",
"taxes": [],
"meta_data": [
{
"id": 92,
"key": "_vendor_id",
"value": "2"
}
],
"sku": null,
"price": 299
}
],
"tax_lines": [],
"shipping_lines": [],
"fee_lines": [],
"coupon_lines": [],
"date_created_gmt": "2018-12-07T09:08:53",
"date_modified_gmt": "2018-12-07T09:08:58",
"date_completed_gmt": null,
"date_paid_gmt": null,
"vendor_order_details": {
"ID": "4",
"vendor_id": "2",
"order_id": "274",
"customer_id": "1",
"payment_method": "cheque",
"product_id": "257,272",
"variation_id": "0",
"quantity": "1",
"product_price": "299",
"purchase_price": "299",
"item_id": "5",
"item_type": "line_item",
"item_sub_total": "598",
"item_total": "598",
"shipping": "0",

[Link] Page 35 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"tax": "0",
"shipping_tax_amount": "0",
"commission_amount": "269.1",
"discount_amount": "0",
"discount_type": "",
"other_amount": "0",
"other_amount_type": "",
"withdrawal_id": "0",
"refunded_id": "0",
"refunded_amount": "0",
"withdraw_charges": "0",
"total_commission": "538.2",
"order_status": "on-hold",
"shipping_status": "pending",
"commission_status": "on-hold",
"withdraw_status": "pending",
"refund_status": "pending",
"is_refunded": "0",
"is_partially_refunded": "0",
"is_withdrawable": "1",
"is_auto_withdrawal": "0",
"is_trashed": "0",
"commission_paid_date": null,
"created": "2018-12-07 14:38:54",
"order_item_ids": "5,6",
"order_item_count": "2",
"is_refundeds": "0,0",
"refund_statuses": "pending,pending"
}
},
{
"id": 267,
"parent_id": 0,
"status": "on-hold",
"currency": "INR",
"version": "3.5.1",
"prices_include_tax": false,
"date_created": "2018-11-30T10:33:49",
"date_modified": "2018-11-30T10:33:51",
"discount_total": "0",
"discount_tax": "0",
"shipping_total": "10.00",
"shipping_tax": "0",
"cart_tax": "0",
"total": "628.00",
"total_tax": "0",
"customer_id": 1,
"order_key": "wc_order_5c01120d1cd6a",
"billing": {
"first_name": "Test",
"last_name": "Name",
"company": "",
"address_1": "PAS Road",
"address_2": "69T/17",
"city": "Kolkata",
"state": "WB",
"postcode": "700033",
"country": "IN",
"email": "testname@[Link]",
"phone": "1111111111"
},
"shipping": {
"first_name": "Test",
"last_name": "Name",
"company": "",

[Link] Page 36 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"address_1": "PAS Road",


"address_2": "69T/17",
"city": "Kolkata",
"state": "WB",
"postcode": "700033",
"country": "IN"
},
"payment_method": "cheque",
"payment_method_title": "Check payments",
"transaction_id": "",
"customer_ip_address": "::1",
"customer_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36",
"created_via": "checkout",
"customer_note": "",
"date_completed": null,
"date_paid": null,
"cart_hash": "6fa21b29ee1b5a3716a5d3fef061014d",
"number": "267",
"meta_data": [
{
"id": 4912,
"key": "_wcfmmp_order_processed",
"value": "yes"
},
{
"id": 4916,
"key": "_wcfm_new_order_notified",
"value": "yes"
}
],
"line_items": [
{
"id": 1,
"name": "Polo",
"product_id": 40,
"variation_id": 0,
"quantity": 1,
"tax_class": "",
"subtotal": "20",
"subtotal_tax": "0",
"total": "20",
"total_tax": "0",
"taxes": [],
"meta_data": [
{
"id": 36,
"key": "_vendor_id",
"value": "2"
}
],
"sku": "",
"price": 20
},
{
"id": 2,
"name": "Test Prod2",
"product_id": 0,
"variation_id": 0,
"quantity": 1,
"tax_class": "",
"subtotal": "299",
"subtotal_tax": "0",
"total": "299",
"total_tax": "0",
"taxes": [],

[Link] Page 37 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"meta_data": [
{
"id": 37,
"key": "_vendor_id",
"value": "2"
}
],
"sku": null,
"price": 299
},
{
"id": 3,
"name": "Test Product",
"product_id": 0,
"variation_id": 0,
"quantity": 1,
"tax_class": "",
"subtotal": "299",
"subtotal_tax": "0",
"total": "299",
"total_tax": "0",
"taxes": [],
"meta_data": [
{
"id": 38,
"key": "_vendor_id",
"value": "2"
}
],
"sku": null,
"price": 299
}
],
"tax_lines": [],
"shipping_lines": [],
"fee_lines": [],
"coupon_lines": [],
"date_created_gmt": "2018-11-30T10:33:49",
"date_modified_gmt": "2018-11-30T10:33:51",
"date_completed_gmt": null,
"date_paid_gmt": null,
"vendor_order_details": {
"ID": "1",
"vendor_id": "2",
"order_id": "267",
"customer_id": "1",
"payment_method": "cheque",
"product_id": "40,254,255",
"variation_id": "0",
"quantity": "1",
"product_price": "20",
"purchase_price": "20",
"item_id": "1",
"item_type": "line_item",
"item_sub_total": "618",
"item_total": "618",
"shipping": "0",
"tax": "0",
"shipping_tax_amount": "0",
"commission_amount": "18",
"discount_amount": "0",
"discount_type": "",
"other_amount": "0",
"other_amount_type": "",
"withdrawal_id": "0",

[Link] Page 38 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"refunded_id": "0",
"refunded_amount": "0",
"withdraw_charges": "0",
"total_commission": "556.2",
"order_status": "on-hold",
"shipping_status": "pending",
"commission_status": "on-hold",
"withdraw_status": "pending",
"refund_status": "pending",
"is_refunded": "0",
"is_partially_refunded": "0",
"is_withdrawable": "1",
"is_auto_withdrawal": "0",
"is_trashed": "0",
"commission_paid_date": null,
"created": "2018-11-30 16:03:49",
"order_item_ids": "1,2,3",
"order_item_count": "3",
"is_refundeds": "0,0,0",
"refund_statuses": "pending,pending,pending"
}
}
]

This API helps you to view all the orders.

HTTP REQUEST

GET <site_base_url>/wp-json/wcfmmp/v1/orders/

HTTP REQUEST WITH PAGINATION

GET <site_base_url>/wp-json/wcfmmp/v1/orders/?per_page=2&page=2

AVAILABLE PARAMETERS

Attribute Type Description

page integer Current page of the collection. Default is 1 .

per_page integer Maximum number of items to be returned in result set. Default is 10 .

search string Limit results to those matching a order number.

after string Limit response to resources published after a given ISO8601 compliant date.

before string Limit response to resources published before a given ISO8601 compliant date.

order string Order sort attribute ascending or descending. Options: ASC and DESC . Default is DESC .

Sort collection by object attribute. Options: date , order_id , include , title and slug . Default is
orderby string
order_id .

Restricted Capabilities

[Link] Page 39 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

The Restricted Capabilities API allows you to get the capabilites which are restricted for a vendor.

Get Restricted Capabilities

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "<site_base_url>/wp-json/wcfmmp/v1/restricted-capabilities/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic authorization_token",
"Cache-Control: no-cache",
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

This API allows you to get all the resticted capabilites of the vendor ie the modules which the vedors DO NOT have
pemissions to.

HTTP REQUEST

GET <site_base_url>/wp-json/wcfmmp/v1/restricted-capabilities/

JSON response example:

{
"gallery_img": "yes",
"tags": "yes",
"spacelimit": "",
"articlelimit": "",
"productlimit": "",
"featured_product_limit": "",
"gallerylimit": "",
"article_catlimit": "",
"catlimit": "",
"customerlimit": "",
"stafflimit": "",
"allowed_categories": [],
"manage_commission": "yes",
"wp_admin_view": "yes",

[Link] Page 40 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"manage_groups": "yes",
"manage_managers": "yes",
"capability_controller": "yes",
"membership": "yes"
}

Settings
The Settings API allows you to get the vendors settings by id or email.

Get Settings by Email

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "<site_base_url>/wp-json/wcfmmp/v1/settings/email/test_vendor@[Link]/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic authorization_token",
"Cache-Control: no-cache",
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

This API retrives all the settings of a vendor by the email address of the vendor.

HTTP REQUEST

GET <site_base_url>/wp-json/wcfmmp/v1/settings/email/<email>

[Link] Page 41 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

Get Settings by ID

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "<site_base_url>/wp-json/wcfmmp/v1/settings/id/2/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic authorization_token",
"Cache-Control: no-cache",
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

This API retrives all the settings of a vendor by the user id of the vendor.

HTTP REQUEST

GET <site_base_url>/wp-json/wcfmmp/v1/settings/id/<id>

JSON response example:

{
"gravatar": "",
"list_banner": "",
"banner_type": "single_img",
"banner": "",
"banner_video": "",
"banner_slider": [
{
"image": ""
}
],
"store_name": "Test Vendor Store",
"store_slug": "test_vendor_store",
"phone": "2222222222",
"shop_description": "<p><br data-mce-bogus=\"1\"></p>",
"address": {
"street_1": "PAS Road",
"street_2": "111",
"city": "Kolkata",
"zip": "700033",
"country": "IN",

[Link] Page 42 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

"state": "WB"
},
"store_name_position": "on_banner",
"store_ppp": "10",
"payment": {
"method": "paypal",
"paypal": {
"email": "test@[Link]"
},
"skrill": {
"email": ""
},
"bank": {
"ac_name": "",
"ac_number": "",
"bank_name": "",
"bank_addr": "",
"routing_number": "",
"iban": "",
"swift": "",
"ifsc": ""
}
},
"wcfmmp_shipping": {
"_wcfmmp_user_shipping_type": ""
},
"wcfmmp_shipping_by_country": {
"_wcfmmp_shipping_type_price": "",
"_wcfmmp_additional_product": "",
"_wcfmmp_additional_qty": "",
"_wcfmmp_pt": "",
"_wcfmmp_form_location": ""
},
"wcfmmp_shipping_rates": [
{
"wcfmmp_country_to": "",
"wcfmmp_country_to_price": "",
"wcfmmp_shipping_state_rates": [
{
"wcfmmp_state_to": "",
"wcfmmp_state_to_price": ""
}
]
}
],
"store_seo": {
"wcfmmp-seo-meta-title": "",
"wcfmmp-seo-meta-desc": "",
"wcfmmp-seo-meta-keywords": "",
"wcfmmp-seo-og-title": "",
"wcfmmp-seo-og-desc": "",
"wcfmmp-seo-og-image": "",
"wcfmmp-seo-twitter-title": "",
"wcfmmp-seo-twitter-desc": "",
"wcfmmp-seo-twitter-image": ""
},
"customer_support": {
"phone": "",
"email": "",
"address1": "",
"address2": "",
"country": "",
"city": "",
"state": "",
"zip": ""

[Link] Page 43 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

},
"wcfm_store_hours": {
"day_times": [
{
"start": "",
"end": ""
},
{
"start": "",
"end": ""
},
{
"start": "",
"end": ""
},
{
"start": "",
"end": ""
},
{
"start": "",
"end": ""
},
{
"start": "",
"end": ""
},
{
"start": "",
"end": ""
}
]
},
"wcfm_policy_tab_title": "",
"wcfm_shipping_policy": "",
"wcfm_refund_policy": "",
"wcfm_cancellation_policy": "",
"store_hide_email": "no",
"store_hide_phone": "no",
"store_hide_address": "no",
"wcfm_vacation_mode": "no",
"wcfm_disable_vacation_purchase": "no"
}

Notifications
The Notification API allows you to get the the notifications of the user from the site.

Get Notifications

<?php

$curl = curl_init();

[Link] Page 44 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

curl_setopt_array($curl, array(
CURLOPT_URL => "<site_base_url>/wp-json/wcfmmp/v1/notifications/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic authorization_token",
"Cache-Control: no-cache",
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

JSON response example:

[
{
"ID": "107",
"message": "#274 order status updated to On hold",
"message_type": "status-update",
"created": "2018-12-07 14:39:02"
},
{
"ID": "106",
"message": "#274 order status updated to On hold",
"message_type": "status-update",
"created": "2018-12-07 14:39:01"
},
{
"ID": "103",
"message": "You have received an Order #274 for Test Product",
"message_type": "order",
"created": "2018-12-07 14:38:58"
}
]

This API retrives all the notificaions of the users vendors/admin.

HTTP REQUEST

GET <site_base_url>/wp-json/wcfmmp/v1/notifications/

HTTP REQUEST WITH PAGINATION

GET <site_base_url>/wp-json/wcfmmp/v1/notifications/?per_page=2&page=2

AVAILABLE PARAMETERS

Attribute Type Description

[Link] Page 45 of 46
Introduction – WCFM Marketplace – REST API Reference 12/06/25, 5:23 PM

page integer Current page of the collection. Default is 1 .

per_page integer Maximum number of items to be returned in result set. Default is 10 .

notifica
tion_stat string Either to retrive read or unread notifications. Options: read and unread . Default is unread
us

The type of notification to retrive. Options: all , direct , product_review , status-update , withdra
w-request , refund-request , new_product , new_taxonomy_term , order,enquiry , support , new_staff ,
notifica
string new_customer , new_follower , registration , membership , vendor_approval , membership-reminder , m
tion_type
embership-cancel , membership-expired , vendor-disable , vendor-enable , pay_for_product , shipment
_tracking , shipment_received , verification , review . Default is all .

order string Order sort attribute ascending or descending. Options: ASC and DESC . Default is DESC .

orderby string Sort collection by object attribute. Options: ID , message_type , created . Default is ID .

Errors
The WCFM Marketplace – REST API uses the following error codes:

Error Code Meaning

400 Bad Request -- Your request is invalid.

401 Unauthorized -- Your API key is wrong.

403 Forbidden -- The kitten requested is hidden for administrators only.

404 Not Found -- The specified kitten could not be found.

405 Method Not Allowed -- You tried to access a kitten with an invalid method.

406 Not Acceptable -- You requested a format that isn't json.

410 Gone -- The kitten requested has been removed from our servers.

418 I'm a teapot.

429 Too Many Requests -- You're requesting too many kittens! Slow down!

500 Internal Server Error -- We had a problem with our server. Try again later.

503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

[Link] Page 46 of 46

You might also like