Introduction
WooCommerce (WC) 2.6+ is fully integrated with the WordPress REST API. This allows WC data to be created, read, updated, and deleted using requests in JSON format and using WordPress REST API Authentication methods and standard HTTP verbs which are understood by most HTTP clients.
The current WP REST API integration version is v3
which takes a first-order position in endpoints.
The following table shows API versions present in each major version of WooCommerce:
API Version | WC Version | WP Version | Documentation |
---|---|---|---|
v3 |
3.5.x or later | 4.4 or later | - |
v2 |
3.0.x or later | 4.4 or later | v2 docs |
v1 |
2.6.x or later | 4.4 or later | v1 docs |
Prior to 2.6, WooCommerce had a REST API separate from WordPress which is now known as the legacy API. You can find the documentation for the legacy API separately.
API Version | WC Version | WP Version | Documentation |
---|---|---|---|
Legacy v3 |
2.4.x or later | 4.1 or later | Legacy v3 docs |
Legacy v2 |
2.2.x or later | 4.1 or later | Legacy v2 docs |
Legacy v1 |
2.1.x or later | 4.1 or later | Legacy v1 docs |
Requirements
To use the latest version of the REST API you must be using:
- WooCommerce 3.5+.
- WordPress 4.4+.
- Pretty permalinks in
Settings > Permalinks
so that the custom endpoints are supported. Default permalinks will not work. - You may access the API over either HTTP or HTTPS, but HTTPS is recommended where possible.
If you use ModSecurity and see 501 Method Not Implemented
errors, see this issue for details.
Request/Response Format
The default response format is JSON. Requests with a message-body use plain JSON to set or update resource attributes. Successful requests will return a 200 OK
HTTP status.
Some general information about responses:
- Dates are returned in ISO8601 format:
YYYY-MM-DDTHH:MM:SS
- Resource IDs are returned as integers.
- Any decimal monetary amount, such as prices or totals, will be returned as strings with two decimal places.
- Other amounts, such as item counts, are returned as integers.
- Blank fields are generally included as
null
or emtpy string instead of being omitted.
JSONP Support
The WP REST API supports JSONP by default. JSONP responses use the application/javascript
content-type. You can specify the callback using the ?_jsonp
parameter for GET
requests to have the response wrapped in a JSON function:
/wp-json/wc/v3?_jsonp=callback
curl https://example.com/wp-json/wc/v3/products/tags/34?_jsonp=tagDetails \
-u consumer_key:consumer_secret
WooCommerce.get("products/tags/34?_jsonp=tagDetails")
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.log(error.response.data);
});
<?php print_r($woocommerce->get('products/tags/34', ['_jsonp' => 'tagDetails'])); ?>
print(wcapi.get("products/tags/34?_jsonp=tagDetails").json())
woocommerce.get("products/tags/34", _jsonp: "tagDetails").parsed_response
Response:
/**/tagDetails({"id":34,"name":"Leather Shoes","slug":"leather-shoes","description":"","count":0,"_links":{"self":[{"href":"https://example.com/wp-json/wc/v3/products/tags/34"}],"collection":[{"href":"https://example.com/wp-json/wc/v3/products/tags"}]}})%
Errors
Occasionally you might encounter errors when accessing the REST API. There are four possible types:
Error Code | Error Type |
---|---|
400 Bad Request |
Invalid request, e.g. using an unsupported HTTP method |
401 Unauthorized |
Authentication or permission error, e.g. incorrect API keys |
404 Not Found |
Requests to resources that don't exist or are missing |
500 Internal Server Error |
Server error |
WP REST API error example:
{
"code": "rest_no_route",
"message": "No route was found matching the URL and request method",
"data": {
"status": 404
}
}
WooCommerce REST API error example:
{
"code": "woocommerce_rest_term_invalid",
"message": "Resource doesn't exist.",
"data": {
"status": 404
}
}
Errors return both an appropriate HTTP status code and response object which contains a code
, message
and data
attribute.
Parameters
Almost all endpoints accept optional parameters which can be passed as a HTTP query string parameter, e.g. GET /orders?status=completed
. All parameters are documented along each endpoint.
Pagination
Requests that return multiple items will be paginated to 10 items by default. This default can be changed by the site administrator by changing the posts_per_page
option. Alternatively the items per page can be specified with the ?per_page
parameter:
GET /orders?per_page=15
You can specify further pages with the ?page
parameter:
GET /orders?page=2
You may also specify the offset from the first resource using the ?offset
parameter:
GET /orders?offset=5
Page number is 1-based and omitting the ?page
parameter will return the first page.
The total number of resources and pages are always included in the X-WP-Total
and X-WP-TotalPages
HTTP headers.
Link Header
Pagination info is included in the Link Header. It's recommended that you follow these values instead of building your own URLs where possible.
Link: <https://www.example.com/wp-json/wc/v3/products?page=2>; rel="next",
<https://www.example.com/wp-json/wc/v3/products?page=3>; rel="last"`
The possible rel
values are:
Value | Description |
---|---|
next |
Shows the URL of the immediate next page of results. |
last |
Shows the URL of the last page of results. |
first |
Shows the URL of the first page of results. |
prev |
Shows the URL of the immediate previous page of results. |
Libraries and Tools
Official libraries
- JavaScript Library
- PHP Library
- Python Library
- Ruby Library
// Install:
// npm install --save @woocommerce/woocommerce-rest-api
// Setup:
const WooCommerceRestApi = require("@woocommerce/woocommerce-rest-api").default;
// import WooCommerceRestApi from "@woocommerce/woocommerce-rest-api"; // Supports ESM
const WooCommerce = new WooCommerceRestApi({
url: 'http://example.com', // Your store URL
consumerKey: 'consumer_key', // Your consumer key
consumerSecret: 'consumer_secret', // Your consumer secret
version: 'wc/v3' // WooCommerce WP REST API version
});
<?php
// Install:
// composer require automattic/woocommerce
// Setup:
require __DIR__ . '/vendor/autoload.php';
use Automattic\WooCommerce\Client;
$woocommerce = new Client(
'http://example.com', // Your store URL
'consumer_key', // Your consumer key
'consumer_secret', // Your consumer secret
[
'wp_api' => true, // Enable the WP REST API integration
'version' => 'wc/v3' // WooCommerce WP REST API version
]
);
?>
# Install:
# pip install woocommerce
# Setup:
from woocommerce import API
wcapi = API(
url="http://example.com", # Your store URL
consumer_key="consumer_key", # Your consumer key
consumer_secret="consumer_secret", # Your consumer secret
wp_api=True, # Enable the WP REST API integration
version="wc/v3" # WooCommerce WP REST API version
)
# Install:
# gem install woocommerce_api
# Setup:
require "woocommerce_api"
woocommerce = WooCommerce::API.new(
"https://example.com", # Your store URL
"consumer_key", # Your consumer key
"consumer_secret", # Your consumer secret
{
wp_api: true, # Enable the WP REST API integration
version: "wc/v3" # WooCommerce WP REST API version
}
)
Third party libraries
Tools
Some useful tools you can use to access the API include:
- Insomnia - Cross-platform GraphQL and REST client, available for Mac, Windows, and Linux.
- Postman - Cross-platform REST client, available for Mac, Windows, and Linux.
- RequestBin - Allows you test webhooks.
- Hookbin - Another tool to test webhooks.
Learn more
Learn more about the REST API checking the official WordPress REST API documentation.
Authentication
WooCommerce includes two ways to authenticate with the WP REST API. It is also possible to authenticate using any WP REST API authentication plugin or method.
REST API keys
Pre-generated keys can be used to authenticate use of the REST API endpoints. New keys can be generated either through the WordPress admin interface or they can be auto-generated through an endpoint.
Generating API keys in the WordPress admin interface
To create or manage keys for a specific WordPress user, go to WooCommerce > Settings > Advanced > REST API.
Note: Keys/Apps was found at WooCommerce > Settings > API > Key/Apps prior to WooCommerce 3.4.
Click the "Add Key" button. In the next screen, add a description and select the WordPress user you would like to generate the key for. Use of the REST API with the generated keys will conform to that user's WordPress roles and capabilities.
Choose the level of access for this REST API key, which can be Read access, Write access or Read/Write access. Then click the "Generate API Key" button and WooCommerce will generate REST API keys for the selected user.
Now that keys have been generated, you should see two new keys, a QRCode, and a Revoke API Key button. These two keys are your Consumer Key and Consumer Secret.
If the WordPress user associated with an API key is deleted, the API key will cease to function. API keys are not transferred to other users.
Auto generating API keys using our Application Authentication Endpoint
This endpoint can be used by any APP to allow users to generate API keys for your APP. This makes integration with WooCommerce API easier because the user only needs to grant access to your APP via a URL. After being redirected back to your APP, the API keys will be sent back in a separate POST request.
The following image illustrates how this works:
URL parameters
Parameter | Type | Description |
---|---|---|
app_name |
string | Your APP name mandatory |
scope |
string | Level of access. Available: read , write and read_write mandatory |
user_id |
string | User ID in your APP. For your internal reference, used when the user is redirected back to your APP. NOT THE USER ID IN WOOCOMMERCE mandatory |
return_url |
string | URL the user will be redirected to after authentication mandatory |
callback_url |
string | URL that will receive the generated API key. Note: this URL should be over HTTPS mandatory |
Creating an authentication endpoint URL
You must use the /wc-auth/v1/authorize
endpoint and pass the above parameters as a query string.
Example of how to build an authentication URL:
# Bash example
STORE_URL='http://example.com'
ENDPOINT='/wc-auth/v1/authorize'
PARAMS="app_name=My App Name&scope=read_write&user_id=123&return_url=http://app.com/return-page&callback_url=https://app.com/callback-endpoint"
QUERY_STRING="$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$PARAMS")"
QUERY_STRING=$(echo $QUERY_STRING | sed -e "s/%20/\+/g" -e "s/%3D/\=/g" -e "s/%26/\&/g")
echo "$STORE_URL$ENDPOINT?$QUERY_STRING"
const querystring = require('querystring');
const store_url = 'http://example.com';
const endpoint = '/wc-auth/v1/authorize';
const params = {
app_name: 'My App Name',
scope: 'read_write',
user_id: 123,
return_url: 'http://app.com/return-page',
callback_url: 'https://app.com/callback-endpoint'
};
const query_string = querystring.stringify(params).replace(/%20/g, '+');
console.log(store_url + endpoint + '?' + query_string);
<?php
$store_url = 'http://example.com';
$endpoint = '/wc-auth/v1/authorize';
$params = [
'app_name' => 'My App Name',
'scope' => 'write',
'user_id' => 123,
'return_url' => 'http://app.com',
'callback_url' => 'https://app.com'
];
$query_string = http_build_query( $params );
echo $store_url . $endpoint . '?' . $query_string;
?>
from urllib.parse import urlencode
store_url = 'http://example.com'
endpoint = '/wc-auth/v1/authorize'
params = {
"app_name": "My App Name",
"scope": "read_write",
"user_id": 123,
"return_url": "http://app.com/return-page",
"callback_url": "https://app.com/callback-endpoint"
}
query_string = urlencode(params)
print("%s%s?%s" % (store_url, endpoint, query_string))
require "uri"
store_url = 'http://example.com'
endpoint = '/wc-auth/v1/authorize'
params = {
app_name: "My App Name",
scope: "read_write",
user_id: 123,
return_url: "http://app.com/return-page",
callback_url: "https://app.com/callback-endpoint"
}
query_string = URI.encode_www_form(params)
puts "#{store_url}#{endpoint}?#{query_string}"
Example of JSON posted with the API Keys
{
"key_id": 1,
"user_id": 123,
"consumer_key": "ck_xxxxxxxxxxxxxxxx",
"consumer_secret": "cs_xxxxxxxxxxxxxxxx",
"key_permissions": "read_write"
}
Example of the screen that the user will see:
Notes
- While redirecting the user using
return_url
, you are also sentsuccess
anduser_id
parameters as query strings. success
sends0
if the user denied, or1
if authenticated successfully.- Use
user_id
to identify the user when redirected back to the (return_url
) and also remember to save the API Keys when yourcallback_url
is posted to after auth. - The auth endpoint will send the API Keys in JSON format to the
callback_url
, so it's important to remember that some languages such as PHP will not display it inside the$_POST
global variable, in PHP you can access it using$HTTP_RAW_POST_DATA
(for old PHP versions) orfile_get_contents('php://input');
. - The URL generated must have all query string values encoded.
Authentication over HTTPS
You may use HTTP Basic Auth by providing the REST API Consumer Key as the username and the REST API Consumer Secret as the password.
HTTP Basic Auth example
curl https://www.example.com/wp-json/wc/v3/orders \
-u consumer_key:consumer_secret
const WooCommerceRestApi = require("@woocommerce/woocommerce-rest-api").default;
// import WooCommerceRestApi from "@woocommerce/woocommerce-rest-api"; // Supports ESM
const WooCommerce = new WooCommerceRestApi({
url: 'https://example.com',
consumerKey: 'consumer_key',
consumerSecret: 'consumer_secret',
version: 'wc/v3'
});
<?php
require __DIR__ . '/vendor/autoload.php';
use Automattic\WooCommerce\Client;
$woocommerce = new Client(
'https://example.com',
'consumer_key',
'consumer_secret',
[
'wp_api' => true,
'version' => 'wc/v3'
]
);
?>
from woocommerce import API
wcapi = API(
url="https://example.com",
consumer_key="consumer_key",
consumer_secret="consumer_secret",
wp_api=True,
version="wc/v3"
)
require "woocommerce_api"
woocommerce = WooCommerce::API.new(
"https://example.com",
"consumer_key",
"consumer_secret",
{
wp_json: true,
version: "wc/v3"
}
)
Occasionally some servers may not parse the Authorization header correctly (if you see a "Consumer key is missing" error when authenticating over SSL, you have a server issue). In this case, you may provide the consumer key/secret as query string parameters instead.
Example for servers that not properly parse the Authorization header:
curl https://www.example.com/wp-json/wc/v3/orders?consumer_key=123&consumer_secret=abc
const WooCommerceRestApi = require("@woocommerce/woocommerce-rest-api").default;
// import WooCommerceRestApi from "@woocommerce/woocommerce-rest-api"; // Supports ESM
const WooCommerce = new WooCommerceRestApi({
url: 'https://example.com',
consumerKey: 'consumer_key',
consumerSecret: 'consumer_secret',
version: 'wc/v3',
queryStringAuth: true // Force Basic Authentication as query string true and using under HTTPS
});
<?php
require __DIR__ . '/vendor/autoload.php';
use Automattic\WooCommerce\Client;
$woocommerce = new Client(
'https://example.com',
'consumer_key',
'consumer_secret',
[
'wp_api' => true,
'version' => 'wc/v3',
'query_string_auth' => true // Force Basic Authentication as query string true and using under HTTPS
]
);
?>
from woocommerce import API
wcapi = API(
url="https://example.com",
consumer_key="consumer_key",
consumer_secret="consumer_secret",
wp_api=True,
version="wc/v3",
query_string_auth=True // Force Basic Authentication as query string true and using under HTTPS
)
require "woocommerce_api"
woocommerce = WooCommerce::API.new(
"https://example.com",
"consumer_key",
"consumer_secret",
{
wp_json: true,
version: "wc/v3",
query_string_auth: true // Force Basic Authentication as query string true and using under HTTPS
}
)
Authentication over HTTP
You must use OAuth 1.0a "one-legged" authentication to ensure REST API credentials cannot be intercepted by an attacker. Typically you will use any standard OAuth 1.0a library in the language of your choice to handle the authentication, or generate the necessary parameters by following the following instructions.
Creating a signature
Collect the request method and URL
First you need to determine the HTTP method you will be using for the request, and the URL of the request.
The HTTP method will be GET
in our case.
The Request URL will be the endpoint you are posting to, e.g. http://www.example.com/wp-json/wc/v3/orders
.
Collect parameters
Collect and normalize your parameters. This includes all oauth_*
parameters except for the oauth_signature
itself.
These values need to be encoded into a single string which will be used later on. The process to build the string is very specific:
- Percent encode every key and value that will be signed.
- Sort the list of parameters alphabetically by encoded key.
- For each key/value pair:
- Append the encoded key to the output string.
- Append the
=
character to the output string. - Append the encoded value to the output string.
- If there are more key/value pairs remaining, append a
&
character to the output string.
When percent encoding in PHP for example, you would use rawurlencode()
.
When sorting parameters in PHP for example, you would use uksort( $params, 'strcmp' )
.
Parameters example:
oauth_consumer_key=abc123&oauth_signature_method=HMAC-SHA1
Create the signature base string
The above values collected so far must be joined to make a single string, from which the signature will be generated. This is called the signature base string in the OAuth specification.
To encode the HTTP method, request URL, and parameter string into a single string:
- Set the output string equal to the uppercase HTTP Method.
- Append the
&
character to the output string. - Percent encode the URL and append it to the output string.
- Append the
&
character to the output string. - Percent encode the parameter string and append it to the output string.
Example signature base string:
GET&http%3A%2F%2Fwww.example.com%2Fwp-json%2Fwc%2Fv3%2Forders&oauth_consumer_key%3Dabc123%26oauth_signature_method%3DHMAC-SHA1
Generate the signature
Generate the signature using the signature base string and your consumer secret key with a &
character with the HMAC-SHA1 hashing algorithm.
In PHP you can use the hash_hmac function.
HMAC-SHA1 or HMAC-SHA256 are the only accepted hash algorithms.
If you are having trouble generating a correct signature, you'll want to review the string you are signing for encoding errors. The authentication source can also be helpful in understanding how to properly generate the signature.
OAuth tips
- The OAuth parameters may be added as query string parameters or included in the Authorization header.
- Note there is no reliable cross-platform way to get the raw request headers in WordPress, so query string should be more reliable in some cases.
- The required parameters are:
oauth_consumer_key
,oauth_timestamp
,oauth_nonce
,oauth_signature
, andoauth_signature_method
.oauth_version
is not required and should be omitted. - The OAuth nonce can be any randomly generated 32 character (recommended) string that is unique to the consumer key.
- The OAuth timestamp should be the unix timestamp at the time of the request. The REST API will deny any requests that include a timestamp outside of a 15 minute window to prevent replay attacks.
- You must use the store URL provided by the index when forming the base string used for the signature, as this is what the server will use. (e.g. if the store URL includes a
www
sub-domain, you should use it for requests) - Note that the request body is not signed as per the OAuth spec.
- If including parameters in your request, it saves a lot of trouble if you can order your items alphabetically.
- Authorization header is supported starting WooCommerce 3.0.
Index
By default, the API provides information about all available endpoints on the site. Authentication is not required to access the API index.
HTTP request
/wp-json/wc/v3
curl https://example.com/wp-json/wc/v3
WooCommerce.get("")
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.log(error.response.data);
});
<?php print_r($woocommerce->get('')); ?>
print(wcapi.get("").json())
woocommerce.get("").parsed_response
JSON response example:
{
"namespace": "wc/v3",
"routes": {
"/wc/v3": {
"namespace": "wc/v3",
"methods": [
"GET"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"namespace": {
"required": false,
"default": "wc/v3"
},
"context": {
"required": false,
"default": "view"
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3"
}
},
"/wc/v3/coupons": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
},
"page": {
"required": false,
"default": 1,
"description": "Current page of the collection.",
"type": "integer"
},
"per_page": {
"required": false,
"default": 10,
"description": "Maximum number of items to be returned in result set.",
"type": "integer"
},
"search": {
"required": false,
"description": "Limit results to those matching a string.",
"type": "string"
},
"after": {
"required": false,
"description": "Limit response to resources published after a given ISO8601 compliant date.",
"type": "string"
},
"before": {
"required": false,
"description": "Limit response to resources published before a given ISO8601 compliant date.",
"type": "string"
},
"exclude": {
"required": false,
"default": [],
"description": "Ensure result set excludes specific IDs.",
"type": "array",
"items": {
"type": "integer"
}
},
"include": {
"required": false,
"default": [],
"description": "Limit result set to specific ids.",
"type": "array",
"items": {
"type": "integer"
}
},
"offset": {
"required": false,
"description": "Offset the result set by a specific number of items.",
"type": "integer"
},
"order": {
"required": false,
"default": "desc",
"enum": [
"asc",
"desc"
],
"description": "Order sort attribute ascending or descending.",
"type": "string"
},
"orderby": {
"required": false,
"default": "date",
"enum": [
"date",
"id",
"include",
"title",
"slug"
],
"description": "Sort collection by object attribute.",
"type": "string"
},
"code": {
"required": false,
"description": "Limit result set to resources with a specific code.",
"type": "string"
}
}
},
{
"methods": [
"POST"
],
"args": {
"code": {
"required": true,
"description": "Coupon code.",
"type": "string"
},
"amount": {
"required": false,
"description": "The amount of discount. Should always be numeric, even if setting a percentage.",
"type": "string"
},
"discount_type": {
"required": false,
"default": "fixed_cart",
"enum": [
"percent",
"fixed_cart",
"fixed_product"
],
"description": "Determines the type of discount that will be applied.",
"type": "string"
},
"description": {
"required": false,
"description": "Coupon description.",
"type": "string"
},
"date_expires": {
"required": false,
"description": "The date the coupon expires, in the site's timezone.",
"type": "string"
},
"date_expires_gmt": {
"required": false,
"description": "The date the coupon expires, as GMT.",
"type": "string"
},
"individual_use": {
"required": false,
"default": false,
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the cart.",
"type": "boolean"
},
"product_ids": {
"required": false,
"description": "List of product IDs the coupon can be used on.",
"type": "array",
"items": {
"type": "integer"
}
},
"excluded_product_ids": {
"required": false,
"description": "List of product IDs the coupon cannot be used on.",
"type": "array",
"items": {
"type": "integer"
}
},
"usage_limit": {
"required": false,
"description": "How many times the coupon can be used in total.",
"type": "integer"
},
"usage_limit_per_user": {
"required": false,
"description": "How many times the coupon can be used per customer.",
"type": "integer"
},
"limit_usage_to_x_items": {
"required": false,
"description": "Max number of items in the cart the coupon can be applied to.",
"type": "integer"
},
"free_shipping": {
"required": false,
"default": false,
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping.",
"type": "boolean"
},
"product_categories": {
"required": false,
"description": "List of category IDs the coupon applies to.",
"type": "array",
"items": {
"type": "integer"
}
},
"excluded_product_categories": {
"required": false,
"description": "List of category IDs the coupon does not apply to.",
"type": "array",
"items": {
"type": "integer"
}
},
"exclude_sale_items": {
"required": false,
"default": false,
"description": "If true, this coupon will not be applied to items that have sale prices.",
"type": "boolean"
},
"minimum_amount": {
"required": false,
"description": "Minimum order amount that needs to be in the cart before coupon applies.",
"type": "string"
},
"maximum_amount": {
"required": false,
"description": "Maximum order amount allowed when using the coupon.",
"type": "string"
},
"email_restrictions": {
"required": false,
"description": "List of email addresses that can use this coupon.",
"type": "array",
"items": {
"type": "string"
}
},
"meta_data": {
"required": false,
"description": "Meta data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/coupons"
}
},
"/wc/v3/coupons/(?P<id>[\\d]+)": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"code": {
"required": false,
"description": "Coupon code.",
"type": "string"
},
"amount": {
"required": false,
"description": "The amount of discount. Should always be numeric, even if setting a percentage.",
"type": "string"
},
"discount_type": {
"required": false,
"enum": [
"percent",
"fixed_cart",
"fixed_product"
],
"description": "Determines the type of discount that will be applied.",
"type": "string"
},
"description": {
"required": false,
"description": "Coupon description.",
"type": "string"
},
"date_expires": {
"required": false,
"description": "The date the coupon expires, in the site's timezone.",
"type": "string"
},
"date_expires_gmt": {
"required": false,
"description": "The date the coupon expires, as GMT.",
"type": "string"
},
"individual_use": {
"required": false,
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the cart.",
"type": "boolean"
},
"product_ids": {
"required": false,
"description": "List of product IDs the coupon can be used on.",
"type": "array",
"items": {
"type": "integer"
}
},
"excluded_product_ids": {
"required": false,
"description": "List of product IDs the coupon cannot be used on.",
"type": "array",
"items": {
"type": "integer"
}
},
"usage_limit": {
"required": false,
"description": "How many times the coupon can be used in total.",
"type": "integer"
},
"usage_limit_per_user": {
"required": false,
"description": "How many times the coupon can be used per customer.",
"type": "integer"
},
"limit_usage_to_x_items": {
"required": false,
"description": "Max number of items in the cart the coupon can be applied to.",
"type": "integer"
},
"free_shipping": {
"required": false,
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping.",
"type": "boolean"
},
"product_categories": {
"required": false,
"description": "List of category IDs the coupon applies to.",
"type": "array",
"items": {
"type": "integer"
}
},
"excluded_product_categories": {
"required": false,
"description": "List of category IDs the coupon does not apply to.",
"type": "array",
"items": {
"type": "integer"
}
},
"exclude_sale_items": {
"required": false,
"description": "If true, this coupon will not be applied to items that have sale prices.",
"type": "boolean"
},
"minimum_amount": {
"required": false,
"description": "Minimum order amount that needs to be in the cart before coupon applies.",
"type": "string"
},
"maximum_amount": {
"required": false,
"description": "Maximum order amount allowed when using the coupon.",
"type": "string"
},
"email_restrictions": {
"required": false,
"description": "List of email addresses that can use this coupon.",
"type": "array",
"items": {
"type": "string"
}
},
"meta_data": {
"required": false,
"description": "Meta data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"force": {
"required": false,
"default": false,
"description": "Whether to bypass trash and force deletion.",
"type": "boolean"
}
}
}
]
},
"/wc/v3/coupons/batch": {
"namespace": "wc/v3",
"methods": [
"POST",
"PUT",
"PATCH"
],
"endpoints": [
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"code": {
"required": false,
"description": "Coupon code.",
"type": "string"
},
"amount": {
"required": false,
"description": "The amount of discount. Should always be numeric, even if setting a percentage.",
"type": "string"
},
"discount_type": {
"required": false,
"enum": [
"percent",
"fixed_cart",
"fixed_product"
],
"description": "Determines the type of discount that will be applied.",
"type": "string"
},
"description": {
"required": false,
"description": "Coupon description.",
"type": "string"
},
"date_expires": {
"required": false,
"description": "The date the coupon expires, in the site's timezone.",
"type": "string"
},
"date_expires_gmt": {
"required": false,
"description": "The date the coupon expires, as GMT.",
"type": "string"
},
"individual_use": {
"required": false,
"description": "If true, the coupon can only be used individually. Other applied coupons will be removed from the cart.",
"type": "boolean"
},
"product_ids": {
"required": false,
"description": "List of product IDs the coupon can be used on.",
"type": "array",
"items": {
"type": "integer"
}
},
"excluded_product_ids": {
"required": false,
"description": "List of product IDs the coupon cannot be used on.",
"type": "array",
"items": {
"type": "integer"
}
},
"usage_limit": {
"required": false,
"description": "How many times the coupon can be used in total.",
"type": "integer"
},
"usage_limit_per_user": {
"required": false,
"description": "How many times the coupon can be used per customer.",
"type": "integer"
},
"limit_usage_to_x_items": {
"required": false,
"description": "Max number of items in the cart the coupon can be applied to.",
"type": "integer"
},
"free_shipping": {
"required": false,
"description": "If true and if the free shipping method requires a coupon, this coupon will enable free shipping.",
"type": "boolean"
},
"product_categories": {
"required": false,
"description": "List of category IDs the coupon applies to.",
"type": "array",
"items": {
"type": "integer"
}
},
"excluded_product_categories": {
"required": false,
"description": "List of category IDs the coupon does not apply to.",
"type": "array",
"items": {
"type": "integer"
}
},
"exclude_sale_items": {
"required": false,
"description": "If true, this coupon will not be applied to items that have sale prices.",
"type": "boolean"
},
"minimum_amount": {
"required": false,
"description": "Minimum order amount that needs to be in the cart before coupon applies.",
"type": "string"
},
"maximum_amount": {
"required": false,
"description": "Maximum order amount allowed when using the coupon.",
"type": "string"
},
"email_restrictions": {
"required": false,
"description": "List of email addresses that can use this coupon.",
"type": "array",
"items": {
"type": "string"
}
},
"meta_data": {
"required": false,
"description": "Meta data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/coupons/batch"
}
},
"/wc/v3/customers/(?P<customer_id>[\\d]+)/downloads": {
"namespace": "wc/v3",
"methods": [
"GET"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"customer_id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
}
]
},
"/wc/v3/customers": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
},
"page": {
"required": false,
"default": 1,
"description": "Current page of the collection.",
"type": "integer"
},
"per_page": {
"required": false,
"default": 10,
"description": "Maximum number of items to be returned in result set.",
"type": "integer"
},
"search": {
"required": false,
"description": "Limit results to those matching a string.",
"type": "string"
},
"exclude": {
"required": false,
"default": [],
"description": "Ensure result set excludes specific IDs.",
"type": "array",
"items": {
"type": "integer"
}
},
"include": {
"required": false,
"default": [],
"description": "Limit result set to specific IDs.",
"type": "array",
"items": {
"type": "integer"
}
},
"offset": {
"required": false,
"description": "Offset the result set by a specific number of items.",
"type": "integer"
},
"order": {
"required": false,
"default": "asc",
"enum": [
"asc",
"desc"
],
"description": "Order sort attribute ascending or descending.",
"type": "string"
},
"orderby": {
"required": false,
"default": "name",
"enum": [
"id",
"include",
"name",
"registered_date"
],
"description": "Sort collection by object attribute.",
"type": "string"
},
"email": {
"required": false,
"description": "Limit result set to resources with a specific email.",
"type": "string"
},
"role": {
"required": false,
"default": "customer",
"enum": [
"all",
"administrator",
"editor",
"author",
"contributor",
"subscriber",
"customer",
"shop_manager"
],
"description": "Limit result set to resources with a specific role.",
"type": "string"
}
}
},
{
"methods": [
"POST"
],
"args": {
"email": {
"required": true,
"description": "New user email address.",
"type": "string"
},
"first_name": {
"required": false,
"description": "Customer first name.",
"type": "string"
},
"last_name": {
"required": false,
"description": "Customer last name.",
"type": "string"
},
"username": {
"required": false,
"description": "New user username.",
"type": "string"
},
"password": {
"required": false,
"description": "New user password.",
"type": "string"
},
"billing": {
"required": false,
"description": "List of billing address data.",
"type": "object"
},
"shipping": {
"required": false,
"description": "List of shipping address data.",
"type": "object"
},
"meta_data": {
"required": false,
"description": "Meta data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/customers"
}
},
"/wc/v3/customers/(?P<id>[\\d]+)": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"email": {
"required": false,
"description": "The email address for the customer.",
"type": "string"
},
"first_name": {
"required": false,
"description": "Customer first name.",
"type": "string"
},
"last_name": {
"required": false,
"description": "Customer last name.",
"type": "string"
},
"username": {
"required": false,
"description": "Customer login name.",
"type": "string"
},
"password": {
"required": false,
"description": "Customer password.",
"type": "string"
},
"billing": {
"required": false,
"description": "List of billing address data.",
"type": "object"
},
"shipping": {
"required": false,
"description": "List of shipping address data.",
"type": "object"
},
"meta_data": {
"required": false,
"description": "Meta data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"force": {
"required": false,
"default": false,
"description": "Required to be true, as resource does not support trashing.",
"type": "boolean"
},
"reassign": {
"required": false,
"default": 0,
"description": "ID to reassign posts to.",
"type": "integer"
}
}
}
]
},
"/wc/v3/customers/batch": {
"namespace": "wc/v3",
"methods": [
"POST",
"PUT",
"PATCH"
],
"endpoints": [
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"email": {
"required": false,
"description": "The email address for the customer.",
"type": "string"
},
"first_name": {
"required": false,
"description": "Customer first name.",
"type": "string"
},
"last_name": {
"required": false,
"description": "Customer last name.",
"type": "string"
},
"username": {
"required": false,
"description": "Customer login name.",
"type": "string"
},
"password": {
"required": false,
"description": "Customer password.",
"type": "string"
},
"billing": {
"required": false,
"description": "List of billing address data.",
"type": "object"
},
"shipping": {
"required": false,
"description": "List of shipping address data.",
"type": "object"
},
"meta_data": {
"required": false,
"description": "Meta data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/customers/batch"
}
},
"/wc/v3/orders/(?P<order_id>[\\d]+)/notes": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"order_id": {
"required": false,
"description": "The order ID.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
},
"type": {
"required": false,
"default": "any",
"enum": [
"any",
"customer",
"internal"
],
"description": "Limit result to customers or internal notes.",
"type": "string"
}
}
},
{
"methods": [
"POST"
],
"args": {
"order_id": {
"required": false,
"description": "The order ID.",
"type": "integer"
},
"note": {
"required": true,
"description": "Order note content.",
"type": "string"
},
"customer_note": {
"required": false,
"default": false,
"description": "If true, the note will be shown to customers and they will be notified. If false, the note will be for admin reference only.",
"type": "boolean"
}
}
}
]
},
"/wc/v3/orders/(?P<order_id>[\\d]+)/notes/(?P<id>[\\d]+)": {
"namespace": "wc/v3",
"methods": [
"GET",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"order_id": {
"required": false,
"description": "The order ID.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"order_id": {
"required": false,
"description": "The order ID.",
"type": "integer"
},
"force": {
"required": false,
"default": false,
"description": "Required to be true, as resource does not support trashing.",
"type": "boolean"
}
}
}
]
},
"/wc/v3/orders/(?P<order_id>[\\d]+)/refunds": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"order_id": {
"required": false,
"description": "The order ID.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
},
"page": {
"required": false,
"default": 1,
"description": "Current page of the collection.",
"type": "integer"
},
"per_page": {
"required": false,
"default": 10,
"description": "Maximum number of items to be returned in result set.",
"type": "integer"
},
"search": {
"required": false,
"description": "Limit results to those matching a string.",
"type": "string"
},
"after": {
"required": false,
"description": "Limit response to resources published after a given ISO8601 compliant date.",
"type": "string"
},
"before": {
"required": false,
"description": "Limit response to resources published before a given ISO8601 compliant date.",
"type": "string"
},
"exclude": {
"required": false,
"default": [],
"description": "Ensure result set excludes specific IDs.",
"type": "array",
"items": {
"type": "integer"
}
},
"include": {
"required": false,
"default": [],
"description": "Limit result set to specific ids.",
"type": "array",
"items": {
"type": "integer"
}
},
"offset": {
"required": false,
"description": "Offset the result set by a specific number of items.",
"type": "integer"
},
"order": {
"required": false,
"default": "desc",
"enum": [
"asc",
"desc"
],
"description": "Order sort attribute ascending or descending.",
"type": "string"
},
"orderby": {
"required": false,
"default": "date",
"enum": [
"date",
"id",
"include",
"title",
"slug"
],
"description": "Sort collection by object attribute.",
"type": "string"
},
"parent": {
"required": false,
"default": [],
"description": "Limit result set to those of particular parent IDs.",
"type": "array",
"items": {
"type": "integer"
}
},
"parent_exclude": {
"required": false,
"default": [],
"description": "Limit result set to all items except those of a particular parent ID.",
"type": "array",
"items": {
"type": "integer"
}
},
"dp": {
"required": false,
"default": 2,
"description": "Number of decimal points to use in each resource.",
"type": "integer"
}
}
},
{
"methods": [
"POST"
],
"args": {
"order_id": {
"required": false,
"description": "The order ID.",
"type": "integer"
},
"amount": {
"required": false,
"description": "Refund amount.",
"type": "string"
},
"reason": {
"required": false,
"description": "Reason for refund.",
"type": "string"
},
"refunded_by": {
"required": false,
"description": "User ID of user who created the refund.",
"type": "integer"
},
"meta_data": {
"required": false,
"description": "Meta data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"line_items": {
"required": false,
"description": "Line items data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Item ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"name": {
"description": "Product name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"product_id": {
"description": "Product ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"variation_id": {
"description": "Variation ID, if applicable.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"quantity": {
"description": "Quantity ordered.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"tax_class": {
"description": "Tax class of product.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"subtotal": {
"description": "Line subtotal (before discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"subtotal_tax": {
"description": "Line subtotal tax (before discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"total": {
"description": "Line total (after discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"total_tax": {
"description": "Line total tax (after discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"taxes": {
"description": "Line taxes.",
"type": "array",
"context": [
"view",
"edit"
],
"readonly": true,
"items": {
"type": "object",
"properties": {
"id": {
"description": "Tax rate ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"total": {
"description": "Tax total.",
"type": "string",
"context": [
"view",
"edit"
]
},
"subtotal": {
"description": "Tax subtotal.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"meta_data": {
"description": "Meta data.",
"type": "array",
"context": [
"view",
"edit"
],
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"sku": {
"description": "Product SKU.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"price": {
"description": "Product price.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"api_refund": {
"required": false,
"default": true,
"description": "When true, the payment gateway API is used to generate the refund.",
"type": "boolean"
}
}
}
]
},
"/wc/v3/orders/(?P<order_id>[\\d]+)/refunds/(?P<id>[\\d]+)": {
"namespace": "wc/v3",
"methods": [
"GET",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"order_id": {
"required": false,
"description": "The order ID.",
"type": "integer"
},
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"order_id": {
"required": false,
"description": "The order ID.",
"type": "integer"
},
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"force": {
"required": false,
"default": true,
"description": "Required to be true, as resource does not support trashing.",
"type": "boolean"
}
}
}
]
},
"/wc/v3/orders": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
},
"page": {
"required": false,
"default": 1,
"description": "Current page of the collection.",
"type": "integer"
},
"per_page": {
"required": false,
"default": 10,
"description": "Maximum number of items to be returned in result set.",
"type": "integer"
},
"search": {
"required": false,
"description": "Limit results to those matching a string.",
"type": "string"
},
"after": {
"required": false,
"description": "Limit response to resources published after a given ISO8601 compliant date.",
"type": "string"
},
"before": {
"required": false,
"description": "Limit response to resources published before a given ISO8601 compliant date.",
"type": "string"
},
"exclude": {
"required": false,
"default": [],
"description": "Ensure result set excludes specific IDs.",
"type": "array",
"items": {
"type": "integer"
}
},
"include": {
"required": false,
"default": [],
"description": "Limit result set to specific ids.",
"type": "array",
"items": {
"type": "integer"
}
},
"offset": {
"required": false,
"description": "Offset the result set by a specific number of items.",
"type": "integer"
},
"order": {
"required": false,
"default": "desc",
"enum": [
"asc",
"desc"
],
"description": "Order sort attribute ascending or descending.",
"type": "string"
},
"orderby": {
"required": false,
"default": "date",
"enum": [
"date",
"id",
"include",
"title",
"slug"
],
"description": "Sort collection by object attribute.",
"type": "string"
},
"parent": {
"required": false,
"default": [],
"description": "Limit result set to those of particular parent IDs.",
"type": "array",
"items": {
"type": "integer"
}
},
"parent_exclude": {
"required": false,
"default": [],
"description": "Limit result set to all items except those of a particular parent ID.",
"type": "array",
"items": {
"type": "integer"
}
},
"status": {
"required": false,
"default": "any",
"enum": [
"any",
"pending",
"processing",
"on-hold",
"completed",
"cancelled",
"refunded",
"failed"
],
"description": "Limit result set to orders assigned a specific status.",
"type": "string"
},
"customer": {
"required": false,
"description": "Limit result set to orders assigned a specific customer.",
"type": "integer"
},
"product": {
"required": false,
"description": "Limit result set to orders assigned a specific product.",
"type": "integer"
},
"dp": {
"required": false,
"default": 2,
"description": "Number of decimal points to use in each resource.",
"type": "integer"
}
}
},
{
"methods": [
"POST"
],
"args": {
"parent_id": {
"required": false,
"description": "Parent order ID.",
"type": "integer"
},
"status": {
"required": false,
"default": "pending",
"enum": [
"pending",
"processing",
"on-hold",
"completed",
"cancelled",
"refunded",
"failed"
],
"description": "Order status.",
"type": "string"
},
"currency": {
"required": false,
"default": "USD",
"enum": [
"AED",
"AFN",
"ALL",
"AMD",
"ANG",
"AOA",
"ARS",
"AUD",
"AWG",
"AZN",
"BAM",
"BBD",
"BDT",
"BGN",
"BHD",
"BIF",
"BMD",
"BND",
"BOB",
"BRL",
"BSD",
"BTC",
"BTN",
"BWP",
"BYR",
"BZD",
"CAD",
"CDF",
"CHF",
"CLP",
"CNY",
"COP",
"CRC",
"CUC",
"CUP",
"CVE",
"CZK",
"DJF",
"DKK",
"DOP",
"DZD",
"EGP",
"ERN",
"ETB",
"EUR",
"FJD",
"FKP",
"GBP",
"GEL",
"GGP",
"GHS",
"GIP",
"GMD",
"GNF",
"GTQ",
"GYD",
"HKD",
"HNL",
"HRK",
"HTG",
"HUF",
"IDR",
"ILS",
"IMP",
"INR",
"IQD",
"IRR",
"IRT",
"ISK",
"JEP",
"JMD",
"JOD",
"JPY",
"KES",
"KGS",
"KHR",
"KMF",
"KPW",
"KRW",
"KWD",
"KYD",
"KZT",
"LAK",
"LBP",
"LKR",
"LRD",
"LSL",
"LYD",
"MAD",
"MDL",
"MGA",
"MKD",
"MMK",
"MNT",
"MOP",
"MRO",
"MUR",
"MVR",
"MWK",
"MXN",
"MYR",
"MZN",
"NAD",
"NGN",
"NIO",
"NOK",
"NPR",
"NZD",
"OMR",
"PAB",
"PEN",
"PGK",
"PHP",
"PKR",
"PLN",
"PRB",
"PYG",
"QAR",
"RON",
"RSD",
"RUB",
"RWF",
"SAR",
"SBD",
"SCR",
"SDG",
"SEK",
"SGD",
"SHP",
"SLL",
"SOS",
"SRD",
"SSP",
"STD",
"SYP",
"SZL",
"THB",
"TJS",
"TMT",
"TND",
"TOP",
"TRY",
"TTD",
"TWD",
"TZS",
"UAH",
"UGX",
"USD",
"UYU",
"UZS",
"VEF",
"VND",
"VUV",
"WST",
"XAF",
"XCD",
"XOF",
"XPF",
"YER",
"ZAR",
"ZMW"
],
"description": "Currency the order was created with, in ISO format.",
"type": "string"
},
"customer_id": {
"required": false,
"default": 0,
"description": "User ID who owns the order. 0 for guests.",
"type": "integer"
},
"customer_note": {
"required": false,
"description": "Note left by customer during checkout.",
"type": "string"
},
"billing": {
"required": false,
"description": "Billing address.",
"type": "object"
},
"shipping": {
"required": false,
"description": "Shipping address.",
"type": "object"
},
"payment_method": {
"required": false,
"description": "Payment method ID.",
"type": "string"
},
"payment_method_title": {
"required": false,
"description": "Payment method title.",
"type": "string"
},
"transaction_id": {
"required": false,
"description": "Unique transaction ID.",
"type": "string"
},
"meta_data": {
"required": false,
"description": "Meta data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"line_items": {
"required": false,
"description": "Line items data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Item ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"name": {
"description": "Product name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"product_id": {
"description": "Product ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"variation_id": {
"description": "Variation ID, if applicable.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"quantity": {
"description": "Quantity ordered.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"tax_class": {
"description": "Tax class of product.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"subtotal": {
"description": "Line subtotal (before discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"subtotal_tax": {
"description": "Line subtotal tax (before discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"total": {
"description": "Line total (after discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"total_tax": {
"description": "Line total tax (after discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"taxes": {
"description": "Line taxes.",
"type": "array",
"context": [
"view",
"edit"
],
"readonly": true,
"items": {
"type": "object",
"properties": {
"id": {
"description": "Tax rate ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"total": {
"description": "Tax total.",
"type": "string",
"context": [
"view",
"edit"
]
},
"subtotal": {
"description": "Tax subtotal.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"meta_data": {
"description": "Meta data.",
"type": "array",
"context": [
"view",
"edit"
],
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"sku": {
"description": "Product SKU.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"price": {
"description": "Product price.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"shipping_lines": {
"required": false,
"description": "Shipping lines data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Item ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"method_title": {
"description": "Shipping method name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"method_id": {
"description": "Shipping method ID.",
"type": "string",
"context": [
"view",
"edit"
]
},
"total": {
"description": "Line total (after discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"total_tax": {
"description": "Line total tax (after discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"taxes": {
"description": "Line taxes.",
"type": "array",
"context": [
"view",
"edit"
],
"readonly": true,
"items": {
"type": "object",
"properties": {
"id": {
"description": "Tax rate ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"total": {
"description": "Tax total.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"meta_data": {
"description": "Meta data.",
"type": "array",
"context": [
"view",
"edit"
],
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
},
"fee_lines": {
"required": false,
"description": "Fee lines data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Item ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"name": {
"description": "Fee name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"tax_class": {
"description": "Tax class of fee.",
"type": "string",
"context": [
"view",
"edit"
]
},
"tax_status": {
"description": "Tax status of fee.",
"type": "string",
"context": [
"view",
"edit"
],
"enum": [
"taxable",
"none"
]
},
"total": {
"description": "Line total (after discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"total_tax": {
"description": "Line total tax (after discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"taxes": {
"description": "Line taxes.",
"type": "array",
"context": [
"view",
"edit"
],
"readonly": true,
"items": {
"type": "object",
"properties": {
"id": {
"description": "Tax rate ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"total": {
"description": "Tax total.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"subtotal": {
"description": "Tax subtotal.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"meta_data": {
"description": "Meta data.",
"type": "array",
"context": [
"view",
"edit"
],
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
},
"coupon_lines": {
"required": false,
"description": "Coupons line data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Item ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"code": {
"description": "Coupon code.",
"type": "string",
"context": [
"view",
"edit"
]
},
"discount": {
"description": "Discount total.",
"type": "string",
"context": [
"view",
"edit"
]
},
"discount_tax": {
"description": "Discount total tax.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"meta_data": {
"description": "Meta data.",
"type": "array",
"context": [
"view",
"edit"
],
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
},
"set_paid": {
"required": false,
"default": false,
"description": "Define if the order is paid. It will set the status to processing and reduce stock items.",
"type": "boolean"
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/orders"
}
},
"/wc/v3/orders/(?P<id>[\\d]+)": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"parent_id": {
"required": false,
"description": "Parent order ID.",
"type": "integer"
},
"status": {
"required": false,
"enum": [
"pending",
"processing",
"on-hold",
"completed",
"cancelled",
"refunded",
"failed"
],
"description": "Order status.",
"type": "string"
},
"currency": {
"required": false,
"enum": [
"AED",
"AFN",
"ALL",
"AMD",
"ANG",
"AOA",
"ARS",
"AUD",
"AWG",
"AZN",
"BAM",
"BBD",
"BDT",
"BGN",
"BHD",
"BIF",
"BMD",
"BND",
"BOB",
"BRL",
"BSD",
"BTC",
"BTN",
"BWP",
"BYR",
"BZD",
"CAD",
"CDF",
"CHF",
"CLP",
"CNY",
"COP",
"CRC",
"CUC",
"CUP",
"CVE",
"CZK",
"DJF",
"DKK",
"DOP",
"DZD",
"EGP",
"ERN",
"ETB",
"EUR",
"FJD",
"FKP",
"GBP",
"GEL",
"GGP",
"GHS",
"GIP",
"GMD",
"GNF",
"GTQ",
"GYD",
"HKD",
"HNL",
"HRK",
"HTG",
"HUF",
"IDR",
"ILS",
"IMP",
"INR",
"IQD",
"IRR",
"IRT",
"ISK",
"JEP",
"JMD",
"JOD",
"JPY",
"KES",
"KGS",
"KHR",
"KMF",
"KPW",
"KRW",
"KWD",
"KYD",
"KZT",
"LAK",
"LBP",
"LKR",
"LRD",
"LSL",
"LYD",
"MAD",
"MDL",
"MGA",
"MKD",
"MMK",
"MNT",
"MOP",
"MRO",
"MUR",
"MVR",
"MWK",
"MXN",
"MYR",
"MZN",
"NAD",
"NGN",
"NIO",
"NOK",
"NPR",
"NZD",
"OMR",
"PAB",
"PEN",
"PGK",
"PHP",
"PKR",
"PLN",
"PRB",
"PYG",
"QAR",
"RON",
"RSD",
"RUB",
"RWF",
"SAR",
"SBD",
"SCR",
"SDG",
"SEK",
"SGD",
"SHP",
"SLL",
"SOS",
"SRD",
"SSP",
"STD",
"SYP",
"SZL",
"THB",
"TJS",
"TMT",
"TND",
"TOP",
"TRY",
"TTD",
"TWD",
"TZS",
"UAH",
"UGX",
"USD",
"UYU",
"UZS",
"VEF",
"VND",
"VUV",
"WST",
"XAF",
"XCD",
"XOF",
"XPF",
"YER",
"ZAR",
"ZMW"
],
"description": "Currency the order was created with, in ISO format.",
"type": "string"
},
"customer_id": {
"required": false,
"description": "User ID who owns the order. 0 for guests.",
"type": "integer"
},
"customer_note": {
"required": false,
"description": "Note left by customer during checkout.",
"type": "string"
},
"billing": {
"required": false,
"description": "Billing address.",
"type": "object"
},
"shipping": {
"required": false,
"description": "Shipping address.",
"type": "object"
},
"payment_method": {
"required": false,
"description": "Payment method ID.",
"type": "string"
},
"payment_method_title": {
"required": false,
"description": "Payment method title.",
"type": "string"
},
"transaction_id": {
"required": false,
"description": "Unique transaction ID.",
"type": "string"
},
"meta_data": {
"required": false,
"description": "Meta data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"line_items": {
"required": false,
"description": "Line items data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Item ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"name": {
"description": "Product name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"product_id": {
"description": "Product ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"variation_id": {
"description": "Variation ID, if applicable.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"quantity": {
"description": "Quantity ordered.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"tax_class": {
"description": "Tax class of product.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"subtotal": {
"description": "Line subtotal (before discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"subtotal_tax": {
"description": "Line subtotal tax (before discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"total": {
"description": "Line total (after discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"total_tax": {
"description": "Line total tax (after discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"taxes": {
"description": "Line taxes.",
"type": "array",
"context": [
"view",
"edit"
],
"readonly": true,
"items": {
"type": "object",
"properties": {
"id": {
"description": "Tax rate ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"total": {
"description": "Tax total.",
"type": "string",
"context": [
"view",
"edit"
]
},
"subtotal": {
"description": "Tax subtotal.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"meta_data": {
"description": "Meta data.",
"type": "array",
"context": [
"view",
"edit"
],
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"sku": {
"description": "Product SKU.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"price": {
"description": "Product price.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"shipping_lines": {
"required": false,
"description": "Shipping lines data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Item ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"method_title": {
"description": "Shipping method name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"method_id": {
"description": "Shipping method ID.",
"type": "string",
"context": [
"view",
"edit"
]
},
"total": {
"description": "Line total (after discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"total_tax": {
"description": "Line total tax (after discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"taxes": {
"description": "Line taxes.",
"type": "array",
"context": [
"view",
"edit"
],
"readonly": true,
"items": {
"type": "object",
"properties": {
"id": {
"description": "Tax rate ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"total": {
"description": "Tax total.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"meta_data": {
"description": "Meta data.",
"type": "array",
"context": [
"view",
"edit"
],
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
},
"fee_lines": {
"required": false,
"description": "Fee lines data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Item ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"name": {
"description": "Fee name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"tax_class": {
"description": "Tax class of fee.",
"type": "string",
"context": [
"view",
"edit"
]
},
"tax_status": {
"description": "Tax status of fee.",
"type": "string",
"context": [
"view",
"edit"
],
"enum": [
"taxable",
"none"
]
},
"total": {
"description": "Line total (after discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"total_tax": {
"description": "Line total tax (after discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"taxes": {
"description": "Line taxes.",
"type": "array",
"context": [
"view",
"edit"
],
"readonly": true,
"items": {
"type": "object",
"properties": {
"id": {
"description": "Tax rate ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"total": {
"description": "Tax total.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"subtotal": {
"description": "Tax subtotal.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"meta_data": {
"description": "Meta data.",
"type": "array",
"context": [
"view",
"edit"
],
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
},
"coupon_lines": {
"required": false,
"description": "Coupons line data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Item ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"code": {
"description": "Coupon code.",
"type": "string",
"context": [
"view",
"edit"
]
},
"discount": {
"description": "Discount total.",
"type": "string",
"context": [
"view",
"edit"
]
},
"discount_tax": {
"description": "Discount total tax.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"meta_data": {
"description": "Meta data.",
"type": "array",
"context": [
"view",
"edit"
],
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
},
"set_paid": {
"required": false,
"description": "Define if the order is paid. It will set the status to processing and reduce stock items.",
"type": "boolean"
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"force": {
"required": false,
"default": false,
"description": "Whether to bypass trash and force deletion.",
"type": "boolean"
}
}
}
]
},
"/wc/v3/orders/batch": {
"namespace": "wc/v3",
"methods": [
"POST",
"PUT",
"PATCH"
],
"endpoints": [
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"parent_id": {
"required": false,
"description": "Parent order ID.",
"type": "integer"
},
"status": {
"required": false,
"enum": [
"pending",
"processing",
"on-hold",
"completed",
"cancelled",
"refunded",
"failed"
],
"description": "Order status.",
"type": "string"
},
"currency": {
"required": false,
"enum": [
"AED",
"AFN",
"ALL",
"AMD",
"ANG",
"AOA",
"ARS",
"AUD",
"AWG",
"AZN",
"BAM",
"BBD",
"BDT",
"BGN",
"BHD",
"BIF",
"BMD",
"BND",
"BOB",
"BRL",
"BSD",
"BTC",
"BTN",
"BWP",
"BYR",
"BZD",
"CAD",
"CDF",
"CHF",
"CLP",
"CNY",
"COP",
"CRC",
"CUC",
"CUP",
"CVE",
"CZK",
"DJF",
"DKK",
"DOP",
"DZD",
"EGP",
"ERN",
"ETB",
"EUR",
"FJD",
"FKP",
"GBP",
"GEL",
"GGP",
"GHS",
"GIP",
"GMD",
"GNF",
"GTQ",
"GYD",
"HKD",
"HNL",
"HRK",
"HTG",
"HUF",
"IDR",
"ILS",
"IMP",
"INR",
"IQD",
"IRR",
"IRT",
"ISK",
"JEP",
"JMD",
"JOD",
"JPY",
"KES",
"KGS",
"KHR",
"KMF",
"KPW",
"KRW",
"KWD",
"KYD",
"KZT",
"LAK",
"LBP",
"LKR",
"LRD",
"LSL",
"LYD",
"MAD",
"MDL",
"MGA",
"MKD",
"MMK",
"MNT",
"MOP",
"MRO",
"MUR",
"MVR",
"MWK",
"MXN",
"MYR",
"MZN",
"NAD",
"NGN",
"NIO",
"NOK",
"NPR",
"NZD",
"OMR",
"PAB",
"PEN",
"PGK",
"PHP",
"PKR",
"PLN",
"PRB",
"PYG",
"QAR",
"RON",
"RSD",
"RUB",
"RWF",
"SAR",
"SBD",
"SCR",
"SDG",
"SEK",
"SGD",
"SHP",
"SLL",
"SOS",
"SRD",
"SSP",
"STD",
"SYP",
"SZL",
"THB",
"TJS",
"TMT",
"TND",
"TOP",
"TRY",
"TTD",
"TWD",
"TZS",
"UAH",
"UGX",
"USD",
"UYU",
"UZS",
"VEF",
"VND",
"VUV",
"WST",
"XAF",
"XCD",
"XOF",
"XPF",
"YER",
"ZAR",
"ZMW"
],
"description": "Currency the order was created with, in ISO format.",
"type": "string"
},
"customer_id": {
"required": false,
"description": "User ID who owns the order. 0 for guests.",
"type": "integer"
},
"customer_note": {
"required": false,
"description": "Note left by customer during checkout.",
"type": "string"
},
"billing": {
"required": false,
"description": "Billing address.",
"type": "object"
},
"shipping": {
"required": false,
"description": "Shipping address.",
"type": "object"
},
"payment_method": {
"required": false,
"description": "Payment method ID.",
"type": "string"
},
"payment_method_title": {
"required": false,
"description": "Payment method title.",
"type": "string"
},
"transaction_id": {
"required": false,
"description": "Unique transaction ID.",
"type": "string"
},
"meta_data": {
"required": false,
"description": "Meta data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"line_items": {
"required": false,
"description": "Line items data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Item ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"name": {
"description": "Product name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"product_id": {
"description": "Product ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"variation_id": {
"description": "Variation ID, if applicable.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"quantity": {
"description": "Quantity ordered.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"tax_class": {
"description": "Tax class of product.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"subtotal": {
"description": "Line subtotal (before discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"subtotal_tax": {
"description": "Line subtotal tax (before discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"total": {
"description": "Line total (after discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"total_tax": {
"description": "Line total tax (after discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"taxes": {
"description": "Line taxes.",
"type": "array",
"context": [
"view",
"edit"
],
"readonly": true,
"items": {
"type": "object",
"properties": {
"id": {
"description": "Tax rate ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"total": {
"description": "Tax total.",
"type": "string",
"context": [
"view",
"edit"
]
},
"subtotal": {
"description": "Tax subtotal.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"meta_data": {
"description": "Meta data.",
"type": "array",
"context": [
"view",
"edit"
],
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"sku": {
"description": "Product SKU.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"price": {
"description": "Product price.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"shipping_lines": {
"required": false,
"description": "Shipping lines data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Item ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"method_title": {
"description": "Shipping method name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"method_id": {
"description": "Shipping method ID.",
"type": "string",
"context": [
"view",
"edit"
]
},
"total": {
"description": "Line total (after discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"total_tax": {
"description": "Line total tax (after discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"taxes": {
"description": "Line taxes.",
"type": "array",
"context": [
"view",
"edit"
],
"readonly": true,
"items": {
"type": "object",
"properties": {
"id": {
"description": "Tax rate ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"total": {
"description": "Tax total.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"meta_data": {
"description": "Meta data.",
"type": "array",
"context": [
"view",
"edit"
],
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
},
"fee_lines": {
"required": false,
"description": "Fee lines data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Item ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"name": {
"description": "Fee name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"tax_class": {
"description": "Tax class of fee.",
"type": "string",
"context": [
"view",
"edit"
]
},
"tax_status": {
"description": "Tax status of fee.",
"type": "string",
"context": [
"view",
"edit"
],
"enum": [
"taxable",
"none"
]
},
"total": {
"description": "Line total (after discounts).",
"type": "string",
"context": [
"view",
"edit"
]
},
"total_tax": {
"description": "Line total tax (after discounts).",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"taxes": {
"description": "Line taxes.",
"type": "array",
"context": [
"view",
"edit"
],
"readonly": true,
"items": {
"type": "object",
"properties": {
"id": {
"description": "Tax rate ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"total": {
"description": "Tax total.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"subtotal": {
"description": "Tax subtotal.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"meta_data": {
"description": "Meta data.",
"type": "array",
"context": [
"view",
"edit"
],
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
},
"coupon_lines": {
"required": false,
"description": "Coupons line data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Item ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"code": {
"description": "Coupon code.",
"type": "string",
"context": [
"view",
"edit"
]
},
"discount": {
"description": "Discount total.",
"type": "string",
"context": [
"view",
"edit"
]
},
"discount_tax": {
"description": "Discount total tax.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"meta_data": {
"description": "Meta data.",
"type": "array",
"context": [
"view",
"edit"
],
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
},
"set_paid": {
"required": false,
"description": "Define if the order is paid. It will set the status to processing and reduce stock items.",
"type": "boolean"
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/orders/batch"
}
},
"/wc/v3/products/attributes/(?P<attribute_id>[\\d]+)/terms": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"attribute_id": {
"required": false,
"description": "Unique identifier for the attribute of the terms.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
},
"page": {
"required": false,
"default": 1,
"description": "Current page of the collection.",
"type": "integer"
},
"per_page": {
"required": false,
"default": 10,
"description": "Maximum number of items to be returned in result set.",
"type": "integer"
},
"search": {
"required": false,
"description": "Limit results to those matching a string.",
"type": "string"
},
"exclude": {
"required": false,
"default": [],
"description": "Ensure result set excludes specific ids.",
"type": "array",
"items": {
"type": "integer"
}
},
"include": {
"required": false,
"default": [],
"description": "Limit result set to specific ids.",
"type": "array",
"items": {
"type": "integer"
}
},
"order": {
"required": false,
"default": "asc",
"enum": [
"asc",
"desc"
],
"description": "Order sort attribute ascending or descending.",
"type": "string"
},
"orderby": {
"required": false,
"default": "name",
"enum": [
"id",
"include",
"name",
"slug",
"term_group",
"description",
"count"
],
"description": "Sort collection by resource attribute.",
"type": "string"
},
"hide_empty": {
"required": false,
"default": false,
"description": "Whether to hide resources not assigned to any products.",
"type": "boolean"
},
"parent": {
"required": false,
"description": "Limit result set to resources assigned to a specific parent.",
"type": "integer"
},
"product": {
"required": false,
"description": "Limit result set to resources assigned to a specific product.",
"type": "integer"
},
"slug": {
"required": false,
"description": "Limit result set to resources with a specific slug.",
"type": "string"
}
}
},
{
"methods": [
"POST"
],
"args": {
"attribute_id": {
"required": false,
"description": "Unique identifier for the attribute of the terms.",
"type": "integer"
},
"name": {
"required": true,
"description": "Name for the resource.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"description": {
"required": false,
"description": "HTML description of the resource.",
"type": "string"
},
"menu_order": {
"required": false,
"description": "Menu order, used to custom sort the resource.",
"type": "integer"
}
}
}
]
},
"/wc/v3/products/attributes/(?P<attribute_id>[\\d]+)/terms/(?P<id>[\\d]+)": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"attribute_id": {
"required": false,
"description": "Unique identifier for the attribute of the terms.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"attribute_id": {
"required": false,
"description": "Unique identifier for the attribute of the terms.",
"type": "integer"
},
"name": {
"required": false,
"description": "Term name.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"description": {
"required": false,
"description": "HTML description of the resource.",
"type": "string"
},
"menu_order": {
"required": false,
"description": "Menu order, used to custom sort the resource.",
"type": "integer"
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"attribute_id": {
"required": false,
"description": "Unique identifier for the attribute of the terms.",
"type": "integer"
},
"force": {
"required": false,
"default": false,
"description": "Required to be true, as resource does not support trashing.",
"type": "boolean"
}
}
}
]
},
"/wc/v3/products/attributes/(?P<attribute_id>[\\d]+)/terms/batch": {
"namespace": "wc/v3",
"methods": [
"POST",
"PUT",
"PATCH"
],
"endpoints": [
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"attribute_id": {
"required": false,
"description": "Unique identifier for the attribute of the terms.",
"type": "integer"
},
"name": {
"required": false,
"description": "Term name.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"description": {
"required": false,
"description": "HTML description of the resource.",
"type": "string"
},
"menu_order": {
"required": false,
"description": "Menu order, used to custom sort the resource.",
"type": "integer"
}
}
}
]
},
"/wc/v3/products/attributes": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"POST"
],
"args": {
"name": {
"required": true,
"description": "Name for the resource.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"type": {
"required": false,
"default": "select",
"enum": [
"select",
"text"
],
"description": "Type of attribute.",
"type": "string"
},
"order_by": {
"required": false,
"default": "menu_order",
"enum": [
"menu_order",
"name",
"name_num",
"id"
],
"description": "Default sort order.",
"type": "string"
},
"has_archives": {
"required": false,
"default": false,
"description": "Enable/Disable attribute archives.",
"type": "boolean"
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/products/attributes"
}
},
"/wc/v3/products/attributes/(?P<id>[\\d]+)": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"name": {
"required": false,
"description": "Attribute name.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"type": {
"required": false,
"enum": [
"select",
"text"
],
"description": "Type of attribute.",
"type": "string"
},
"order_by": {
"required": false,
"enum": [
"menu_order",
"name",
"name_num",
"id"
],
"description": "Default sort order.",
"type": "string"
},
"has_archives": {
"required": false,
"description": "Enable/Disable attribute archives.",
"type": "boolean"
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"force": {
"required": false,
"default": true,
"description": "Required to be true, as resource does not support trashing.",
"type": "boolean"
}
}
}
]
},
"/wc/v3/products/attributes/batch": {
"namespace": "wc/v3",
"methods": [
"POST",
"PUT",
"PATCH"
],
"endpoints": [
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"name": {
"required": false,
"description": "Attribute name.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"type": {
"required": false,
"enum": [
"select",
"text"
],
"description": "Type of attribute.",
"type": "string"
},
"order_by": {
"required": false,
"enum": [
"menu_order",
"name",
"name_num",
"id"
],
"description": "Default sort order.",
"type": "string"
},
"has_archives": {
"required": false,
"description": "Enable/Disable attribute archives.",
"type": "boolean"
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/products/attributes/batch"
}
},
"/wc/v3/products/categories": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
},
"page": {
"required": false,
"default": 1,
"description": "Current page of the collection.",
"type": "integer"
},
"per_page": {
"required": false,
"default": 10,
"description": "Maximum number of items to be returned in result set.",
"type": "integer"
},
"search": {
"required": false,
"description": "Limit results to those matching a string.",
"type": "string"
},
"exclude": {
"required": false,
"default": [],
"description": "Ensure result set excludes specific ids.",
"type": "array",
"items": {
"type": "integer"
}
},
"include": {
"required": false,
"default": [],
"description": "Limit result set to specific ids.",
"type": "array",
"items": {
"type": "integer"
}
},
"order": {
"required": false,
"default": "asc",
"enum": [
"asc",
"desc"
],
"description": "Order sort attribute ascending or descending.",
"type": "string"
},
"orderby": {
"required": false,
"default": "name",
"enum": [
"id",
"include",
"name",
"slug",
"term_group",
"description",
"count"
],
"description": "Sort collection by resource attribute.",
"type": "string"
},
"hide_empty": {
"required": false,
"default": false,
"description": "Whether to hide resources not assigned to any products.",
"type": "boolean"
},
"parent": {
"required": false,
"description": "Limit result set to resources assigned to a specific parent.",
"type": "integer"
},
"product": {
"required": false,
"description": "Limit result set to resources assigned to a specific product.",
"type": "integer"
},
"slug": {
"required": false,
"description": "Limit result set to resources with a specific slug.",
"type": "string"
}
}
},
{
"methods": [
"POST"
],
"args": {
"name": {
"required": true,
"description": "Name for the resource.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"parent": {
"required": false,
"description": "The ID for the parent of the resource.",
"type": "integer"
},
"description": {
"required": false,
"description": "HTML description of the resource.",
"type": "string"
},
"display": {
"required": false,
"default": "default",
"enum": [
"default",
"products",
"subcategories",
"both"
],
"description": "Category archive display type.",
"type": "string"
},
"image": {
"required": false,
"description": "Image data.",
"type": "object"
},
"menu_order": {
"required": false,
"description": "Menu order, used to custom sort the resource.",
"type": "integer"
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/products/categories"
}
},
"/wc/v3/products/categories/(?P<id>[\\d]+)": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"name": {
"required": false,
"description": "Category name.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"parent": {
"required": false,
"description": "The ID for the parent of the resource.",
"type": "integer"
},
"description": {
"required": false,
"description": "HTML description of the resource.",
"type": "string"
},
"display": {
"required": false,
"enum": [
"default",
"products",
"subcategories",
"both"
],
"description": "Category archive display type.",
"type": "string"
},
"image": {
"required": false,
"description": "Image data.",
"type": "object"
},
"menu_order": {
"required": false,
"description": "Menu order, used to custom sort the resource.",
"type": "integer"
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"force": {
"required": false,
"default": false,
"description": "Required to be true, as resource does not support trashing.",
"type": "boolean"
}
}
}
]
},
"/wc/v3/products/categories/batch": {
"namespace": "wc/v3",
"methods": [
"POST",
"PUT",
"PATCH"
],
"endpoints": [
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"name": {
"required": false,
"description": "Category name.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"parent": {
"required": false,
"description": "The ID for the parent of the resource.",
"type": "integer"
},
"description": {
"required": false,
"description": "HTML description of the resource.",
"type": "string"
},
"display": {
"required": false,
"enum": [
"default",
"products",
"subcategories",
"both"
],
"description": "Category archive display type.",
"type": "string"
},
"image": {
"required": false,
"description": "Image data.",
"type": "object"
},
"menu_order": {
"required": false,
"description": "Menu order, used to custom sort the resource.",
"type": "integer"
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/products/categories/batch"
}
},
"/wc/v3/products/(?P<product_id>[\\d]+)/reviews": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"product_id": {
"required": false,
"description": "Unique identifier for the variable product.",
"type": "integer"
},
"id": {
"required": false,
"description": "Unique identifier for the variation.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"POST"
],
"args": {
"product_id": {
"required": false,
"description": "Unique identifier for the variable product.",
"type": "integer"
},
"id": {
"required": false,
"description": "Unique identifier for the variation.",
"type": "integer"
},
"review": {
"required": true,
"description": "Review content.",
"type": "string"
},
"date_created": {
"required": false,
"description": "The date the review was created, in the site's timezone.",
"type": "date-time"
},
"date_created_gmt": {
"required": false,
"description": "The date the review was created, as GMT.",
"type": "date-time"
},
"rating": {
"required": false,
"description": "Review rating (0 to 5).",
"type": "integer"
},
"name": {
"required": true,
"description": "Name of the reviewer.",
"type": "string"
},
"email": {
"required": true,
"description": "Email of the reviewer.",
"type": "string"
}
}
}
]
},
"/wc/v3/products/(?P<product_id>[\\d]+)/reviews/(?P<id>[\\d]+)": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"product_id": {
"required": false,
"description": "Unique identifier for the variable product.",
"type": "integer"
},
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"product_id": {
"required": false,
"description": "Unique identifier for the variable product.",
"type": "integer"
},
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"review": {
"required": false,
"description": "The content of the review.",
"type": "string"
},
"date_created": {
"required": false,
"description": "The date the review was created, in the site's timezone.",
"type": "date-time"
},
"date_created_gmt": {
"required": false,
"description": "The date the review was created, as GMT.",
"type": "date-time"
},
"rating": {
"required": false,
"description": "Review rating (0 to 5).",
"type": "integer"
},
"name": {
"required": false,
"description": "Reviewer name.",
"type": "string"
},
"email": {
"required": false,
"description": "Reviewer email.",
"type": "string"
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"product_id": {
"required": false,
"description": "Unique identifier for the variable product.",
"type": "integer"
},
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"force": {
"required": false,
"default": false,
"description": "Whether to bypass trash and force deletion.",
"type": "boolean"
}
}
}
]
},
"/wc/v3/products/(?P<product_id>[\\d]+)/reviews/batch": {
"namespace": "wc/v3",
"methods": [
"POST",
"PUT",
"PATCH"
],
"endpoints": [
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"product_id": {
"required": false,
"description": "Unique identifier for the variable product.",
"type": "integer"
},
"review": {
"required": false,
"description": "The content of the review.",
"type": "string"
},
"date_created": {
"required": false,
"description": "The date the review was created, in the site's timezone.",
"type": "date-time"
},
"date_created_gmt": {
"required": false,
"description": "The date the review was created, as GMT.",
"type": "date-time"
},
"rating": {
"required": false,
"description": "Review rating (0 to 5).",
"type": "integer"
},
"name": {
"required": false,
"description": "Reviewer name.",
"type": "string"
},
"email": {
"required": false,
"description": "Reviewer email.",
"type": "string"
}
}
}
]
},
"/wc/v3/products/shipping_classes": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
},
"page": {
"required": false,
"default": 1,
"description": "Current page of the collection.",
"type": "integer"
},
"per_page": {
"required": false,
"default": 10,
"description": "Maximum number of items to be returned in result set.",
"type": "integer"
},
"search": {
"required": false,
"description": "Limit results to those matching a string.",
"type": "string"
},
"exclude": {
"required": false,
"default": [],
"description": "Ensure result set excludes specific ids.",
"type": "array",
"items": {
"type": "integer"
}
},
"include": {
"required": false,
"default": [],
"description": "Limit result set to specific ids.",
"type": "array",
"items": {
"type": "integer"
}
},
"offset": {
"required": false,
"description": "Offset the result set by a specific number of items.",
"type": "integer"
},
"order": {
"required": false,
"default": "asc",
"enum": [
"asc",
"desc"
],
"description": "Order sort attribute ascending or descending.",
"type": "string"
},
"orderby": {
"required": false,
"default": "name",
"enum": [
"id",
"include",
"name",
"slug",
"term_group",
"description",
"count"
],
"description": "Sort collection by resource attribute.",
"type": "string"
},
"hide_empty": {
"required": false,
"default": false,
"description": "Whether to hide resources not assigned to any products.",
"type": "boolean"
},
"product": {
"required": false,
"description": "Limit result set to resources assigned to a specific product.",
"type": "integer"
},
"slug": {
"required": false,
"description": "Limit result set to resources with a specific slug.",
"type": "string"
}
}
},
{
"methods": [
"POST"
],
"args": {
"name": {
"required": true,
"description": "Name for the resource.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"description": {
"required": false,
"description": "HTML description of the resource.",
"type": "string"
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/products/shipping_classes"
}
},
"/wc/v3/products/shipping_classes/(?P<id>[\\d]+)": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"name": {
"required": false,
"description": "Shipping class name.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"description": {
"required": false,
"description": "HTML description of the resource.",
"type": "string"
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"force": {
"required": false,
"default": false,
"description": "Required to be true, as resource does not support trashing.",
"type": "boolean"
}
}
}
]
},
"/wc/v3/products/shipping_classes/batch": {
"namespace": "wc/v3",
"methods": [
"POST",
"PUT",
"PATCH"
],
"endpoints": [
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"name": {
"required": false,
"description": "Shipping class name.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"description": {
"required": false,
"description": "HTML description of the resource.",
"type": "string"
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/products/shipping_classes/batch"
}
},
"/wc/v3/products/tags": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
},
"page": {
"required": false,
"default": 1,
"description": "Current page of the collection.",
"type": "integer"
},
"per_page": {
"required": false,
"default": 10,
"description": "Maximum number of items to be returned in result set.",
"type": "integer"
},
"search": {
"required": false,
"description": "Limit results to those matching a string.",
"type": "string"
},
"exclude": {
"required": false,
"default": [],
"description": "Ensure result set excludes specific ids.",
"type": "array",
"items": {
"type": "integer"
}
},
"include": {
"required": false,
"default": [],
"description": "Limit result set to specific ids.",
"type": "array",
"items": {
"type": "integer"
}
},
"offset": {
"required": false,
"description": "Offset the result set by a specific number of items.",
"type": "integer"
},
"order": {
"required": false,
"default": "asc",
"enum": [
"asc",
"desc"
],
"description": "Order sort attribute ascending or descending.",
"type": "string"
},
"orderby": {
"required": false,
"default": "name",
"enum": [
"id",
"include",
"name",
"slug",
"term_group",
"description",
"count"
],
"description": "Sort collection by resource attribute.",
"type": "string"
},
"hide_empty": {
"required": false,
"default": false,
"description": "Whether to hide resources not assigned to any products.",
"type": "boolean"
},
"product": {
"required": false,
"description": "Limit result set to resources assigned to a specific product.",
"type": "integer"
},
"slug": {
"required": false,
"description": "Limit result set to resources with a specific slug.",
"type": "string"
}
}
},
{
"methods": [
"POST"
],
"args": {
"name": {
"required": true,
"description": "Name for the resource.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"description": {
"required": false,
"description": "HTML description of the resource.",
"type": "string"
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/products/tags"
}
},
"/wc/v3/products/tags/(?P<id>[\\d]+)": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"name": {
"required": false,
"description": "Tag name.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"description": {
"required": false,
"description": "HTML description of the resource.",
"type": "string"
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"force": {
"required": false,
"default": false,
"description": "Required to be true, as resource does not support trashing.",
"type": "boolean"
}
}
}
]
},
"/wc/v3/products/tags/batch": {
"namespace": "wc/v3",
"methods": [
"POST",
"PUT",
"PATCH"
],
"endpoints": [
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"name": {
"required": false,
"description": "Tag name.",
"type": "string"
},
"slug": {
"required": false,
"description": "An alphanumeric identifier for the resource unique to its type.",
"type": "string"
},
"description": {
"required": false,
"description": "HTML description of the resource.",
"type": "string"
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/products/tags/batch"
}
},
"/wc/v3/products": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
},
"page": {
"required": false,
"default": 1,
"description": "Current page of the collection.",
"type": "integer"
},
"per_page": {
"required": false,
"default": 10,
"description": "Maximum number of items to be returned in result set.",
"type": "integer"
},
"search": {
"required": false,
"description": "Limit results to those matching a string.",
"type": "string"
},
"after": {
"required": false,
"description": "Limit response to resources published after a given ISO8601 compliant date.",
"type": "string"
},
"before": {
"required": false,
"description": "Limit response to resources published before a given ISO8601 compliant date.",
"type": "string"
},
"exclude": {
"required": false,
"default": [],
"description": "Ensure result set excludes specific IDs.",
"type": "array",
"items": {
"type": "integer"
}
},
"include": {
"required": false,
"default": [],
"description": "Limit result set to specific ids.",
"type": "array",
"items": {
"type": "integer"
}
},
"offset": {
"required": false,
"description": "Offset the result set by a specific number of items.",
"type": "integer"
},
"order": {
"required": false,
"default": "desc",
"enum": [
"asc",
"desc"
],
"description": "Order sort attribute ascending or descending.",
"type": "string"
},
"orderby": {
"required": false,
"default": "date",
"enum": [
"date",
"id",
"include",
"title",
"slug",
"price",
"popularity",
"rating"
],
"description": "Sort collection by object attribute.",
"type": "string"
},
"parent": {
"required": false,
"default": [],
"description": "Limit result set to those of particular parent IDs.",
"type": "array",
"items": {
"type": "integer"
}
},
"parent_exclude": {
"required": false,
"default": [],
"description": "Limit result set to all items except those of a particular parent ID.",
"type": "array",
"items": {
"type": "integer"
}
},
"slug": {
"required": false,
"description": "Limit result set to products with a specific slug.",
"type": "string"
},
"status": {
"required": false,
"default": "any",
"enum": [
"any",
"draft",
"pending",
"private",
"publish"
],
"description": "Limit result set to products assigned a specific status.",
"type": "string"
},
"type": {
"required": false,
"enum": [
"simple",
"grouped",
"external",
"variable"
],
"description": "Limit result set to products assigned a specific type.",
"type": "string"
},
"sku": {
"required": false,
"description": "Limit result set to products with a specific SKU.",
"type": "string"
},
"featured": {
"required": false,
"description": "Limit result set to featured products.",
"type": "boolean"
},
"category": {
"required": false,
"description": "Limit result set to products assigned a specific category ID.",
"type": "string"
},
"tag": {
"required": false,
"description": "Limit result set to products assigned a specific tag ID.",
"type": "string"
},
"shipping_class": {
"required": false,
"description": "Limit result set to products assigned a specific shipping class ID.",
"type": "string"
},
"attribute": {
"required": false,
"description": "Limit result set to products with a specific attribute.",
"type": "string"
},
"attribute_term": {
"required": false,
"description": "Limit result set to products with a specific attribute term ID (required an assigned attribute).",
"type": "string"
},
"tax_class": {
"required": false,
"enum": [
"standard",
"reduced-rate",
"zero-rate"
],
"description": "Limit result set to products with a specific tax class.",
"type": "string"
},
"in_stock": {
"required": false,
"description": "Limit result set to products in stock or out of stock.",
"type": "boolean"
},
"on_sale": {
"required": false,
"description": "Limit result set to products on sale.",
"type": "boolean"
},
"min_price": {
"required": false,
"description": "Limit result set to products based on a minimum price.",
"type": "string"
},
"max_price": {
"required": false,
"description": "Limit result set to products based on a maximum price.",
"type": "string"
}
}
},
{
"methods": [
"POST"
],
"args": {
"name": {
"required": false,
"description": "Product name.",
"type": "string"
},
"slug": {
"required": false,
"description": "Product slug.",
"type": "string"
},
"type": {
"required": false,
"default": "simple",
"enum": [
"simple",
"grouped",
"external",
"variable"
],
"description": "Product type.",
"type": "string"
},
"status": {
"required": false,
"default": "publish",
"enum": [
"draft",
"pending",
"private",
"publish"
],
"description": "Product status (post status).",
"type": "string"
},
"featured": {
"required": false,
"default": false,
"description": "Featured product.",
"type": "boolean"
},
"catalog_visibility": {
"required": false,
"default": "visible",
"enum": [
"visible",
"catalog",
"search",
"hidden"
],
"description": "Catalog visibility.",
"type": "string"
},
"description": {
"required": false,
"description": "Product description.",
"type": "string"
},
"short_description": {
"required": false,
"description": "Product short description.",
"type": "string"
},
"sku": {
"required": false,
"description": "Unique identifier.",
"type": "string"
},
"regular_price": {
"required": false,
"description": "Product regular price.",
"type": "string"
},
"sale_price": {
"required": false,
"description": "Product sale price.",
"type": "string"
},
"date_on_sale_from": {
"required": false,
"description": "Start date of sale price, in the site's timezone.",
"type": "date-time"
},
"date_on_sale_from_gmt": {
"required": false,
"description": "Start date of sale price, as GMT.",
"type": "date-time"
},
"date_on_sale_to": {
"required": false,
"description": "End date of sale price, in the site's timezone.",
"type": "date-time"
},
"date_on_sale_to_gmt": {
"required": false,
"description": "End date of sale price, in the site's timezone.",
"type": "date-time"
},
"virtual": {
"required": false,
"default": false,
"description": "If the product is virtual.",
"type": "boolean"
},
"downloadable": {
"required": false,
"default": false,
"description": "If the product is downloadable.",
"type": "boolean"
},
"downloads": {
"required": false,
"description": "List of downloadable files.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "File ID.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"name": {
"description": "File name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"file": {
"description": "File URL.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"download_limit": {
"required": false,
"default": -1,
"description": "Number of times downloadable files can be downloaded after purchase.",
"type": "integer"
},
"download_expiry": {
"required": false,
"default": -1,
"description": "Number of days until access to downloadable files expires.",
"type": "integer"
},
"external_url": {
"required": false,
"description": "Product external URL. Only for external products.",
"type": "string"
},
"button_text": {
"required": false,
"description": "Product external button text. Only for external products.",
"type": "string"
},
"tax_status": {
"required": false,
"default": "taxable",
"enum": [
"taxable",
"shipping",
"none"
],
"description": "Tax status.",
"type": "string"
},
"tax_class": {
"required": false,
"description": "Tax class.",
"type": "string"
},
"manage_stock": {
"required": false,
"default": false,
"description": "Stock management at product level.",
"type": "boolean"
},
"stock_quantity": {
"required": false,
"description": "Stock quantity.",
"type": "integer"
},
"in_stock": {
"required": false,
"default": true,
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend.",
"type": "boolean"
},
"backorders": {
"required": false,
"default": "no",
"enum": [
"no",
"notify",
"yes"
],
"description": "If managing stock, this controls if backorders are allowed.",
"type": "string"
},
"sold_individually": {
"required": false,
"default": false,
"description": "Allow one item to be bought in a single order.",
"type": "boolean"
},
"weight": {
"required": false,
"description": "Product weight (kg).",
"type": "string"
},
"dimensions": {
"required": false,
"description": "Product dimensions.",
"type": "object"
},
"shipping_class": {
"required": false,
"description": "Shipping class slug.",
"type": "string"
},
"reviews_allowed": {
"required": false,
"default": true,
"description": "Allow reviews.",
"type": "boolean"
},
"upsell_ids": {
"required": false,
"description": "List of up-sell products IDs.",
"type": "array",
"items": {
"type": "integer"
}
},
"cross_sell_ids": {
"required": false,
"description": "List of cross-sell products IDs.",
"type": "array",
"items": {
"type": "integer"
}
},
"parent_id": {
"required": false,
"description": "Product parent ID.",
"type": "integer"
},
"purchase_note": {
"required": false,
"description": "Optional note to send the customer after purchase.",
"type": "string"
},
"categories": {
"required": false,
"description": "List of categories.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Category ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"name": {
"description": "Category name.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"slug": {
"description": "Category slug.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"tags": {
"required": false,
"description": "List of tags.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Tag ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"name": {
"description": "Tag name.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"slug": {
"description": "Tag slug.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"images": {
"required": false,
"description": "List of images.",
"type": "object",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Image ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"date_created": {
"description": "The date the image was created, in the site's timezone.",
"type": "date-time",
"context": [
"view",
"edit"
],
"readonly": true
},
"date_created_gmt": {
"description": "The date the image was created, as GMT.",
"type": "date-time",
"context": [
"view",
"edit"
],
"readonly": true
},
"date_modified": {
"description": "The date the image was last modified, in the site's timezone.",
"type": "date-time",
"context": [
"view",
"edit"
],
"readonly": true
},
"date_modified_gmt": {
"description": "The date the image was last modified, as GMT.",
"type": "date-time",
"context": [
"view",
"edit"
],
"readonly": true
},
"src": {
"description": "Image URL.",
"type": "string",
"format": "uri",
"context": [
"view",
"edit"
]
},
"name": {
"description": "Image name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"alt": {
"description": "Image alternative text.",
"type": "string",
"context": [
"view",
"edit"
]
},
"position": {
"description": "Image position. 0 means that the image is featured.",
"type": "integer",
"context": [
"view",
"edit"
]
}
}
}
},
"attributes": {
"required": false,
"description": "List of attributes.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Attribute ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"name": {
"description": "Attribute name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"position": {
"description": "Attribute position.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"visible": {
"description": "Define if the attribute is visible on the \"Additional information\" tab in the product's page.",
"type": "boolean",
"default": false,
"context": [
"view",
"edit"
]
},
"variation": {
"description": "Define if the attribute can be used as variation.",
"type": "boolean",
"default": false,
"context": [
"view",
"edit"
]
},
"options": {
"description": "List of available term names of the attribute.",
"type": "array",
"context": [
"view",
"edit"
]
}
}
}
},
"default_attributes": {
"required": false,
"description": "Defaults variation attributes.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Attribute ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"name": {
"description": "Attribute name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"option": {
"description": "Selected attribute term name.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"menu_order": {
"required": false,
"description": "Menu order, used to custom sort products.",
"type": "integer"
},
"meta_data": {
"required": false,
"description": "Meta data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
}
],
"_links": {
"self": "https://example.com/wp-json/wc/v3/products"
}
},
"/wc/v3/products/(?P<id>[\\d]+)": {
"namespace": "wc/v3",
"methods": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"context": {
"required": false,
"default": "view",
"enum": [
"view",
"edit"
],
"description": "Scope under which the request is made; determines fields present in response.",
"type": "string"
}
}
},
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"name": {
"required": false,
"description": "Product name.",
"type": "string"
},
"slug": {
"required": false,
"description": "Product slug.",
"type": "string"
},
"type": {
"required": false,
"enum": [
"simple",
"grouped",
"external",
"variable"
],
"description": "Product type.",
"type": "string"
},
"status": {
"required": false,
"enum": [
"draft",
"pending",
"private",
"publish"
],
"description": "Product status (post status).",
"type": "string"
},
"featured": {
"required": false,
"description": "Featured product.",
"type": "boolean"
},
"catalog_visibility": {
"required": false,
"enum": [
"visible",
"catalog",
"search",
"hidden"
],
"description": "Catalog visibility.",
"type": "string"
},
"description": {
"required": false,
"description": "Product description.",
"type": "string"
},
"short_description": {
"required": false,
"description": "Product short description.",
"type": "string"
},
"sku": {
"required": false,
"description": "Unique identifier.",
"type": "string"
},
"regular_price": {
"required": false,
"description": "Product regular price.",
"type": "string"
},
"sale_price": {
"required": false,
"description": "Product sale price.",
"type": "string"
},
"date_on_sale_from": {
"required": false,
"description": "Start date of sale price, in the site's timezone.",
"type": "date-time"
},
"date_on_sale_from_gmt": {
"required": false,
"description": "Start date of sale price, as GMT.",
"type": "date-time"
},
"date_on_sale_to": {
"required": false,
"description": "End date of sale price, in the site's timezone.",
"type": "date-time"
},
"date_on_sale_to_gmt": {
"required": false,
"description": "End date of sale price, in the site's timezone.",
"type": "date-time"
},
"virtual": {
"required": false,
"description": "If the product is virtual.",
"type": "boolean"
},
"downloadable": {
"required": false,
"description": "If the product is downloadable.",
"type": "boolean"
},
"downloads": {
"required": false,
"description": "List of downloadable files.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "File ID.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"name": {
"description": "File name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"file": {
"description": "File URL.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"download_limit": {
"required": false,
"description": "Number of times downloadable files can be downloaded after purchase.",
"type": "integer"
},
"download_expiry": {
"required": false,
"description": "Number of days until access to downloadable files expires.",
"type": "integer"
},
"external_url": {
"required": false,
"description": "Product external URL. Only for external products.",
"type": "string"
},
"button_text": {
"required": false,
"description": "Product external button text. Only for external products.",
"type": "string"
},
"tax_status": {
"required": false,
"enum": [
"taxable",
"shipping",
"none"
],
"description": "Tax status.",
"type": "string"
},
"tax_class": {
"required": false,
"description": "Tax class.",
"type": "string"
},
"manage_stock": {
"required": false,
"description": "Stock management at product level.",
"type": "boolean"
},
"stock_quantity": {
"required": false,
"description": "Stock quantity.",
"type": "integer"
},
"in_stock": {
"required": false,
"description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend.",
"type": "boolean"
},
"backorders": {
"required": false,
"enum": [
"no",
"notify",
"yes"
],
"description": "If managing stock, this controls if backorders are allowed.",
"type": "string"
},
"sold_individually": {
"required": false,
"description": "Allow one item to be bought in a single order.",
"type": "boolean"
},
"weight": {
"required": false,
"description": "Product weight (kg).",
"type": "string"
},
"dimensions": {
"required": false,
"description": "Product dimensions.",
"type": "object"
},
"shipping_class": {
"required": false,
"description": "Shipping class slug.",
"type": "string"
},
"reviews_allowed": {
"required": false,
"description": "Allow reviews.",
"type": "boolean"
},
"upsell_ids": {
"required": false,
"description": "List of up-sell products IDs.",
"type": "array",
"items": {
"type": "integer"
}
},
"cross_sell_ids": {
"required": false,
"description": "List of cross-sell products IDs.",
"type": "array",
"items": {
"type": "integer"
}
},
"parent_id": {
"required": false,
"description": "Product parent ID.",
"type": "integer"
},
"purchase_note": {
"required": false,
"description": "Optional note to send the customer after purchase.",
"type": "string"
},
"categories": {
"required": false,
"description": "List of categories.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Category ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"name": {
"description": "Category name.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"slug": {
"description": "Category slug.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"tags": {
"required": false,
"description": "List of tags.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Tag ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"name": {
"description": "Tag name.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"slug": {
"description": "Tag slug.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
}
}
}
},
"images": {
"required": false,
"description": "List of images.",
"type": "object",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Image ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"date_created": {
"description": "The date the image was created, in the site's timezone.",
"type": "date-time",
"context": [
"view",
"edit"
],
"readonly": true
},
"date_created_gmt": {
"description": "The date the image was created, as GMT.",
"type": "date-time",
"context": [
"view",
"edit"
],
"readonly": true
},
"date_modified": {
"description": "The date the image was last modified, in the site's timezone.",
"type": "date-time",
"context": [
"view",
"edit"
],
"readonly": true
},
"date_modified_gmt": {
"description": "The date the image was last modified, as GMT.",
"type": "date-time",
"context": [
"view",
"edit"
],
"readonly": true
},
"src": {
"description": "Image URL.",
"type": "string",
"format": "uri",
"context": [
"view",
"edit"
]
},
"name": {
"description": "Image name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"alt": {
"description": "Image alternative text.",
"type": "string",
"context": [
"view",
"edit"
]
},
"position": {
"description": "Image position. 0 means that the image is featured.",
"type": "integer",
"context": [
"view",
"edit"
]
}
}
}
},
"attributes": {
"required": false,
"description": "List of attributes.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Attribute ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"name": {
"description": "Attribute name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"position": {
"description": "Attribute position.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"visible": {
"description": "Define if the attribute is visible on the \"Additional information\" tab in the product's page.",
"type": "boolean",
"default": false,
"context": [
"view",
"edit"
]
},
"variation": {
"description": "Define if the attribute can be used as variation.",
"type": "boolean",
"default": false,
"context": [
"view",
"edit"
]
},
"options": {
"description": "List of available term names of the attribute.",
"type": "array",
"context": [
"view",
"edit"
]
}
}
}
},
"default_attributes": {
"required": false,
"description": "Defaults variation attributes.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Attribute ID.",
"type": "integer",
"context": [
"view",
"edit"
]
},
"name": {
"description": "Attribute name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"option": {
"description": "Selected attribute term name.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"menu_order": {
"required": false,
"description": "Menu order, used to custom sort products.",
"type": "integer"
},
"meta_data": {
"required": false,
"description": "Meta data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "Meta ID.",
"type": "integer",
"context": [
"view",
"edit"
],
"readonly": true
},
"key": {
"description": "Meta key.",
"type": "string",
"context": [
"view",
"edit"
]
},
"value": {
"description": "Meta value.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
}
}
},
{
"methods": [
"DELETE"
],
"args": {
"id": {
"required": false,
"description": "Unique identifier for the resource.",
"type": "integer"
},
"force": {
"required": false,
"default": false,
"description": "Whether to bypass trash and force deletion.",
"type": "boolean"
}
}
}
]
},
"/wc/v3/products/batch": {
"namespace": "wc/v3",
"methods": [
"POST",
"PUT",
"PATCH"
],
"endpoints": [
{
"methods": [
"POST",
"PUT",
"PATCH"
],
"args": {
"name": {
"required": false,
"description": "Product name.",
"type": "string"
},
"slug": {
"required": false,
"description": "Product slug.",
"type": "string"
},
"type": {
"required": false,
"enum": [
"simple",
"grouped",
"external",
"variable"
],
"description": "Product type.",
"type": "string"
},
"status": {
"required": false,
"enum": [
"draft",
"pending",
"private",
"publish"
],
"description": "Product status (post status).",
"type": "string"
},
"featured": {
"required": false,
"description": "Featured product.",
"type": "boolean"
},
"catalog_visibility": {
"required": false,
"enum": [
"visible",
"catalog",
"search",
"hidden"
],
"description": "Catalog visibility.",
"type": "string"
},
"description": {
"required": false,
"description": "Product description.",
"type": "string"
},
"short_description": {
"required": false,
"description": "Product short description.",
"type": "string"
},
"sku": {
"required": false,
"description": "Unique identifier.",
"type": "string"
},
"regular_price": {
"required": false,
"description": "Product regular price.",
"type": "string"
},
"sale_price": {
"required": false,
"description": "Product sale price.",
"type": "string"
},
"date_on_sale_from": {
"required": false,
"description": "Start date of sale price, in the site's timezone.",
"type": "date-time"
},
"date_on_sale_from_gmt": {
"required": false,
"description": "Start date of sale price, as GMT.",
"type": "date-time"
},
"date_on_sale_to": {
"required": false,
"description": "End date of sale price, in the site's timezone.",
"type": "date-time"
},
"date_on_sale_to_gmt": {
"required": false,
"description": "End date of sale price, in the site's timezone.",
"type": "date-time"
},
"virtual": {
"required": false,
"description": "If the product is virtual.",
"type": "boolean"
},
"downloadable": {
"required": false,
"description": "If the product is downloadable.",
"type": "boolean"
},
"downloads": {
"required": false,
"description": "List of downloadable files.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "File ID.",
"type": "string",
"context": [
"view",
"edit"
],
"readonly": true
},
"name": {
"description": "File name.",
"type": "string",
"context": [
"view",
"edit"
]
},
"file": {
"description": "File URL.",
"type": "string",
"context": [
"view",
"edit"
]
}
}
}
},
"download_limit": {
"required": false,
"description": "Number of times downloadable files can be downloaded after purchase.",
"type": "integer"
},
"download_expiry": {
"required": false,
"description": "Number of days until access to downloadable files expires.",
"type": "integer"
},
"external_url": {
"required": false,
"description": "Product external URL. Only for external products.",
"type": "string"
},
"button_text": {
"required": false,
"description": "Product external button text. Only for external products.",
"type": "string"
},
"tax_status": {
"required": false,
"enum": [
"taxable",
"shipping",
"none"
],
"description": "Tax status.",
"type": "string"
},
"tax_class": {
"required": false,
"description": "Tax class.",
"type": "string"
},
"manage_stock": {
"required": false,
"description": "Stock management at product level.",
"type": "boolean"
},
<