Woocommerce Bookings Api Docs

In this article

Introduction

WooCommerce Bookings is fully integrated with the WordPress REST API. This allows Bookings data to be read 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.

Requirements

To use the Bookings REST API you must be using:

  • WooCommerce 3.5+.
  • WooCommerce Bookings 1.14.0+.
  • WordPress 4.4+.
  • Pretty permalinks in Settings > Permalinks so that the custom endpoints are supported. Default permalinks will not work.
  • You may access the API over either HTTP or HTTPS, but HTTPS is recommended where possible.

If you use ModSecurity and see 501 Method Not Implemented errors, see this issue for details.

Request/Response Format

The default response format is JSON. Requests with a message-body use plain JSON to set or update resource attributes. Successful requests will return a 200 OK HTTP status.

Some general information about responses:

  • Dates are returned in ISO8601 format: YYYY-MM-DDTHH:MM:SS
  • Resource IDs are returned as integers.
  • Any decimal monetary amount, such as prices or totals, will be returned as strings with two decimal places.
  • Other amounts, such as item counts, are returned as integers.
  • Blank fields are generally included as null or emtpy string instead of being omitted.

JSONP Support

The WP REST API supports JSONP by default. JSONP responses use the application/javascript content-type. You can specify the callback using the ?_jsonp parameter for GET requests to have the response wrapped in a JSON function:

GET 

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

Errors

Occasionally you might encounter errors when accessing the REST API. There are four possible types:

Error CodeError Type
400 Bad RequestInvalid request, e.g. using an unsupported HTTP method
401 UnauthorizedAuthentication or permission error, e.g. incorrect API keys
404 Not FoundRequests to resources that don’t exist or are missing
500 Internal Server ErrorServer 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 codemessage and data attribute.

Parameters

Almost all endpoints accept optional parameters which can be passed as a HTTP query string parameter, e.g. GET /bookings?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 /bookings?per_page=15

You can specify further pages with the ?page parameter:

GET /bookings?page=2

You may also specify the offset from the first resource using the ?offset parameter:

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

The possible rel values are:

ValueDescription
nextShows the URL of the immediate next page of results.
lastShows the URL of the last page of results.
firstShows the URL of the first page of results.
prevShows the URL of the immediate previous page of results.

Tools

Useful Tools

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

  • Insomnia – Cross-platform GraphQL and REST client, available for Mac, Windows, and Linux.
  • Postman – Cross-platform REST client, available for Mac, Windows, and Linux.
  • RequestBin – Allows you test webhooks.
  • Hookbin – Another tool to test webhooks.

Learn more

Learn more about the REST API checking the official WordPress REST API documentation.

Authentication

WooCommerce includes two ways to authenticate with the WP REST API. It is also possible to authenticate using any WP REST API authentication plugin or method.

REST API keys

Pre-generated keys can be used to authenticate use of the REST API endpoints. New keys can be generated either through the WordPress admin interface or they can be auto-generated through an endpoint.

Generating API keys in the WordPress admin interface

To create or manage keys for a specific WordPress user, go to WooCommerce > Settings > 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

If the WordPress user associated with an API key is deleted, the API key will cease to function. API keys are not transferred to other users.

Auto generating API keys using our Application Authentication Endpoint

This endpoint can be used by any APP to allow users to generate API keys for your APP. This makes integration with WooCommerce API easier because the user only needs to grant access to your APP via a URL. After being redirected back to your APP, the API keys will be sent back in a separate POST request.

The following image illustrates how this works:

Authentication Endpoint flow

URL parameters

ParameterTypeDescription
app_namestringYour APP nameMANDATORY
scopestringLevel of access. Available: readwrite and read_writeMANDATORY
user_idstringUser ID in your APP. For your internal reference, used when the user is redirected back to your APP. NOT THE USER ID IN WOOCOMMERCEMANDATORY
return_urlstringURL the user will be redirected to after authenticationMANDATORY
callback_urlstringURL that will receive the generated API key. Note: this URL should be over HTTPSMANDATORY

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

  • While redirecting the user using return_url, you are also sent success and user_id parameters as query strings.
  • success sends 0 if the user denied, or 1 if authenticated successfully.
  • Use user_id to identify the user when redirected back to the (return_url) and also remember to save the API Keys when your callback_url is posted to after auth.
  • The auth endpoint will send the API Keys in JSON format to the callback_url, so it’s important to remember that some languages such as PHP will not display it inside the $_POST global variable, in PHP you can access it using $HTTP_RAW_POST_DATA (for old PHP versions) or file_get_contents('php://input');.
  • The URL generated must have all query string values encoded.

Authentication over HTTPS

You may use HTTP Basic Auth by providing the REST API Consumer Key as the username and the REST API Consumer Secret as the password.

HTTP Basic Auth example

curl https://www.example.com/wp-json/wc-bookings/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-bookings/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-bookings/v1'
    ]
);
?>
from woocommerce import API
wcapi = API(
    url="https://example.com",
    consumer_key="consumer_key",
    consumer_secret="consumer_secret",
    wp_api=True,
    version="wc-bookings/v1"
)
require "woocommerce_api"
woocommerce = WooCommerce::API.new(
  "https://example.com",
  "consumer_key",
  "consumer_secret",
  {
    wp_json: true,
    version: "wc-bookings/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-bookings/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-bookings/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-bookings/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-bookings/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-bookings/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-bookings/v1/orders.

Collect parameters

Collect and normalize your parameters. This includes all oauth_* parameters except for the oauth_signature itself.

These values need to be encoded into a single string which will be used later on. The process to build the string is very specific:

  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%2Fv3%2Forders&oauth_consumer_key%3Dabc123%26oauth_signature_method%3DHMAC-SHA1

Generate the signature

Generate the signature using the signature base string and your consumer secret key with a & character with the HMAC-SHA1 hashing algorithm.

In PHP you can use the hash_hmac function.

HMAC-SHA1 or HMAC-SHA256 are the only accepted hash algorithms.

If you are having trouble generating a correct signature, you’ll want to review the string you are signing for encoding errors. The authentication source can also be helpful in understanding how to properly generate the signature.

OAuth tips

  • The OAuth parameters may be added as query string parameters or included in the Authorization header.
  • Note there is no reliable cross-platform way to get the raw request headers in WordPress, so query string should be more reliable in some cases.
  • The required parameters are: oauth_consumer_keyoauth_timestampoauth_nonceoauth_signature, and oauth_signature_methodoauth_version is not required and should be omitted.
  • The OAuth nonce can be any randomly generated 32 character (recommended) string that is unique to the consumer key. Read more suggestions on generating nonces on the Twitter REST API forums.
  • The OAuth timestamp should be the unix timestamp at the time of the request. The REST API will deny any requests that include a timestamp outside of a 15 minute window to prevent replay attacks.
  • You must use the store URL provided by the index when forming the base string used for the signature, as this is what the server will use. (e.g. if the store URL includes a www sub-domain, you should use it for requests)
  • You may test your generated signature using LinkedIn’s OAuth test console — leave the member token/secret blank.
  • Twitter has great instructions on generating signatures with OAuth 1.0a, but remember tokens are not used with this implementation.
  • Note that the request body is not signed as per the OAuth spec, see Google’s OAuth 1.0 extension for details on why.
  • If including parameters in your request, it saves a lot of trouble if you can order your items alphabetically.
  • Authorization header is supported starting WooCommerce 3.0.

Index

By default, the API provides information about all available endpoints on the site. Authentication is not required to access the API index.

HTTP request

GET 

/wp-json/wc-bookings/v1
curl https://example.com/wp-json/wc-bookings/v1

JSON response example:

{
    "namespace": "wc-bookings/v1",
    "routes": {
        "/wc-bookings/v1": {
            "namespace": "wc-bookings/v1",
            "methods": [
                "GET"
            ],
            "endpoints": [
                {
                    "methods": [
                        "GET"
                    ],
                    "args": {
                        "namespace": {
                            "required": false,
                            "default": "wc-bookings/v1"
                        },
                        "context": {
                            "required": false,
                            "default": "view"
                        }
                    }
                }
            ],
            "_links": {
                "self": "https://example.com/wp-json/wc-bookings/v1"
            }
        },
        "/wc-bookings/v1/products": {
            "namespace": "wc-bookings/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.",
                            "type": "string"
                        },
                        "page": {
                            "required": false,
                            "default": 1,
                            "description": "Current page of the collection.",
                            "type": "integer"
                        },
                        "per_page": {
                            "required": false,
                            "default": 10,
                            "description": "Maximum number of items to be returned in result set.",
                            "type": "integer"
                        },
                        "search": {
                            "required": false,
                            "description": "Limit results to those matching a string.",
                            "type": "string"
                        },
                        "after": {
                            "required": false,
                            "description": "Limit response to resources published after a given ISO8601 compliant date.",
                            "type": "string"
                        },
                        "before": {
                            "required": false,
                            "description": "Limit response to resources published before a given ISO8601 compliant date.",
                            "type": "string"
                        },
                        "exclude": {
                            "required": false,
                            "default": [],
                            "description": "Ensure result set excludes specific IDs.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "include": {
                            "required": false,
                            "default": [],
                            "description": "Limit result set to specific ids.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "offset": {
                            "required": false,
                            "description": "Offset the result set by a specific number of items.",
                            "type": "integer"
                        },
                        "order": {
                            "required": false,
                            "default": "desc",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "description": "Order sort attribute ascending or descending.",
                            "type": "string"
                        },
                        "orderby": {
                            "required": false,
                            "default": "date",
                            "enum": [
                                "date",
                                "id",
                                "include",
                                "title",
                                "slug",
                                "menu_order",
                                "price",
                                "popularity",
                                "rating"
                            ],
                            "description": "Sort collection by object attribute.",
                            "type": "string"
                        },
                        "parent": {
                            "required": false,
                            "default": [],
                            "description": "Limit result set to those of particular parent IDs.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "parent_exclude": {
                            "required": false,
                            "default": [],
                            "description": "Limit result set to all items except those of a particular parent ID.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "slug": {
                            "required": false,
                            "description": "Limit result set to products with a specific slug.",
                            "type": "string"
                        },
                        "status": {
                            "required": false,
                            "default": "publish",
                            "enum": [
                                "any",
                                "future",
                                "draft",
                                "pending",
                                "private",
                                "publish"
                            ],
                            "description": "Limit result set to products assigned a specific status.",
                            "type": "string"
                        },
                        "type": {
                            "required": false,
                            "default": "booking",
                            "enum": [
                                "booking"
                            ],
                            "description": "Limit result set to products assigned a specific type.",
                            "type": "string"
                        },
                        "sku": {
                            "required": false,
                            "description": "Limit result set to products with specific SKU(s). Use commas to separate.",
                            "type": "string"
                        },
                        "featured": {
                            "required": false,
                            "description": "Limit result set to featured products.",
                            "type": "boolean"
                        },
                        "category": {
                            "required": false,
                            "description": "Limit result set to products assigned a specific category ID.",
                            "type": "string"
                        },
                        "tag": {
                            "required": false,
                            "description": "Limit result set to products assigned a specific tag ID.",
                            "type": "string"
                        },
                        "shipping_class": {
                            "required": false,
                            "description": "Limit result set to products assigned a specific shipping class ID.",
                            "type": "string"
                        },
                        "attribute": {
                            "required": false,
                            "description": "Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.",
                            "type": "string"
                        },
                        "attribute_term": {
                            "required": false,
                            "description": "Limit result set to products with a specific attribute term ID (required an assigned attribute).",
                            "type": "string"
                        },
                        "tax_class": {
                            "required": false,
                            "enum": [
                                "standard",
                                "reduced-rate",
                                "zero-rate"
                            ],
                            "description": "Limit result set to products with a specific tax class.",
                            "type": "string"
                        },
                        "on_sale": {
                            "required": false,
                            "description": "Limit result set to products on sale.",
                            "type": "boolean"
                        },
                        "min_price": {
                            "required": false,
                            "description": "Limit result set to products based on a minimum price.",
                            "type": "string"
                        },
                        "max_price": {
                            "required": false,
                            "description": "Limit result set to products based on a maximum price.",
                            "type": "string"
                        },
                        "stock_status": {
                            "required": false,
                            "enum": [
                                "instock",
                                "outofstock",
                                "onbackorder"
                            ],
                            "description": "Limit result set to products with specified stock status.",
                            "type": "string"
                        },
                        "resource": {
                            "required": false,
                            "description": "Limit result set to products assigned a specific resource ID.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        }
                    }
                },
                {
                    "methods": [
                        "POST"
                    ],
                    "args": {
                        "name": {
                            "required": false,
                            "description": "Product name.",
                            "type": "string"
                        },
                        "slug": {
                            "required": false,
                            "description": "Product slug.",
                            "type": "string"
                        },
                        "date_created": {
                            "required": false,
                            "description": "The date the product was created, in the site's timezone.",
                            "type": "date-time"
                        },
                        "date_created_gmt": {
                            "required": false,
                            "description": "The date the product was created, as GMT.",
                            "type": "date-time"
                        },
                        "type": {
                            "required": false,
                            "default": "simple",
                            "enum": [
                                "simple",
                                "grouped",
                                "external",
                                "variable"
                            ],
                            "description": "Product type.",
                            "type": "string"
                        },
                        "status": {
                            "required": false,
                            "default": "publish",
                            "enum": [
                                "draft",
                                "pending",
                                "private",
                                "publish",
                                "future"
                            ],
                            "description": "Product status (post status).",
                            "type": "string"
                        },
                        "featured": {
                            "required": false,
                            "default": false,
                            "description": "Featured product.",
                            "type": "boolean"
                        },
                        "catalog_visibility": {
                            "required": false,
                            "default": "visible",
                            "enum": [
                                "visible",
                                "catalog",
                                "search",
                                "hidden"
                            ],
                            "description": "Catalog visibility.",
                            "type": "string"
                        },
                        "description": {
                            "required": false,
                            "description": "Product description.",
                            "type": "string"
                        },
                        "short_description": {
                            "required": false,
                            "description": "Product short description.",
                            "type": "string"
                        },
                        "sku": {
                            "required": false,
                            "description": "Unique identifier.",
                            "type": "string"
                        },
                        "regular_price": {
                            "required": false,
                            "description": "Product regular price.",
                            "type": "string"
                        },
                        "sale_price": {
                            "required": false,
                            "description": "Product sale price.",
                            "type": "string"
                        },
                        "date_on_sale_from": {
                            "required": false,
                            "description": "Start date of sale price, in the site's timezone.",
                            "type": "date-time"
                        },
                        "date_on_sale_from_gmt": {
                            "required": false,
                            "description": "Start date of sale price, as GMT.",
                            "type": "date-time"
                        },
                        "date_on_sale_to": {
                            "required": false,
                            "description": "End date of sale price, in the site's timezone.",
                            "type": "date-time"
                        },
                        "date_on_sale_to_gmt": {
                            "required": false,
                            "description": "End date of sale price, in the site's timezone.",
                            "type": "date-time"
                        },
                        "virtual": {
                            "required": false,
                            "default": false,
                            "description": "If the product is virtual.",
                            "type": "boolean"
                        },
                        "downloadable": {
                            "required": false,
                            "default": false,
                            "description": "If the product is downloadable.",
                            "type": "boolean"
                        },
                        "downloads": {
                            "required": false,
                            "description": "List of downloadable files.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "File ID.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "File name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "file": {
                                        "description": "File URL.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "download_limit": {
                            "required": false,
                            "default": -1,
                            "description": "Number of times downloadable files can be downloaded after purchase.",
                            "type": "integer"
                        },
                        "download_expiry": {
                            "required": false,
                            "default": -1,
                            "description": "Number of days until access to downloadable files expires.",
                            "type": "integer"
                        },
                        "external_url": {
                            "required": false,
                            "description": "Product external URL. Only for external products.",
                            "type": "string"
                        },
                        "button_text": {
                            "required": false,
                            "description": "Product external button text. Only for external products.",
                            "type": "string"
                        },
                        "tax_status": {
                            "required": false,
                            "default": "taxable",
                            "enum": [
                                "taxable",
                                "shipping",
                                "none"
                            ],
                            "description": "Tax status.",
                            "type": "string"
                        },
                        "tax_class": {
                            "required": false,
                            "description": "Tax class.",
                            "type": "string"
                        },
                        "manage_stock": {
                            "required": false,
                            "default": false,
                            "description": "Stock management at product level.",
                            "type": "boolean"
                        },
                        "stock_quantity": {
                            "required": false,
                            "description": "Stock quantity.",
                            "type": "integer"
                        },
                        "stock_status": {
                            "required": false,
                            "default": "instock",
                            "enum": [
                                "instock",
                                "outofstock",
                                "onbackorder"
                            ],
                            "description": "Controls the stock status of the product.",
                            "type": "string"
                        },
                        "backorders": {
                            "required": false,
                            "default": "no",
                            "enum": [
                                "no",
                                "notify",
                                "yes"
                            ],
                            "description": "If managing stock, this controls if backorders are allowed.",
                            "type": "string"
                        },
                        "sold_individually": {
                            "required": false,
                            "default": false,
                            "description": "Allow one item to be bought in a single order.",
                            "type": "boolean"
                        },
                        "weight": {
                            "required": false,
                            "description": "Product weight (oz).",
                            "type": "string"
                        },
                        "dimensions": {
                            "required": false,
                            "description": "Product dimensions.",
                            "type": "object"
                        },
                        "shipping_class": {
                            "required": false,
                            "description": "Shipping class slug.",
                            "type": "string"
                        },
                        "reviews_allowed": {
                            "required": false,
                            "default": true,
                            "description": "Allow reviews.",
                            "type": "boolean"
                        },
                        "upsell_ids": {
                            "required": false,
                            "description": "List of up-sell products IDs.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "cross_sell_ids": {
                            "required": false,
                            "description": "List of cross-sell products IDs.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "parent_id": {
                            "required": false,
                            "description": "Product parent ID.",
                            "type": "integer"
                        },
                        "purchase_note": {
                            "required": false,
                            "description": "Optional note to send the customer after purchase.",
                            "type": "string"
                        },
                        "categories": {
                            "required": false,
                            "description": "List of categories.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Category ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Category name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "slug": {
                                        "description": "Category slug.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    }
                                }
                            }
                        },
                        "tags": {
                            "required": false,
                            "description": "List of tags.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Tag ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Tag name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "slug": {
                                        "description": "Tag slug.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    }
                                }
                            }
                        },
                        "images": {
                            "required": false,
                            "description": "List of images.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Image ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "date_created": {
                                        "description": "The date the image was created, in the site's timezone.",
                                        "type": "date-time",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "date_created_gmt": {
                                        "description": "The date the image was created, as GMT.",
                                        "type": "date-time",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "date_modified": {
                                        "description": "The date the image was last modified, in the site's timezone.",
                                        "type": "date-time",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "date_modified_gmt": {
                                        "description": "The date the image was last modified, as GMT.",
                                        "type": "date-time",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "src": {
                                        "description": "Image URL.",
                                        "type": "string",
                                        "format": "uri",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Image name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "alt": {
                                        "description": "Image alternative text.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "attributes": {
                            "required": false,
                            "description": "List of attributes.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Attribute ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Attribute name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "position": {
                                        "description": "Attribute position.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "visible": {
                                        "description": "Define if the attribute is visible on the \"Additional information\" tab in the product's page.",
                                        "type": "boolean",
                                        "default": false,
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "variation": {
                                        "description": "Define if the attribute can be used as variation.",
                                        "type": "boolean",
                                        "default": false,
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "options": {
                                        "description": "List of available term names of the attribute.",
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "default_attributes": {
                            "required": false,
                            "description": "Defaults variation attributes.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Attribute ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Attribute name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "option": {
                                        "description": "Selected attribute term name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "menu_order": {
                            "required": false,
                            "description": "Menu order, used to custom sort products.",
                            "type": "integer"
                        },
                        "meta_data": {
                            "required": false,
                            "description": "Meta data.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Meta ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "key": {
                                        "description": "Meta key.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "value": {
                                        "description": "Meta value.",
                                        "type": "mixed",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "apply_adjacent_buffer": {
                            "required": false,
                            "description": "Apply adjacent buffers.",
                            "type": "boolean"
                        },
                        "availability": {
                            "required": false,
                            "description": "Availability rules defined on product level.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "description": "Availability type.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "from": {
                                        "description": "Starting month/day/week inclusive.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "to": {
                                        "description": "Ending month/day/week inclusive.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "from_date": {
                                        "description": "Starting day if 'from' is a time.,",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "to_date": {
                                        "description": "Ending day if 'to' is a time.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "bookable": {
                                        "description": "Rule marks things as bookable or not, 'yes' or 'no'.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "priority": {
                                        "description": "Priority of rule.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "block_cost": {
                            "required": false,
                            "description": "Base cost of each block.",
                            "type": "number"
                        },
                        "buffer_period": {
                            "required": false,
                            "description": "Required buffer Period between bookings.",
                            "type": "integer"
                        },
                        "calendar_display_mode": {
                            "required": false,
                            "enum": [
                                "",
                                "always_visible"
                            ],
                            "description": "How the calendar will display on the product page. Valid values are 'always_visible' or ''.",
                            "type": "string"
                        },
                        "cancel_limit_unit": {
                            "required": false,
                            "enum": [
                                "month",
                                "day",
                                "hour",
                                "minute"
                            ],
                            "description": "The unit limit is defined in. Valid values are 'month', 'day', 'hour', and 'minute'.",
                            "type": "string"
                        },
                        "cancel_limit": {
                            "required": false,
                            "description": "How many limit units in advance users are allowed to cancel bookings.",
                            "type": "integer"
                        },
                        "check_start_block_only": {
                            "required": false,
                            "description": "If true only the first block in checked for availability.",
                            "type": "boolean"
                        },
                        "cost": {
                            "required": false,
                            "description": "Product cost.",
                            "type": "number"
                        },
                        "default_date_availability": {
                            "required": false,
                            "enum": [
                                "",
                                "available"
                            ],
                            "description": "If 'available' product is bookable unless made unbookable by availability rules.",
                            "type": "string"
                        },
                        "display_cost": {
                            "required": false,
                            "description": "Product cost displayed.",
                            "type": "string"
                        },
                        "duration_type": {
                            "required": false,
                            "enum": [
                                "customer",
                                "fixed"
                            ],
                            "description": "How duration is defined.",
                            "type": "string"
                        },
                        "duration_unit": {
                            "required": false,
                            "enum": [
                                "month",
                                "day",
                                "hour",
                                "minute"
                            ],
                            "description": "Unit duration is defined in.",
                            "type": "string"
                        },
                        "duration": {
                            "required": false,
                            "description": "Size in duration units of each block.",
                            "type": "integer"
                        },
                        "enable_range_picker": {
                            "required": false,
                            "description": "Customer can pick a range of days on calendar.",
                            "type": "boolean"
                        },
                        "first_block_time": {
                            "required": false,
                            "description": "Time of day first block starts.",
                            "type": "string"
                        },
                        "has_person_cost_multiplier": {
                            "required": false,
                            "description": "Will multiply cost by number of persons.",
                            "type": "boolean"
                        },
                        "has_person_qty_multiplier": {
                            "required": false,
                            "description": "Each person counts as a booking.",
                            "type": "boolean"
                        },
                        "has_person_types": {
                            "required": false,
                            "description": "Product has different types of persons.",
                            "type": "boolean"
                        },
                        "has_persons": {
                            "required": false,
                            "description": "Product has persons defined.",
                            "type": "boolean"
                        },
                        "has_resources": {
                            "required": false,
                            "description": "Product has resources defined.",
                            "type": "boolean"
                        },
                        "has_restricted_days": {
                            "required": false,
                            "description": "Product has restricted days.",
                            "type": "boolean"
                        },
                        "max_date": {
                            "required": false,
                            "description": "Max date value combined with max date unit.",
                            "type": "string"
                        },
                        "max_date_value": {
                            "required": false,
                            "description": "Max amount af max_date_units into the future a block is bookable.",
                            "type": "integer"
                        },
                        "max_date_unit": {
                            "required": false,
                            "enum": [
                                "month",
                                "day",
                                "hour",
                                "week"
                            ],
                            "description": "Units for max_date_value.",
                            "type": "string"
                        },
                        "min_date": {
                            "required": false,
                            "description": "Min date value combined with min date unit.",
                            "type": "string"
                        },
                        "min_date_value": {
                            "required": false,
                            "description": "Min amount af min_date_units into the future a block is bookable.",
                            "type": "integer"
                        },
                        "min_date_unit": {
                            "required": false,
                            "enum": [
                                "month",
                                "day",
                                "hour",
                                "week"
                            ],
                            "description": "Units for min_date_value.",
                            "type": "string"
                        },
                        "max_duration": {
                            "required": false,
                            "description": "Max duration of units a booking can be.",
                            "type": "integer"
                        },
                        "min_duration": {
                            "required": false,
                            "description": "Min duration of units a booking can be.",
                            "type": "integer"
                        },
                        "max_persons": {
                            "required": false,
                            "description": "Max persons which can be booked per booking.",
                            "type": "integer"
                        },
                        "min_persons": {
                            "required": false,
                            "description": "Min persons which can be booked per booking.",
                            "type": "integer"
                        },
                        "pricing": {
                            "required": false,
                            "description": "Pricing rules.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "description": "Date range type.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "from": {
                                        "description": "Starting month/day/week inclusive.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "to": {
                                        "description": "Ending month/day/week inclusive.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "from_date": {
                                        "description": "Starting day if 'from' is a time.,",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "to_date": {
                                        "description": "Ending day if 'to' is a time.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "modifier": {
                                        "description": "How the block cost should be modified.",
                                        "type": "string",
                                        "enum": [
                                            "+",
                                            "minus",
                                            "times",
                                            "divide",
                                            "equals"
                                        ],
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "cost": {
                                        "description": "Block cost.",
                                        "type": "number",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "base_modifier": {
                                        "description": "How the base cost should be modified.",
                                        "type": "string",
                                        "enum": [
                                            "+",
                                            "minus",
                                            "times",
                                            "divide",
                                            "equals"
                                        ],
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "base_cost": {
                                        "description": "Base cost.",
                                        "type": "number",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "priority": {
                                        "description": "Priority of rule.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "qty": {
                            "required": false,
                            "description": "Max bookings per block.",
                            "type": "integer"
                        },
                        "requires_confirmation": {
                            "required": false,
                            "description": "Booking require confirmation.",
                            "type": "boolean"
                        },
                        "restricted_days": {
                            "required": false,
                            "description": "Days days of week bookings cannot start. Array of numeric day indexes with 0 being Sunday.",
                            "type": "array",
                            "items": {
                                "type": "integer",
                                "enum": [
                                    0,
                                    1,
                                    2,
                                    3,
                                    4,
                                    5,
                                    6
                                ]
                            }
                        },
                        "can_be_cancelled": {
                            "required": false,
                            "description": "Booking can be cancelled by customer.",
                            "type": "boolean"
                        }
                    }
                }
            ],
            "_links": {
                "self": "https://example.com/wp-json/wc-bookings/v1/products"
            }
        },
        "/wc-bookings/v1/products/(?P<id>[\\d]+)": {
            "namespace": "wc-bookings/v1",
            "methods": [
                "GET",
                "POST",
                "PUT",
                "PATCH",
                "DELETE"
            ],
            "endpoints": [
                {
                    "methods": [
                        "GET"
                    ],
                    "args": {
                        "id": {
                            "required": false,
                            "description": "Unique identifier for the resource.",
                            "type": "integer"
                        },
                        "context": {
                            "required": false,
                            "default": "view",
                            "enum": [
                                "view",
                                "edit"
                            ],
                            "description": "Scope under which the request is made; determines fields present in response.",
                            "type": "string"
                        }
                    }
                },
                {
                    "methods": [
                        "POST",
                        "PUT",
                        "PATCH"
                    ],
                    "args": {
                        "id": {
                            "required": false,
                            "description": "Unique identifier for the resource.",
                            "type": "integer"
                        },
                        "name": {
                            "required": false,
                            "description": "Product name.",
                            "type": "string"
                        },
                        "slug": {
                            "required": false,
                            "description": "Product slug.",
                            "type": "string"
                        },
                        "date_created": {
                            "required": false,
                            "description": "The date the product was created, in the site's timezone.",
                            "type": "date-time"
                        },
                        "date_created_gmt": {
                            "required": false,
                            "description": "The date the product was created, as GMT.",
                            "type": "date-time"
                        },
                        "type": {
                            "required": false,
                            "enum": [
                                "simple",
                                "grouped",
                                "external",
                                "variable"
                            ],
                            "description": "Product type.",
                            "type": "string"
                        },
                        "status": {
                            "required": false,
                            "enum": [
                                "draft",
                                "pending",
                                "private",
                                "publish",
                                "future"
                            ],
                            "description": "Product status (post status).",
                            "type": "string"
                        },
                        "featured": {
                            "required": false,
                            "description": "Featured product.",
                            "type": "boolean"
                        },
                        "catalog_visibility": {
                            "required": false,
                            "enum": [
                                "visible",
                                "catalog",
                                "search",
                                "hidden"
                            ],
                            "description": "Catalog visibility.",
                            "type": "string"
                        },
                        "description": {
                            "required": false,
                            "description": "Product description.",
                            "type": "string"
                        },
                        "short_description": {
                            "required": false,
                            "description": "Product short description.",
                            "type": "string"
                        },
                        "sku": {
                            "required": false,
                            "description": "Unique identifier.",
                            "type": "string"
                        },
                        "regular_price": {
                            "required": false,
                            "description": "Product regular price.",
                            "type": "string"
                        },
                        "sale_price": {
                            "required": false,
                            "description": "Product sale price.",
                            "type": "string"
                        },
                        "date_on_sale_from": {
                            "required": false,
                            "description": "Start date of sale price, in the site's timezone.",
                            "type": "date-time"
                        },
                        "date_on_sale_from_gmt": {
                            "required": false,
                            "description": "Start date of sale price, as GMT.",
                            "type": "date-time"
                        },
                        "date_on_sale_to": {
                            "required": false,
                            "description": "End date of sale price, in the site's timezone.",
                            "type": "date-time"
                        },
                        "date_on_sale_to_gmt": {
                            "required": false,
                            "description": "End date of sale price, in the site's timezone.",
                            "type": "date-time"
                        },
                        "virtual": {
                            "required": false,
                            "description": "If the product is virtual.",
                            "type": "boolean"
                        },
                        "downloadable": {
                            "required": false,
                            "description": "If the product is downloadable.",
                            "type": "boolean"
                        },
                        "downloads": {
                            "required": false,
                            "description": "List of downloadable files.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "File ID.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "File name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "file": {
                                        "description": "File URL.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "download_limit": {
                            "required": false,
                            "description": "Number of times downloadable files can be downloaded after purchase.",
                            "type": "integer"
                        },
                        "download_expiry": {
                            "required": false,
                            "description": "Number of days until access to downloadable files expires.",
                            "type": "integer"
                        },
                        "external_url": {
                            "required": false,
                            "description": "Product external URL. Only for external products.",
                            "type": "string"
                        },
                        "button_text": {
                            "required": false,
                            "description": "Product external button text. Only for external products.",
                            "type": "string"
                        },
                        "tax_status": {
                            "required": false,
                            "enum": [
                                "taxable",
                                "shipping",
                                "none"
                            ],
                            "description": "Tax status.",
                            "type": "string"
                        },
                        "tax_class": {
                            "required": false,
                            "description": "Tax class.",
                            "type": "string"
                        },
                        "manage_stock": {
                            "required": false,
                            "description": "Stock management at product level.",
                            "type": "boolean"
                        },
                        "stock_quantity": {
                            "required": false,
                            "description": "Stock quantity.",
                            "type": "integer"
                        },
                        "stock_status": {
                            "required": false,
                            "enum": [
                                "instock",
                                "outofstock",
                                "onbackorder"
                            ],
                            "description": "Controls the stock status of the product.",
                            "type": "string"
                        },
                        "backorders": {
                            "required": false,
                            "enum": [
                                "no",
                                "notify",
                                "yes"
                            ],
                            "description": "If managing stock, this controls if backorders are allowed.",
                            "type": "string"
                        },
                        "sold_individually": {
                            "required": false,
                            "description": "Allow one item to be bought in a single order.",
                            "type": "boolean"
                        },
                        "weight": {
                            "required": false,
                            "description": "Product weight (oz).",
                            "type": "string"
                        },
                        "dimensions": {
                            "required": false,
                            "description": "Product dimensions.",
                            "type": "object"
                        },
                        "shipping_class": {
                            "required": false,
                            "description": "Shipping class slug.",
                            "type": "string"
                        },
                        "reviews_allowed": {
                            "required": false,
                            "description": "Allow reviews.",
                            "type": "boolean"
                        },
                        "upsell_ids": {
                            "required": false,
                            "description": "List of up-sell products IDs.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "cross_sell_ids": {
                            "required": false,
                            "description": "List of cross-sell products IDs.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "parent_id": {
                            "required": false,
                            "description": "Product parent ID.",
                            "type": "integer"
                        },
                        "purchase_note": {
                            "required": false,
                            "description": "Optional note to send the customer after purchase.",
                            "type": "string"
                        },
                        "categories": {
                            "required": false,
                            "description": "List of categories.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Category ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Category name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "slug": {
                                        "description": "Category slug.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    }
                                }
                            }
                        },
                        "tags": {
                            "required": false,
                            "description": "List of tags.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Tag ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Tag name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "slug": {
                                        "description": "Tag slug.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    }
                                }
                            }
                        },
                        "images": {
                            "required": false,
                            "description": "List of images.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Image ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "date_created": {
                                        "description": "The date the image was created, in the site's timezone.",
                                        "type": "date-time",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "date_created_gmt": {
                                        "description": "The date the image was created, as GMT.",
                                        "type": "date-time",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "date_modified": {
                                        "description": "The date the image was last modified, in the site's timezone.",
                                        "type": "date-time",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "date_modified_gmt": {
                                        "description": "The date the image was last modified, as GMT.",
                                        "type": "date-time",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "src": {
                                        "description": "Image URL.",
                                        "type": "string",
                                        "format": "uri",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Image name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "alt": {
                                        "description": "Image alternative text.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "attributes": {
                            "required": false,
                            "description": "List of attributes.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Attribute ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Attribute name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "position": {
                                        "description": "Attribute position.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "visible": {
                                        "description": "Define if the attribute is visible on the \"Additional information\" tab in the product's page.",
                                        "type": "boolean",
                                        "default": false,
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "variation": {
                                        "description": "Define if the attribute can be used as variation.",
                                        "type": "boolean",
                                        "default": false,
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "options": {
                                        "description": "List of available term names of the attribute.",
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "default_attributes": {
                            "required": false,
                            "description": "Defaults variation attributes.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Attribute ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Attribute name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "option": {
                                        "description": "Selected attribute term name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "menu_order": {
                            "required": false,
                            "description": "Menu order, used to custom sort products.",
                            "type": "integer"
                        },
                        "meta_data": {
                            "required": false,
                            "description": "Meta data.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Meta ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "key": {
                                        "description": "Meta key.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "value": {
                                        "description": "Meta value.",
                                        "type": "mixed",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "apply_adjacent_buffer": {
                            "required": false,
                            "description": "Apply adjacent buffers.",
                            "type": "boolean"
                        },
                        "availability": {
                            "required": false,
                            "description": "Availability rules defined on product level.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "description": "Availability type.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "from": {
                                        "description": "Starting month/day/week inclusive.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "to": {
                                        "description": "Ending month/day/week inclusive.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "from_date": {
                                        "description": "Starting day if 'from' is a time.,",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "to_date": {
                                        "description": "Ending day if 'to' is a time.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "bookable": {
                                        "description": "Rule marks things as bookable or not, 'yes' or 'no'.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "priority": {
                                        "description": "Priority of rule.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "block_cost": {
                            "required": false,
                            "description": "Base cost of each block.",
                            "type": "number"
                        },
                        "buffer_period": {
                            "required": false,
                            "description": "Required buffer Period between bookings.",
                            "type": "integer"
                        },
                        "calendar_display_mode": {
                            "required": false,
                            "enum": [
                                "",
                                "always_visible"
                            ],
                            "description": "How the calendar will display on the product page. Valid values are 'always_visible' or ''.",
                            "type": "string"
                        },
                        "cancel_limit_unit": {
                            "required": false,
                            "enum": [
                                "month",
                                "day",
                                "hour",
                                "minute"
                            ],
                            "description": "The unit limit is defined in. Valid values are 'month', 'day', 'hour', and 'minute'.",
                            "type": "string"
                        },
                        "cancel_limit": {
                            "required": false,
                            "description": "How many limit units in advance users are allowed to cancel bookings.",
                            "type": "integer"
                        },
                        "check_start_block_only": {
                            "required": false,
                            "description": "If true only the first block in checked for availability.",
                            "type": "boolean"
                        },
                        "cost": {
                            "required": false,
                            "description": "Product cost.",
                            "type": "number"
                        },
                        "default_date_availability": {
                            "required": false,
                            "enum": [
                                "",
                                "available"
                            ],
                            "description": "If 'available' product is bookable unless made unbookable by availability rules.",
                            "type": "string"
                        },
                        "display_cost": {
                            "required": false,
                            "description": "Product cost displayed.",
                            "type": "string"
                        },
                        "duration_type": {
                            "required": false,
                            "enum": [
                                "customer",
                                "fixed"
                            ],
                            "description": "How duration is defined.",
                            "type": "string"
                        },
                        "duration_unit": {
                            "required": false,
                            "enum": [
                                "month",
                                "day",
                                "hour",
                                "minute"
                            ],
                            "description": "Unit duration is defined in.",
                            "type": "string"
                        },
                        "duration": {
                            "required": false,
                            "description": "Size in duration units of each block.",
                            "type": "integer"
                        },
                        "enable_range_picker": {
                            "required": false,
                            "description": "Customer can pick a range of days on calendar.",
                            "type": "boolean"
                        },
                        "first_block_time": {
                            "required": false,
                            "description": "Time of day first block starts.",
                            "type": "string"
                        },
                        "has_person_cost_multiplier": {
                            "required": false,
                            "description": "Will multiply cost by number of persons.",
                            "type": "boolean"
                        },
                        "has_person_qty_multiplier": {
                            "required": false,
                            "description": "Each person counts as a booking.",
                            "type": "boolean"
                        },
                        "has_person_types": {
                            "required": false,
                            "description": "Product has different types of persons.",
                            "type": "boolean"
                        },
                        "has_persons": {
                            "required": false,
                            "description": "Product has persons defined.",
                            "type": "boolean"
                        },
                        "has_resources": {
                            "required": false,
                            "description": "Product has resources defined.",
                            "type": "boolean"
                        },
                        "has_restricted_days": {
                            "required": false,
                            "description": "Product has restricted days.",
                            "type": "boolean"
                        },
                        "max_date": {
                            "required": false,
                            "description": "Max date value combined with max date unit.",
                            "type": "string"
                        },
                        "max_date_value": {
                            "required": false,
                            "description": "Max amount af max_date_units into the future a block is bookable.",
                            "type": "integer"
                        },
                        "max_date_unit": {
                            "required": false,
                            "enum": [
                                "month",
                                "day",
                                "hour",
                                "week"
                            ],
                            "description": "Units for max_date_value.",
                            "type": "string"
                        },
                        "min_date": {
                            "required": false,
                            "description": "Min date value combined with min date unit.",
                            "type": "string"
                        },
                        "min_date_value": {
                            "required": false,
                            "description": "Min amount af min_date_units into the future a block is bookable.",
                            "type": "integer"
                        },
                        "min_date_unit": {
                            "required": false,
                            "enum": [
                                "month",
                                "day",
                                "hour",
                                "week"
                            ],
                            "description": "Units for min_date_value.",
                            "type": "string"
                        },
                        "max_duration": {
                            "required": false,
                            "description": "Max duration of units a booking can be.",
                            "type": "integer"
                        },
                        "min_duration": {
                            "required": false,
                            "description": "Min duration of units a booking can be.",
                            "type": "integer"
                        },
                        "max_persons": {
                            "required": false,
                            "description": "Max persons which can be booked per booking.",
                            "type": "integer"
                        },
                        "min_persons": {
                            "required": false,
                            "description": "Min persons which can be booked per booking.",
                            "type": "integer"
                        },
                        "pricing": {
                            "required": false,
                            "description": "Pricing rules.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "description": "Date range type.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "from": {
                                        "description": "Starting month/day/week inclusive.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "to": {
                                        "description": "Ending month/day/week inclusive.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "from_date": {
                                        "description": "Starting day if 'from' is a time.,",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "to_date": {
                                        "description": "Ending day if 'to' is a time.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "modifier": {
                                        "description": "How the block cost should be modified.",
                                        "type": "string",
                                        "enum": [
                                            "+",
                                            "minus",
                                            "times",
                                            "divide",
                                            "equals"
                                        ],
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "cost": {
                                        "description": "Block cost.",
                                        "type": "number",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "base_modifier": {
                                        "description": "How the base cost should be modified.",
                                        "type": "string",
                                        "enum": [
                                            "+",
                                            "minus",
                                            "times",
                                            "divide",
                                            "equals"
                                        ],
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "base_cost": {
                                        "description": "Base cost.",
                                        "type": "number",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "priority": {
                                        "description": "Priority of rule.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "qty": {
                            "required": false,
                            "description": "Max bookings per block.",
                            "type": "integer"
                        },
                        "requires_confirmation": {
                            "required": false,
                            "description": "Booking require confirmation.",
                            "type": "boolean"
                        },
                        "restricted_days": {
                            "required": false,
                            "description": "Days days of week bookings cannot start. Array of numeric day indexes with 0 being Sunday.",
                            "type": "array",
                            "items": {
                                "type": "integer",
                                "enum": [
                                    0,
                                    1,
                                    2,
                                    3,
                                    4,
                                    5,
                                    6
                                ]
                            }
                        },
                        "can_be_cancelled": {
                            "required": false,
                            "description": "Booking can be cancelled by customer.",
                            "type": "boolean"
                        }
                    }
                },
                {
                    "methods": [
                        "DELETE"
                    ],
                    "args": {
                        "id": {
                            "required": false,
                            "description": "Unique identifier for the resource.",
                            "type": "integer"
                        },
                        "force": {
                            "required": false,
                            "default": false,
                            "description": "Whether to bypass trash and force deletion.",
                            "type": "boolean"
                        }
                    }
                }
            ]
        },
        "/wc-bookings/v1/products/batch": {
            "namespace": "wc-bookings/v1",
            "methods": [
                "POST",
                "PUT",
                "PATCH"
            ],
            "endpoints": [
                {
                    "methods": [
                        "POST",
                        "PUT",
                        "PATCH"
                    ],
                    "args": {
                        "name": {
                            "required": false,
                            "description": "Product name.",
                            "type": "string"
                        },
                        "slug": {
                            "required": false,
                            "description": "Product slug.",
                            "type": "string"
                        },
                        "date_created": {
                            "required": false,
                            "description": "The date the product was created, in the site's timezone.",
                            "type": "date-time"
                        },
                        "date_created_gmt": {
                            "required": false,
                            "description": "The date the product was created, as GMT.",
                            "type": "date-time"
                        },
                        "type": {
                            "required": false,
                            "enum": [
                                "simple",
                                "grouped",
                                "external",
                                "variable"
                            ],
                            "description": "Product type.",
                            "type": "string"
                        },
                        "status": {
                            "required": false,
                            "enum": [
                                "draft",
                                "pending",
                                "private",
                                "publish",
                                "future"
                            ],
                            "description": "Product status (post status).",
                            "type": "string"
                        },
                        "featured": {
                            "required": false,
                            "description": "Featured product.",
                            "type": "boolean"
                        },
                        "catalog_visibility": {
                            "required": false,
                            "enum": [
                                "visible",
                                "catalog",
                                "search",
                                "hidden"
                            ],
                            "description": "Catalog visibility.",
                            "type": "string"
                        },
                        "description": {
                            "required": false,
                            "description": "Product description.",
                            "type": "string"
                        },
                        "short_description": {
                            "required": false,
                            "description": "Product short description.",
                            "type": "string"
                        },
                        "sku": {
                            "required": false,
                            "description": "Unique identifier.",
                            "type": "string"
                        },
                        "regular_price": {
                            "required": false,
                            "description": "Product regular price.",
                            "type": "string"
                        },
                        "sale_price": {
                            "required": false,
                            "description": "Product sale price.",
                            "type": "string"
                        },
                        "date_on_sale_from": {
                            "required": false,
                            "description": "Start date of sale price, in the site's timezone.",
                            "type": "date-time"
                        },
                        "date_on_sale_from_gmt": {
                            "required": false,
                            "description": "Start date of sale price, as GMT.",
                            "type": "date-time"
                        },
                        "date_on_sale_to": {
                            "required": false,
                            "description": "End date of sale price, in the site's timezone.",
                            "type": "date-time"
                        },
                        "date_on_sale_to_gmt": {
                            "required": false,
                            "description": "End date of sale price, in the site's timezone.",
                            "type": "date-time"
                        },
                        "virtual": {
                            "required": false,
                            "description": "If the product is virtual.",
                            "type": "boolean"
                        },
                        "downloadable": {
                            "required": false,
                            "description": "If the product is downloadable.",
                            "type": "boolean"
                        },
                        "downloads": {
                            "required": false,
                            "description": "List of downloadable files.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "File ID.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "File name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "file": {
                                        "description": "File URL.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "download_limit": {
                            "required": false,
                            "description": "Number of times downloadable files can be downloaded after purchase.",
                            "type": "integer"
                        },
                        "download_expiry": {
                            "required": false,
                            "description": "Number of days until access to downloadable files expires.",
                            "type": "integer"
                        },
                        "external_url": {
                            "required": false,
                            "description": "Product external URL. Only for external products.",
                            "type": "string"
                        },
                        "button_text": {
                            "required": false,
                            "description": "Product external button text. Only for external products.",
                            "type": "string"
                        },
                        "tax_status": {
                            "required": false,
                            "enum": [
                                "taxable",
                                "shipping",
                                "none"
                            ],
                            "description": "Tax status.",
                            "type": "string"
                        },
                        "tax_class": {
                            "required": false,
                            "description": "Tax class.",
                            "type": "string"
                        },
                        "manage_stock": {
                            "required": false,
                            "description": "Stock management at product level.",
                            "type": "boolean"
                        },
                        "stock_quantity": {
                            "required": false,
                            "description": "Stock quantity.",
                            "type": "integer"
                        },
                        "stock_status": {
                            "required": false,
                            "enum": [
                                "instock",
                                "outofstock",
                                "onbackorder"
                            ],
                            "description": "Controls the stock status of the product.",
                            "type": "string"
                        },
                        "backorders": {
                            "required": false,
                            "enum": [
                                "no",
                                "notify",
                                "yes"
                            ],
                            "description": "If managing stock, this controls if backorders are allowed.",
                            "type": "string"
                        },
                        "sold_individually": {
                            "required": false,
                            "description": "Allow one item to be bought in a single order.",
                            "type": "boolean"
                        },
                        "weight": {
                            "required": false,
                            "description": "Product weight (oz).",
                            "type": "string"
                        },
                        "dimensions": {
                            "required": false,
                            "description": "Product dimensions.",
                            "type": "object"
                        },
                        "shipping_class": {
                            "required": false,
                            "description": "Shipping class slug.",
                            "type": "string"
                        },
                        "reviews_allowed": {
                            "required": false,
                            "description": "Allow reviews.",
                            "type": "boolean"
                        },
                        "upsell_ids": {
                            "required": false,
                            "description": "List of up-sell products IDs.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "cross_sell_ids": {
                            "required": false,
                            "description": "List of cross-sell products IDs.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "parent_id": {
                            "required": false,
                            "description": "Product parent ID.",
                            "type": "integer"
                        },
                        "purchase_note": {
                            "required": false,
                            "description": "Optional note to send the customer after purchase.",
                            "type": "string"
                        },
                        "categories": {
                            "required": false,
                            "description": "List of categories.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Category ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Category name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "slug": {
                                        "description": "Category slug.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    }
                                }
                            }
                        },
                        "tags": {
                            "required": false,
                            "description": "List of tags.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Tag ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Tag name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "slug": {
                                        "description": "Tag slug.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    }
                                }
                            }
                        },
                        "images": {
                            "required": false,
                            "description": "List of images.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Image ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "date_created": {
                                        "description": "The date the image was created, in the site's timezone.",
                                        "type": "date-time",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "date_created_gmt": {
                                        "description": "The date the image was created, as GMT.",
                                        "type": "date-time",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "date_modified": {
                                        "description": "The date the image was last modified, in the site's timezone.",
                                        "type": "date-time",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "date_modified_gmt": {
                                        "description": "The date the image was last modified, as GMT.",
                                        "type": "date-time",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "src": {
                                        "description": "Image URL.",
                                        "type": "string",
                                        "format": "uri",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Image name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "alt": {
                                        "description": "Image alternative text.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "attributes": {
                            "required": false,
                            "description": "List of attributes.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Attribute ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Attribute name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "position": {
                                        "description": "Attribute position.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "visible": {
                                        "description": "Define if the attribute is visible on the \"Additional information\" tab in the product's page.",
                                        "type": "boolean",
                                        "default": false,
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "variation": {
                                        "description": "Define if the attribute can be used as variation.",
                                        "type": "boolean",
                                        "default": false,
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "options": {
                                        "description": "List of available term names of the attribute.",
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "default_attributes": {
                            "required": false,
                            "description": "Defaults variation attributes.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Attribute ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "name": {
                                        "description": "Attribute name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "option": {
                                        "description": "Selected attribute term name.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "menu_order": {
                            "required": false,
                            "description": "Menu order, used to custom sort products.",
                            "type": "integer"
                        },
                        "meta_data": {
                            "required": false,
                            "description": "Meta data.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "description": "Meta ID.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ],
                                        "readonly": true
                                    },
                                    "key": {
                                        "description": "Meta key.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "value": {
                                        "description": "Meta value.",
                                        "type": "mixed",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "apply_adjacent_buffer": {
                            "required": false,
                            "description": "Apply adjacent buffers.",
                            "type": "boolean"
                        },
                        "availability": {
                            "required": false,
                            "description": "Availability rules defined on product level.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "description": "Availability type.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "from": {
                                        "description": "Starting month/day/week inclusive.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "to": {
                                        "description": "Ending month/day/week inclusive.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "from_date": {
                                        "description": "Starting day if 'from' is a time.,",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "to_date": {
                                        "description": "Ending day if 'to' is a time.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "bookable": {
                                        "description": "Rule marks things as bookable or not, 'yes' or 'no'.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "priority": {
                                        "description": "Priority of rule.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "block_cost": {
                            "required": false,
                            "description": "Base cost of each block.",
                            "type": "number"
                        },
                        "buffer_period": {
                            "required": false,
                            "description": "Required buffer Period between bookings.",
                            "type": "integer"
                        },
                        "calendar_display_mode": {
                            "required": false,
                            "enum": [
                                "",
                                "always_visible"
                            ],
                            "description": "How the calendar will display on the product page. Valid values are 'always_visible' or ''.",
                            "type": "string"
                        },
                        "cancel_limit_unit": {
                            "required": false,
                            "enum": [
                                "month",
                                "day",
                                "hour",
                                "minute"
                            ],
                            "description": "The unit limit is defined in. Valid values are 'month', 'day', 'hour', and 'minute'.",
                            "type": "string"
                        },
                        "cancel_limit": {
                            "required": false,
                            "description": "How many limit units in advance users are allowed to cancel bookings.",
                            "type": "integer"
                        },
                        "check_start_block_only": {
                            "required": false,
                            "description": "If true only the first block in checked for availability.",
                            "type": "boolean"
                        },
                        "cost": {
                            "required": false,
                            "description": "Product cost.",
                            "type": "number"
                        },
                        "default_date_availability": {
                            "required": false,
                            "enum": [
                                "",
                                "available"
                            ],
                            "description": "If 'available' product is bookable unless made unbookable by availability rules.",
                            "type": "string"
                        },
                        "display_cost": {
                            "required": false,
                            "description": "Product cost displayed.",
                            "type": "string"
                        },
                        "duration_type": {
                            "required": false,
                            "enum": [
                                "customer",
                                "fixed"
                            ],
                            "description": "How duration is defined.",
                            "type": "string"
                        },
                        "duration_unit": {
                            "required": false,
                            "enum": [
                                "month",
                                "day",
                                "hour",
                                "minute"
                            ],
                            "description": "Unit duration is defined in.",
                            "type": "string"
                        },
                        "duration": {
                            "required": false,
                            "description": "Size in duration units of each block.",
                            "type": "integer"
                        },
                        "enable_range_picker": {
                            "required": false,
                            "description": "Customer can pick a range of days on calendar.",
                            "type": "boolean"
                        },
                        "first_block_time": {
                            "required": false,
                            "description": "Time of day first block starts.",
                            "type": "string"
                        },
                        "has_person_cost_multiplier": {
                            "required": false,
                            "description": "Will multiply cost by number of persons.",
                            "type": "boolean"
                        },
                        "has_person_qty_multiplier": {
                            "required": false,
                            "description": "Each person counts as a booking.",
                            "type": "boolean"
                        },
                        "has_person_types": {
                            "required": false,
                            "description": "Product has different types of persons.",
                            "type": "boolean"
                        },
                        "has_persons": {
                            "required": false,
                            "description": "Product has persons defined.",
                            "type": "boolean"
                        },
                        "has_resources": {
                            "required": false,
                            "description": "Product has resources defined.",
                            "type": "boolean"
                        },
                        "has_restricted_days": {
                            "required": false,
                            "description": "Product has restricted days.",
                            "type": "boolean"
                        },
                        "max_date": {
                            "required": false,
                            "description": "Max date value combined with max date unit.",
                            "type": "string"
                        },
                        "max_date_value": {
                            "required": false,
                            "description": "Max amount af max_date_units into the future a block is bookable.",
                            "type": "integer"
                        },
                        "max_date_unit": {
                            "required": false,
                            "enum": [
                                "month",
                                "day",
                                "hour",
                                "week"
                            ],
                            "description": "Units for max_date_value.",
                            "type": "string"
                        },
                        "min_date": {
                            "required": false,
                            "description": "Min date value combined with min date unit.",
                            "type": "string"
                        },
                        "min_date_value": {
                            "required": false,
                            "description": "Min amount af min_date_units into the future a block is bookable.",
                            "type": "integer"
                        },
                        "min_date_unit": {
                            "required": false,
                            "enum": [
                                "month",
                                "day",
                                "hour",
                                "week"
                            ],
                            "description": "Units for min_date_value.",
                            "type": "string"
                        },
                        "max_duration": {
                            "required": false,
                            "description": "Max duration of units a booking can be.",
                            "type": "integer"
                        },
                        "min_duration": {
                            "required": false,
                            "description": "Min duration of units a booking can be.",
                            "type": "integer"
                        },
                        "max_persons": {
                            "required": false,
                            "description": "Max persons which can be booked per booking.",
                            "type": "integer"
                        },
                        "min_persons": {
                            "required": false,
                            "description": "Min persons which can be booked per booking.",
                            "type": "integer"
                        },
                        "pricing": {
                            "required": false,
                            "description": "Pricing rules.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "description": "Date range type.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "from": {
                                        "description": "Starting month/day/week inclusive.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "to": {
                                        "description": "Ending month/day/week inclusive.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "from_date": {
                                        "description": "Starting day if 'from' is a time.,",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "to_date": {
                                        "description": "Ending day if 'to' is a time.",
                                        "type": "string",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "modifier": {
                                        "description": "How the block cost should be modified.",
                                        "type": "string",
                                        "enum": [
                                            "+",
                                            "minus",
                                            "times",
                                            "divide",
                                            "equals"
                                        ],
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "cost": {
                                        "description": "Block cost.",
                                        "type": "number",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "base_modifier": {
                                        "description": "How the base cost should be modified.",
                                        "type": "string",
                                        "enum": [
                                            "+",
                                            "minus",
                                            "times",
                                            "divide",
                                            "equals"
                                        ],
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "base_cost": {
                                        "description": "Base cost.",
                                        "type": "number",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    },
                                    "priority": {
                                        "description": "Priority of rule.",
                                        "type": "integer",
                                        "context": [
                                            "view",
                                            "edit"
                                        ]
                                    }
                                }
                            }
                        },
                        "qty": {
                            "required": false,
                            "description": "Max bookings per block.",
                            "type": "integer"
                        },
                        "requires_confirmation": {
                            "required": false,
                            "description": "Booking require confirmation.",
                            "type": "boolean"
                        },
                        "restricted_days": {
                            "required": false,
                            "description": "Days days of week bookings cannot start. Array of numeric day indexes with 0 being Sunday.",
                            "type": "array",
                            "items": {
                                "type": "integer",
                                "enum": [
                                    0,
                                    1,
                                    2,
                                    3,
                                    4,
                                    5,
                                    6
                                ]
                            }
                        },
                        "can_be_cancelled": {
                            "required": false,
                            "description": "Booking can be cancelled by customer.",
                            "type": "boolean"
                        }
                    }
                }
            ],
            "_links": {
                "self": "https://example.com/wp-json/wc-bookings/v1/products/batch"
            }
        },
        "/wc-bookings/v1/products/categories": {
            "namespace": "wc-bookings/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.",
                            "type": "string"
                        },
                        "page": {
                            "required": false,
                            "default": 1,
                            "description": "Current page of the collection.",
                            "type": "integer"
                        },
                        "per_page": {
                            "required": false,
                            "default": 10,
                            "description": "Maximum number of items to be returned in result set.",
                            "type": "integer"
                        },
                        "search": {
                            "required": false,
                            "description": "Limit results to those matching a string.",
                            "type": "string"
                        },
                        "exclude": {
                            "required": false,
                            "default": [],
                            "description": "Ensure result set excludes specific IDs.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "include": {
                            "required": false,
                            "default": [],
                            "description": "Limit result set to specific ids.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "order": {
                            "required": false,
                            "default": "asc",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "description": "Order sort attribute ascending or descending.",
                            "type": "string"
                        },
                        "orderby": {
                            "required": false,
                            "default": "name",
                            "enum": [
                                "id",
                                "include",
                                "name",
                                "slug",
                                "term_group",
                                "description",
                                "count"
                            ],
                            "description": "Sort collection by resource attribute.",
                            "type": "string"
                        },
                        "hide_empty": {
                            "required": false,
                            "default": false,
                            "description": "Whether to hide resources not assigned to any products.",
                            "type": "boolean"
                        },
                        "parent": {
                            "required": false,
                            "description": "Limit result set to resources assigned to a specific parent.",
                            "type": "integer"
                        },
                        "product": {
                            "required": false,
                            "description": "Limit result set to resources assigned to a specific product.",
                            "type": "integer"
                        },
                        "slug": {
                            "required": false,
                            "description": "Limit result set to resources with a specific slug.",
                            "type": "string"
                        }
                    }
                },
                {
                    "methods": [
                        "POST"
                    ],
                    "args": {
                        "name": {
                            "required": true,
                            "description": "Name for the resource.",
                            "type": "string"
                        },
                        "slug": {
                            "required": false,
                            "description": "An alphanumeric identifier for the resource unique to its type.",
                            "type": "string"
                        },
                        "parent": {
                            "required": false,
                            "description": "The ID for the parent of the resource.",
                            "type": "integer"
                        },
                        "description": {
                            "required": false,
                            "description": "HTML description of the resource.",
                            "type": "string"
                        },
                        "display": {
                            "required": false,
                            "default": "default",
                            "enum": [
                                "default",
                                "products",
                                "subcategories",
                                "both"
                            ],
                            "description": "Category archive display type.",
                            "type": "string"
                        },
                        "image": {
                            "required": false,
                            "description": "Image data.",
                            "type": "object"
                        },
                        "menu_order": {
                            "required": false,
                            "description": "Menu order, used to custom sort the resource.",
                            "type": "integer"
                        }
                    }
                }
            ],
            "_links": {
                "self": "https://example.com/wp-json/wc-bookings/v1/products/categories"
            }
        },
        "/wc-bookings/v1/products/categories/(?P<id>[\\d]+)": {
            "namespace": "wc-bookings/v1",
            "methods": [
                "GET",
                "POST",
                "PUT",
                "PATCH",
                "DELETE"
            ],
            "endpoints": [
                {
                    "methods": [
                        "GET"
                    ],
                    "args": {
                        "id": {
                            "required": false,
                            "description": "Unique identifier for the resource.",
                            "type": "integer"
                        },
                        "context": {
                            "required": false,
                            "default": "view",
                            "enum": [
                                "view",
                                "edit"
                            ],
                            "description": "Scope under which the request is made; determines fields present in response.",
                            "type": "string"
                        }
                    }
                },
                {
                    "methods": [
                        "POST",
                        "PUT",
                        "PATCH"
                    ],
                    "args": {
                        "id": {
                            "required": false,
                            "description": "Unique identifier for the resource.",
                            "type": "integer"
                        },
                        "name": {
                            "required": false,
                            "description": "Category name.",
                            "type": "string"
                        },
                        "slug": {
                            "required": false,
                            "description": "An alphanumeric identifier for the resource unique to its type.",
                            "type": "string"
                        },
                        "parent": {
                            "required": false,
                            "description": "The ID for the parent of the resource.",
                            "type": "integer"
                        },
                        "description": {
                            "required": false,
                            "description": "HTML description of the resource.",
                            "type": "string"
                        },
                        "display": {
                            "required": false,
                            "enum": [
                                "default",
                                "products",
                                "subcategories",
                                "both"
                            ],
                            "description": "Category archive display type.",
                            "type": "string"
                        },
                        "image": {
                            "required": false,
                            "description": "Image data.",
                            "type": "object"
                        },
                        "menu_order": {
                            "required": false,
                            "description": "Menu order, used to custom sort the resource.",
                            "type": "integer"
                        }
                    }
                },
                {
                    "methods": [
                        "DELETE"
                    ],
                    "args": {
                        "id": {
                            "required": false,
                            "description": "Unique identifier for the resource.",
                            "type": "integer"
                        },
                        "force": {
                            "required": false,
                            "default": false,
                            "description": "Required to be true, as resource does not support trashing.",
                            "type": "boolean"
                        }
                    }
                }
            ]
        },
        "/wc-bookings/v1/products/categories/batch": {
            "namespace": "wc-bookings/v1",
            "methods": [
                "POST",
                "PUT",
                "PATCH"
            ],
            "endpoints": [
                {
                    "methods": [
                        "POST",
                        "PUT",
                        "PATCH"
                    ],
                    "args": {
                        "name": {
                            "required": false,
                            "description": "Category name.",
                            "type": "string"
                        },
                        "slug": {
                            "required": false,
                            "description": "An alphanumeric identifier for the resource unique to its type.",
                            "type": "string"
                        },
                        "parent": {
                            "required": false,
                            "description": "The ID for the parent of the resource.",
                            "type": "integer"
                        },
                        "description": {
                            "required": false,
                            "description": "HTML description of the resource.",
                            "type": "string"
                        },
                        "display": {
                            "required": false,
                            "enum": [
                                "default",
                                "products",
                                "subcategories",
                                "both"
                            ],
                            "description": "Category archive display type.",
                            "type": "string"
                        },
                        "image": {
                            "required": false,
                            "description": "Image data.",
                            "type": "object"
                        },
                        "menu_order": {
                            "required": false,
                            "description": "Menu order, used to custom sort the resource.",
                            "type": "integer"
                        }
                    }
                }
            ],
            "_links": {
                "self": "https://example.com/wp-json/wc-bookings/v1/products/categories/batch"
            }
        },
        "/wc-bookings/v1/resources": {
            "namespace": "wc-bookings/v1",
            "methods": [
                "GET",
                "POST"
            ],
            "endpoints": [
                {
                    "methods": [
                        "GET"
                    ],
                    "args": {
                        "context": {
                            "required": false,
                            "default": "view",
                            "enum": [
                                "view"
                            ],
                            "description": "Scope under which the request is made; determines fields present in response.",
                            "type": "string"
                        },
                        "page": {
                            "required": false,
                            "default": 1,
                            "description": "Current page of the collection.",
                            "type": "integer"
                        },
                        "per_page": {
                            "required": false,
                            "default": 10,
                            "description": "Maximum number of items to be returned in result set.",
                            "type": "integer"
                        },
                        "search": {
                            "required": false,
                            "description": "Limit results to those matching a string.",
                            "type": "string"
                        },
                        "after": {
                            "required": false,
                            "description": "Limit response to resources published after a given ISO8601 compliant date.",
                            "type": "string"
                        },
                        "before": {
                            "required": false,
                            "description": "Limit response to resources published before a given ISO8601 compliant date.",
                            "type": "string"
                        },
                        "exclude": {
                            "required": false,
                            "default": [],
                            "description": "Ensure result set excludes specific IDs.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "include": {
                            "required": false,
                            "default": [],
                            "description": "Limit result set to specific ids.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "offset": {
                            "required": false,
                            "description": "Offset the result set by a specific number of items.",
                            "type": "integer"
                        },
                        "order": {
                            "required": false,
                            "default": "desc",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "description": "Order sort attribute ascending or descending.",
                            "type": "string"
                        },
                        "orderby": {
                            "required": false,
                            "default": "date",
                            "enum": [
                                "date",
                                "id",
                                "include",
                                "title",
                                "slug"
                            ],
                            "description": "Sort collection by object attribute.",
                            "type": "string"
                        }
                    }
                },
                {
                    "methods": [
                        "POST"
                    ],
                    "args": {
                        "availability": {
                            "required": false,
                            "type": {
                                "description": "Availability date/time range type string.",
                                "type": "string",
                                "readonly": true,
                                "context": [
                                    "view"
                                ]
                            }
                        }
                    }
                }
            ],
            "_links": {
                "self": "https://example.com/wp-json/wc-bookings/v1/resources"
            }
        },
        "/wc-bookings/v1/resources/(?P<id>[\\d]+)": {
            "namespace": "wc-bookings/v1",
            "methods": [
                "GET",
                "POST",
                "PUT",
                "PATCH",
                "DELETE"
            ],
            "endpoints": [
                {
                    "methods": [
                        "GET"
                    ],
                    "args": {
                        "id": {
                            "required": false,
                            "description": "Unique identifier for the resource.",
                            "type": "integer"
                        },
                        "context": {
                            "required": false,
                            "default": "view",
                            "enum": [
                                "view"
                            ],
                            "description": "Scope under which the request is made; determines fields present in response.",
                            "type": "string"
                        }
                    }
                },
                {
                    "methods": [
                        "POST",
                        "PUT",
                        "PATCH"
                    ],
                    "args": {
                        "id": {
                            "required": false,
                            "description": "Unique identifier for the resource.",
                            "type": "integer"
                        },
                        "availability": {
                            "required": false,
                            "type": {
                                "description": "Availability date/time range type string.",
                                "type": "string",
                                "readonly": true,
                                "context": [
                                    "view"
                                ]
                            }
                        }
                    }
                },
                {
                    "methods": [
                        "DELETE"
                    ],
                    "args": {
                        "id": {
                            "required": false,
                            "description": "Unique identifier for the resource.",
                            "type": "integer"
                        },
                        "force": {
                            "required": false,
                            "default": false,
                            "description": "Whether to bypass trash and force deletion.",
                            "type": "boolean"
                        }
                    }
                }
            ]
        },
        "/wc-bookings/v1/resources/batch": {
            "namespace": "wc-bookings/v1",
            "methods": [
                "POST",
                "PUT",
                "PATCH"
            ],
            "endpoints": [
                {
                    "methods": [
                        "POST",
                        "PUT",
                        "PATCH"
                    ],
                    "args": {
                        "availability": {
                            "required": false,
                            "type": {
                                "description": "Availability date/time range type string.",
                                "type": "string",
                                "readonly": true,
                                "context": [
                                    "view"
                                ]
                            }
                        }
                    }
                }
            ],
            "_links": {
                "self": "https://example.com/wp-json/wc-bookings/v1/resources/batch"
            }
        },
        "/wc-bookings/v1/bookings": {
            "namespace": "wc-bookings/v1",
            "methods": [
                "GET",
                "POST"
            ],
            "endpoints": [
                {
                    "methods": [
                        "GET"
                    ],
                    "args": {
                        "context": {
                            "required": false,
                            "default": "view",
                            "description": "Scope under which the request is made; determines fields present in response.",
                            "type": "string"
                        },
                        "page": {
                            "required": false,
                            "default": 1,
                            "description": "Current page of the collection.",
                            "type": "integer"
                        },
                        "per_page": {
                            "required": false,
                            "default": 10,
                            "description": "Maximum number of items to be returned in result set.",
                            "type": "integer"
                        },
                        "search": {
                            "required": false,
                            "description": "Limit results to those matching a string.",
                            "type": "string"
                        },
                        "after": {
                            "required": false,
                            "description": "Limit response to resources published after a given ISO8601 compliant date.",
                            "type": "string"
                        },
                        "before": {
                            "required": false,
                            "description": "Limit response to resources published before a given ISO8601 compliant date.",
                            "type": "string"
                        },
                        "exclude": {
                            "required": false,
                            "default": [],
                            "description": "Ensure result set excludes specific IDs.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "include": {
                            "required": false,
                            "default": [],
                            "description": "Limit result set to specific ids.",
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        },
                        "offset": {
                            "required": false,
                            "description": "Offset the result set by a specific number of items.",
                            "type": "integer"
                        },
                        "order": {
                            "required": false,
                            "default": "desc",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "description": "Order sort attribute ascending or descending.",
                            "type": "string"
                        },
                        "orderby": {
                            "required": false,
                            "default": "date",
                            "enum": [
                                "date",
                                "id",
                                "include",
                                "title",
                                "slug"
                            ],
                            "description": "Sort collection by object attribute.",
                            "type": "string"
                        }
                    }
                },
                {
                    "methods": [
                        "POST"
                    ],
                    "args": []
                }
            ],
            "_links": {
                "self": "https://example.com/wp-json/wc-bookings/v1/bookings"
            }
        },
        "/wc-bookings/v1/bookings/(?P<id>[\\d]+)": {
            "namespace": "wc-bookings/v1",
            "methods": [
                "GET",
                "POST",
                "PUT",
                "PATCH",
                "DELETE"
            ],
            "endpoints": [
                {
                    "methods": [
                        "GET"
                    ],
                    "args": {
                        "id": {
                            "required": false,
                            "description": "Unique identifier for the resource.",
                            "type": "integer"
                        },
                        "context": {
                            "required": false,
                            "default": "view",
                            "description": "Scope under which the request is made; determines fields present in response.",
                            "type": "string"
                        }
                    }
                },
                {
                    "methods": [
                        "POST",
                        "PUT",
                        "PATCH"
                    ],
                    "args": {
                        "id": {
                            "required": false,
                            "description": "Unique identifier for the resource.",
                            "type": "integer"
                        }
                    }
                },
                {
                    "methods": [
                        "DELETE"
                    ],
                    "args": {
                        "id": {
                            "required": false,
                            "description": "Unique identifier for the resource.",
                            "type": "integer"
                        },
                        "force": {
                            "required": false,
                            "default": false,
                            "description": "Whether to bypass trash and force deletion.",
                            "type": "boolean"
                        }
                    }
                }
            ]
        },
        "/wc-bookings/v1/bookings/batch": {
            "namespace": "wc-bookings/v1",
            "methods": [
                "POST",
                "PUT",
                "PATCH"
            ],
            "endpoints": [
                {
                    "methods": [
                        "POST",
                        "PUT",
                        "PATCH"
                    ],
                    "args": []
                }
            ],
            "_links": {
                "self": "https://example.com/wp-json/wc-bookings/v1/bookings/batch"
            }
        },
        "/wc-bookings/v1/products/slots": {
            "namespace": "wc-bookings/v1",
            "methods": [
                "GET"
            ],
            "endpoints": [
                {
                    "methods": [
                        "GET"
                    ],
                    "args": []
                }
            ],
            "_links": {
                "self": "https://example.com/wp-json/wc-bookings/v1/products/slots"
            }
        }
    },
    "_links": {
        "up": [
            {
                "href": "https://example.com/wp-json/"
            }
        ]
    }
}

Bookings

The Bookings API allows you to create, read, and delete individual bookings as well as list multiple bookings.

Booking properties

AttributeTypeDescription
idintegerUnique identifier for the resource.READ-ONLY
all_daybooleanA boolean describing if the booking is for an entire day.READ-ONLY
coststringTotal booking cost.READ-ONLY
customer_idintegerID of customer that purchased the booking.READ-ONLY
date_createdintegerTimestamp of the time the booking was created.READ-ONLY
date_modifiedintegerTimestamp of the time the booking was last updated.READ-ONLY
endintegerTimestamp of the end time of the booking.READ-ONLY
google_calendar_event_idstringA unique ID of a synced booking event to Google Calendar.READ-ONLY
order_idintegerThe order ID linked to the booking.READ-ONLY
order_item_idintegerThe unique order line item ID of the booking.READ-ONLY
parent_idintegerThe unique item ID of the parent post.READ-ONLY
person_countsarrayThe number of persons by person type within the booking.READ-ONLY
product_idintegerThe unique product ID linked to the booking.READ-ONLY
resource_idintegerThe unique resource ID linked to the booking.READ-ONLY
startintegerTimestamp of the start time of the booking.READ-ONLY
statusstringThe current status of the booking.READ-ONLY
local_timezonestringThe local timezone used when the booking was purchased.READ-ONLY

Create a booking

This API helps you to create a new booking.

HTTP request

POST 

/wp-json/wc-bookings/v1/bookings/

Example of creating a new booking:

curl -X POST https://example.com/wp-json/wc-bookings/v1/bookings/ \
    -u consumer_key:consumer_secret \
    -H "Content-Type: application/json" \
    -d '{
    "all_day": false,
    "cost": "300",
    "customer_id": 1,
    "date_created": 1587634157,
    "date_modified": 1587647729,
    "end": 1588534200,
    "order_item_id": 573,
    "parent_id": 0,
    "person_counts": [
        1
    ],
    "product_id": 655,
    "resource_id": 656,
    "start": 1588528800,
    "status": "publish",
    "local_timezone": "Europe/Berlin"
}'

JSON response example:

{
    "id": 688,
    "all_day": false,
    "cost": "0",
    "customer_id": 0,
    "date_created": 1587666559,
    "date_modified": 1587666559,
    "end": false,
    "google_calendar_event_id": "0",
    "order_id": 0,
    "order_item_id": 0,
    "parent_id": 0,
    "person_counts": [],
    "product_id": 0,
    "resource_id": 0,
    "start": false,
    "status": "unpaid",
    "local_timezone": "",
    "_links": {
        "self": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/bookings/688"
            }
        ],
        "collection": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/bookings"
            }
        ]
    }
}

Retrieve a booking

This API helps you to view an existing booking.

HTTP request

GET 

/wp-json/wc-bookings/v1/bookings/<id>

Example of viewing a specific booking:

curl https://example.com/wp-json/wc-bookings/v1/bookings/678 \
    -u consumer_key:consumer_secret \

JSON response example:

{
    "id": 678,
    "all_day": false,
    "cost": "200",
    "customer_id": 1,
    "date_created": 1587634157,
    "date_modified": 1587634168,
    "end": 1588534200,
    "google_calendar_event_id": "0",
    "order_id": 679,
    "order_item_id": 573,
    "parent_id": 0,
    "person_counts": [
        1
    ],
    "product_id": 655,
    "resource_id": 656,
    "start": 1588528800,
    "status": "paid",
    "local_timezone": "Europe/Berlin",
    "_links": {
        "self": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/bookings/678"
            }
        ],
        "collection": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/bookings"
            }
        ]
    }
}

List all bookings

This API lets you retrieve and view all bookings made on the site.

HTTP request

GET 

/wp-json/wc-bookings/v1/bookings/
curl https://example.com/wp-json/wc-bookings/v1/bookings/ \
    -u consumer_key:consumer_secret

JSON response example:

[
    {
        "id": 678,
        "all_day": false,
        "cost": "200",
        "customer_id": 1,
        "date_created": 1587634157,
        "date_modified": 1587634168,
        "end": 1588534200,
        "google_calendar_event_id": "0",
        "order_id": 679,
        "order_item_id": 573,
        "parent_id": 0,
        "person_counts": [
            1
        ],
        "product_id": 655,
        "resource_id": 656,
        "start": 1588528800,
        "status": "paid",
        "local_timezone": "Europe/Berlin",
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/bookings/678"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/bookings"
                }
            ]
        }
    },
    {
        "id": 677,
        "all_day": false,
        "cost": "200",
        "customer_id": 1,
        "date_created": 1587634151,
        "date_modified": 1587634167,
        "end": 1588455000,
        "google_calendar_event_id": "0",
        "order_id": 679,
        "order_item_id": 572,
        "parent_id": 0,
        "person_counts": [
            1
        ],
        "product_id": 655,
        "resource_id": 656,
        "start": 1588449600,
        "status": "paid",
        "local_timezone": "Europe/Berlin",
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/bookings/677"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/bookings"
                }
            ]
        }
    },
    {
        "id": 676,
        "all_day": false,
        "cost": "200",
        "customer_id": 1,
        "date_created": 1587634146,
        "date_modified": 1587634167,
        "end": 1587936600,
        "google_calendar_event_id": "0",
        "order_id": 679,
        "order_item_id": 571,
        "parent_id": 0,
        "person_counts": [
            1
        ],
        "product_id": 655,
        "resource_id": 656,
        "start": 1587931200,
        "status": "paid",
        "local_timezone": "Europe/Berlin",
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/bookings/676"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/bookings"
                }
            ]
        }
    }
]

Delete a booking

This API helps you to delete an existing booking, changing the booking’s status to “trash”.

HTTP request

DELETE 

/wp-json/wc-bookings/v1/bookings/<id>

Example of deleting a specific booking:

curl -X DELETE https://example.com/wp-json/wc-bookings/v1/bookings/678?force=true \
    -u consumer_key:consumer_secret \

JSON response example:

{
    "id": 678,
    "all_day": false,
    "cost": "200",
    "customer_id": 1,
    "date_created": 1587634157,
    "date_modified": 1587647316,
    "end": 1588534200,
    "google_calendar_event_id": "0",
    "order_id": 679,
    "order_item_id": 573,
    "parent_id": 0,
    "person_counts": [
        1
    ],
    "product_id": 655,
    "resource_id": 656,
    "start": 1588528800,
    "status": "trash",
    "local_timezone": "Europe/Berlin",
    "_links": {
        "self": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/bookings/678"
            }
        ],
        "collection": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/bookings"
            }
        ]
    }
}

Available parameters

ParameterTypeDescription
forcestringUse true to permanently delete the product. Default is false.

Resources

The resources API allows you to view all or individual Bookings resources.

Resource properties

AttributeTypeDescription
idintegerUnique identifier for the resource.READ-ONLY
availabilityarrayArray of availability rules.READ-ONLY
base_costintegerThe base cost of the resource.READ-ONLY
block_costintegerThe block cost of the resource.READ-ONLY
namestringThe given name for the resource.READ-ONLY
parent_idintegerThe parent post id.READ-ONLY
qtyintegerThe available quantity of resource.READ-ONLY
sort_orderintegerDetermines the sort order.READ-ONLY

Resource – availability properties

AttributeTypeDescription
typestringType of availability rule.
bookablestringWhether the product is bookable or not(“yes/no”).
priorityintegerPriority value of availability rule.
fromstringStart time of the availability rule.
tostringEnd time of availability rule.

Retrieve a resource

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

HTTP request

GET 

/wp-json/wc-bookings/v1/resources/<id>
curl https://example.com/wp-json/wc-bookings/v1/resources/99 \
    -u consumer_key:consumer_secret

JSON response example:

{
    "id": 99,
    "availability": [
        {
            "type": "time:6",
            "bookable": "yes",
            "priority": 10,
            "from": "12:00",
            "to": "20:00"
        },
        {
            "type": "time:7",
            "bookable": "yes",
            "priority": 10,
            "from": "12:00",
            "to": "20:00"
        },
        {
            "type": "custom",
            "bookable": "no",
            "priority": 9,
            "from": "2019-05-18",
            "to": "2019-05-18"
        },
        {
            "type": "custom",
            "bookable": "no",
            "priority": 9,
            "from": "2019-05-25",
            "to": "2019-05-25"
        }
    ],
    "base_cost": 10,
    "block_cost": 10,
    "name": "Gym of Your Choice",
    "parent_id": 0,
    "qty": "1",
    "sort_order": 0,
    "_links": {
        "self": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/resources/99"
            }
        ],
        "collection": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/resources"
            }
        ]
    }
}

Available parameters

ParameterTypeDescription
idintegerThe post ID of a specific resource.

List all resources

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

HTTP request

GET 

/wp-json/wc-bookings/v1/resources
curl https://example.com/wp-json/wc-bookings/v1/resources \
    -u consumer_key:consumer_secret

JSON response example:

[
    {
        "id": 99,
        "availability": [
            {
                "type": "time:6",
                "bookable": "yes",
                "priority": 10,
                "from": "12:00",
                "to": "20:00"
            },
            {
                "type": "time:7",
                "bookable": "yes",
                "priority": 10,
                "from": "12:00",
                "to": "20:00"
            },
            {
                "type": "custom",
                "bookable": "no",
                "priority": 9,
                "from": "2019-05-18",
                "to": "2019-05-18"
            },
            {
                "type": "custom",
                "bookable": "no",
                "priority": 9,
                "from": "2019-05-25",
                "to": "2019-05-25"
            }
        ],
        "base_cost": 0,
        "block_cost": 0,
        "name": "The Second Best Gym, San Jose",
        "parent_id": 0,
        "qty": "1",
        "sort_order": 0,
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/resources/657"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/resources"
                }
            ]
        }
    },
    {
        "id": 98,
        "availability": [
            {
                "type": "time:6",
                "bookable": "yes",
                "priority": 10,
                "from": "18:00",
                "to": "22:00"
            },
            {
                "type": "time:7",
                "bookable": "yes",
                "priority": 10,
                "from": "18:00",
                "to": "22:00"
            }
        ],
        "base_cost": 0,
        "block_cost": 0,
        "name": "The Best Gym, Los Angeles",
        "parent_id": 0,
        "qty": "1",
        "sort_order": 0,
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/resources/656"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/resources"
                }
            ]
        }
    }
]

Bookable Products

The products API allows you to read, update, and delete individual bookable products as well as list all bookable products.

Bookable Product properties

AttributeTypeDescription
idintegerUnique identifier for the product.READ-ONLY
namestringProduct name.
slugstringProduct slug.
permalinkstringProduct URL.
date_createddate-timeThe date the product was created, in the site’s timezone.
date_created_gmtdate-timeThe date the product was created, as GMT.
date_modifieddate-timeThe date the product was last modified, in the site’s timezone.
date_modified_gmtdate-timeThe date the product was last modified, as GMT.
typestringProduct type. Options: simplegroupedexternal and variable. Default is simple.
statusstringProduct status (post status). Options: draftpendingprivate and publish. Default is publish.
featuredbooleanFeatured product. Default is
catalog_visibilitystringCatalog visibility. Options: visiblecatalogsearch and hidden. Default is visible.
descriptionstringProduct description.
short_descriptionstringProduct short description.
skustringUnique identifier.
pricestringCurrent product price.
regular_pricestringProduct regular price.
sale_pricestringProduct sale price.
date_on_sale_fromdate-timeStart date of sale price, in the site’s timezone.
date_on_sale_from_gmtdate-timeStart date of sale price, as GMT.
date_on_sale_todate-timeEnd date of sale price, in the site’s timezone.
date_on_sale_to_gmtdate-timeEnd date of sale price, as GMT.
price_htmlstringPrice formatted in HTML.
on_salebooleanShows if the product is on sale.
purchasablebooleanShows if the product can be bought.
total_salesintegerAmount of sales.
virtualbooleanIf the product is virtual. Default is false.
downloadablebooleanIf the product is downloadable. Default is false.
downloadsarrayList of downloadable files.
download_limitintegerNumber of times downloadable files can be downloaded after purchase. Default is -1.
download_expiryintegerNumber of days until access to downloadable files expires. Default is -1.
external_urlstringProduct external URL. Only for external products.
button_textstringProduct external button text. Only for external products.
tax_statusstringTax status. Options: taxableshipping and none. Default is taxable.
tax_classstringTax class.
manage_stockbooleanStock management at product level. Default is false.
stock_quantityintegerStock quantity.
stock_statusstringControls the stock status of the product. Options: instockoutofstockonbackorder. Default is instock.
backordersstringIf managing stock, this controls if backorders are allowed. Options: nonotify and yes. Default is no.
backorders_allowedbooleanShows if backorders are allowed.
backorderedbooleanShows if the product is on backordered.
sold_individuallybooleanAllow one item to be bought in a single order. Default is false.
weightstringProduct weight.
dimensionsobjectProduct dimensions.
shipping_requiredbooleanShows if the product need to be shipped.
shipping_taxablebooleanShows whether or not the product shipping is taxable.
shipping_classstringShipping class slug.
shipping_class_idintegerShipping class ID.
reviews_allowedbooleanAllow reviews. Default is true.
average_ratingstringReviews average rating.
rating_countintegerAmount of reviews that the product have.
related_idsarrayList of related products IDs.
upsell_idsarrayList of up-sell products IDs.
cross_sell_idsarrayList of cross-sell products IDs.
parent_idintegerProduct parent ID.
purchase_notestringOptional note to send the customer after purchase.
categoriesarrayList of categories.
tagsarrayList of tags.
imagesarrayList of images.
attributesarrayList of attributes.
default_attributesarrayDefaults variation attributes.
variationsarrayList of variations IDs.
grouped_productsarrayList of grouped products ID.
menu_orderintegerMenu order, used to custom sort products.
meta_dataarrayMeta data.
apply_adjacent_bufferbooleanUse adjacent buffering for calculating availability.
availabilityarrayList of custom availability rules.
block_costintegerBlock cost of the bookable product.
buffer_periodintegerTime(minutes) to apply a buffer between bookings.
calendar_display_modestringCalendar display mode on the product page.
cancel_limit_unitstringThe unit type for the cancellation limit.
cancel_limitintegerThe length of the cancellation limit.
check_start_block_onlybooleanCheck availability only from the starting block.
costintegerThe base cost of the bookable product.
default_date_availabilitystringMake the bookable product available by default.
display_coststringString override for the booking display cost.
duration_typestringThe product’s block duration(fixed or customer-defined).
duration_unitstringThe product’s block duration unit type(minutes, hours, days).
durationintegerThe value of the block duration unit.
enable_range_pickerbooleanEnable date range selection on product pages.
first_block_timestringSet a beginning time in which availability is calculated.
has_person_cost_multiplierbooleanMultiply booking costs by number of persons.
has_person_qty_multiplierbooleanTreat each person as a booking.
has_person_typesbooleanEnable person types for the product.
has_personsbooleanEnable persons for the product.
has_resourcesbooleanEnable resources for the product.
has_restricted_daysstringDays of week are disabled for availability (“1” or “0”).
restricted_daysobjectDays of the week which are disabled, “0” through “6”.
max_durationintegerMaximum number of blocks per booking.
min_durationintegerMinimum number of blocks per booking.
max_personsintegerMaximum number of persons per booking.
min_personsintegerMinimum number of persons per booking.
person_typesobjectThe person types attached to product, linked by ID.
requires_confirmationbooleanRequire admin confirmation for bookings of this product.
resource_labelstringLabel shown on product page for resource selection.
resource_base_costsobjectThe base cost per resource attached to product, linked by ID.
resource_block_costsobjectThe block cost per resource attached to product, linked by ID.
resource_idsobjectThe resources attached to product, linked by ID.
resources_assignmentobjectHow resources are chosen, either “automatic” or “customer”.
can_be_cancelledbooleanAllow cancellation of bookings.
user_can_cancelbooleanAllow customer cancellation of bookings.

Bookable Product – max_date properties

AttributeTypeDescription
valueintegerValue of the maximum date bookings can be made in the future.
unitstringUnit type(“month, day”) for maximum future booking date.

Bookable Product – min_date properties

AttributeTypeDescription
valueintegerValue of the minimum date bookings can be made in the future.
unitstringUnit type(“month, day”) for minimum future booking date.

Bookable Product – pricing properties

AttributeTypeDescription
typestringThe custom pricing rule type.
coststringCustom block cost.
modifierstringModifier type for calculating block cost.
coststringCustom base cost.
fromstringMinimum value to apply cost rule.
tostringMaximum value to apply cost rule.
base_modifierstringModifier type for calculating base cost.

Retrieve a bookable product

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

HTTP request

GET 

/wp-json/wc-bookings/v1/products/<id>
curl https://example.com/wp-json/wc-bookings/v1/products/655 \
    -u consumer_key:consumer_secret

JSON response example:

{
    "id": 655,
    "name": "Fitness Photo Shoot",
    "slug": "fitness-photo-shoot",
    "permalink": "https://example.com/product/fitness-photo-shoot/",
    "date_created": "2020-04-09T13:38:30",
    "date_created_gmt": "2020-04-09T13:38:30",
    "date_modified": "2020-04-22T19:04:49",
    "date_modified_gmt": "2020-04-22T19:04:49",
    "type": "booking",
    "status": "publish",
    "featured": false,
    "catalog_visibility": "visible",
    "description": "",
    "short_description": "",
    "sku": "",
    "price": "200",
    "regular_price": "",
    "sale_price": "",
    "date_on_sale_from": null,
    "date_on_sale_from_gmt": null,
    "date_on_sale_to": null,
    "date_on_sale_to_gmt": null,
    "price_html": "From: <span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">&#36;</span>200.00</span>",
    "on_sale": false,
    "purchasable": true,
    "total_sales": 4,
    "virtual": true,
    "downloadable": false,
    "downloads": [],
    "download_limit": -1,
    "download_expiry": -1,
    "external_url": "",
    "button_text": "",
    "tax_status": "taxable",
    "tax_class": "",
    "manage_stock": false,
    "stock_quantity": null,
    "stock_status": "instock",
    "backorders": "no",
    "backorders_allowed": false,
    "backordered": false,
    "sold_individually": true,
    "weight": "",
    "dimensions": {
        "length": "",
        "width": "",
        "height": ""
    },
    "shipping_required": false,
    "shipping_taxable": false,
    "shipping_class": "",
    "shipping_class_id": 0,
    "reviews_allowed": true,
    "average_rating": "0.00",
    "rating_count": 0,
    "related_ids": [
        658,
        588,
        523,
        673,
        659
    ],
    "upsell_ids": [],
    "cross_sell_ids": [],
    "parent_id": 0,
    "purchase_note": "",
    "categories": [
        {
            "id": 15,
            "name": "Uncategorized",
            "slug": "uncategorized"
        }
    ],
    "tags": [],
    "images": [],
    "attributes": [],
    "default_attributes": [],
    "variations": [],
    "grouped_products": [],
    "menu_order": 0,
    "meta_data": [
        {
            "id": 18087,
            "key": "_wc_booking_base_cost",
            "value": "0"
        },
        {
            "id": 18117,
            "key": "_wc_booking_resouce_label",
            "value": ""
        },
        {
            "id": 18134,
            "key": "_product_addons",
            "value": []
        },
        {
            "id": 18135,
            "key": "_product_addons_exclude_global",
            "value": "0"
        },
        {
            "id": 18895,
            "key": "_nyp",
            "value": "no"
        },
        {
            "id": 18896,
            "key": "_suggested_price",
            "value": ""
        },
        {
            "id": 18897,
            "key": "_min_price",
            "value": ""
        },
        {
            "id": 18898,
            "key": "_hide_nyp_minimum",
            "value": "no"
        },
        {
            "id": 18899,
            "key": "_maximum_price",
            "value": ""
        },
        {
            "id": 18900,
            "key": "_wcopc",
            "value": "no"
        }
    ],
    "apply_adjacent_buffer": false,
    "availability": [],
    "block_cost": 0,
    "buffer_period": 30,
    "calendar_display_mode": "always_visible",
    "cancel_limit_unit": "month",
    "cancel_limit": 1,
    "check_start_block_only": false,
    "cost": 200,
    "default_date_availability": "non-available",
    "display_cost": "",
    "duration_type": "fixed",
    "duration_unit": "minute",
    "duration": 90,
    "enable_range_picker": false,
    "first_block_time": "",
    "has_person_cost_multiplier": false,
    "has_person_qty_multiplier": false,
    "has_person_types": false,
    "has_persons": true,
    "has_resources": true,
    "has_restricted_days": "",
    "max_date": {
        "value": 6,
        "unit": "month"
    },
    "max_date_value": 6,
    "max_date_unit": "month",
    "max_duration": 1,
    "max_persons": 2,
    "min_date": {
        "value": 0,
        "unit": "month"
    },
    "min_date_value": 0,
    "min_date_unit": "month",
    "min_duration": 1,
    "min_persons": 1,
    "person_types": [],
    "pricing": [
        {
            "type": "persons",
            "cost": "",
            "modifier": "",
            "base_cost": "60",
            "base_modifier": "",
            "from": "2",
            "to": "2"
        }
    ],
    "qty": 1,
    "requires_confirmation": false,
    "resource_label": "Shoot Location",
    "resource_base_costs": {
        "656": "",
        "657": "50"
    },
    "resource_block_costs": {
        "656": "",
        "657": ""
    },
    "resource_ids": [
        656,
        657
    ],
    "resources_assignment": "customer",
    "restricted_days": {
        "0": "0",
        "6": "6"
    },
    "can_be_cancelled": false,
    "user_can_cancel": false,
    "_links": {
        "self": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/products/655"
            }
        ],
        "collection": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/products"
            }
        ]
    }
}

List all bookable products

This API helps you to view all published bookable products.

HTTP request

GET 

/wp-json/wc-bookings/v1/products
curl https://example.com/wp-json/wc-bookings/v1/products \
    -u consumer_key:consumer_secret

JSON response example:

[
    {
        "id": 680,
        "name": "Personal Trainer Session",
        "slug": "personal-trainer-session",
        "permalink": "https://example.com/product/personal-trainer-session/",
        "date_created": "2020-04-23T10:12:27",
        "date_created_gmt": "2020-04-23T10:12:27",
        "date_modified": "2020-04-23T10:13:20",
        "date_modified_gmt": "2020-04-23T10:13:20",
        "type": "booking",
        "status": "publish",
        "featured": false,
        "catalog_visibility": "visible",
        "description": "",
        "short_description": "",
        "sku": "",
        "price": "100",
        "regular_price": "",
        "sale_price": "",
        "date_on_sale_from": null,
        "date_on_sale_from_gmt": null,
        "date_on_sale_to": null,
        "date_on_sale_to_gmt": null,
        "price_html": "From: <span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">&#36;</span>100.00</span>",
        "on_sale": false,
        "purchasable": true,
        "total_sales": 0,
        "virtual": true,
        "downloadable": false,
        "downloads": [],
        "download_limit": -1,
        "download_expiry": -1,
        "external_url": "",
        "button_text": "",
        "tax_status": "taxable",
        "tax_class": "",
        "manage_stock": false,
        "stock_quantity": null,
        "stock_status": "instock",
        "backorders": "no",
        "backorders_allowed": false,
        "backordered": false,
        "sold_individually": true,
        "weight": "",
        "dimensions": {
            "length": "",
            "width": "",
            "height": ""
        },
        "shipping_required": false,
        "shipping_taxable": false,
        "shipping_class": "",
        "shipping_class_id": 0,
        "reviews_allowed": true,
        "average_rating": "0.00",
        "rating_count": 0,
        "related_ids": [
            659,
            663,
            655,
            673,
            523
        ],
        "upsell_ids": [],
        "cross_sell_ids": [],
        "parent_id": 0,
        "purchase_note": "",
        "categories": [
            {
                "id": 15,
                "name": "Uncategorized",
                "slug": "uncategorized"
            }
        ],
        "tags": [],
        "images": [],
        "attributes": [],
        "default_attributes": [],
        "variations": [],
        "grouped_products": [],
        "menu_order": 0,
        "meta_data": [
            {
                "id": 19191,
                "key": "_wc_booking_base_cost",
                "value": "0"
            },
            {
                "id": 19192,
                "key": "_wc_booking_resouce_label",
                "value": ""
            },
            {
                "id": 19193,
                "key": "_product_addons",
                "value": []
            },
            {
                "id": 19194,
                "key": "_product_addons_exclude_global",
                "value": "0"
            },
            {
                "id": 19195,
                "key": "_nyp",
                "value": "no"
            },
            {
                "id": 19196,
                "key": "_suggested_price",
                "value": ""
            },
            {
                "id": 19197,
                "key": "_min_price",
                "value": ""
            },
            {
                "id": 19198,
                "key": "_hide_nyp_minimum",
                "value": "no"
            },
            {
                "id": 19199,
                "key": "_maximum_price",
                "value": ""
            },
            {
                "id": 19200,
                "key": "_wcopc",
                "value": "no"
            }
        ],
        "apply_adjacent_buffer": false,
        "availability": [],
        "block_cost": 0,
        "buffer_period": 30,
        "calendar_display_mode": "always_visible",
        "cancel_limit_unit": "month",
        "cancel_limit": 1,
        "check_start_block_only": false,
        "cost": 100,
        "default_date_availability": "non-available",
        "display_cost": "",
        "duration_type": "fixed",
        "duration_unit": "minute",
        "duration": 90,
        "enable_range_picker": false,
        "first_block_time": "",
        "has_person_cost_multiplier": false,
        "has_person_qty_multiplier": false,
        "has_person_types": false,
        "has_persons": true,
        "has_resources": true,
        "has_restricted_days": "",
        "max_date": {
            "value": 6,
            "unit": "month"
        },
        "max_date_value": 6,
        "max_date_unit": "month",
        "max_duration": 1,
        "max_persons": 2,
        "min_date": {
            "value": 0,
            "unit": "month"
        },
        "min_date_value": 0,
        "min_date_unit": "month",
        "min_duration": 1,
        "min_persons": 1,
        "person_types": [],
        "pricing": [
            {
                "type": "persons",
                "cost": "",
                "modifier": "",
                "base_cost": "60",
                "base_modifier": "",
                "from": "2",
                "to": "2"
            }
        ],
        "qty": 1,
        "requires_confirmation": false,
        "resource_label": "Training Location",
        "resource_base_costs": {
            "656": "",
            "657": "50"
        },
        "resource_block_costs": {
            "656": "",
            "657": ""
        },
        "resource_ids": [
            656,
            657
        ],
        "resources_assignment": "customer",
        "restricted_days": {
            "0": "0",
            "6": "6"
        },
        "can_be_cancelled": false,
        "user_can_cancel": false,
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/products/680"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/products"
                }
            ]
        }
    },
    {
        "id": 655,
        "name": "Fitness Photo Shoot",
        "slug": "fitness-photo-shoot",
        "permalink": "https://example.com/product/fitness-photo-shoot/",
        "date_created": "2020-04-09T13:38:30",
        "date_created_gmt": "2020-04-09T13:38:30",
        "date_modified": "2020-04-22T19:04:49",
        "date_modified_gmt": "2020-04-22T19:04:49",
        "type": "booking",
        "status": "publish",
        "featured": false,
        "catalog_visibility": "visible",
        "description": "",
        "short_description": "",
        "sku": "",
        "price": "200",
        "regular_price": "",
        "sale_price": "",
        "date_on_sale_from": null,
        "date_on_sale_from_gmt": null,
        "date_on_sale_to": null,
        "date_on_sale_to_gmt": null,
        "price_html": "From: <span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">&#36;</span>200.00</span>",
        "on_sale": false,
        "purchasable": true,
        "total_sales": 4,
        "virtual": true,
        "downloadable": false,
        "downloads": [],
        "download_limit": -1,
        "download_expiry": -1,
        "external_url": "",
        "button_text": "",
        "tax_status": "taxable",
        "tax_class": "",
        "manage_stock": false,
        "stock_quantity": null,
        "stock_status": "instock",
        "backorders": "no",
        "backorders_allowed": false,
        "backordered": false,
        "sold_individually": true,
        "weight": "",
        "dimensions": {
            "length": "",
            "width": "",
            "height": ""
        },
        "shipping_required": false,
        "shipping_taxable": false,
        "shipping_class": "",
        "shipping_class_id": 0,
        "reviews_allowed": true,
        "average_rating": "0.00",
        "rating_count": 0,
        "related_ids": [
            510,
            522,
            523,
            663,
            673
        ],
        "upsell_ids": [],
        "cross_sell_ids": [],
        "parent_id": 0,
        "purchase_note": "",
        "categories": [
            {
                "id": 15,
                "name": "Uncategorized",
                "slug": "uncategorized"
            }
        ],
        "tags": [],
        "images": [],
        "attributes": [],
        "default_attributes": [],
        "variations": [],
        "grouped_products": [],
        "menu_order": 0,
        "meta_data": [
            {
                "id": 18087,
                "key": "_wc_booking_base_cost",
                "value": "0"
            },
            {
                "id": 18117,
                "key": "_wc_booking_resouce_label",
                "value": ""
            },
            {
                "id": 18134,
                "key": "_product_addons",
                "value": []
            },
            {
                "id": 18135,
                "key": "_product_addons_exclude_global",
                "value": "0"
            },
            {
                "id": 18895,
                "key": "_nyp",
                "value": "no"
            },
            {
                "id": 18896,
                "key": "_suggested_price",
                "value": ""
            },
            {
                "id": 18897,
                "key": "_min_price",
                "value": ""
            },
            {
                "id": 18898,
                "key": "_hide_nyp_minimum",
                "value": "no"
            },
            {
                "id": 18899,
                "key": "_maximum_price",
                "value": ""
            },
            {
                "id": 18900,
                "key": "_wcopc",
                "value": "no"
            }
        ],
        "apply_adjacent_buffer": false,
        "availability": [],
        "block_cost": 0,
        "buffer_period": 30,
        "calendar_display_mode": "always_visible",
        "cancel_limit_unit": "month",
        "cancel_limit": 1,
        "check_start_block_only": false,
        "cost": 200,
        "default_date_availability": "non-available",
        "display_cost": "",
        "duration_type": "fixed",
        "duration_unit": "minute",
        "duration": 90,
        "enable_range_picker": false,
        "first_block_time": "",
        "has_person_cost_multiplier": false,
        "has_person_qty_multiplier": false,
        "has_person_types": false,
        "has_persons": true,
        "has_resources": true,
        "has_restricted_days": "",
        "max_date": {
            "value": 6,
            "unit": "month"
        },
        "max_date_value": 6,
        "max_date_unit": "month",
        "max_duration": 1,
        "max_persons": 2,
        "min_date": {
            "value": 0,
            "unit": "month"
        },
        "min_date_value": 0,
        "min_date_unit": "month",
        "min_duration": 1,
        "min_persons": 1,
        "person_types": [],
        "pricing": [
            {
                "type": "persons",
                "cost": "",
                "modifier": "",
                "base_cost": "60",
                "base_modifier": "",
                "from": "2",
                "to": "2"
            }
        ],
        "qty": 1,
        "requires_confirmation": false,
        "resource_label": "Shoot Location",
        "resource_base_costs": {
            "656": "",
            "657": "50"
        },
        "resource_block_costs": {
            "656": "",
            "657": ""
        },
        "resource_ids": [
            656,
            657
        ],
        "resources_assignment": "customer",
        "restricted_days": {
            "0": "0",
            "6": "6"
        },
        "can_be_cancelled": false,
        "user_can_cancel": false,
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/products/655"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/products"
                }
            ]
        }
    }
]

Available parameters

ParameterTypeDescription
resourceintegerResource ID attached to a bookable product.
pageintegerCurrent page of the collection. Default is 1.
per_pageintegerMaximum number of items to be returned in result set. Default is 10.
searchstringLimit results to those matching a string.
afterstringLimit response to resources published after a given ISO8601 compliant date.
beforestringLimit response to resources published before a given ISO8601 compliant date.
excludearrayEnsure result set excludes specific IDs.
includearrayLimit result set to specific ids.
offsetintegerOffset the result set by a specific number of items.
orderstringOrder sort attribute ascending or descending. Options: asc and desc. Default is desc.
orderbystringSort collection by object attribute. Options: dateidincludetitle and slug. Default is date.
parentarrayLimit result set to those of particular parent IDs.
parent_excludearrayLimit result set to all items except those of a particular parent ID.
slugstringLimit result set to products with a specific slug.
statusstringLimit result set to products assigned a specific status. Options: anydraftpendingprivate and publish. Default is any.
typestringLimit result set to products assigned a specific type. Options: simplegroupedexternal and variable.
skustringLimit result set to products with a specific SKU.
featuredbooleanLimit result set to featured products.
categorystringLimit result set to products assigned a specific category ID.
tagstringLimit result set to products assigned a specific tag ID.
shipping_classstringLimit result set to products assigned a specific shipping class ID.
attributestringLimit result set to products with a specific attribute.
attribute_termstringLimit result set to products with a specific attribute term ID (required an assigned attribute).
tax_classstringLimit result set to products with a specific tax class. Default options: standardreduced-rate and zero-rate.
on_salebooleanLimit result set to products on sale.
min_pricestringLimit result set to products based on a minimum price.
max_pricestringLimit result set to products based on a maximum price.
stock_statusstringLimit result set to products with specified stock status. Options: instockoutofstock and onbackorder.

Update a bookable product

This API helps you to update an existing bookable product.

HTTP request

PUT 

/wp-json/wc-bookings/v1/products/<id>

Example of updating an existing booking:

curl -X PUT https://example.com/wp-json/wc-bookings/v1/products/684 \
    -u consumer_key:consumer_secret \
    -d '{
    "name": "Fitness Video Shoot",
    "cost": 50,
    "featured": true,
    "requires_confirmation": true
    }'

JSON response example:

{
    "id": 684,
    "name": "Fitness Video Shoot",
    "slug": "product-2",
    "permalink": "https://example.com/product/product-2/",
    "date_created": "2020-04-23T13:38:43",
    "date_created_gmt": "2020-04-23T13:38:43",
    "date_modified": "2020-04-23T13:43:58",
    "date_modified_gmt": "2020-04-23T13:43:58",
    "type": "booking",
    "status": "publish",
    "featured": true,
    "catalog_visibility": "visible",
    "description": "",
    "short_description": "",
    "sku": "",
    "price": "50",
    "regular_price": "",
    "sale_price": "",
    "date_on_sale_from": null,
    "date_on_sale_from_gmt": null,
    "date_on_sale_to": null,
    "date_on_sale_to_gmt": null,
    "price_html": "<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">&#36;</span>50.00</span>",
    "on_sale": false,
    "purchasable": true,
    "total_sales": 0,
    "virtual": false,
    "downloadable": false,
    "downloads": [],
    "download_limit": -1,
    "download_expiry": -1,
    "external_url": "",
    "button_text": "",
    "tax_status": "taxable",
    "tax_class": "",
    "manage_stock": false,
    "stock_quantity": null,
    "stock_status": "instock",
    "backorders": "no",
    "backorders_allowed": false,
    "backordered": false,
    "sold_individually": true,
    "weight": "",
    "dimensions": {
        "length": "",
        "width": "",
        "height": ""
    },
    "shipping_required": true,
    "shipping_taxable": true,
    "shipping_class": "",
    "shipping_class_id": 0,
    "reviews_allowed": true,
    "average_rating": "0",
    "rating_count": 0,
    "related_ids": [
        663,
        523,
        680,
        655,
        510
    ],
    "upsell_ids": [],
    "cross_sell_ids": [],
    "parent_id": 0,
    "purchase_note": "",
    "categories": [
        {
            "id": 15,
            "name": "Uncategorized",
            "slug": "uncategorized"
        }
    ],
    "tags": [],
    "images": [],
    "attributes": [],
    "default_attributes": [],
    "variations": [],
    "grouped_products": [],
    "menu_order": 0,
    "meta_data": [],
    "apply_adjacent_buffer": false,
    "availability": [],
    "block_cost": 0,
    "buffer_period": 0,
    "calendar_display_mode": "always_visible",
    "cancel_limit_unit": "month",
    "cancel_limit": 1,
    "check_start_block_only": false,
    "cost": 50,
    "default_date_availability": "",
    "display_cost": "",
    "duration_type": "fixed",
    "duration_unit": "day",
    "duration": 1,
    "enable_range_picker": false,
    "first_block_time": "",
    "has_person_cost_multiplier": false,
    "has_person_qty_multiplier": false,
    "has_person_types": false,
    "has_persons": false,
    "has_resources": false,
    "has_restricted_days": "",
    "max_date_value": 12,
    "max_date_unit": "month",
    "max_duration": 1,
    "max_persons": 1,
    "min_date_value": 0,
    "min_date_unit": "day",
    "min_duration": 1,
    "min_persons": 1,
    "person_types": [],
    "pricing": [],
    "qty": 1,
    "requires_confirmation": true,
    "resource_label": "",
    "resource_base_costs": [],
    "resource_block_costs": [],
    "resource_ids": [],
    "resources_assignment": "",
    "restricted_days": "",
    "can_be_cancelled": false,
    "user_can_cancel": false,
    "_links": {
        "self": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/products/684"
            }
        ],
        "collection": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/products"
            }
        ]
    }
}

Available parameters

ParameterTypeDescription
resource_idsarrayResource IDs attached to a bookable product.
parentarraySet parent post ID.
slugstringSet bookable product slug.
statusstringChange status of bookable product. Options: anydraftpendingprivate and publish. Default is any.
featuredbooleanSet bookable product as a featured product.
categoriesarraySet the categories assigned to the bookable product.
tagsarraySet the tags assigned to the bookable product.
tax_classstringSet tax class assigned to the bookable product. Default options: standardreduced-rate and zero-rate.
on_salebooleanSet bookable product on sale.
stock_statusstringSet product stock status. Options: instockoutofstock and onbackorder.
apply_adjacent_bufferbooleanUse adjacent buffering for calculating availability.
availabilityarrayList of custom availability rules.
block_costintegerBlock cost of the bookable product.
buffer_periodintegerTime(minutes) to apply a buffer between bookings.
calendar_display_modestringCalendar display mode on the product page.
cancel_limit_unitstringThe unit type for the cancellation limit.
cancel_limitintegerThe length of the cancellation limit.
check_start_block_onlybooleanCheck availability only from the starting block.
costintegerThe base cost of the bookable product.
default_date_availabilitystringMake the bookable product available by default.
display_coststringString override for the booking display cost.
duration_typestringThe product’s block duration(fixed or customer-defined).
duration_unitstringThe product’s block duration unit type(minutes, hours, days).
durationintegerThe value of the block duration unit.
enable_range_pickerbooleanEnable date range selection on product pages.
first_block_timestringSet a beginning time in which availability is calculated.
has_person_cost_multiplierbooleanMultiply booking costs by number of persons.
has_person_qty_multiplierbooleanTreat each person as a booking.
has_person_typesbooleanEnable person types for the product.
has_personsbooleanEnable persons for the product.
has_resourcesbooleanEnable resources for the product.
has_restricted_daysstringDays of week are disabled for availability (“1” or “0”).
restricted_daysobjectDays of the week which are disabled, “0” through “6”.
max_durationintegerMaximum number of blocks per booking.
min_durationintegerMinimum number of blocks per booking.
max_personsintegerMaximum number of persons per booking.
min_personsintegerMinimum number of persons per booking.
person_typesobjectThe person types attached to product, linked by ID.
requires_confirmationbooleanRequire admin confirmation for bookings of this product.
resource_labelstringLabel shown on product page for resource selection.
resource_base_costsobjectThe base cost per resource attached to product, linked by ID.
resource_block_costsobjectThe block cost per resource attached to product, linked by ID.
resource_idsobjectThe resources attached to product, linked by ID.
resources_assignmentobjectHow resources are chosen, either “automatic” or “customer”.
can_be_cancelledbooleanAllow cancellation of bookings.
user_can_cancelbooleanAllow customer cancellation of bookings.

Delete a bookable product

This API helps you to delete an existing bookable product, changing the post status to “trash”.

HTTP request

DELETE 

/wp-json/wc-bookings/v1/bookings/products/<id>

Example of deleting a specific booking:

curl -X DELETE https://example.com/wp-json/wc-bookings/v1/bookings/products/678 \
    -u consumer_key:consumer_secret \

JSON response example:

{
    "id": 684,
    "name": "Fitness Video Shoot",
    "slug": "product-2",
    "permalink": "https://example.com/product/product-2/",
    "date_created": "2020-04-23T13:38:43",
    "date_created_gmt": "2020-04-23T13:38:43",
    "date_modified": "2020-04-23T13:49:55",
    "date_modified_gmt": "2020-04-23T13:49:55",
    "type": "booking",
    "status": "publish",
    "featured": true,
    "catalog_visibility": "visible",
    "description": "",
    "short_description": "",
    "sku": "",
    "price": "50",
    "regular_price": "",
    "sale_price": "",
    "date_on_sale_from": null,
    "date_on_sale_from_gmt": null,
    "date_on_sale_to": null,
    "date_on_sale_to_gmt": null,
    "price_html": "<span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">&#36;</span>50.00</span>",
    "on_sale": false,
    "purchasable": true,
    "total_sales": 0,
    "virtual": false,
    "downloadable": false,
    "downloads": [],
    "download_limit": -1,
    "download_expiry": -1,
    "external_url": "",
    "button_text": "",
    "tax_status": "taxable",
    "tax_class": "",
    "manage_stock": false,
    "stock_quantity": null,
    "stock_status": "instock",
    "backorders": "no",
    "backorders_allowed": false,
    "backordered": false,
    "sold_individually": true,
    "weight": "",
    "dimensions": {
        "length": "",
        "width": "",
        "height": ""
    },
    "shipping_required": true,
    "shipping_taxable": true,
    "shipping_class": "",
    "shipping_class_id": 0,
    "reviews_allowed": true,
    "average_rating": "0",
    "rating_count": 0,
    "related_ids": [
        522,
        510,
        663,
        659,
        680
    ],
    "upsell_ids": [],
    "cross_sell_ids": [],
    "parent_id": 0,
    "purchase_note": "",
    "categories": [
        {
            "id": 15,
            "name": "Uncategorized",
            "slug": "uncategorized"
        }
    ],
    "tags": [],
    "images": [],
    "attributes": [],
    "default_attributes": [],
    "variations": [],
    "grouped_products": [],
    "menu_order": 0,
    "meta_data": [],
    "apply_adjacent_buffer": false,
    "availability": [],
    "block_cost": 0,
    "buffer_period": 0,
    "calendar_display_mode": "always_visible",
    "cancel_limit_unit": "month",
    "cancel_limit": 1,
    "check_start_block_only": false,
    "cost": 50,
    "default_date_availability": "",
    "display_cost": "",
    "duration_type": "fixed",
    "duration_unit": "day",
    "duration": 1,
    "enable_range_picker": false,
    "first_block_time": "",
    "has_person_cost_multiplier": false,
    "has_person_qty_multiplier": false,
    "has_person_types": false,
    "has_persons": false,
    "has_resources": false,
    "has_restricted_days": "",
    "max_date_value": 12,
    "max_date_unit": "month",
    "max_duration": 1,
    "max_persons": 1,
    "min_date_value": 0,
    "min_date_unit": "day",
    "min_duration": 1,
    "min_persons": 1,
    "person_types": [],
    "pricing": [],
    "qty": 1,
    "requires_confirmation": true,
    "resource_label": "",
    "resource_base_costs": [],
    "resource_block_costs": [],
    "resource_ids": [],
    "resources_assignment": "",
    "restricted_days": "",
    "can_be_cancelled": false,
    "user_can_cancel": false,
    "_links": {
        "self": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/products/684"
            }
        ],
        "collection": [
            {
                "href": "https://example.com/wp-json/wc-bookings/v1/products"
            }
        ]
    }
}

Product categories

The product categories API allows you to list all categories which have published bookable products.

Product category properties

AttributeTypeDescription
idintegerUnique identifier for the category.READ-ONLY
namestringCategory name.READ-ONLY
slugstringAn alphanumeric identifier for the category unique to its type.READ-ONLY
parentintegerThe ID for the parent of the category.READ-ONLY
descriptionstringHTML description of the category.READ-ONLY
displaystringCategory archive display type. Options: defaultproductssubcategories and both. Default is default.READ-ONLY
imageobjectImage data.READ-ONLY
menu_orderintegerMenu order, used to custom sort the category.READ-ONLY
countintegerNumber of published products for the resource.READ-ONLY

List all product categories

This API lets you retrieve all product categories which have bookable products.

GET 

/wp-json/wc-bookings/v1/products/categories
curl https://example.com/wp-json/wc-bookings/v1/products/categories \
    -u consumer_key:consumer_secret

JSON response example:

[
    {
        "id": 45,
        "name": "Bookings",
        "slug": "bookings",
        "parent": 0,
        "description": "",
        "display": "default",
        "image": null,
        "menu_order": 0,
        "count": 1,
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/products/categories/45"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/products/categories"
                }
            ]
        }
    },
    {
        "id": 15,
        "name": "Uncategorized",
        "slug": "uncategorized",
        "parent": 0,
        "description": "",
        "display": "default",
        "image": null,
        "menu_order": 0,
        "count": 13,
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/products/categories/15"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc-bookings/v1/products/categories"
                }
            ]
        }
    }
]

Available parameters

ParameterTypeDescription
contextstringScope under which the request is made; determines fields present in response. Options: view and edit. Default is view.
pageintegerCurrent page of the collection. Default is 1.
per_pageintegerMaximum number of items to be returned in result set. Default is 10.
searchstringLimit results to those matching a string.
excludearrayEnsure result set excludes specific ids.
includearrayLimit result set to specific ids.
orderstringOrder sort attribute ascending or descending. Options: asc and desc. Default is asc.
orderbystringSort collection by resource attribute. Options: idincludenameslugterm_groupdescription and count. Default is name.
hide_emptybooleanWhether to hide resources not assigned to any products. Default is false.
parentintegerLimit result set to resources assigned to a specific parent.
productintegerLimit result set to resources assigned to a specific product.
slugstringLimit result set to resources with a specific slug.

Booking Slots

The Booking Slots API allows you to query booking product slots.

Booking Slot properties

AttributeTypeDescription
product_idintegerUnique identifier for the product linked to the booking slot.READ-ONLY
datedate-timeThe date-time of the booking slot.READ-ONLY
durationintegerThe duration of the booking slot.READ-ONLY
availableintegerAvailability of the booking slot(1 or 0).READ-ONLY
bookedintegerBooking slot is already booked(1 or 0).READ-ONLY

List all booking product slots

This API helps you to view booking product slots via query arguments.

HTTP request

GET 

/wp-json/wc-bookings/v1/products/slots
curl https://example.com/wp-json/wc-bookings/v1/products/slots?min_date=2020-04-20&max_date=2020-05-01&product_ids=655 \
    -u consumer_key:consumer_secret

JSON response example:

{
    "records": [
        {
            "date": "2020-04-25T12:00",
            "duration": 90,
            "available": 1,
            "booked": 0,
            "product_id": 655
        },
        {
            "date": "2020-04-25T14:00",
            "duration": 90,
            "available": 1,
            "booked": 0,
            "product_id": 655
        },
        {
            "date": "2020-04-25T16:00",
            "duration": 90,
            "available": 1,
            "booked": 0,
            "product_id": 655
        },
        {
            "date": "2020-04-25T18:00",
            "duration": 90,
            "available": 0,
            "booked": 1,
            "product_id": 655
        },
        {
            "date": "2020-04-25T18:00",
            "duration": 90,
            "available": 1,
            "booked": 0,
            "product_id": 655
        },
        {
            "date": "2020-04-25T20:00",
            "duration": 90,
            "available": 0,
            "booked": 1,
            "product_id": 655
        },
        {
            "date": "2020-04-26T12:00",
            "duration": 90,
            "available": 1,
            "booked": 0,
            "product_id": 655
        },
        {
            "date": "2020-04-26T14:00",
            "duration": 90,
            "available": 1,
            "booked": 0,
            "product_id": 655
        },
        {
            "date": "2020-04-26T16:00",
            "duration": 90,
            "available": 1,
            "booked": 0,
            "product_id": 655
        },
        {
            "date": "2020-04-26T18:00",
            "duration": 90,
            "available": 1,
            "booked": 0,
            "product_id": 655
        }
    ],
    "count": 12
}

Available parameters

ParameterTypeDescription
   
min_datestringSet a minimum start date for booking slots retrieval.
max_datestringSet a max start date for booking slots retrieval.MANDATORY
product_idsintegerComma-separated list of product ids to search.
resource_idsintegerComma-separated list of resource ids to search.
pageintegerCurrent page of the collection. Default is 1.
per_pageintegerMaximum number of items to be returned in result set. Default is 10.
searchstringLimit results to those matching a string.
offsetintegerOffset the result set by a specific number of items.
orderstringOrder sort attribute ascending or descending. Options: asc and desc. Default is asc.
Was this article helpful?
Dislike 0
Views: 7

Cart

Log in

Create an Account
Back to Top