NAV
cURL Node.js PHP Python Ruby

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 v1 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
v1 2.6.x or later 4.4 or later

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:

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:

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:

GET
/wp-json/wc/v1?_jsonp=callback
curl https://example.com/wp-json/wc/v1/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/v1/products/tags/34"}],"collection":[{"href":"https://example.com/wp-json/wc/v1/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.

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/v1/products?page=2>; rel="next",
<https://www.example.com/wp-json/wc/v1/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

// 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/v1' // 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/v1' // 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/v1" # WooCommerce WP REST API version
)
# Install:
# gem install woocommerce_api

# Setup:
require "woocommerce_api"

woocommerce = WooCommerce::API.new(
  "http://example.com", # Your store URL
  "consumer_key", # Your consumer key
  "consumer_secret", # Your consumer secret
  {
    wp_json: true, # Enable the WP REST API integration
    version: "v3" # WooCommerce WP REST API version
  }
)

Third party libraries

Tools

Some useful tools you can use to access the API include:

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 > API > Keys/Apps.

WooCommerce REST API keys settings

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.

Creating a new REST API key

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.

Generated REST API key

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:

Authentication Endpoint flow

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:

Authentication Endpoint example

Notes

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/v1/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/v1"
});
<?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/v1'
    ]
);
?>
from woocommerce import API

wcapi = API(
    url="https://example.com",
    consumer_key="consumer_key",
    consumer_secret="consumer_secret",
    wp_api=True,
    version="wc/v1"
)
require "woocommerce_api"

woocommerce = WooCommerce::API.new(
  "https://example.com",
  "consumer_key",
  "consumer_secret",
  {
    wp_json: true,
    version: "wc/v1"
  }
)

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/v1/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/v1",
  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/v1',
        '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/v1",
    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/v1",
    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/v1/orders.

Collect parameters

Collect and normalize your query string 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:

  1. Percent encode every key and value that will be signed.
  2. Sort the list of parameters alphabetically by encoded key.
  3. 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:

  1. Set the output string equal to the uppercase HTTP Method.
  2. Append the & character to the output string.
  3. Percent encode the URL and append it to the output string.
  4. Append the & character to the output string.
  5. 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%2Fv1%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

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

GET
/wp-json/wc/v1
curl https://example.com/wp-json/wc/v1
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/v1",
  "routes": {
    "/wc/v1": {
      "namespace": "wc/v1",
      "methods": [
        "GET"
      ],
      "endpoints": [
        {
          "methods": [
            "GET"
          ],
          "args": {
            "namespace": {
              "required": false,
              "default": "wc/v1"
            },
            "context": {
              "required": false,
              "default": "view"
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1"
      }
    },
    "/wc/v1/coupons": {
      "namespace": "wc/v1",
      "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."
            },
            "page": {
              "required": false,
              "default": 1,
              "description": "Current page of the collection."
            },
            "per_page": {
              "required": false,
              "default": 10,
              "description": "Maximum number of items to be returned in result set."
            },
            "search": {
              "required": false,
              "description": "Limit results to those matching a string."
            },
            "after": {
              "required": false,
              "description": "Limit response to resources published after a given ISO8601 compliant date."
            },
            "before": {
              "required": false,
              "description": "Limit response to resources published before a given ISO8601 compliant date."
            },
            "exclude": {
              "required": false,
              "default": [],
              "description": "Ensure result set excludes specific ids."
            },
            "include": {
              "required": false,
              "default": [],
              "description": "Limit result set to specific ids."
            },
            "offset": {
              "required": false,
              "description": "Offset the result set by a specific number of items."
            },
            "order": {
              "required": false,
              "default": "desc",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Order sort attribute ascending or descending."
            },
            "orderby": {
              "required": false,
              "default": "date",
              "enum": [
                "date",
                "id",
                "include",
                "title",
                "slug"
              ],
              "description": "Sort collection by object attribute."
            },
            "slug": {
              "required": false,
              "description": "Limit result set to posts with a specific slug."
            },
            "filter": {
              "required": false,
              "description": "Use WP Query arguments to modify the response; private query vars require appropriate authorization."
            },
            "code": {
              "required": false,
              "description": "Limit result set to resources with a specific code."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "code": {
              "required": true
            },
            "description": {
              "required": false,
              "description": "Coupon description."
            },
            "discount_type": {
              "required": false,
              "default": "fixed_cart",
              "enum": [
                "fixed_cart",
                "percent",
                "fixed_product",
                "percent_product"
              ],
              "description": "Determines the type of discount that will be applied."
            },
            "amount": {
              "required": false,
              "description": "The amount of discount."
            },
            "expiry_date": {
              "required": false,
              "description": "UTC DateTime when the coupon expires."
            },
            "individual_use": {
              "required": false,
              "default": false,
              "description": "Whether coupon can only be used individually."
            },
            "product_ids": {
              "required": false,
              "description": "List of product ID's the coupon can be used on."
            },
            "exclude_product_ids": {
              "required": false,
              "description": "List of product ID's the coupon cannot be used on."
            },
            "usage_limit": {
              "required": false,
              "description": "How many times the coupon can be used."
            },
            "usage_limit_per_user": {
              "required": false,
              "description": "How many times the coupon can be used per customer."
            },
            "limit_usage_to_x_items": {
              "required": false,
              "description": "Max number of items in the cart the coupon can be applied to."
            },
            "free_shipping": {
              "required": false,
              "default": false,
              "description": "Define if can be applied for free shipping."
            },
            "product_categories": {
              "required": false,
              "description": "List of category ID's the coupon applies to."
            },
            "excluded_product_categories": {
              "required": false,
              "description": "List of category ID's the coupon does not apply to."
            },
            "exclude_sale_items": {
              "required": false,
              "default": false,
              "description": "Define if should not apply when have sale items."
            },
            "minimum_amount": {
              "required": false,
              "description": "Minimum order amount that needs to be in the cart before coupon applies."
            },
            "maximum_amount": {
              "required": false,
              "description": "Maximum order amount allowed when using the coupon."
            },
            "email_restrictions": {
              "required": false,
              "description": "List of email addresses that can use this coupon."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/coupons"
      }
    },
    "/wc/v1/coupons/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "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."
            }
          }
        },
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "code": {
              "required": false,
              "description": "Coupon code."
            },
            "description": {
              "required": false,
              "description": "Coupon description."
            },
            "discount_type": {
              "required": false,
              "enum": [
                "fixed_cart",
                "percent",
                "fixed_product",
                "percent_product"
              ],
              "description": "Determines the type of discount that will be applied."
            },
            "amount": {
              "required": false,
              "description": "The amount of discount."
            },
            "expiry_date": {
              "required": false,
              "description": "UTC DateTime when the coupon expires."
            },
            "individual_use": {
              "required": false,
              "description": "Whether coupon can only be used individually."
            },
            "product_ids": {
              "required": false,
              "description": "List of product ID's the coupon can be used on."
            },
            "exclude_product_ids": {
              "required": false,
              "description": "List of product ID's the coupon cannot be used on."
            },
            "usage_limit": {
              "required": false,
              "description": "How many times the coupon can be used."
            },
            "usage_limit_per_user": {
              "required": false,
              "description": "How many times the coupon can be used per customer."
            },
            "limit_usage_to_x_items": {
              "required": false,
              "description": "Max number of items in the cart the coupon can be applied to."
            },
            "free_shipping": {
              "required": false,
              "description": "Define if can be applied for free shipping."
            },
            "product_categories": {
              "required": false,
              "description": "List of category ID's the coupon applies to."
            },
            "excluded_product_categories": {
              "required": false,
              "description": "List of category ID's the coupon does not apply to."
            },
            "exclude_sale_items": {
              "required": false,
              "description": "Define if should not apply when have sale items."
            },
            "minimum_amount": {
              "required": false,
              "description": "Minimum order amount that needs to be in the cart before coupon applies."
            },
            "maximum_amount": {
              "required": false,
              "description": "Maximum order amount allowed when using the coupon."
            },
            "email_restrictions": {
              "required": false,
              "description": "List of email addresses that can use this coupon."
            }
          }
        },
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Whether to bypass trash and force deletion."
            }
          }
        }
      ]
    },
    "/wc/v1/coupons/batch": {
      "namespace": "wc/v1",
      "methods": [
        "POST",
        "PUT",
        "PATCH"
      ],
      "endpoints": [
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "code": {
              "required": false,
              "description": "Coupon code."
            },
            "description": {
              "required": false,
              "description": "Coupon description."
            },
            "discount_type": {
              "required": false,
              "enum": [
                "fixed_cart",
                "percent",
                "fixed_product",
                "percent_product"
              ],
              "description": "Determines the type of discount that will be applied."
            },
            "amount": {
              "required": false,
              "description": "The amount of discount."
            },
            "expiry_date": {
              "required": false,
              "description": "UTC DateTime when the coupon expires."
            },
            "individual_use": {
              "required": false,
              "description": "Whether coupon can only be used individually."
            },
            "product_ids": {
              "required": false,
              "description": "List of product ID's the coupon can be used on."
            },
            "exclude_product_ids": {
              "required": false,
              "description": "List of product ID's the coupon cannot be used on."
            },
            "usage_limit": {
              "required": false,
              "description": "How many times the coupon can be used."
            },
            "usage_limit_per_user": {
              "required": false,
              "description": "How many times the coupon can be used per customer."
            },
            "limit_usage_to_x_items": {
              "required": false,
              "description": "Max number of items in the cart the coupon can be applied to."
            },
            "free_shipping": {
              "required": false,
              "description": "Define if can be applied for free shipping."
            },
            "product_categories": {
              "required": false,
              "description": "List of category ID's the coupon applies to."
            },
            "excluded_product_categories": {
              "required": false,
              "description": "List of category ID's the coupon does not apply to."
            },
            "exclude_sale_items": {
              "required": false,
              "description": "Define if should not apply when have sale items."
            },
            "minimum_amount": {
              "required": false,
              "description": "Minimum order amount that needs to be in the cart before coupon applies."
            },
            "maximum_amount": {
              "required": false,
              "description": "Maximum order amount allowed when using the coupon."
            },
            "email_restrictions": {
              "required": false,
              "description": "List of email addresses that can use this coupon."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/coupons/batch"
      }
    },
    "/wc/v1/customers/(?P<customer_id>[\\d]+)/downloads": {
      "namespace": "wc/v1",
      "methods": [
        "GET"
      ],
      "endpoints": [
        {
          "methods": [
            "GET"
          ],
          "args": {
            "context": {
              "required": false,
              "default": "view",
              "enum": [
                "view"
              ],
              "description": "Scope under which the request is made; determines fields present in response."
            }
          }
        }
      ]
    },
    "/wc/v1/customers": {
      "namespace": "wc/v1",
      "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."
            },
            "page": {
              "required": false,
              "default": 1,
              "description": "Current page of the collection."
            },
            "per_page": {
              "required": false,
              "default": 10,
              "description": "Maximum number of items to be returned in result set."
            },
            "search": {
              "required": false,
              "description": "Limit results to those matching a string."
            },
            "exclude": {
              "required": false,
              "default": [],
              "description": "Ensure result set excludes specific ids."
            },
            "include": {
              "required": false,
              "default": [],
              "description": "Limit result set to specific ids."
            },
            "offset": {
              "required": false,
              "description": "Offset the result set by a specific number of items."
            },
            "order": {
              "required": false,
              "default": "asc",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Order sort attribute ascending or descending."
            },
            "orderby": {
              "required": false,
              "default": "name",
              "enum": [
                "id",
                "include",
                "name",
                "registered_date"
              ],
              "description": "Sort collection by object attribute."
            },
            "email": {
              "required": false,
              "description": "Limit result set to resources with a specific email."
            },
            "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."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "email": {
              "required": true
            },
            "first_name": {
              "required": false,
              "description": "Customer first name."
            },
            "last_name": {
              "required": false,
              "description": "Customer last name."
            },
            "username": {
              "required": false
            },
            "password": {
              "required": true
            },
            "billing_address": {
              "required": false,
              "description": "List of billing address data."
            },
            "shipping_address": {
              "required": false,
              "description": "List of shipping address data."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/customers"
      }
    },
    "/wc/v1/customers/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "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."
            }
          }
        },
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "email": {
              "required": false,
              "description": "The email address for the customer."
            },
            "first_name": {
              "required": false,
              "description": "Customer first name."
            },
            "last_name": {
              "required": false,
              "description": "Customer last name."
            },
            "username": {
              "required": false,
              "description": "Customer login name."
            },
            "password": {
              "required": false,
              "description": "Customer password."
            },
            "billing_address": {
              "required": false,
              "description": "List of billing address data."
            },
            "shipping_address": {
              "required": false,
              "description": "List of shipping address data."
            }
          }
        },
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Required to be true, as resource does not support trashing."
            },
            "reassign": {
              "required": false
            }
          }
        }
      ]
    },
    "/wc/v1/customers/batch": {
      "namespace": "wc/v1",
      "methods": [
        "POST",
        "PUT",
        "PATCH"
      ],
      "endpoints": [
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "email": {
              "required": false,
              "description": "The email address for the customer."
            },
            "first_name": {
              "required": false,
              "description": "Customer first name."
            },
            "last_name": {
              "required": false,
              "description": "Customer last name."
            },
            "username": {
              "required": false,
              "description": "Customer login name."
            },
            "password": {
              "required": false,
              "description": "Customer password."
            },
            "billing_address": {
              "required": false,
              "description": "List of billing address data."
            },
            "shipping_address": {
              "required": false,
              "description": "List of shipping address data."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/customers/batch"
      }
    },
    "/wc/v1/orders/(?P<order_id>[\\d]+)/notes": {
      "namespace": "wc/v1",
      "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."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "note": {
              "required": true
            },
            "customer_note": {
              "required": false,
              "default": false,
              "description": "Shows/define if the note is only for reference or for the customer (the user will be notified)."
            }
          }
        }
      ]
    },
    "/wc/v1/orders/(?P<order_id>[\\d]+)/notes/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET",
        "DELETE"
      ],
      "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."
            }
          }
        },
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Required to be true, as resource does not support trashing."
            }
          }
        }
      ]
    },
    "/wc/v1/orders/(?P<order_id>[\\d]+)/refunds": {
      "namespace": "wc/v1",
      "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."
            },
            "page": {
              "required": false,
              "default": 1,
              "description": "Current page of the collection."
            },
            "per_page": {
              "required": false,
              "default": 10,
              "description": "Maximum number of items to be returned in result set."
            },
            "search": {
              "required": false,
              "description": "Limit results to those matching a string."
            },
            "after": {
              "required": false,
              "description": "Limit response to resources published after a given ISO8601 compliant date."
            },
            "before": {
              "required": false,
              "description": "Limit response to resources published before a given ISO8601 compliant date."
            },
            "exclude": {
              "required": false,
              "default": [],
              "description": "Ensure result set excludes specific ids."
            },
            "include": {
              "required": false,
              "default": [],
              "description": "Limit result set to specific ids."
            },
            "offset": {
              "required": false,
              "description": "Offset the result set by a specific number of items."
            },
            "order": {
              "required": false,
              "default": "desc",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Order sort attribute ascending or descending."
            },
            "orderby": {
              "required": false,
              "default": "date",
              "enum": [
                "date",
                "id",
                "include",
                "title",
                "slug"
              ],
              "description": "Sort collection by object attribute."
            },
            "slug": {
              "required": false,
              "description": "Limit result set to posts with a specific slug."
            },
            "filter": {
              "required": false,
              "description": "Use WP Query arguments to modify the response; private query vars require appropriate authorization."
            },
            "dp": {
              "required": false,
              "default": 2,
              "description": "Number of decimal points to use in each resource."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "amount": {
              "required": false,
              "description": "Refund amount."
            },
            "reason": {
              "required": false,
              "description": "Reason for refund"
            },
            "line_items": {
              "required": false,
              "description": "Line items data."
            },
            "email": {
              "required": true
            }
          }
        }
      ]
    },
    "/wc/v1/orders/(?P<order_id>[\\d]+)/refunds/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET",
        "DELETE"
      ],
      "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."
            }
          }
        },
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Required to be true, as resource does not support trashing."
            },
            "reassign": {
              "required": false
            }
          }
        }
      ]
    },
    "/wc/v1/orders": {
      "namespace": "wc/v1",
      "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."
            },
            "page": {
              "required": false,
              "default": 1,
              "description": "Current page of the collection."
            },
            "per_page": {
              "required": false,
              "default": 10,
              "description": "Maximum number of items to be returned in result set."
            },
            "search": {
              "required": false,
              "description": "Limit results to those matching a string."
            },
            "after": {
              "required": false,
              "description": "Limit response to resources published after a given ISO8601 compliant date."
            },
            "before": {
              "required": false,
              "description": "Limit response to resources published before a given ISO8601 compliant date."
            },
            "exclude": {
              "required": false,
              "default": [],
              "description": "Ensure result set excludes specific ids."
            },
            "include": {
              "required": false,
              "default": [],
              "description": "Limit result set to specific ids."
            },
            "offset": {
              "required": false,
              "description": "Offset the result set by a specific number of items."
            },
            "order": {
              "required": false,
              "default": "desc",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Order sort attribute ascending or descending."
            },
            "orderby": {
              "required": false,
              "default": "date",
              "enum": [
                "date",
                "id",
                "include",
                "title",
                "slug"
              ],
              "description": "Sort collection by object attribute."
            },
            "slug": {
              "required": false,
              "description": "Limit result set to posts with a specific slug."
            },
            "filter": {
              "required": false,
              "description": "Use WP Query arguments to modify the response; private query vars require appropriate authorization."
            },
            "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."
            },
            "customer": {
              "required": false,
              "description": "Limit result set to orders assigned a specific customer."
            },
            "product": {
              "required": false,
              "description": "Limit result set to orders assigned a specific product."
            },
            "dp": {
              "required": false,
              "default": 2,
              "description": "Number of decimal points to use in each resource."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "parent_id": {
              "required": false,
              "description": "Parent order ID."
            },
            "status": {
              "required": false,
              "default": "pending",
              "enum": [
                "pending",
                "processing",
                "on-hold",
                "completed",
                "cancelled",
                "refunded",
                "failed"
              ],
              "description": "Order status."
            },
            "currency": {
              "required": false,
              "default": "BRL",
              "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",
                "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."
            },
            "customer_id": {
              "required": false,
              "default": 0,
              "description": "User ID who owns the order. 0 for guests."
            },
            "billing": {
              "required": false,
              "description": "Billing address."
            },
            "shipping": {
              "required": false,
              "description": "Shipping address."
            },
            "payment_method": {
              "required": false,
              "description": "Payment method ID."
            },
            "payment_method_title": {
              "required": false,
              "description": "Payment method title."
            },
            "set_paid": {
              "required": false,
              "default": false,
              "description": "Define if the order is paid. It will set the status to processing and reduce stock items."
            },
            "transaction_id": {
              "required": false,
              "description": "Unique transaction ID."
            },
            "customer_note": {
              "required": false,
              "description": "Note left by customer during checkout."
            },
            "line_items": {
              "required": false,
              "description": "Line items data."
            },
            "shipping_lines": {
              "required": false,
              "description": "Shipping lines data."
            },
            "fee_lines": {
              "required": false,
              "description": "Fee lines data."
            },
            "coupon_lines": {
              "required": false,
              "description": "Coupons line data."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/orders"
      }
    },
    "/wc/v1/orders/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "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."
            }
          }
        },
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "parent_id": {
              "required": false,
              "description": "Parent order ID."
            },
            "status": {
              "required": false,
              "enum": [
                "pending",
                "processing",
                "on-hold",
                "completed",
                "cancelled",
                "refunded",
                "failed"
              ],
              "description": "Order status."
            },
            "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",
                "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."
            },
            "customer_id": {
              "required": false,
              "description": "User ID who owns the order. 0 for guests."
            },
            "billing": {
              "required": false,
              "description": "Billing address."
            },
            "shipping": {
              "required": false,
              "description": "Shipping address."
            },
            "payment_method": {
              "required": false,
              "description": "Payment method ID."
            },
            "payment_method_title": {
              "required": false,
              "description": "Payment method title."
            },
            "set_paid": {
              "required": false,
              "description": "Define if the order is paid. It will set the status to processing and reduce stock items."
            },
            "transaction_id": {
              "required": false,
              "description": "Unique transaction ID."
            },
            "customer_note": {
              "required": false,
              "description": "Note left by customer during checkout."
            },
            "line_items": {
              "required": false,
              "description": "Line items data."
            },
            "shipping_lines": {
              "required": false,
              "description": "Shipping lines data."
            },
            "fee_lines": {
              "required": false,
              "description": "Fee lines data."
            },
            "coupon_lines": {
              "required": false,
              "description": "Coupons line data."
            }
          }
        },
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Whether to bypass trash and force deletion."
            },
            "reassign": {
              "required": false
            }
          }
        }
      ]
    },
    "/wc/v1/orders/batch": {
      "namespace": "wc/v1",
      "methods": [
        "POST",
        "PUT",
        "PATCH"
      ],
      "endpoints": [
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "parent_id": {
              "required": false,
              "description": "Parent order ID."
            },
            "status": {
              "required": false,
              "enum": [
                "pending",
                "processing",
                "on-hold",
                "completed",
                "cancelled",
                "refunded",
                "failed"
              ],
              "description": "Order status."
            },
            "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",
                "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."
            },
            "customer_id": {
              "required": false,
              "description": "User ID who owns the order. 0 for guests."
            },
            "billing": {
              "required": false,
              "description": "Billing address."
            },
            "shipping": {
              "required": false,
              "description": "Shipping address."
            },
            "payment_method": {
              "required": false,
              "description": "Payment method ID."
            },
            "payment_method_title": {
              "required": false,
              "description": "Payment method title."
            },
            "set_paid": {
              "required": false,
              "description": "Define if the order is paid. It will set the status to processing and reduce stock items."
            },
            "transaction_id": {
              "required": false,
              "description": "Unique transaction ID."
            },
            "customer_note": {
              "required": false,
              "description": "Note left by customer during checkout."
            },
            "line_items": {
              "required": false,
              "description": "Line items data."
            },
            "shipping_lines": {
              "required": false,
              "description": "Shipping lines data."
            },
            "fee_lines": {
              "required": false,
              "description": "Fee lines data."
            },
            "coupon_lines": {
              "required": false,
              "description": "Coupons line data."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/orders/batch"
      }
    },
    "/wc/v1/products/attributes/(?P<attribute_id>[\\d]+)/terms": {
      "namespace": "wc/v1",
      "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."
            },
            "page": {
              "required": false,
              "default": 1,
              "description": "Current page of the collection."
            },
            "per_page": {
              "required": false,
              "default": 10,
              "description": "Maximum number of items to be returned in result set."
            },
            "search": {
              "required": false,
              "description": "Limit results to those matching a string."
            },
            "exclude": {
              "required": false,
              "default": [],
              "description": "Ensure result set excludes specific ids."
            },
            "include": {
              "required": false,
              "default": [],
              "description": "Limit result set to specific ids."
            },
            "order": {
              "required": false,
              "default": "asc",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Order sort attribute ascending or descending."
            },
            "orderby": {
              "required": false,
              "default": "name",
              "enum": [
                "id",
                "include",
                "name",
                "slug",
                "term_group",
                "description",
                "count"
              ],
              "description": "Sort collection by resource attribute."
            },
            "hide_empty": {
              "required": false,
              "default": false,
              "description": "Whether to hide resources not assigned to any products."
            },
            "parent": {
              "required": false,
              "description": "Limit result set to resources assigned to a specific parent."
            },
            "product": {
              "required": false,
              "description": "Limit result set to resources assigned to a specific product."
            },
            "slug": {
              "required": false,
              "description": "Limit result set to resources with a specific slug."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "name": {
              "required": true
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "menu_order": {
              "required": false,
              "description": "Menu order, used to custom sort the resource."
            }
          }
        }
      ]
    },
    "/wc/v1/products/attributes/(?P<attribute_id>[\\d]+)/terms/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "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."
            }
          }
        },
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "Term name."
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "menu_order": {
              "required": false,
              "description": "Menu order, used to custom sort the resource."
            }
          }
        },
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Required to be true, as resource does not support trashing."
            }
          }
        }
      ]
    },
    "/wc/v1/products/attributes/(?P<attribute_id>[\\d]+)/terms/batch": {
      "namespace": "wc/v1",
      "methods": [
        "POST",
        "PUT",
        "PATCH"
      ],
      "endpoints": [
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "Term name."
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "menu_order": {
              "required": false,
              "description": "Menu order, used to custom sort the resource."
            }
          }
        }
      ]
    },
    "/wc/v1/products/attributes": {
      "namespace": "wc/v1",
      "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."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "name": {
              "required": true
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "type": {
              "required": false,
              "default": "select",
              "enum": [
                "select",
                "text"
              ],
              "description": "Type of attribute."
            },
            "order_by": {
              "required": false,
              "default": "menu_order",
              "enum": [
                "menu_order",
                "name",
                "name_num",
                "id"
              ],
              "description": "Default sort order."
            },
            "has_archives": {
              "required": false,
              "default": false,
              "description": "Enable/Disable attribute archives."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/products/attributes"
      }
    },
    "/wc/v1/products/attributes/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "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."
            }
          }
        },
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "Attribute name."
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "type": {
              "required": false,
              "enum": [
                "select",
                "text"
              ],
              "description": "Type of attribute."
            },
            "order_by": {
              "required": false,
              "enum": [
                "menu_order",
                "name",
                "name_num",
                "id"
              ],
              "description": "Default sort order."
            },
            "has_archives": {
              "required": false,
              "description": "Enable/Disable attribute archives."
            }
          }
        },
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Required to be true, as resource does not support trashing."
            }
          }
        }
      ]
    },
    "/wc/v1/products/categories": {
      "namespace": "wc/v1",
      "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."
            },
            "page": {
              "required": false,
              "default": 1,
              "description": "Current page of the collection."
            },
            "per_page": {
              "required": false,
              "default": 10,
              "description": "Maximum number of items to be returned in result set."
            },
            "search": {
              "required": false,
              "description": "Limit results to those matching a string."
            },
            "exclude": {
              "required": false,
              "default": [],
              "description": "Ensure result set excludes specific ids."
            },
            "include": {
              "required": false,
              "default": [],
              "description": "Limit result set to specific ids."
            },
            "order": {
              "required": false,
              "default": "asc",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Order sort attribute ascending or descending."
            },
            "orderby": {
              "required": false,
              "default": "name",
              "enum": [
                "id",
                "include",
                "name",
                "slug",
                "term_group",
                "description",
                "count"
              ],
              "description": "Sort collection by resource attribute."
            },
            "hide_empty": {
              "required": false,
              "default": false,
              "description": "Whether to hide resources not assigned to any products."
            },
            "parent": {
              "required": false,
              "description": "Limit result set to resources assigned to a specific parent."
            },
            "product": {
              "required": false,
              "description": "Limit result set to resources assigned to a specific product."
            },
            "slug": {
              "required": false,
              "description": "Limit result set to resources with a specific slug."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "name": {
              "required": true
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "parent": {
              "required": false,
              "description": "The id for the parent of the resource."
            },
            "description": {
              "required": false,
              "description": "HTML description of the resource."
            },
            "display": {
              "required": false,
              "default": "default",
              "enum": [
                "default",
                "products",
                "subcategories",
                "both"
              ],
              "description": "Category archive display type."
            },
            "image": {
              "required": false,
              "description": "Image URL."
            },
            "menu_order": {
              "required": false,
              "description": "Menu order, used to custom sort the resource."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/products/categories"
      }
    },
    "/wc/v1/products/categories/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "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."
            }
          }
        },
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "Category name."
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "parent": {
              "required": false,
              "description": "The id for the parent of the resource."
            },
            "description": {
              "required": false,
              "description": "HTML description of the resource."
            },
            "display": {
              "required": false,
              "enum": [
                "default",
                "products",
                "subcategories",
                "both"
              ],
              "description": "Category archive display type."
            },
            "image": {
              "required": false,
              "description": "Image URL."
            },
            "menu_order": {
              "required": false,
              "description": "Menu order, used to custom sort the resource."
            }
          }
        },
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Required to be true, as resource does not support trashing."
            }
          }
        }
      ]
    },
    "/wc/v1/products/categories/batch": {
      "namespace": "wc/v1",
      "methods": [
        "POST",
        "PUT",
        "PATCH"
      ],
      "endpoints": [
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "Category name."
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "parent": {
              "required": false,
              "description": "The id for the parent of the resource."
            },
            "description": {
              "required": false,
              "description": "HTML description of the resource."
            },
            "display": {
              "required": false,
              "enum": [
                "default",
                "products",
                "subcategories",
                "both"
              ],
              "description": "Category archive display type."
            },
            "image": {
              "required": false,
              "description": "Image URL."
            },
            "menu_order": {
              "required": false,
              "description": "Menu order, used to custom sort the resource."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/products/categories/batch"
      }
    },
    "/wc/v1/products/(?P<product_id>[\\d]+)/reviews": {
      "namespace": "wc/v1",
      "methods": [
        "GET"
      ],
      "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."
            }
          }
        }
      ]
    },
    "/wc/v1/products/(?P<product_id>[\\d]+)/reviews/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET"
      ],
      "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."
            }
          }
        }
      ]
    },
    "/wc/v1/products/shipping_classes": {
      "namespace": "wc/v1",
      "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."
            },
            "page": {
              "required": false,
              "default": 1,
              "description": "Current page of the collection."
            },
            "per_page": {
              "required": false,
              "default": 10,
              "description": "Maximum number of items to be returned in result set."
            },
            "search": {
              "required": false,
              "description": "Limit results to those matching a string."
            },
            "exclude": {
              "required": false,
              "default": [],
              "description": "Ensure result set excludes specific ids."
            },
            "include": {
              "required": false,
              "default": [],
              "description": "Limit result set to specific ids."
            },
            "offset": {
              "required": false,
              "description": "Offset the result set by a specific number of items."
            },
            "order": {
              "required": false,
              "default": "asc",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Order sort attribute ascending or descending."
            },
            "orderby": {
              "required": false,
              "default": "name",
              "enum": [
                "id",
                "include",
                "name",
                "slug",
                "term_group",
                "description",
                "count"
              ],
              "description": "Sort collection by resource attribute."
            },
            "hide_empty": {
              "required": false,
              "default": false,
              "description": "Whether to hide resources not assigned to any products."
            },
            "product": {
              "required": false,
              "description": "Limit result set to resources assigned to a specific product."
            },
            "slug": {
              "required": false,
              "description": "Limit result set to resources with a specific slug."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "name": {
              "required": true
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "parent": {
              "required": false,
              "description": "The id for the parent of the resource."
            },
            "description": {
              "required": false,
              "description": "HTML description of the resource."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/products/shipping_classes"
      }
    },
    "/wc/v1/products/shipping_classes/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "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."
            }
          }
        },
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "Shipping class name."
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "parent": {
              "required": false,
              "description": "The id for the parent of the resource."
            },
            "description": {
              "required": false,
              "description": "HTML description of the resource."
            }
          }
        },
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Required to be true, as resource does not support trashing."
            }
          }
        }
      ]
    },
    "/wc/v1/products/shipping_classes/batch": {
      "namespace": "wc/v1",
      "methods": [
        "POST",
        "PUT",
        "PATCH"
      ],
      "endpoints": [
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "Shipping class name."
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "parent": {
              "required": false,
              "description": "The id for the parent of the resource."
            },
            "description": {
              "required": false,
              "description": "HTML description of the resource."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/products/shipping_classes/batch"
      }
    },
    "/wc/v1/products/tags": {
      "namespace": "wc/v1",
      "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."
            },
            "page": {
              "required": false,
              "default": 1,
              "description": "Current page of the collection."
            },
            "per_page": {
              "required": false,
              "default": 10,
              "description": "Maximum number of items to be returned in result set."
            },
            "search": {
              "required": false,
              "description": "Limit results to those matching a string."
            },
            "exclude": {
              "required": false,
              "default": [],
              "description": "Ensure result set excludes specific ids."
            },
            "include": {
              "required": false,
              "default": [],
              "description": "Limit result set to specific ids."
            },
            "offset": {
              "required": false,
              "description": "Offset the result set by a specific number of items."
            },
            "order": {
              "required": false,
              "default": "asc",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Order sort attribute ascending or descending."
            },
            "orderby": {
              "required": false,
              "default": "name",
              "enum": [
                "id",
                "include",
                "name",
                "slug",
                "term_group",
                "description",
                "count"
              ],
              "description": "Sort collection by resource attribute."
            },
            "hide_empty": {
              "required": false,
              "default": false,
              "description": "Whether to hide resources not assigned to any products."
            },
            "product": {
              "required": false,
              "description": "Limit result set to resources assigned to a specific product."
            },
            "slug": {
              "required": false,
              "description": "Limit result set to resources with a specific slug."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "name": {
              "required": true
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "description": {
              "required": false,
              "description": "HTML description of the resource."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/products/tags"
      }
    },
    "/wc/v1/products/tags/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "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."
            }
          }
        },
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "Tag name."
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "description": {
              "required": false,
              "description": "HTML description of the resource."
            }
          }
        },
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Required to be true, as resource does not support trashing."
            }
          }
        }
      ]
    },
    "/wc/v1/products/tags/batch": {
      "namespace": "wc/v1",
      "methods": [
        "POST",
        "PUT",
        "PATCH"
      ],
      "endpoints": [
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "Tag name."
            },
            "slug": {
              "required": false,
              "description": "An alphanumeric identifier for the resource unique to its type."
            },
            "description": {
              "required": false,
              "description": "HTML description of the resource."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/products/tags/batch"
      }
    },
    "/wc/v1/products": {
      "namespace": "wc/v1",
      "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."
            },
            "page": {
              "required": false,
              "default": 1,
              "description": "Current page of the collection."
            },
            "per_page": {
              "required": false,
              "default": 10,
              "description": "Maximum number of items to be returned in result set."
            },
            "search": {
              "required": false,
              "description": "Limit results to those matching a string."
            },
            "after": {
              "required": false,
              "description": "Limit response to resources published after a given ISO8601 compliant date."
            },
            "before": {
              "required": false,
              "description": "Limit response to resources published before a given ISO8601 compliant date."
            },
            "exclude": {
              "required": false,
              "default": [],
              "description": "Ensure result set excludes specific ids."
            },
            "include": {
              "required": false,
              "default": [],
              "description": "Limit result set to specific ids."
            },
            "offset": {
              "required": false,
              "description": "Offset the result set by a specific number of items."
            },
            "order": {
              "required": false,
              "default": "desc",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Order sort attribute ascending or descending."
            },
            "orderby": {
              "required": false,
              "default": "date",
              "enum": [
                "date",
                "id",
                "include",
                "title",
                "slug"
              ],
              "description": "Sort collection by object attribute."
            },
            "slug": {
              "required": false,
              "description": "Limit result set to posts with a specific slug."
            },
            "filter": {
              "required": false,
              "description": "Use WP Query arguments to modify the response; private query vars require appropriate authorization."
            },
            "status": {
              "required": false,
              "default": "any",
              "enum": [
                "any",
                "draft",
                "pending",
                "private",
                "publish"
              ],
              "description": "Limit result set to products assigned a specific status."
            },
            "type": {
              "required": false,
              "enum": [
                "simple",
                "grouped",
                "external",
                "variable"
              ],
              "description": "Limit result set to products assigned a specific type."
            },
            "category": {
              "required": false,
              "description": "Limit result set to products assigned a specific category."
            },
            "tag": {
              "required": false,
              "description": "Limit result set to products assigned a specific tag."
            },
            "shipping_class": {
              "required": false,
              "description": "Limit result set to products assigned a specific shipping class."
            },
            "attribute": {
              "required": false,
              "description": "Limit result set to products with a specific attribute."
            },
            "attribute_term": {
              "required": false,
              "description": "Limit result set to products with a specific attribute term (required an assigned attribute)."
            },
            "sku": {
              "required": false,
              "description": "Limit result set to products with a specific SKU."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "Product name."
            },
            "slug": {
              "required": false,
              "description": "Product slug."
            },
            "type": {
              "required": false,
              "default": "simple",
              "enum": [
                "simple",
                "grouped",
                "external",
                "variable"
              ],
              "description": "Product type."
            },
            "status": {
              "required": false,
              "default": "publish",
              "enum": [
                "draft",
                "pending",
                "private",
                "publish"
              ],
              "description": "Product status (post status)."
            },
            "featured": {
              "required": false,
              "default": false,
              "description": "Featured product."
            },
            "catalog_visibility": {
              "required": false,
              "default": "visible",
              "enum": [
                "visible",
                "catalog",
                "search",
                "hidden"
              ],
              "description": "Catalog visibility."
            },
            "description": {
              "required": false,
              "description": "Product description."
            },
            "short_description": {
              "required": false,
              "description": "Product short description."
            },
            "sku": {
              "required": false,
              "description": "Unique identifier."
            },
            "regular_price": {
              "required": false,
              "description": "Product regular price."
            },
            "sale_price": {
              "required": false,
              "description": "Product sale price."
            },
            "date_on_sale_from": {
              "required": false,
              "description": "Start date of sale price."
            },
            "date_on_sale_to": {
              "required": false,
              "description": "End data of sale price."
            },
            "virtual": {
              "required": false,
              "default": false,
              "description": "If the product is virtual."
            },
            "downloadable": {
              "required": false,
              "default": false,
              "description": "If the product is downloadable."
            },
            "downloads": {
              "required": false,
              "description": "List of downloadable files."
            },
            "download_limit": {
              "required": false,
              "description": "Amount of times the product can be downloaded."
            },
            "download_expiry": {
              "required": false,
              "description": "Number of days that the customer has up to be able to download the product."
            },
            "download_type": {
              "required": false,
              "default": "standard",
              "enum": [
                "standard",
                "application",
                "music"
              ],
              "description": "Download type, this controls the schema on the front-end."
            },
            "external_url": {
              "required": false,
              "description": "Product external URL. Only for external products."
            },
            "button_text": {
              "required": false,
              "description": "Product external button text. Only for external products."
            },
            "tax_status": {
              "required": false,
              "default": "taxable",
              "enum": [
                "taxable",
                "shipping",
                "none"
              ],
              "description": "Tax status."
            },
            "tax_class": {
              "required": false,
              "description": "Tax class."
            },
            "manage_stock": {
              "required": false,
              "default": false,
              "description": "Stock management at product level."
            },
            "stock_quantity": {
              "required": false,
              "description": "Stock quantity."
            },
            "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."
            },
            "backorders": {
              "required": false,
              "default": "no",
              "enum": [
                "no",
                "notify",
                "yes"
              ],
              "description": "If managing stock, this controls if backorders are allowed."
            },
            "sold_individually": {
              "required": false,
              "default": false,
              "description": "Allow one item to be bought in a single order."
            },
            "weight": {
              "required": false,
              "description": "Product weight (kg)."
            },
            "dimensions": {
              "required": false,
              "description": "Product dimensions."
            },
            "shipping_class": {
              "required": false,
              "description": "Shipping class slug."
            },
            "reviews_allowed": {
              "required": false,
              "default": true,
              "description": "Allow reviews."
            },
            "upsell_ids": {
              "required": false,
              "description": "List of up-sell products IDs."
            },
            "cross_sell_ids": {
              "required": false,
              "description": "List of cross-sell products IDs."
            },
            "parent_id": {
              "required": false,
              "description": "Product parent ID."
            },
            "purchase_note": {
              "required": false,
              "description": "Optional note to send the customer after purchase."
            },
            "categories": {
              "required": false,
              "description": "List of categories."
            },
            "tags": {
              "required": false,
              "description": "List of tags."
            },
            "images": {
              "required": false,
              "description": "List of images."
            },
            "attributes": {
              "required": false,
              "description": "List of attributes."
            },
            "default_attributes": {
              "required": false,
              "description": "Defaults variation attributes."
            },
            "variations": {
              "required": false,
              "description": "List of variations."
            },
            "menu_order": {
              "required": false,
              "description": "Menu order, used to custom sort products."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/products"
      }
    },
    "/wc/v1/products/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "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."
            }
          }
        },
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "Product name."
            },
            "slug": {
              "required": false,
              "description": "Product slug."
            },
            "type": {
              "required": false,
              "enum": [
                "simple",
                "grouped",
                "external",
                "variable"
              ],
              "description": "Product type."
            },
            "status": {
              "required": false,
              "enum": [
                "draft",
                "pending",
                "private",
                "publish"
              ],
              "description": "Product status (post status)."
            },
            "featured": {
              "required": false,
              "description": "Featured product."
            },
            "catalog_visibility": {
              "required": false,
              "enum": [
                "visible",
                "catalog",
                "search",
                "hidden"
              ],
              "description": "Catalog visibility."
            },
            "description": {
              "required": false,
              "description": "Product description."
            },
            "short_description": {
              "required": false,
              "description": "Product short description."
            },
            "sku": {
              "required": false,
              "description": "Unique identifier."
            },
            "regular_price": {
              "required": false,
              "description": "Product regular price."
            },
            "sale_price": {
              "required": false,
              "description": "Product sale price."
            },
            "date_on_sale_from": {
              "required": false,
              "description": "Start date of sale price."
            },
            "date_on_sale_to": {
              "required": false,
              "description": "End data of sale price."
            },
            "virtual": {
              "required": false,
              "description": "If the product is virtual."
            },
            "downloadable": {
              "required": false,
              "description": "If the product is downloadable."
            },
            "downloads": {
              "required": false,
              "description": "List of downloadable files."
            },
            "download_limit": {
              "required": false,
              "description": "Amount of times the product can be downloaded."
            },
            "download_expiry": {
              "required": false,
              "description": "Number of days that the customer has up to be able to download the product."
            },
            "download_type": {
              "required": false,
              "enum": [
                "standard",
                "application",
                "music"
              ],
              "description": "Download type, this controls the schema on the front-end."
            },
            "external_url": {
              "required": false,
              "description": "Product external URL. Only for external products."
            },
            "button_text": {
              "required": false,
              "description": "Product external button text. Only for external products."
            },
            "tax_status": {
              "required": false,
              "enum": [
                "taxable",
                "shipping",
                "none"
              ],
              "description": "Tax status."
            },
            "tax_class": {
              "required": false,
              "description": "Tax class."
            },
            "manage_stock": {
              "required": false,
              "description": "Stock management at product level."
            },
            "stock_quantity": {
              "required": false,
              "description": "Stock quantity."
            },
            "in_stock": {
              "required": false,
              "description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
            },
            "backorders": {
              "required": false,
              "enum": [
                "no",
                "notify",
                "yes"
              ],
              "description": "If managing stock, this controls if backorders are allowed."
            },
            "sold_individually": {
              "required": false,
              "description": "Allow one item to be bought in a single order."
            },
            "weight": {
              "required": false,
              "description": "Product weight (kg)."
            },
            "dimensions": {
              "required": false,
              "description": "Product dimensions."
            },
            "shipping_class": {
              "required": false,
              "description": "Shipping class slug."
            },
            "reviews_allowed": {
              "required": false,
              "description": "Allow reviews."
            },
            "upsell_ids": {
              "required": false,
              "description": "List of up-sell products IDs."
            },
            "cross_sell_ids": {
              "required": false,
              "description": "List of cross-sell products IDs."
            },
            "parent_id": {
              "required": false,
              "description": "Product parent ID."
            },
            "purchase_note": {
              "required": false,
              "description": "Optional note to send the customer after purchase."
            },
            "categories": {
              "required": false,
              "description": "List of categories."
            },
            "tags": {
              "required": false,
              "description": "List of tags."
            },
            "images": {
              "required": false,
              "description": "List of images."
            },
            "attributes": {
              "required": false,
              "description": "List of attributes."
            },
            "default_attributes": {
              "required": false,
              "description": "Defaults variation attributes."
            },
            "variations": {
              "required": false,
              "description": "List of variations."
            },
            "menu_order": {
              "required": false,
              "description": "Menu order, used to custom sort products."
            }
          }
        },
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Whether to bypass trash and force deletion."
            },
            "reassign": {
              "required": false
            }
          }
        }
      ]
    },
    "/wc/v1/products/batch": {
      "namespace": "wc/v1",
      "methods": [
        "POST",
        "PUT",
        "PATCH"
      ],
      "endpoints": [
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "Product name."
            },
            "slug": {
              "required": false,
              "description": "Product slug."
            },
            "type": {
              "required": false,
              "enum": [
                "simple",
                "grouped",
                "external",
                "variable"
              ],
              "description": "Product type."
            },
            "status": {
              "required": false,
              "enum": [
                "draft",
                "pending",
                "private",
                "publish"
              ],
              "description": "Product status (post status)."
            },
            "featured": {
              "required": false,
              "description": "Featured product."
            },
            "catalog_visibility": {
              "required": false,
              "enum": [
                "visible",
                "catalog",
                "search",
                "hidden"
              ],
              "description": "Catalog visibility."
            },
            "description": {
              "required": false,
              "description": "Product description."
            },
            "short_description": {
              "required": false,
              "description": "Product short description."
            },
            "sku": {
              "required": false,
              "description": "Unique identifier."
            },
            "regular_price": {
              "required": false,
              "description": "Product regular price."
            },
            "sale_price": {
              "required": false,
              "description": "Product sale price."
            },
            "date_on_sale_from": {
              "required": false,
              "description": "Start date of sale price."
            },
            "date_on_sale_to": {
              "required": false,
              "description": "End data of sale price."
            },
            "virtual": {
              "required": false,
              "description": "If the product is virtual."
            },
            "downloadable": {
              "required": false,
              "description": "If the product is downloadable."
            },
            "downloads": {
              "required": false,
              "description": "List of downloadable files."
            },
            "download_limit": {
              "required": false,
              "description": "Amount of times the product can be downloaded."
            },
            "download_expiry": {
              "required": false,
              "description": "Number of days that the customer has up to be able to download the product."
            },
            "download_type": {
              "required": false,
              "enum": [
                "standard",
                "application",
                "music"
              ],
              "description": "Download type, this controls the schema on the front-end."
            },
            "external_url": {
              "required": false,
              "description": "Product external URL. Only for external products."
            },
            "button_text": {
              "required": false,
              "description": "Product external button text. Only for external products."
            },
            "tax_status": {
              "required": false,
              "enum": [
                "taxable",
                "shipping",
                "none"
              ],
              "description": "Tax status."
            },
            "tax_class": {
              "required": false,
              "description": "Tax class."
            },
            "manage_stock": {
              "required": false,
              "description": "Stock management at product level."
            },
            "stock_quantity": {
              "required": false,
              "description": "Stock quantity."
            },
            "in_stock": {
              "required": false,
              "description": "Controls whether or not the product is listed as \"in stock\" or \"out of stock\" on the frontend."
            },
            "backorders": {
              "required": false,
              "enum": [
                "no",
                "notify",
                "yes"
              ],
              "description": "If managing stock, this controls if backorders are allowed."
            },
            "sold_individually": {
              "required": false,
              "description": "Allow one item to be bought in a single order."
            },
            "weight": {
              "required": false,
              "description": "Product weight (kg)."
            },
            "dimensions": {
              "required": false,
              "description": "Product dimensions."
            },
            "shipping_class": {
              "required": false,
              "description": "Shipping class slug."
            },
            "reviews_allowed": {
              "required": false,
              "description": "Allow reviews."
            },
            "upsell_ids": {
              "required": false,
              "description": "List of up-sell products IDs."
            },
            "cross_sell_ids": {
              "required": false,
              "description": "List of cross-sell products IDs."
            },
            "parent_id": {
              "required": false,
              "description": "Product parent ID."
            },
            "purchase_note": {
              "required": false,
              "description": "Optional note to send the customer after purchase."
            },
            "categories": {
              "required": false,
              "description": "List of categories."
            },
            "tags": {
              "required": false,
              "description": "List of tags."
            },
            "images": {
              "required": false,
              "description": "List of images."
            },
            "attributes": {
              "required": false,
              "description": "List of attributes."
            },
            "default_attributes": {
              "required": false,
              "description": "Defaults variation attributes."
            },
            "variations": {
              "required": false,
              "description": "List of variations."
            },
            "menu_order": {
              "required": false,
              "description": "Menu order, used to custom sort products."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/products/batch"
      }
    },
    "/wc/v1/reports/sales": {
      "namespace": "wc/v1",
      "methods": [
        "GET"
      ],
      "endpoints": [
        {
          "methods": [
            "GET"
          ],
          "args": {
            "context": {
              "required": false,
              "default": "view",
              "enum": [
                "view"
              ],
              "description": "Scope under which the request is made; determines fields present in response."
            },
            "period": {
              "required": false,
              "enum": [
                "week",
                "month",
                "last_month",
                "year"
              ],
              "description": "Report period."
            },
            "date_min": {
              "required": false,
              "description": "Return sales for a specific start date, the date need to be in the YYYY-MM-DD format."
            },
            "date_max": {
              "required": false,
              "description": "Return sales for a specific end date, the date need to be in the YYYY-MM-DD format."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/reports/sales"
      }
    },
    "/wc/v1/reports/top_sellers": {
      "namespace": "wc/v1",
      "methods": [
        "GET"
      ],
      "endpoints": [
        {
          "methods": [
            "GET"
          ],
          "args": {
            "context": {
              "required": false,
              "default": "view",
              "enum": [
                "view"
              ],
              "description": "Scope under which the request is made; determines fields present in response."
            },
            "period": {
              "required": false,
              "enum": [
                "week",
                "month",
                "last_month",
                "year"
              ],
              "description": "Report period."
            },
            "date_min": {
              "required": false,
              "description": "Return sales for a specific start date, the date need to be in the YYYY-MM-DD format."
            },
            "date_max": {
              "required": false,
              "description": "Return sales for a specific end date, the date need to be in the YYYY-MM-DD format."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/reports/top_sellers"
      }
    },
    "/wc/v1/reports": {
      "namespace": "wc/v1",
      "methods": [
        "GET"
      ],
      "endpoints": [
        {
          "methods": [
            "GET"
          ],
          "args": {
            "context": {
              "required": false,
              "default": "view",
              "enum": [
                "view"
              ],
              "description": "Scope under which the request is made; determines fields present in response."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/reports"
      }
    },
    "/wc/v1/taxes/classes": {
      "namespace": "wc/v1",
      "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."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "name": {
              "required": true,
              "description": "Tax class name."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/taxes/classes"
      }
    },
    "/wc/v1/taxes/classes/(?P<slug>\\w[\\w\\s\\-]*)": {
      "namespace": "wc/v1",
      "methods": [
        "DELETE"
      ],
      "endpoints": [
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Required to be true, as resource does not support trashing."
            }
          }
        }
      ]
    },
    "/wc/v1/taxes": {
      "namespace": "wc/v1",
      "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."
            },
            "page": {
              "required": false,
              "default": 1,
              "description": "Current page of the collection."
            },
            "per_page": {
              "required": false,
              "default": 10,
              "description": "Maximum number of items to be returned in result set."
            },
            "search": {
              "required": false,
              "description": "Limit results to those matching a string."
            },
            "exclude": {
              "required": false,
              "default": [],
              "description": "Ensure result set excludes specific ids."
            },
            "include": {
              "required": false,
              "default": [],
              "description": "Limit result set to specific ids."
            },
            "offset": {
              "required": false,
              "description": "Offset the result set by a specific number of items."
            },
            "order": {
              "required": false,
              "default": "asc",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Order sort attribute ascending or descending."
            },
            "orderby": {
              "required": false,
              "default": "order",
              "enum": [
                "id",
                "order"
              ],
              "description": "Sort collection by object attribute."
            },
            "class": {
              "required": false,
              "enum": [
                "standard",
                "reduced-rate",
                "zero-rate"
              ],
              "description": "Sort by tax class."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "country": {
              "required": false,
              "description": "Country ISO 3166 code."
            },
            "state": {
              "required": false,
              "description": "State code."
            },
            "postcode": {
              "required": false,
              "description": "Postcode/ZIP."
            },
            "city": {
              "required": false,
              "description": "City name."
            },
            "rate": {
              "required": false,
              "description": "Tax rate."
            },
            "name": {
              "required": false,
              "description": "Tax rate name."
            },
            "priority": {
              "required": false,
              "default": 1,
              "description": "Tax priority."
            },
            "compound": {
              "required": false,
              "default": false,
              "description": "Whether or not this is a compound rate."
            },
            "shipping": {
              "required": false,
              "default": true,
              "description": "Whether or not this tax rate also gets applied to shipping."
            },
            "order": {
              "required": false,
              "description": "Indicates the order that will appear in queries."
            },
            "class": {
              "required": false,
              "default": "standard",
              "enum": [
                "standard",
                "reduced-rate",
                "zero-rate"
              ],
              "description": "Tax class."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/taxes"
      }
    },
    "/wc/v1/taxes/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "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."
            }
          }
        },
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "country": {
              "required": false,
              "description": "Country ISO 3166 code."
            },
            "state": {
              "required": false,
              "description": "State code."
            },
            "postcode": {
              "required": false,
              "description": "Postcode/ZIP."
            },
            "city": {
              "required": false,
              "description": "City name."
            },
            "rate": {
              "required": false,
              "description": "Tax rate."
            },
            "name": {
              "required": false,
              "description": "Tax rate name."
            },
            "priority": {
              "required": false,
              "description": "Tax priority."
            },
            "compound": {
              "required": false,
              "description": "Whether or not this is a compound rate."
            },
            "shipping": {
              "required": false,
              "description": "Whether or not this tax rate also gets applied to shipping."
            },
            "order": {
              "required": false,
              "description": "Indicates the order that will appear in queries."
            },
            "class": {
              "required": false,
              "enum": [
                "standard",
                "reduced-rate",
                "zero-rate"
              ],
              "description": "Tax class."
            }
          }
        },
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Required to be true, as resource does not support trashing."
            }
          }
        }
      ]
    },
    "/wc/v1/taxes/batch": {
      "namespace": "wc/v1",
      "methods": [
        "POST",
        "PUT",
        "PATCH"
      ],
      "endpoints": [
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "country": {
              "required": false,
              "description": "Country ISO 3166 code."
            },
            "state": {
              "required": false,
              "description": "State code."
            },
            "postcode": {
              "required": false,
              "description": "Postcode/ZIP."
            },
            "city": {
              "required": false,
              "description": "City name."
            },
            "rate": {
              "required": false,
              "description": "Tax rate."
            },
            "name": {
              "required": false,
              "description": "Tax rate name."
            },
            "priority": {
              "required": false,
              "description": "Tax priority."
            },
            "compound": {
              "required": false,
              "description": "Whether or not this is a compound rate."
            },
            "shipping": {
              "required": false,
              "description": "Whether or not this tax rate also gets applied to shipping."
            },
            "order": {
              "required": false,
              "description": "Indicates the order that will appear in queries."
            },
            "class": {
              "required": false,
              "enum": [
                "standard",
                "reduced-rate",
                "zero-rate"
              ],
              "description": "Tax class."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/taxes/batch"
      }
    },
    "/wc/v1/webhooks/(?P<webhook_id>[\\d]+)/deliveries": {
      "namespace": "wc/v1",
      "methods": [
        "GET"
      ],
      "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."
            }
          }
        }
      ]
    },
    "/wc/v1/webhooks/(?P<webhook_id>[\\d]+)/deliveries/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET"
      ],
      "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."
            }
          }
        }
      ]
    },
    "/wc/v1/webhooks": {
      "namespace": "wc/v1",
      "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."
            },
            "page": {
              "required": false,
              "default": 1,
              "description": "Current page of the collection."
            },
            "per_page": {
              "required": false,
              "default": 10,
              "description": "Maximum number of items to be returned in result set."
            },
            "search": {
              "required": false,
              "description": "Limit results to those matching a string."
            },
            "after": {
              "required": false,
              "description": "Limit response to resources published after a given ISO8601 compliant date."
            },
            "before": {
              "required": false,
              "description": "Limit response to resources published before a given ISO8601 compliant date."
            },
            "exclude": {
              "required": false,
              "default": [],
              "description": "Ensure result set excludes specific ids."
            },
            "include": {
              "required": false,
              "default": [],
              "description": "Limit result set to specific ids."
            },
            "offset": {
              "required": false,
              "description": "Offset the result set by a specific number of items."
            },
            "order": {
              "required": false,
              "default": "desc",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Order sort attribute ascending or descending."
            },
            "orderby": {
              "required": false,
              "default": "date",
              "enum": [
                "date",
                "id",
                "include",
                "title",
                "slug"
              ],
              "description": "Sort collection by object attribute."
            },
            "slug": {
              "required": false,
              "description": "Limit result set to posts with a specific slug."
            },
            "filter": {
              "required": false,
              "description": "Use WP Query arguments to modify the response; private query vars require appropriate authorization."
            },
            "status": {
              "required": false,
              "default": "all",
              "enum": [
                "all",
                "active",
                "paused",
                "disabled"
              ],
              "description": "Limit result set to webhooks assigned a specific status."
            }
          }
        },
        {
          "methods": [
            "POST"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "A friendly name for the webhook."
            },
            "status": {
              "required": false,
              "default": "active",
              "enum": [
                "active",
                "paused",
                "disabled"
              ],
              "description": "Webhook status."
            },
            "topic": {
              "required": true
            },
            "secret": {
              "required": false,
              "description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default is a MD5 hash from the current user's ID|username if not provided."
            },
            "delivery_url": {
              "required": true
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/webhooks"
      }
    },
    "/wc/v1/webhooks/(?P<id>[\\d]+)": {
      "namespace": "wc/v1",
      "methods": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "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."
            }
          }
        },
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "A friendly name for the webhook."
            },
            "status": {
              "required": false,
              "enum": [
                "active",
                "paused",
                "disabled"
              ],
              "description": "Webhook status."
            },
            "topic": {
              "required": false,
              "description": "Webhook topic."
            },
            "secret": {
              "required": false,
              "description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default is a MD5 hash from the current user's ID|username if not provided."
            }
          }
        },
        {
          "methods": [
            "DELETE"
          ],
          "args": {
            "force": {
              "required": false,
              "default": false,
              "description": "Required to be true, as resource does not support trashing."
            }
          }
        }
      ]
    },
    "/wc/v1/webhooks/batch": {
      "namespace": "wc/v1",
      "methods": [
        "POST",
        "PUT",
        "PATCH"
      ],
      "endpoints": [
        {
          "methods": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "args": {
            "name": {
              "required": false,
              "description": "A friendly name for the webhook."
            },
            "status": {
              "required": false,
              "enum": [
                "active",
                "paused",
                "disabled"
              ],
              "description": "Webhook status."
            },
            "topic": {
              "required": false,
              "description": "Webhook topic."
            },
            "secret": {
              "required": false,
              "description": "Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default is a MD5 hash from the current user's ID|username if not provided."
            }
          }
        }
      ],
      "_links": {
        "self": "https://example.com/wp-json/wc/v1/webhooks/batch"
      }
    }
  },
  "_links": {
    "up": [
      {
        "href": "https://example.com/wp-json/"
      }
    ]
  }
}

Coupons

The coupons API allows you to create, view, update, and delete individual, or a batch, of coupon codes.

Coupon properties

Attribute Type Description
id integer Unique identifier for the object. read-only
code string Coupon code. mandatory
date_created date-time The date the coupon was created, in the site's timezone. read-only
date_modified date-time The date the coupon was last modified, in the site's timezone. read-only
description string Coupon description.
discount_type string Determines the type of discount that will be applied. Options: fixed_cart, percent, fixed_product and percent_product. Default: fixed_cart.
amount string The amount of discount.
expiry_date string UTC DateTime when the coupon expires.
usage_count integer Number of times the coupon has been used already. read-only
individual_use boolean Whether coupon can only be used individually.
product_ids array List of product ID's the coupon can be used on.
exclude_product_ids array List of product ID's the coupon cannot be used on.
usage_limit integer How many times the coupon can be used.
usage_limit_per_user integer How many times the coupon can be used per customer.
limit_usage_to_x_items integer Max number of items in the cart the coupon can be applied to.
free_shipping boolean Define if can be applied for free shipping.
product_categories array List of category ID's the coupon applies to.
excluded_product_categories array List of category ID's the coupon does not apply to.
exclude_sale_items boolean Define if should not apply when have sale items.
minimum_amount string Minimum order amount that needs to be in the cart before coupon applies.
maximum_amount string Maximum order amount allowed when using the coupon.
email_restrictions array List of email addresses that can use this coupon.
used_by array List of user IDs who have used the coupon. read-only

Create a coupon

This API helps you to create a new coupon.

HTTP request

POST
/wp-json/wc/v1/coupons
curl -X POST https://example.com/wp-json/wc/v1/coupons \
    -u consumer_key:consumer_secret \
    -H "Content-Type: application/json" \
    -d '{
  "code": "10off",
  "discount_type": "percent",
  "amount": 10,
  "individual_use": true,
  "exclude_sale_items": true,
  "minimum_amount": "100.00"
}'
const data = {
  code: "10off",
  discount_type: "percent",
  amount: 10,
  individual_use: true,
  exclude_sale_items: true,
  minimum_amount: "100.00"
};

WooCommerce.get("coupons")
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });

<?php
$data = [
    'code' => '10off',
    'discount_type' => 'percent',
    'amount' => 10,
    'individual_use' => true,
    'exclude_sale_items' => true,
    'minimum_amount' => '100.00'
];

print_r($woocommerce->post('coupons', $data));
?>
data = {
    "code": "10off",
    "discount_type": "percent",
    "amount": 10,
    "individual_use": True,
    "exclude_sale_items": True,
    "minimum_amount": "100.00"
}

print(wcapi.post("coupons", data).json())
data = {
  code: "10off",
  discount_type: "percent",
  amount: 10,
  individual_use: true,
  exclude_sale_items: true,
  minimum_amount: "100.00"
}

woocommerce.post("coupons", data).parsed_response

JSON response example:

{
  "id": 113,
  "code": "10off",
  "date_created": "2016-04-28T21:55:54",
  "date_modified": "2016-04-28T21:55:54",
  "discount_type": "percent",
  "description": "",
  "amount": "10.00",
  "expiry_date": null,
  "usage_count": 0,
  "individual_use": true,
  "product_ids": [],
  "exclude_product_ids": [],
  "usage_limit": null,
  "usage_limit_per_user": null,
  "limit_usage_to_x_items": 0,
  "free_shipping": false,
  "product_categories": [],
  "excluded_product_categories": [],
  "exclude_sale_items": true,
  "minimum_amount": "100.00",
  "maximum_amount": "0.00",
  "email_restrictions": [],
  "used_by": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v1/coupons/113"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v1/coupons"
      }
    ]
  }
}

Retrieve a coupon

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

HTTP request

GET
/wp-json/wc/v1/coupons/<id>
curl https://example.com/wp-json/wc/v1/coupons/113 \
    -u consumer_key:consumer_secret
WooCommerce.get("coupons/113")
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php print_r($woocommerce->get('coupons/113')); ?>
print(wcapi.get("coupons/113").json())
woocommerce.get("coupons/113").parsed_response

JSON response example:

{
  "id": 113,
  "code": "10off",
  "date_created": "2016-04-28T21:55:54",
  "date_modified": "2016-04-28T21:55:54",
  "discount_type": "percent",
  "description": "",
  "amount": "10.00",
  "expiry_date": null,
  "usage_count": 0,
  "individual_use": true,
  "product_ids": [],
  "exclude_product_ids": [],
  "usage_limit": null,
  "usage_limit_per_user": null,
  "limit_usage_to_x_items": 0,
  "free_shipping": false,
  "product_categories": [],
  "excluded_product_categories": [],
  "exclude_sale_items": true,
  "minimum_amount": "100.00",
  "maximum_amount": "0.00",
  "email_restrictions": [],
  "used_by": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v1/coupons/113"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v1/coupons"
      }
    ]
  }
}

List all coupons

This API helps you to list all the coupons that have been created.

HTTP request

GET
/wp-json/wc/v1/coupons
curl https://example.com/wp-json/wc/v1/coupons \
    -u consumer_key:consumer_secret
WooCommerce.get("coupons")
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php print_r($woocommerce->get('coupons')); ?>
print(wcapi.get("coupons").json())
woocommerce.get("coupons").parsed_response

JSON response example:

[
  {
    "id": 114,
    "code": "free-shipping",
    "date_created": "2016-04-28T21:58:25",
    "date_modified": "2016-04-28T21:58:25",
    "discount_type": "fixed_cart",
    "description": "",
    "amount": "0.00",
    "expiry_date": null,
    "usage_count": 0,
    "individual_use": true,
    "product_ids": [],
    "exclude_product_ids": [],
    "usage_limit": null,
    "usage_limit_per_user": null,
    "limit_usage_to_x_items": 0,
    "free_shipping": false,
    "product_categories": [],
    "excluded_product_categories": [],
    "exclude_sale_items": true,
    "minimum_amount": "50.00",
    "maximum_amount": "0.00",
    "email_restrictions": [],
    "used_by": [],
    "_links": {
      "self": [
        {
          "href": "https://example.com/wp-json/wc/v1/coupons/114"
        }
      ],
      "collection": [
        {
          "href": "https://example.com/wp-json/wc/v1/coupons"
        }
      ]
    }
  },
  {
    "id": 113,
    "code": "10off",
    "date_created": "2016-04-28T21:55:54",
    "date_modified": "2016-04-28T21:55:54",
    "discount_type": "percent",
    "description": "",
    "amount": "10.00",
    "expiry_date": null,
    "usage_count": 0,
    "individual_use": true,
    "product_ids": [],
    "exclude_product_ids": [],
    "usage_limit": null,
    "usage_limit_per_user": null,
    "limit_usage_to_x_items": 0,
    "free_shipping": false,
    "product_categories": [],
    "excluded_product_categories": [],
    "exclude_sale_items": true,
    "minimum_amount": "100.00",
    "maximum_amount": "0.00",
    "email_restrictions": [],
    "used_by": [],
    "_links": {
      "self": [
        {
          "href": "https://example.com/wp-json/wc/v1/coupons/113"
        }
      ],
      "collection": [
        {
          "href": "https://example.com/wp-json/wc/v1/coupons"
        }
      ]
    }
  }
]

Available parameters

Parameter Type Description
context string Scope under which the request is made; determines fields present in response. Options: view and edit.
page integer Current page of the collection.
per_page integer Maximum number of items to be returned in result set.
search string Limit results to those matching a string.
after string Limit response to resources published after a given ISO8601 compliant date.
before string Limit response to resources published before a given ISO8601 compliant date.
exclude string Ensure result set excludes specific ids.
include string Limit result set to specific ids.
offset integer Offset the result set by a specific number of items.
order string Order sort attribute ascending or descending. Default is asc. Options: asc and desc.
orderby string Sort collection by object attribute. Default is date, Options: date, id, include, title and slug.
code string Limit result set to resources with a specific code.

Update a coupon

This API lets you make changes to a coupon.

HTTP request

PUT
/wp-json/wc/v1/coupons/<id>
curl -X PUT https://example.com/wp-json/wc/v1/coupons/113 \
    -u consumer_key:consumer_secret \
    -H "Content-Type: application/json" \
    -d '{
  "amount": 5
}'
const data = {
  amount: 5
};

WooCommerce.put("coupons/113", data)
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php 
$data = [
    'amount' => 5
];

print_r($woocommerce->put('coupons/113', $data)); 
?>
data = {
    "amount": 5
}

print(wcapi.put("coupons/113", data).json())
data = {
  amount: 5
}

woocommerce.put("coupons/113", data).parsed_response

JSON response example:

{
  "id": 113,
  "code": "10off",
  "date_created": "2016-04-28T21:55:54",
  "date_modified": "2016-04-28T22:00:49",
  "discount_type": "percent",
  "description": "",
  "amount": "5.00",
  "expiry_date": null,
  "usage_count": 0,
  "individual_use": true,
  "product_ids": [],
  "exclude_product_ids": [],
  "usage_limit": null,
  "usage_limit_per_user": null,
  "limit_usage_to_x_items": 0,
  "free_shipping": false,
  "product_categories": [],
  "excluded_product_categories": [],
  "exclude_sale_items": true,
  "minimum_amount": "100.00",
  "maximum_amount": "0.00",
  "email_restrictions": [],
  "used_by": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v1/coupons/113"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v1/coupons"
      }
    ]
  }
}

Delete a coupon

This API helps you delete a coupon.

HTTP request

DELETE
/wp-json/wc/v1/coupons/<id>
curl -X DELETE https://example.com/wp-json/wc/v1/coupons/113?force=true \
    -u consumer_key:consumer_secret
WooCommerce.delete("coupons/113", {
  force: true
})
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php print_r($woocommerce->delete('coupons/113', ['force' => true])); ?>
print(wcapi.delete("coupons/113", params={"force": True}).json())
woocommerce.delete("coupons/113", force: true).parsed_response

JSON response example:

{
  "id": 113,
  "code": "10off",
  "date_created": "2016-04-28T21:55:54",
  "date_modified": "2016-04-28T22:00:49",
  "discount_type": "percent",
  "description": "",
  "amount": "5.00",
  "expiry_date": null,
  "usage_count": 0,
  "individual_use": true,
  "product_ids": [],
  "exclude_product_ids": [],
  "usage_limit": null,
  "usage_limit_per_user": null,
  "limit_usage_to_x_items": 0,
  "free_shipping": false,
  "product_categories": [],
  "excluded_product_categories": [],
  "exclude_sale_items": true,
  "minimum_amount": "100.00",
  "maximum_amount": "0.00",
  "email_restrictions": [],
  "used_by": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v1/coupons/113"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v1/coupons"
      }
    ]
  }
}

Available parameters

Parameter Type Description
force string Use true whether to permanently delete the coupon, Default is false.

Batch update coupons

This API helps you to batch create, update and delete multiple coupons.

HTTP request

POST
/wp-json/wc/v1/coupons/batch
curl -X POST https://example.com//wp-json/wc/v1/coupons/batch \
    -u consumer_key:consumer_secret \
    -H "Content-Type: application/json" \
    -d '{
  "create": [
    {
      "code": "20off",
      "discount_type": "percent",
      "amount": 20,
      "individual_use": true,
      "exclude_sale_items": true,
      "minimum_amount": "100.00"
    },
    {
      "code": "30off",
      "discount_type": "percent",
      "amount": 30,
      "individual_use": true,
      "exclude_sale_items": true,
      "minimum_amount": "100.00"
    }
  ],
  "update": [
    {
      "id": 113,
      "minimum_amount": "50.00"
    }
  ],
  "delete": [
    137
  ]
}'
const data = {
  create: [
    {
      code: "20off",
      discount_type: "percent",
      amount: 20,
      individual_use: true,
      exclude_sale_items: true,
      minimum_amount: "100.00"
    },
    {
      code: "30off",
      discount_type: "percent",
      amount: 30,
      individual_use: true,
      exclude_sale_items: true,
      minimum_amount: "100.00"
    }
  ],
  update: [
    {
      id: 113,
      minimum_amount: "50.00"
    }
  ],
  delete: [
    137
  ]
};

WooCommerce.post("customers/batch", data)
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php
$data = [
    'create' => [
        [
            'code' => '20off',
            'discount_type' => 'percent',
            'amount' => 20,
            'individual_use' => true,
            'exclude_sale_items' => true,
            'minimum_amount' => '100.00'
        ],
        [
            'code' => '30off',
            'discount_type' => 'percent',
            'amount' => 30,
            'individual_use' => true,
            'exclude_sale_items' => true,
            'minimum_amount' => '100.00'
        ]
    ],
    'update' => [
        [
            'id' => 113,
            'minimum_amount' => '50.00'
        ]
    ],
    'delete' => [
        137
    ]
];

print_r($woocommerce->post('customers/batch', $data));
?>
data = {
    "create": [
        {
            "code": "20off",
            "discount_type": "percent",
            "amount": 20,
            "individual_use": True,
            "exclude_sale_items": True,
            "minimum_amount": "100.00"
        },
        {
            "code": "30off",
            "discount_type": "percent",
            "amount": 30,
            "individual_use": True,
            "exclude_sale_items": True,
            "minimum_amount": "100.00"
        }
    ],
    "update": [
        {
            "id": 113,
            "minimum_amount": "50.00"
        }
    ],
    "delete": [
        137
    ]
}

print(wcapi.post("customers/batch", data).json())
data = {
  create: [
    {
      code: "20off",
      discount_type: "percent",
      amount: 20,
      individual_use: true,
      exclude_sale_items: true,
      minimum_amount: "100.00"
    },
    {
      code: "30off",
      discount_type: "percent",
      amount: 30,
      individual_use: true,
      exclude_sale_items: true,
      minimum_amount: "100.00"
    }
  ],
  update: [
    {
      id: 113,
      minimum_amount: "50.00"
    }
  ],
  delete: [
    137
  ]
}

woocommerce.post("customers/batch", data).parsed_response

JSON response example:

{
  "create": [
    {
      "id": 138,
      "code": "20off",
      "date_created": "2016-05-17T20:52:21",
      "date_modified": "2016-05-17T20:52:21",
      "discount_type": "percent",
      "description": "",
      "amount": "20.00",
      "expiry_date": null,
      "usage_count": 0,
      "individual_use": true,
      "product_ids": [],
      "exclude_product_ids": [],
      "usage_limit": null,
      "usage_limit_per_user": null,
      "limit_usage_to_x_items": 0,
      "free_shipping": false,
      "product_categories": [],
      "excluded_product_categories": [],
      "exclude_sale_items": true,
      "minimum_amount": "100.00",
      "maximum_amount": "0.00",
      "email_restrictions": [],
      "used_by": [],
      "_links": {
        "self": [
          {
            "href": "https://example.com/wp-json/wc/v1/coupons/138"
          }
        ],
        "collection": [
          {
            "href": "https://example.com/wp-json/wc/v1/coupons"
          }
        ]
      }
    },
    {
      "id": 139,
      "code": "30off",
      "date_created": "2016-05-17T20:52:22",
      "date_modified": "2016-05-17T20:52:22",
      "discount_type": "percent",
      "description": "",
      "amount": "30.00",
      "expiry_date": null,
      "usage_count": 0,
      "individual_use": true,
      "product_ids": [],
      "exclude_product_ids": [],
      "usage_limit": null,
      "usage_limit_per_user": null,
      "limit_usage_to_x_items": 0,
      "free_shipping": false,
      "product_categories": [],
      "excluded_product_categories": [],
      "exclude_sale_items": true,
      "minimum_amount": "100.00",
      "maximum_amount": "0.00",
      "email_restrictions": [],
      "used_by": [],
      "_links": {
        "self": [
          {
            "href": "https://example.com/wp-json/wc/v1/coupons/139"
          }
        ],
        "collection": [
          {
            "href": "https://example.com/wp-json/wc/v1/coupons"
          }
        ]
      }
    }
  ],
  "update": [
    {
      "id": 113,
      "code": "10off",
      "date_created": "2016-04-28T21:55:54",
      "date_modified": "2016-05-17T20:52:23",
      "discount_type": "percent",
      "description": "",
      "amount": "5.00",
      "expiry_date": null,
      "usage_count": 0,
      "individual_use": true,
      "product_ids": [],
      "exclude_product_ids": [],
      "usage_limit": null,
      "usage_limit_per_user": null,
      "limit_usage_to_x_items": 0,
      "free_shipping": false,
      "product_categories": [],
      "excluded_product_categories": [],
      "exclude_sale_items": true,
      "minimum_amount": "50.00",
      "maximum_amount": "0.00",
      "email_restrictions": [],
      "used_by": [],
      "_links": {
        "self": [
          {
            "href": "https://example.com/wp-json/wc/v1/coupons/113"
          }
        ],
        "collection": [
          {
            "href": "https://example.com/wp-json/wc/v1/coupons"
          }
        ]
      }
    }
  ],
  "delete": [
    {
      "id": 137,
      "code": "50off",
      "date_created": "2016-05-17T20:49:12",
      "date_modified": "2016-05-17T20:50:30",
      "discount_type": "fixed_cart",
      "description": "",
      "amount": "50.00",
      "expiry_date": null,
      "usage_count": 0,
      "individual_use": false,
      "product_ids": [],
      "exclude_product_ids": [],
      "usage_limit": null,
      "usage_limit_per_user": null,
      "limit_usage_to_x_items": 0,
      "free_shipping": false,
      "product_categories": [],
      "excluded_product_categories": [],
      "exclude_sale_items": false,
      "minimum_amount": "0.00",
      "maximum_amount": "0.00",
      "email_restrictions": [],
      "used_by": [],
      "_links": {
        "self": [
          {
            "href": "https://example.com/wp-json/wc/v1/coupons/137"
          }
        ],
        "collection": [
          {
            "href": "https://example.com/wp-json/wc/v1/coupons"
          }
        ]
      }
    }
  ]
}

Customers

The customer API allows you to create, view, update, and delete individual, or a batch, of customers.

Customer properties

Attribute Type Description
id integer Unique identifier for the resource. read-only
date_created date-time The date the customer was created, in the site's timezone. read-only
date_modified date-time The date the customer was last modified, in the site's timezone. read-only
email string The email address for the customer. mandatory
first_name string Customer first name.
last_name string Customer last name.
username string Customer login name. Can be generated automatically from the customer's email address if the option woocommerce_registration_generate_username is equal to yes cannot be changed maybe mandatory
password string Customer password. Can be generated automatically with wp_generate_password() if the "Automatically generate customer password" option is enabled, check the index meta for generate_password write-only maybe mandatory
last_order array Last order data. See Customer Last Order properties. read-only
orders_count integer Quantity of orders made by the customer. read-only
total_spent string Total amount spent. read-only
avatar_url string Avatar URL.
billing array List of billing address data. See Billing Address properties.
shipping array List of shipping address data. See Shipping Address properties.

Customer last order properties

Attribute Type Description
id integer Last order ID. read-only
date date-time UTC DateTime of the customer last order. read-only

Billing address properties

Attribute Type Description
first_name string First name.
last_name string Last name.
company string Company name.
address_1 string Address line 1.
address_2 string Address line 2.
city string City name.
state string ISO code or name of the state, province or district.
postcode string Postal code.
country string ISO code of the country.
email string Email address.
phone string Phone number.

Shipping address properties

Attribute Type Description
first_name string First name.
last_name string Last name.
company string Company name.
address_1 string Address line 1.
address_2 string Address line 2.
city string City name.
state string ISO code or name of the state, province or district.
postcode string Postal code.
country string ISO code of the country.

Create a customer

This API helps you to create a new customer.

HTTP request

POST
/wp-json/wc/v1/customers
curl -X POST https://example.com/wp-json/wc/v1/customers \
    -u consumer_key:consumer_secret \
    -H "Content-Type: application/json" \
    -d '{
  "email": "john.doe@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "username": "john.doe",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  }
}'
const data = {
  email: "john.doe@example.com",
  first_name: "John",
  last_name: "Doe",
  username: "john.doe",
  billing: {
    first_name: "John",
    last_name: "Doe",
    company: "",
    address_1: "969 Market",
    address_2: "",
    city: "San Francisco",
    state: "CA",
    postcode: "94103",
    country: "US",
    email: "john.doe@example.com",
    phone: "(555) 555-5555"
  },
  shipping: {
    first_name: "John",
    last_name: "Doe",
    company: "",
    address_1: "969 Market",
    address_2: "",
    city: "San Francisco",
    state: "CA",
    postcode: "94103",
    country: "US"
  }
};

WooCommerce.post("customers", data)
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php
$data = [
    'email' => 'john.doe@example.com',
    'first_name' => 'John',
    'last_name' => 'Doe',
    'username' => 'john.doe',
    'billing' => [
        'first_name' => 'John',
        'last_name' => 'Doe',
        'company' => '',
        'address_1' => '969 Market',
        'address_2' => '',
        'city' => 'San Francisco',
        'state' => 'CA',
        'postcode' => '94103',
        'country' => 'US',
        'email' => 'john.doe@example.com',
        'phone' => '(555) 555-5555'
    ],
    'shipping' => [
        'first_name' => 'John',
        'last_name' => 'Doe',
        'company' => '',
        'address_1' => '969 Market',
        'address_2' => '',
        'city' => 'San Francisco',
        'state' => 'CA',
        'postcode' => '94103',
        'country' => 'US'
    ]
];

print_r($woocommerce->post('customers', $data));
?>
data = {
    "email": "john.doe@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "username": "john.doe",
    "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "(555) 555-5555"
    },
    "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
    }
}

print(wcapi.post("customers", data).json())
data = {
  email: "john.doe@example.com",
  first_name: "John",
  last_name: "Doe",
  username: "john.doe",
  billing: {
    first_name: "John",
    last_name: "Doe",
    company: "",
    address_1: "969 Market",
    address_2: "",
    city: "San Francisco",
    state: "CA",
    postcode: "94103",
    country: "US",
    email: "john.doe@example.com",
    phone: "(555) 555-5555"
  },
  shipping: {
    first_name: "John",
    last_name: "Doe",
    company: "",
    address_1: "969 Market",
    address_2: "",
    city: "San Francisco",
    state: "CA",
    postcode: "94103",
    country: "US"
  }
}

woocommerce.post("customers", data).parsed_response

JSON response example:

{
  "id": 2,
  "date_created": "2016-05-03T17:58:35",
  "date_modified": "2016-05-11T21:34:43",
  "email": "john.doe@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "username": "john.doe",
  "last_order": {
    "id": 118,
    "date": "2016-05-03T18:10:43"
  },
  "orders_count": 3,
  "total_spent": "28.00",
  "avatar_url": "https://secure.gravatar.com/avatar/?s=96",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v1/customers/2"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v1/customers"
      }
    ]
  }
}

Retrieve a customer

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

HTTP request

GET
/wp-json/wc/v1/customers/<id>
curl https://example.com/wp-json/wc/v1/customers/2 \
    -u consumer_key:consumer_secret
WooCommerce.get("customers/2")
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php print_r($woocommerce->get('customers/2')); ?>
print(wcapi.get("customers/2").json())
woocommerce.get("customers/2").parsed_response

JSON response example:

{
  "id": 2,
  "date_created": "2016-05-03T17:58:35",
  "date_modified": "2016-05-11T21:34:43",
  "email": "john.doe@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "username": "john.doe",
  "last_order": {
    "id": 118,
    "date": "2016-05-03T18:10:43"
  },
  "orders_count": 3,
  "total_spent": "28.00",
  "avatar_url": "https://secure.gravatar.com/avatar/?s=96",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v1/customers/2"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v1/customers"
      }
    ]
  }
}

List all customers

This API helps you to view all the customers.

HTTP request

GET
/wp-json/wc/v1/customers
curl https://example.com/wp-json/wc/v1/customers \
    -u consumer_key:consumer_secret
WooCommerce.get("customers")
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php print_r($woocommerce->get('customers')); ?>
print(wcapi.get("customers").json())
woocommerce.get("customers").parsed_response

JSON response example:

[
  {
    "id": 5,
    "date_created": "2016-05-11T21:39:01",
    "date_modified": "2016-05-11T21:40:02",
    "email": "joao.silva@example.com",
    "first_name": "João",
    "last_name": "Silva",
    "username": "joao.silva",
    "last_order": {
      "id": null,
      "date": null
    },
    "orders_count": 0,
    "total_spent": "0.00",
    "avatar_url": "https://secure.gravatar.com/avatar/?s=96",
    "billing": {
      "first_name": "João",
      "last_name": "Silva",
      "company": "",
      "address_1": "Av. Brasil, 432",
      "address_2": "",
      "city": "Rio de Janeiro",
      "state": "RJ",
      "postcode": "12345-000",
      "country": "BR",
      "email": "joao.silva@example.com",
      "phone": "(55) 5555-5555"
    },
    "shipping": {
      "first_name": "João",
      "last_name": "Silva",
      "company": "",
      "address_1": "Av. Brasil, 432",
      "address_2": "",
      "city": "Rio de Janeiro",
      "state": "RJ",
      "postcode": "12345-000",
      "country": "BR"
    },
    "_links": {
      "self": [
        {
          "href": "https://example.com/wp-json/wc/v1/customers/5"
        }
      ],
      "collection": [
        {
          "href": "https://example.com/wp-json/wc/v1/customers"
        }
      ]
    }
  },
  {
    "id": 2,
    "date_created": "2016-05-03T17:58:35",
    "date_modified": "2016-05-11T21:34:43",
    "email": "john.doe@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "username": "john.doe",
    "last_order": {
      "id": 118,
      "date": "2016-05-03T18:10:43"
    },
    "orders_count": 3,
    "total_spent": "28.00",
    "avatar_url": "https://secure.gravatar.com/avatar/?s=96",
    "billing": {
      "first_name": "John",
      "last_name": "Doe",
      "company": "",
      "address_1": "969 Market",
      "address_2": "",
      "city": "San Francisco",
      "state": "CA",
      "postcode": "94103",
      "country": "US",
      "email": "john.doe@example.com",
      "phone": "(555) 555-5555"
    },
    "shipping": {
      "first_name": "John",
      "last_name": "Doe",
      "company": "",
      "address_1": "969 Market",
      "address_2": "",
      "city": "San Francisco",
      "state": "CA",
      "postcode": "94103",
      "country": "US"
    },
    "_links": {
      "self": [
        {
          "href": "https://example.com/wp-json/wc/v1/customers/2"
        }
      ],
      "collection": [
        {
          "href": "https://example.com/wp-json/wc/v1/customers"
        }
      ]
    }
  }
]

Available parameters

Parameter Type Description
context string Scope under which the request is made; determines fields present in response. Options: view and edit.
page integer Current page of the collection.
per_page integer Maximum number of items to be returned in result set.
search string Limit results to those matching a string.
exclude string Ensure result set excludes specific ids.
include string Limit result set to specific ids.
offset integer Offset the result set by a specific number of items.
order string Order sort attribute ascending or descending. Default is asc, Options: asc and desc.
orderby string Sort collection by object attribute. Default is name. Options: id, include, name and registered_date.
email string Limit result set to resources with a specific email.
role string Limit result set to resources with a specific role. Default: customer. Options (some plugins can add more user roles): all, administrator, editor, author, contributor, subscriber, customer and shop_manager

Update a customer

This API lets you make changes to a customer.

HTTP request

PUT
/wp-json/wc/v1/customers/<id>
curl -X PUT https://example.com/wp-json/wc/v1/customers/2 \
    -u consumer_key:consumer_secret \
    -H "Content-Type: application/json" \
    -d '{
  "first_name": "James",
  "billing": {
    "first_name": "James"
  },
  "shipping": {
    "first_name": "James"
  }
}'
const data = {
  first_name: "James",
  billing: {
    first_name: "James"
  },
  shipping: {
    first_name: "James"
  }
};

WooCommerce.put("customers/2", data)
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php 
$data = [
    'first_name' => 'James',
    'billing' => [
        'first_name' => 'James'
    ],
    'shipping' => [
        'first_name' => 'James'
    ]
];

print_r($woocommerce->put('customers/2', $data));
?>
data = {
    "first_name": "James",
    "billing": {
        "first_name": "James"
    },
    "shipping": {
        "first_name": "James"
    }
}

print(wcapi.put("customers/2", data).json())
data = {
  first_name: "James",
  billing: {
    first_name: "James"
  },
  shipping: {
    first_name: "James"
  }
}

woocommerce.put("customers/2", data).parsed_response

JSON response example:

{
  "id": 2,
  "date_created": "2016-05-03T17:58:35",
  "date_modified": "2016-05-11T21:43:45",
  "email": "john.doe@example.com",
  "first_name": "James",
  "last_name": "Doe",
  "username": "john.doe",
  "last_order": {
    "id": 118,
    "date": "2016-05-03T18:10:43"
  },
  "orders_count": 3,
  "total_spent": "28.00",
  "avatar_url": "https://secure.gravatar.com/avatar/?s=96",
  "billing": {
    "first_name": "James",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "James",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v1/customers/2"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v1/customers"
      }
    ]
  }
}

Delete a customer

This API helps you delete a customer.

HTTP request

DELETE
/wp-json/wc/v1/customers/<id>
curl -X DELETE https://example.com/wp-json/wc/v1/customers/2?force=true \
    -u consumer_key:consumer_secret
WooCommerce.delete("customers/2", {
  force: true
})
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php print_r($woocommerce->delete('customers/2', ['force' => true])); ?>
print(wcapi.delete("customers/2", params={"force": True}).json())
woocommerce.delete("customers/2", force: true).parsed_response

JSON response example:

{
  "id": 2,
  "date_created": "2016-05-03T17:58:35",
  "date_modified": "2016-05-11T21:43:45",
  "email": "john.doe@example.com",
  "first_name": "James",
  "last_name": "Doe",
  "username": "john.doe",
  "last_order": {
    "id": 118,
    "date": "2016-05-03T18:10:43"
  },
  "orders_count": 3,
  "total_spent": "28.00",
  "avatar_url": "https://secure.gravatar.com/avatar/?s=96",
  "billing": {
    "first_name": "James",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "James",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v1/customers/2"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v1/customers"
      }
    ]
  }
}

Available parameters

Parameter Type Description
force string Required to be true, as resource does not support trashing.

Batch update customers

This API helps you to batch create, update and delete multiple customers.

HTTP request

POST
/wp-json/wc/v1/customers/batch
curl -X POST https://example.com/wp-json/wc/v1/customers/batch \
    -u consumer_key:consumer_secret \
    -H "Content-Type: application/json" \
    -d '{
  "create": [
    {
      "email": "john.doe2@example.com",
      "first_name": "John",
      "last_name": "Doe",
      "username": "john.doe2",
      "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "(555) 555-5555"
      },
      "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
      }
    },
    {
      "email": "joao.silva2@example.com",
      "first_name": "João",
      "last_name": "Silva",
      "username": "joao.silva2",
      "billing": {
        "first_name": "João",
        "last_name": "Silva",
        "company": "",
        "address_1": "Av. Brasil, 432",
        "address_2": "",
        "city": "Rio de Janeiro",
        "state": "RJ",
        "postcode": "12345-000",
        "country": "BR",
        "email": "joao.silva@example.com",
        "phone": "(55) 5555-5555"
      },
      "shipping": {
        "first_name": "João",
        "last_name": "Silva",
        "company": "",
        "address_1": "Av. Brasil, 432",
        "address_2": "",
        "city": "Rio de Janeiro",
        "state": "RJ",
        "postcode": "12345-000",
        "country": "BR"
      }
    }
  ],
  "update": [
    {
      "id": 5,
      "billing": {
        "phone": "(11) 1111-1111"
      }
    }
  ],
  "delete": [
    2
  ]
}'
const data = {
  create: [
    {
      email: "john.doe2@example.com",
      first_name: "John",
      last_name: "Doe",
      username: "john.doe2",
      billing: {
        first_name: "John",
        last_name: "Doe",
        company: "",
        address_1: "969 Market",
        address_2: "",
        city: "San Francisco",
        state: "CA",
        postcode: "94103",
        country: "US",
        email: "john.doe@example.com",
        phone: "(555) 555-5555"
      },
      shipping: {
        first_name: "John",
        last_name: "Doe",
        company: "",
        address_1: "969 Market",
        address_2: "",
        city: "San Francisco",
        state: "CA",
        postcode: "94103",
        country: "US"
      }
    },
    {
      email: "joao.silva2@example.com",
      first_name: "João",
      last_name: "Silva",
      username: "joao.silva2",
      billing: {
        first_name: "João",
        last_name: "Silva",
        company: "",
        address_1: "Av. Brasil, 432",
        address_2: "",
        city: "Rio de Janeiro",
        state: "RJ",
        postcode: "12345-000",
        country: "BR",
        email: "joao.silva@example.com",
        phone: "(55) 5555-5555"
      },
      shipping: {
        first_name: "João",
        last_name: "Silva",
        company: "",
        address_1: "Av. Brasil, 432",
        address_2: "",
        city: "Rio de Janeiro",
        state: "RJ",
        postcode: "12345-000",
        country: "BR"
      }
    }
  ],
  update: [
    {
      id: 5,
      billing: {
        phone: "(11) 1111-1111"
      }
    }
  ],
  delete: [
    2
  ]
};

WooCommerce.post("customers/batch", data)
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php 
$data = [
    'create' => [
        [
            'email' => 'john.doe2@example.com',
            'first_name' => 'John',
            'last_name' => 'Doe',
            'username' => 'john.doe2',
            'billing' => [
                'first_name' => 'John',
                'last_name' => 'Doe',
                'company' => '',
                'address_1' => '969 Market',
                'address_2' => '',
                'city' => 'San Francisco',
                'state' => 'CA',
                'postcode' => '94103',
                'country' => 'US',
                'email' => 'john.doe@example.com',
                'phone' => '(555) 555-5555'
            ],
            'shipping' => [
                'first_name' => 'John',
                'last_name' => 'Doe',
                'company' => '',
                'address_1' => '969 Market',
                'address_2' => '',
                'city' => 'San Francisco',
                'state' => 'CA',
                'postcode' => '94103',
                'country' => 'US'
            ]
        ],
        [
            'email' => 'joao.silva2@example.com',
            'first_name' => 'João',
            'last_name' => 'Silva',
            'username' => 'joao.silva2',
            'billing' => [
                'first_name' => 'João',
                'last_name' => 'Silva',
                'company' => '',
                'address_1' => 'Av. Brasil, 432',
                'address_2' => '',
                'city' => 'Rio de Janeiro',
                'state' => 'RJ',
                'postcode' => '12345-000',
                'country' => 'BR',
                'email' => 'joao.silva@example.com',
                'phone' => '(55) 5555-5555'
            ],
            'shipping' => [
                'first_name' => 'João',
                'last_name' => 'Silva',
                'company' => '',
                'address_1' => 'Av. Brasil, 432',
                'address_2' => '',
                'city' => 'Rio de Janeiro',
                'state' => 'RJ',
                'postcode' => '12345-000',
                'country' => 'BR'
            ]
        ]
    ],
    'update' => [
        [
            'id' => 5,
            'billing' => [
                'phone' => '(11) 1111-1111'
            ]
        ]
    ],
    'delete' => [
        2
    ]
];

print_r($woocommerce->post('customers/batch', $data));
?>
data = {
    "create": [
        {
            "email": "john.doe2@example.com",
            "first_name": "John",
            "last_name": "Doe",
            "username": "john.doe2",
            "billing": {
                "first_name": "John",
                "last_name": "Doe",
                "company": "",
                "address_1": "969 Market",
                "address_2": "",
                "city": "San Francisco",
                "state": "CA",
                "postcode": "94103",
                "country": "US",
                "email": "john.doe@example.com",
                "phone": "(555) 555-5555"
            },
            "shipping": {
                "first_name": "John",
                "last_name": "Doe",
                "company": "",
                "address_1": "969 Market",
                "address_2": "",
                "city": "San Francisco",
                "state": "CA",
                "postcode": "94103",
                "country": "US"
            }
        },
        {
            "email": "joao.silva2@example.com",
            "first_name": "João",
            "last_name": "Silva",
            "username": "joao.silva2",
            "billing": {
                "first_name": "João",
                "last_name": "Silva",
                "company": "",
                "address_1": "Av. Brasil, 432",
                "address_2": "",
                "city": "Rio de Janeiro",
                "state": "RJ",
                "postcode": "12345-000",
                "country": "BR",
                "email": "joao.silva@example.com",
                "phone": "(55) 5555-5555"
            },
            "shipping": {
                "first_name": "João",
                "last_name": "Silva",
                "company": "",
                "address_1": "Av. Brasil, 432",
                "address_2": "",
                "city": "Rio de Janeiro",
                "state": "RJ",
                "postcode": "12345-000",
                "country": "BR"
            }
        }
    ],
    "update": [
        {
            "id": 5,
            "billing": {
                "phone": "(11) 1111-1111"
            }
        }
    ],
    "delete": [
        2
    ]
}

print(wcapi.post("customers/batch", data).json())
data = {
  create: [
    {
      email: "john.doe2@example.com",
      first_name: "John",
      last_name: "Doe",
      username: "john.doe2",
      billing: {
        first_name: "John",
        last_name: "Doe",
        company: "",
        address_1: "969 Market",
        address_2: "",
        city: "San Francisco",
        state: "CA",
        postcode: "94103",
        country: "US",
        email: "john.doe@example.com",
        phone: "(555) 555-5555"
      },
      shipping: {
        first_name: "John",
        last_name: "Doe",
        company: "",
        address_1: "969 Market",
        address_2: "",
        city: "San Francisco",
        state: "CA",
        postcode: "94103",
        country: "US"
      }
    },
    {
      email: "joao.silva2@example.com",
      first_name: "João",
      last_name: "Silva",
      username: "joao.silva2",
      billing: {
        first_name: "João",
        last_name: "Silva",
        company: "",
        address_1: "Av. Brasil, 432",
        address_2: "",
        city: "Rio de Janeiro",
        state: "RJ",
        postcode: "12345-000",
        country: "BR",
        email: "joao.silva@example.com",
        phone: "(55) 5555-5555"
      },
      shipping: {
        first_name: "João",
        last_name: "Silva",
        company: "",
        address_1: "Av. Brasil, 432",
        address_2: "",
        city: "Rio de Janeiro",
        state: "RJ",
        postcode: "12345-000",
        country: "BR"
      }
    }
  ],
  update: [
    {
      id: 5,
      billing: {
        phone: "(11) 1111-1111"
      }
    }
  ],
  delete: [
    2
  ]
}

woocommerce.post("customers/batch", data).parsed_response

JSON response example:

{
  "create": [
    {
      "id": 6,
      "date_created": "2016-05-11T22:06:32",
      "date_modified": "2016-05-11T22:07:31",
      "email": "john.doe2@example.com",
      "first_name": "John",
      "last_name": "Doe",
      "username": "john.doe2",
      "last_order": {
        "id": null,
        "date": null
      },
      "orders_count": 0,
      "total_spent": "0.00",
      "avatar_url": "https://secure.gravatar.com/avatar/?s=96",
      "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "(555) 555-5555"
      },
      "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
      },
      "_links": {
        "self": [
          {
            "href": "https://example.com/wp-json/wc/v1/customers/6"
          }
        ],
        "collection": [
          {
            "href": "https://example.com/wp-json/wc/v1/customers"
          }
        ]
      }
    },
    {
      "id": 7,
      "date_created": "2016-05-11T22:07:33",
      "date_modified": "2016-05-11T22:07:37",
      "email": "joao.silva2@example.com",
      "first_name": "João",
      "last_name": "Silva",
      "username": "joao.silva2",
      "last_order": {
        "id": null,
        "date": null
      },
      "orders_count": 0,
      "total_spent": "0.00",
      "avatar_url": "https://secure.gravatar.com/avatar/?s=96",
      "billing": {
        "first_name": "João",
        "last_name": "Silva",
        "company": "",
        "address_1": "Av. Brasil, 432",
        "address_2": "",
        "city": "Rio de Janeiro",
        "state": "RJ",
        "postcode": "12345-000",
        "country": "BR",
        "email": "joao.silva@example.com",
        "phone": "(55) 5555-5555"
      },
      "shipping": {
        "first_name": "João",
        "last_name": "Silva",
        "company": "",
        "address_1": "Av. Brasil, 432",
        "address_2": "",
        "city": "Rio de Janeiro",
        "state": "RJ",
        "postcode": "12345-000",
        "country": "BR"
      },
      "_links": {
        "self": [
          {
            "href": "https://example.com/wp-json/wc/v1/customers/7"
          }
        ],
        "collection": [
          {
            "href": "https://example.com/wp-json/wc/v1/customers"
          }
        ]
      }
    }
  ],
  "update": [
    {
      "id": 5,
      "date_created": "2016-05-11T21:39:01",
      "date_modified": "2016-05-11T22:04:36",
      "email": "joao.silva@example.com",
      "first_name": "João",
      "last_name": "Silva",
      "username": "joao.silva",
      "last_order": {
        "id": null,
        "date": null
      },
      "orders_count": 0,
      "total_spent": "0.00",
      "avatar_url": "https://secure.gravatar.com/avatar/?s=96",
      "billing": {
        "first_name": "João",
        "last_name": "Silva",
        "company": "",
        "address_1": "Av. Brasil, 432",
        "address_2": "",
        "city": "Rio de Janeiro",
        "state": "RJ",
        "postcode": "12345-000",
        "country": "BR",
        "email": "joao.silva@example.com",
        "phone": "(11) 1111-1111"
      },
      "shipping": {
        "first_name": "João",
        "last_name": "Silva",
        "company": "",
        "address_1": "Av. Brasil, 432",
        "address_2": "",
        "city": "Rio de Janeiro",
        "state": "RJ",
        "postcode": "12345-000",
        "country": "BR"
      },
      "_links": {
        "self": [
          {
            "href": "https://example.com/wp-json/wc/v1/customers/5"
          }
        ],
        "collection": [
          {
            "href": "https://example.com/wp-json/wc/v1/customers"
          }
        ]
      }
    }
  ],
  "delete": [
    {
      "id": 2,
      "date_created": "2016-05-03T17:58:35",
      "date_modified": "2016-05-11T21:43:45",
      "email": "john.doe@example.com",
      "first_name": "James",
      "last_name": "Doe",
      "username": "john.doe",
      "last_order": {
        "id": 118,
        "date": "2016-05-03T18:10:43"
      },
      "orders_count": 3,
      "total_spent": "28.00",
      "avatar_url": "https://secure.gravatar.com/avatar/?s=96",
      "billing": {
        "first_name": "James",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "(555) 555-5555"
      },
      "shipping": {
        "first_name": "James",
        "last_name": "Doe",
        "company": "",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
      },
      "_links": {
        "self": [
          {
            "href": "https://example.com/wp-json/wc/v1/customers/2"
          }
        ],
        "collection": [
          {
            "href": "https://example.com/wp-json/wc/v1/customers"
          }
        ]
      }
    }
  ]
}

Retrieve customer downloads

This API lets you retrieve customer downloads permissions.

HTTP request

GET
/wp-json/wc/v1/customers/<id>/downloads
curl https://example.com/wp-json/wc/v1/customers/2/downloads \
    -u consumer_key:consumer_secret
WooCommerce.get("customers/2/downloads")
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php print_r($woocommerce->get('customers/2/downloads')); ?>
print(wcapi.get("customers/2/downloads").json())
woocommerce.get("customers/2/downloads").parsed_response

JSON response example:

[
  {
    "download_url": "https://example.com/?download_file=96&order=wc_order_571a7260c0da5&email=john.dow@xanmple.com&key=1789931e0c14ad9909a50c826f10c169",
    "download_id": "1789931e0c14ad9909a50c826f10c169",
    "product_id": 96,
    "download_name": "Woo Album #4 &ndash; Testing",
    "order_id": 105,
    "order_key": "wc_order_571a7260c0da5",
    "downloads_remaining": "unlimited",
    "access_expires": "never",
    "file": {
      "name": "Testing",
      "file": "http://example.com/wp-content/uploads/2013/06/cd_5_angle.jpg"
    },
    "_links": {
      "collection": [
        {
          "href": "https://example.com/wp-json/wc/v1/customers/1/downloads"
        }
      ],
      "product": [
        {
          "href": "https://example.com/wp-json/wc/v1/products/96"
        }
      ],
      "order": [
        {
          "href": "https://example.com/wp-json/wc/v1/orders/105"
        }
      ]
    }
  }
]

Customer downloads properties

Attribute Type Description
download_url string Download file URL. read-only
download_id string Download ID (MD5). read-only
product_id integer Downloadable product ID. read-only
download_name string Downloadable file name. read-only
order_id integer Order ID. read-only
order_key string Order key. read-only
downloads_remaining string Amount of downloads remaining. read-only
access_expires string The date when the download access expires, in the site's timezone. read-only
file array File details with name (file name) and file (file URL) attributes. read-only

Orders

The orders API allows you to create, view, update, and delete individual, or a batch, of orders.

Order properties

Attribute Type Description
id integer Unique identifier for the resource. read-only
parent_id integer Parent order ID.
status string Order status. Default is pending. Options (plugins may include new status): pending, processing, on-hold, completed, cancelled, refunded and failed.
order_key string Order key. read-only
number string Order number. read-only
currency string Currency the order was created with, in ISO format, e.g USD. Default is the current store currency.
version string Version of WooCommerce when the order was made. read-only
prices_include_tax boolean Shows if the prices included tax during checkout. read-only
date_created date-time The date the order was created, in the site's timezone. read-only
date_modified date-time The date the order was last modified, in the site's timezone. read-only
customer_id integer User ID who owns the order. Use 0 for guests. Default is 0.
discount_total string Total discount amount for the order. read-only
discount_tax string Total discount tax amount for the order. read-only
shipping_total string Total shipping amount for the order. read-only
shipping_tax string Total shipping tax amount for the order. read-only
cart_tax string Sum of line item taxes only. read-only
total string Grand total. read-only
total_tax string Sum of all taxes. read-only
billing object Billing address. See Customer Billing Address properties.
shipping object Shipping address. See Customer Shipping Address properties.
payment_method string Payment method ID.
payment_method_title string Payment method title.
set_paid boolean Define if the order is paid. It will set the status to processing and reduce stock items. Default is false. write-only
transaction_id string Unique transaction ID. In write-mode only is available if set_paid is true.
customer_ip_address string Customer's IP address. read-only
customer_user_agent string User agent of the customer. read-only
created_via string Shows where the order was created. read-only
customer_note string Note left by customer during checkout.
date_completed date-time The date the order was completed, in the site's timezone. read-only
date_paid date-time The date the order has been paid, in the site's timezone. read-only
cart_hash string MD5 hash of cart items to ensure orders are not modified. read-only
line_items array Line items data. See Line Items properties.
tax_lines array Tax lines data. See Tax Lines properties. read-only
shipping_lines array Shipping lines data. See Shipping Lines properties.
fee_lines array Fee lines data. See Fee Lines Properties.
coupon_lines array Coupons line data. See Coupon Lines properties.
refunds array List of refunds. See Refunds Lines properties. read-only

Line item properties

Attribute Type Description
id integer Item ID. read-only
name string Product name. read-only
sku string Product SKU. read-only
product_id integer Product ID.
variation_id integer Variation ID, if applicable.
quantity integer Quantity ordered.
tax_class string Tax class of product. read-only
price string Product price. read-only
subtotal string Line subtotal (before discounts).
subtotal_tax string Line subtotal tax (before discounts).
total string Line total (after discounts).
total_tax string Line total tax (after discounts).
taxes array Line taxes with id, total and subtotal. read-only
meta array Line item meta data with key, label and value. read-only

Tax line properties

Attribute Type Description
id integer Item ID. read-only
rate_code string Tax rate code. read-only
rate_id string Tax rate ID. read-only
label string Tax rate label. read-only
compound boolean Show if is a compound tax rate. Compound tax rates are applied on top of other tax rates. read-only
tax_total string Tax total (not including shipping taxes). read-only
shipping_tax_total string Shipping tax total. read-only

Shipping line properties

Attribute Type Description
id integer Item ID. read-only
method_title string Shipping method name.
method_id string Shipping method ID. required
total string Line total (after discounts).
total_tax string Line total tax (after discounts). read-only
taxes array Line taxes with id and total. read-only

Fee line properties

Attribute Type Description
id integer Item ID. read-only
name string Fee name. required
tax_class string Tax class. required if the fee is taxable
tax_status string Tax status of fee. Set to taxable if need apply taxes.
total string Line total (after discounts).
total_tax string Line total tax (after discounts).
taxes array Line taxes with id, total and subtotal. read-only

Coupon line properties

Attribute Type Description
id integer Item ID. read-only
code string Coupon code. required
discount string Discount total. required
discount_tax string Discount total tax. read-only

Refund line properties

Attribute Type Description
id integer Refund ID. read-only
reason string Refund reason. read-only
total string Refund total. read-only

Create an order

This API helps you to create a new order.

HTTP request

POST
/wp-json/wc/v1/orders

Example of create a paid order:

curl -X POST https://example.com/wp-json/wc/v1/orders \
    -u consumer_key:consumer_secret \
    -H "Content-Type: application/json" \
    -d '{
  "payment_method": "bacs",
  "payment_method_title": "Direct Bank Transfer",
  "set_paid": true,
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "line_items": [
    {
      "product_id": 93,
      "quantity": 2
    },
    {
      "product_id": 22,
      "variation_id": 23,
      "quantity": 1
    }
  ],
  "shipping_lines": [
    {
      "method_id": "flat_rate",
      "method_title": "Flat Rate",
      "total": "10.00"
    }
  ]
}'
const data = {
  payment_method: "bacs",
  payment_method_title: "Direct Bank Transfer",
  set_paid: true,
  billing: {
    first_name: "John",
    last_name: "Doe",
    address_1: "969 Market",
    address_2: "",
    city: "San Francisco",
    state: "CA",
    postcode: "94103",
    country: "US",
    email: "john.doe@example.com",
    phone: "(555) 555-5555"
  },
  shipping: {
    first_name: "John",
    last_name: "Doe",
    address_1: "969 Market",
    address_2: "",
    city: "San Francisco",
    state: "CA",
    postcode: "94103",
    country: "US"
  },
  line_items: [
    {
      product_id: 93,
      quantity: 2
    },
    {
      product_id: 22,
      variation_id: 23,
      quantity: 1
    }
  ],
  shipping_lines: [
    {
      method_id: "flat_rate",
      method_title: "Flat Rate",
      total: "10.00"
    }
  ]
};

WooCommerce.post("orders", data)
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php
$data = [
    'payment_method' => 'bacs',
    'payment_method_title' => 'Direct Bank Transfer',
    'set_paid' => true,
    'billing' => [
        'first_name' => 'John',
        'last_name' => 'Doe',
        'address_1' => '969 Market',
        'address_2' => '',
        'city' => 'San Francisco',
        'state' => 'CA',
        'postcode' => '94103',
        'country' => 'US',
        'email' => 'john.doe@example.com',
        'phone' => '(555) 555-5555'
    ],
    'shipping' => [
        'first_name' => 'John',
        'last_name' => 'Doe',
        'address_1' => '969 Market',
        'address_2' => '',
        'city' => 'San Francisco',
        'state' => 'CA',
        'postcode' => '94103',
        'country' => 'US'
    ],
    'line_items' => [
        [
            'product_id' => 93,
            'quantity' => 2
        ],
        [
            'product_id' => 22,
            'variation_id' => 23,
            'quantity' => 1
        ]
    ],
    'shipping_lines' => [
        [
            'method_id' => 'flat_rate',
            'method_title' => 'Flat Rate',
            'total' => '10.00'
        ]
    ]
];

print_r($woocommerce->post('orders', $data));
?>
data = {
    "payment_method": "bacs",
    "payment_method_title": "Direct Bank Transfer",
    "set_paid": True,
    "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "(555) 555-5555"
    },
    "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
    },
    "line_items": [
        {
            "product_id": 93,
            "quantity": 2
        },
        {
            "product_id": 22,
            "variation_id": 23,
            "quantity": 1
        }
    ],
    "shipping_lines": [
        {
            "method_id": "flat_rate",
            "method_title": "Flat Rate",
            "total": "10.00"
        }
    ]
}

print(wcapi.post("orders", data).json())
data = {
  payment_method: "bacs",
  payment_method_title: "Direct Bank Transfer",
  set_paid: true,
  billing: {
    first_name: "John",
    last_name: "Doe",
    address_1: "969 Market",
    address_2: "",
    city: "San Francisco",
    state: "CA",
    postcode: "94103",
    country: "US",
    email: "john.doe@example.com",
    phone: "(555) 555-5555"
  },
  shipping: {
    first_name: "John",
    last_name: "Doe",
    address_1: "969 Market",
    address_2: "",
    city: "San Francisco",
    state: "CA",
    postcode: "94103",
    country: "US"
  },
  line_items: [
    {
      product_id: 93,
      quantity: 2
    },
    {
      product_id: 22,
      variation_id: 23,
      quantity: 1
    }
  ],
  shipping_lines: [
    {
      method_id: "flat_rate",
      method_title: "Flat Rate",
      total: "10.00"
    }
  ]
}

woocommerce.post("orders", data).parsed_response

JSON response example:

{
  "id": 154,
  "parent_id": 0,
  "status": "processing",
  "order_key": "wc_order_574cc02467274",
  "number": "154",
  "currency": "USD",
  "version": "2.6.0",
  "prices_include_tax": false,
  "date_created": "2016-05-30T22:35:16",
  "date_modified": "2016-05-30T22:35:16",
  "customer_id": 0,
  "discount_total": "0.00",
  "discount_tax": "0.00",
  "shipping_total": "10.00",
  "shipping_tax": "0.00",
  "cart_tax": "1.95",
  "total": "37.95",
  "total_tax": "1.95",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "payment_method": "bacs",
  "payment_method_title": "bacs",
  "transaction_id": "",
  "customer_ip_address": "127.0.0.1",
  "customer_user_agent": "curl/7.47.0",
  "created_via": "rest-api",
  "customer_note": "",
  "date_completed": "2016-05-30T19:35:16",
  "date_paid": "2016-05-30 19:35:25",
  "cart_hash": "",
  "line_items": [
    {
      "id": 18,
      "name": "Woo Single #1",
      "sku": "",
      "product_id": 93,
      "variation_id": 0,
      "quantity": 2,
      "tax_class": "",
      "price": "3.00",
      "subtotal": "6.00",
      "subtotal_tax": "0.45",
      "total": "6.00",
      "total_tax": "0.45",
      "taxes": [
        {
          "id": 75,
          "total": 0.45,
          "subtotal": 0.45
        }
      ],
      "meta": []
    },
    {
      "id": 19,
      "name": "Ship Your Idea",
      "sku": "",
      "product_id": 22,
      "variation_id": 23,
      "quantity": 1,
      "tax_class": "",
      "price": "20.00",
      "subtotal": "20.00",
      "subtotal_tax": "1.50",
      "total": "20.00",
      "total_tax": "1.50",
      "taxes": [
        {
          "id": 75,
          "total": 1.5,
          "subtotal": 1.5
        }
      ],
      "meta": [
        {
          "key": "pa_color",
          "label": "Color",
          "value": "Black"
        }
      ]
    }
  ],
  "tax_lines": [
    {
      "id": 21,
      "rate_code": "US-CA-STATE TAX",
      "rate_id": "75",
      "label": "State Tax",
      "compound": false,
      "tax_total": "1.95",
      "shipping_tax_total": "0.00"
    }
  ],
  "shipping_lines": [
    {
      "id": 20,
      "method_title": "Flat Rate",
      "method_id": "flat_rate",
      "total": "10.00",
      "total_tax": "0.00",
      "taxes": []
    }
  ],
  "fee_lines": [],
  "coupon_lines": [],
  "refunds": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v1/orders/154"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v1/orders"
      }
    ]
  }
}

Retrieve an order

This API lets you retrieve and view a specific order.

HTTP request

GET
/wp-json/wc/v1/orders/<id>
curl https://example.com/wp-json/wc/v1/orders/154 \
    -u consumer_key:consumer_secret
WooCommerce.get("orders/154")
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php print_r($woocommerce->get('orders/154')); ?>
print(wcapi.get("orders/154").json())
woocommerce.get("orders/154").parsed_response

JSON response example:

{
  "id": 154,
  "parent_id": 0,
  "status": "processing",
  "order_key": "wc_order_574cc02467274",
  "number": "154",
  "currency": "USD",
  "version": "2.6.0",
  "prices_include_tax": false,
  "date_created": "2016-05-30T22:35:16",
  "date_modified": "2016-05-30T22:35:16",
  "customer_id": 0,
  "discount_total": "0.00",
  "discount_tax": "0.00",
  "shipping_total": "10.00",
  "shipping_tax": "0.00",
  "cart_tax": "1.95",
  "total": "37.95",
  "total_tax": "1.95",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "payment_method": "bacs",
  "payment_method_title": "bacs",
  "transaction_id": "",
  "customer_ip_address": "127.0.0.1",
  "customer_user_agent": "curl/7.47.0",
  "created_via": "rest-api",
  "customer_note": "",
  "date_completed": "2016-05-30T19:35:16",
  "date_paid": "2016-05-30 19:35:25",
  "cart_hash": "",
  "line_items": [
    {
      "id": 18,
      "name": "Woo Single #1",
      "sku": "",
      "product_id": 93,
      "variation_id": 0,
      "quantity": 2,
      "tax_class": "",
      "price": "3.00",
      "subtotal": "6.00",
      "subtotal_tax": "0.45",
      "total": "6.00",
      "total_tax": "0.45",
      "taxes": [
        {
          "id": 75,
          "total": 0.45,
          "subtotal": 0.45
        }
      ],
      "meta": []
    },
    {
      "id": 19,
      "name": "Ship Your Idea",
      "sku": "",
      "product_id": 22,
      "variation_id": 23,
      "quantity": 1,
      "tax_class": "",
      "price": "20.00",
      "subtotal": "20.00",
      "subtotal_tax": "1.50",
      "total": "20.00",
      "total_tax": "1.50",
      "taxes": [
        {
          "id": 75,
          "total": 1.5,
          "subtotal": 1.5
        }
      ],
      "meta": [
        {
          "key": "pa_color",
          "label": "Color",
          "value": "Black"
        }
      ]
    }
  ],
  "tax_lines": [
    {
      "id": 21,
      "rate_code": "US-CA-STATE TAX",
      "rate_id": "75",
      "label": "State Tax",
      "compound": false,
      "tax_total": "1.95",
      "shipping_tax_total": "0.00"
    }
  ],
  "shipping_lines": [
    {
      "id": 20,
      "method_title": "Flat Rate",
      "method_id": "flat_rate",
      "total": "10.00",
      "total_tax": "0.00",
      "taxes": []
    }
  ],
  "fee_lines": [],
  "coupon_lines": [],
  "refunds": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v1/orders/154"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v1/orders"
      }
    ]
  }
}

Available parameters

Parameter Type Description
dp string Number of decimal points to use in each resource.

List all orders

This API helps you to view all the orders.

HTTP request

GET
/wp-json/wc/v1/orders
curl https://example.com/wp-json/wc/v1/orders \
    -u consumer_key:consumer_secret
WooCommerce.get("orders")
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php print_r($woocommerce->get('orders')); ?>
print(wcapi.get("orders").json())
woocommerce.get("orders").parsed_response

JSON response example:

[
  {
    "id": 154,
    "parent_id": 0,
    "status": "processing",
    "order_key": "wc_order_574cc02467274",
    "number": "154",
    "currency": "USD",
    "version": "2.6.0",
    "prices_include_tax": false,
    "date_created": "2016-05-30T22:35:16",
    "date_modified": "2016-05-30T22:35:16",
    "customer_id": 0,
    "discount_total": "0.00",
    "discount_tax": "0.00",
    "shipping_total": "10.00",
    "shipping_tax": "0.00",
    "cart_tax": "1.95",
    "total": "37.95",
    "total_tax": "1.95",
    "billing": {
      "first_name": "John",
      "last_name": "Doe",
      "company": "",
      "address_1": "969 Market",
      "address_2": "",
      "city": "San Francisco",
      "state": "CA",
      "postcode": "94103",
      "country": "US",
      "email": "john.doe@example.com",
      "phone": "(555) 555-5555"
    },
    "shipping": {
      "first_name": "John",
      "last_name": "Doe",
      "company": "",
      "address_1": "969 Market",
      "address_2": "",
      "city": "San Francisco",
      "state": "CA",
      "postcode": "94103",
      "country": "US"
    },
    "payment_method": "bacs",
    "payment_method_title": "bacs",
    "transaction_id": "",
    "customer_ip_address": "127.0.0.1",
    "customer_user_agent": "curl/7.47.0",
    "created_via": "rest-api",
    "customer_note": "",
    "date_completed": "2016-05-30T19:35:16",
    "date_paid": "2016-05-30 19:35:25",
    "cart_hash": "",
    "line_items": [
      {
        "id": 18,
        "name": "Woo Single #1",
        "sku": "",
        "product_id": 93,
        "variation_id": 0,
        "quantity": 2,
        "tax_class": "",
        "price": "3.00",
        "subtotal": "6.00",
        "subtotal_tax": "0.45",
        "total": "6.00",
        "total_tax": "0.45",
        "taxes": [
          {
            "id": 75,
            "total": 0.45,
            "subtotal": 0.45
          }
        ],
        "meta": []
      },
      {
        "id": 19,
        "name": "Ship Your Idea",
        "sku": "",
        "product_id": 22,
        "variation_id": 23,
        "quantity": 1,
        "tax_class": "",
        "price": "20.00",
        "subtotal": "20.00",
        "subtotal_tax": "1.50",
        "total": "20.00",
        "total_tax": "1.50",
        "taxes": [
          {
            "id": 75,
            "total": 1.5,
            "subtotal": 1.5
          }
        ],
        "meta": [
          {
            "key": "pa_color",
            "label": "Color",
            "value": "Black"
          }
        ]
      }
    ],
    "tax_lines": [
      {
        "id": 21,
        "rate_code": "US-CA-STATE TAX",
        "rate_id": "75",
        "label": "State Tax",
        "compound": false,
        "tax_total": "1.95",
        "shipping_tax_total": "0.00"
      }
    ],
    "shipping_lines": [
      {
        "id": 20,
        "method_title": "Flat Rate",
        "method_id": "flat_rate",
        "total": "10.00",
        "total_tax": "0.00",
        "taxes": []
      }
    ],
    "fee_lines": [],
    "coupon_lines": [],
    "refunds": [],
    "_links": {
      "self": [
        {
          "href": "https://example.com/wp-json/wc/v1/orders/154"
        }
      ],
      "collection": [
        {
          "href": "https://example.com/wp-json/wc/v1/orders"
        }
      ]
    }
  },
  {
    "id": 116,
    "parent_id": 0,
    "status": "processing",
    "order_key": "wc_order_5728e6e53d2a4",
    "number": "116",
    "currency": "USD",
    "version": "2.6.0",
    "prices_include_tax": false,
    "date_created": "2016-05-03T17:59:00",
    "date_modified": "2016-05-30T22:37:31",
    "customer_id": 1,
    "discount_total": "0.00",
    "discount_tax": "0.00",
    "shipping_total": "10.00",
    "shipping_tax": "0.00",
    "cart_tax": "0.00",
    "total": "14.00",
    "total_tax": "0.00",
    "billing": {
      "first_name": "John",
      "last_name": "Doe",
      "company": "",
      "address_1": "969 Market",
      "address_2": "",
      "city": "San Francisco",
      "state": "CA",
      "postcode": "94103",
      "country": "US",
      "email": "john.doe@claudiosmweb.com",
      "phone": "(555) 555-5555"
    },
    "shipping": {
      "first_name": "John",
      "last_name": "Doe",
      "company": "",
      "address_1": "969 Market",
      "address_2": "",
      "city": "San Francisco",
      "state": "CA",
      "postcode": "94103",
      "country": "US"
    },
    "payment_method": "bacs",
    "payment_method_title": "Direct Bank Transfer",
    "transaction_id": "",
    "customer_ip_address": "127.0.0.1",
    "customer_user_agent": "curl/7.47.0",
    "created_via": "",
    "customer_note": "",
    "date_completed": "2016-05-30T19:35:16",
    "date_paid": "2016-05-03 14:59:12",
    "cart_hash": "",
    "line_items": [
      {
        "id": 6,
        "name": "Woo Single #2",
        "sku": "12345",
        "product_id": 99,
        "variation_id": 0,
        "quantity": 2,
        "tax_class": "",
        "price": "2.00",
        "subtotal": "4.00",
        "subtotal_tax": "0.00",
        "total": "4.00",
        "total_tax": "0.00",
        "taxes": [],
        "meta": []
      }
    ],
    "tax_lines": [],
    "shipping_lines": [
      {
        "id": 7,
        "method_title": "Flat Rate",
        "method_id": "flat_rate",
        "total": "10.00",
        "total_tax": "0.00",
        "taxes": []
      }
    ],
    "fee_lines": [],
    "coupon_lines": [],
    "refunds": [],
    "_links": {
      "self": [
        {
          "href": "https://example.com/wp-json/wc/v1/orders/116"
        }
      ],
      "collection": [
        {
          "href": "https://example.com/wp-json/wc/v1/orders"
        }
      ],
      "customer": [
        {
          "href": "https://example.com/wp-json/wc/v1/customers/1"
        }
      ]
    }
  }
]

Available parameters

Parameter Type Description
context string Scope under which the request is made; determines fields present in response. Options: view and edit.
page integer Current page of the collection.
per_page integer Maximum number of items to be returned in result set.
search string Limit results to those matching a string.
after string Limit response to resources published after a given ISO8601 compliant date.
before string Limit response to resources published before a given ISO8601 compliant date.
exclude string Ensure result set excludes specific ids.
include string Limit result set to specific ids.
offset integer Offset the result set by a specific number of items.
order string Order sort attribute ascending or descending. Default is asc. Options: asc and desc.
orderby string Sort collection by object attribute. Default is date, Options: date, id, include, title and slug.
status string Limit result set to orders assigned a specific status. Default is any. Options (plugins may add new status): any, pending, processing, on-hold, completed, cancelled, refunded and failed.
customer string Limit result set to orders assigned a specific customer.
product string Limit result set to orders assigned a specific product.
dp string Number of decimal points to use in each resource.

Update an Order

This API lets you make changes to an order.

HTTP Request

PUT
/wp-json/wc/v1/orders/<id>
curl -X PUT https://example.com/wp-json/wc/v1/orders/154 \
    -u consumer_key:consumer_secret \
    -H "Content-Type: application/json" \
    -d '{
  "status": "completed"
}'
const data = {
  status: "completed"
};

WooCommerce.put("orders/154", data)
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php
$data = [
    'status' => 'completed'
];

print_r($woocommerce->put('orders/154', $data));
?>
data = {
    "status": "completed"
}

print(wcapi.put("orders/154", data).json())
data = {
  status: "completed"
}

woocommerce.put("orders/154", data).parsed_response

JSON response example:

{
  "id": 154,
  "parent_id": 0,
  "status": "completed",
  "order_key": "wc_order_574cc02467274",
  "number": "154",
  "currency": "USD",
  "version": "2.6.0",
  "prices_include_tax": false,
  "date_created": "2016-05-30T22:35:16",
  "date_modified": "2016-05-30T22:46:16",
  "customer_id": 0,
  "discount_total": "0.00",
  "discount_tax": "0.00",
  "shipping_total": "10.00",
  "shipping_tax": "0.00",
  "cart_tax": "1.95",
  "total": "37.95",
  "total_tax": "1.95",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "payment_method": "bacs",
  "payment_method_title": "bacs",
  "transaction_id": "",
  "customer_ip_address": "127.0.0.1",
  "customer_user_agent": "curl/7.47.0",
  "created_via": "rest-api",
  "customer_note": "",
  "date_completed": "2016-05-30T19:47:46",
  "date_paid": "2016-05-30 19:35:25",
  "cart_hash": "",
  "line_items": [
    {
      "id": 18,
      "name": "Woo Single #1",
      "sku": "",
      "product_id": 93,
      "variation_id": 0,
      "quantity": 2,
      "tax_class": "",
      "price": "3.00",
      "subtotal": "6.00",
      "subtotal_tax": "0.45",
      "total": "6.00",
      "total_tax": "0.45",
      "taxes": [
        {
          "id": 75,
          "total": 0.45,
          "subtotal": 0.45
        }
      ],
      "meta": []
    },
    {
      "id": 19,
      "name": "Ship Your Idea",
      "sku": "",
      "product_id": 22,
      "variation_id": 23,
      "quantity": 1,
      "tax_class": "",
      "price": "20.00",
      "subtotal": "20.00",
      "subtotal_tax": "1.50",
      "total": "20.00",
      "total_tax": "1.50",
      "taxes": [
        {
          "id": 75,
          "total": 1.5,
          "subtotal": 1.5
        }
      ],
      "meta": [
        {
          "key": "pa_color",
          "label": "Color",
          "value": "Black"
        }
      ]
    }
  ],
  "tax_lines": [
    {
      "id": 21,
      "rate_code": "US-CA-STATE TAX",
      "rate_id": "75",
      "label": "State Tax",
      "compound": false,
      "tax_total": "1.95",
      "shipping_tax_total": "0.00"
    }
  ],
  "shipping_lines": [
    {
      "id": 20,
      "method_title": "Flat Rate",
      "method_id": "flat_rate",
      "total": "10.00",
      "total_tax": "0.00",
      "taxes": []
    }
  ],
  "fee_lines": [],
  "coupon_lines": [],
  "refunds": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v1/orders/154"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v1/orders"
      }
    ]
  }
}

Delete an order

This API helps you delete an order.

HTTP request

DELETE
/wp-json/wc/v1/orders/<id>
curl -X DELETE https://example.com/wp-json/wc/v1/orders/154?force=true \
    -u consumer_key:consumer_secret
WooCommerce.delete("orders/154", {
  force: true
})
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.data);
  });
<?php print_r($woocommerce->delete('orders/154', ['force' => true])); ?>
print(wcapi.delete("orders/154", params={"force": True}).json())
woocommerce.delete("orders/154", force: true).parsed_response

JSON response example:

{
  "id": 154,
  "parent_id": 0,
  "status": "completed",
  "order_key": "wc_order_574cc02467274",
  "number": "154",
  "currency": "USD",
  "version": "2.6.0",
  "prices_include_tax": false,
  "date_created": "2016-05-30T22:35:16",
  "date_modified": "2016-05-30T22:46:16",
  "customer_id": 0,
  "discount_total": "0.00",
  "discount_tax": "0.00",
  "shipping_total": "10.00",
  "shipping_tax": "0.00",
  "cart_tax": "1.95",
  "total": "37.95",
  "total_tax": "1.95",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "payment_method": "bacs",
  "payment_method_title": "bacs",
  "transaction_id": "",
  "customer_ip_address": "127.0.0.1",
  "customer_user_agent": "curl/7.47.0",
  "created_via": "rest-api",
  "customer_note": "",
  "date_completed": "2016-05-30T19:47:46",
  "date_paid": "2016-05-30 19:35:25",
  "cart_hash": "",
  "line_items": [
    {
      "id": 18,
      "name": "Woo Single #1",
      "sku": "",
      "product_id": 93,
      "variation_id": 0,
      "quantity": 2,
      "tax_class": "",
      "price": "3.00",
      "subtotal": "6.00",
      "subtotal_tax": "0.45",
      "total": "6.00",
      "total_tax": "0.45",
      "taxes": [
        {
          "id": 75,
          "total": 0.45,
          "subtotal": 0.45
        }
      ],
      "meta": []
    },
    {
      "id": 19,
      "name": "Ship Your Idea",
      "sku": "",
      "product_id": 22,
      "variation_id": 23,
      "quantity": 1,
      "tax_class": "",
      "price": "20.00",
      "subtotal": "20.00",
      "subtotal_tax": "1.50",
      "total": "20.00",
      "total_tax": "1.50",
      "taxes": [
        {
          "id": 75,
          "total": 1.5,
          "subtotal": 1.5
        }
      ],
      "meta": [
        {
          "key": "pa_color",
          "label": "Color",
          "value": "Black"
        }
      ]
    }
  ],
  "tax_lines": [
    {
      "id": 21,
      "rate_code": "US-CA-STATE TAX",
      "rate_id": "75",
      "label": "State Tax",
      "compound": false,
      "tax_total": "1.95",
      "shipping_tax_total": "0.00"
    }
  ],
  "shipping_lines": [
    {
      "id": 20,
      "method_title": "Flat Rate",
      "method_id": "flat_rate",
      "total": "10.00",
      "total_tax": "0.00",
      "taxes": []
    }
  ],
  "fee_lines": [],
  "coupon_lines": [],
  "refunds": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v1/orders/154"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v1/orders"
      }
    ]
  }
}

Available parameters

Parameter Type Description
force string Use true whether to permanently delete the order, Default is false.

Batch update orders

This API helps you to batch create, update and delete multiple orders.

HTTP request

POST
/wp-json/wc/v1/orders/batch
curl -X POST https://example.com/wp-json/wc/v1/orders/batch \
    -u consumer_key:consumer_secret \
    -H "Content-Type: application/json" \
    -d '{
  "create": [
    {
      "payment_method": "bacs",
      "payment_method_title": "Direct Bank Transfer",
      "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "(555) 555-5555"
      },
      "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
      },
      "line_items": [
        {
          "product_id": 79,
          "quantity": 1
        },
        {
          "product_id": 93,
          "quantity": 1
        },
        {
          "product_id": 22,
          "variation_id": 23,
          "quantity": 1
        }
      ],
      "shipping_lines": [
        {
          "method_id": "flat_rate",
          "method_title": "Flat Rate",
          "total": "30.00"
        }
      ]
    },
    {
      "payment_method": "bacs",
      "payment_method_title": "Direct Bank Transfer",
      "set_paid": true,
      "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "(555) 555-5555"
      },
      "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
      },
      "line_items": [
        {
          "product_id": 22,
          "variation_id": 23,
          "quantity": 1
        },
        {
          "product_id": 22,
          "variation_id": 24,
          "quantity": 1
        }
      ],
      "shipping_lines": [
        {
          "method_id": "flat_rate",
          "method_title": "Flat Rate",
          "total": "20.00"
        }
      ]
    }
  ],
  "update": [
    {
      "id": 154,
      "shipping_methods": "Local Delivery"
    }
  ],
  "delete": [
    154
  ]
}'
const data = {
  create: [
    {
      payment_method: "bacs",
      payment_method_title: "Direct Bank Transfer",
      billing: {
        first_name: "John",
        last_name: "Doe",
        address_1: "969 Market",
        address_2: "",
        city: "San Francisco",
        state: "CA",
        postcode: "94103",
        country: "US",
        email: "john.doe@example.com",
        phone: "(555) 555-5555"
      },
      shipping: {
        first_name: "John",
        last_name: "Doe",
        address_1: "969 Market",
        address_2: "",
        city: "San Francisco",
        state: "CA",
        postcode: "94103",
        country: "US"
      },
      line_items: [
        {
          product_id: 79,
          quantity: 1
        },
        {
          product_id: 93,
          quantity: 1
        },
        {
          product_id: 22,
          variation_id: 23,
          quantity: 1
        }
      ],
      shipping_lines: [
        {
          method_id: "flat_rate",
          method_title: "Flat Rate",
          total: "30.00"
        }
      ]
    },
    {
      payment_method: "bacs",
      payment_method_title: "Direct Bank Transfer",
      set_paid: true,
      billing: {
        first_name: "John",
        last_name: "Doe",
        address_1: "969 Market",
        address_2: "",
        city: "San Francisco",
        state: "CA",
        postcode: "94103",
        country: "US",
        email: "john.doe@example.com",
        phone: "(555) 555-5555"
      },
      shipping: {
        first_name: "John",
        last_name: "Doe",
        address_1